Subversion Repositories livecd

Rev

Rev 132 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 132 Rev 134
Line 384... Line 384...
384
	    system-config-display --noui --reconfig -v | grep Trying
384
	    system-config-display --noui --reconfig -v | grep Trying
385
	fi
385
	fi
386
    fi
386
    fi
387
fi
387
fi
388
 
388
 
389
 
-
 
390
### enable NVIDIA driver (needs nvidia, nvidia-libs rpms)
389
### enable nvidia driver
391
if [ $NVIDIA ] && [ ! $NONVIDIA ]; then
390
if [ $NVIDIA ] && [ ! $NONVIDIA ]; then
392
    # serach for Nvidia Video Card
391
    # serach for Nvidia Video Card
393
    /sbin/lspci | grep VGA | grep -i -q nvidia
392
    /sbin/lspci | grep VGA | grep -i -q nvidia
394
    if [ "$?" = "0" ]; then
393
    if [ "$?" = "0" ]; then
395
	# lib or lib64 ?
394
	# nvidia-x11-drv installed?
396
	LIB=lib
-
 
397
	[ $( arch ) = "x86_64" ] && LIB=lib64
-
 
398
	# find out installed Nvidia driver version
-
 
399
	libglx=$( ls /usr/X11R6/$LIB/modules/extensions/libglx.so.1.* | head -n 1 )
-
 
400
	nvidia_version=${libglx##*.so.1.}
395
	which nvidia-xconfig >/dev/null 2>&1
401
	# enable Nvidia driver (normally done by nvidia-enable - does not work on LiveCD)
-
 
402
	echo -n "NVIDIA graphic card found. Enable the nvidia driver ${nvidia_version} ... " 
-
 
403
	NVLOG=/var/log/nvidia.log
396
	if [ "$?" = "0" ]; then
404
	# assuming that the kernel modules are already build 
397
	    # set driver to nv in case it's only vesa
405
	# link to Nvidia libs
-
 
406
	ln -sf ../../usr/X11R6/$LIB/libGL.so.1.${nvidia_version} /usr/$LIB/libGL.so
-
 
407
	ln -sf libGL.so.1.${nvidia_version} /usr/X11R6/$LIB/libGL.so
398
	    sed -i 's|"vesa"|"nv"|' /etc/X11/xorg.conf
408
	mv /usr/X11R6/$LIB/modules/extensions/libGLcore.a /usr/X11R6/$LIB/modules/extensions/xxx.libGLcore.a.saved_by_nvidia
-
 
409
	mv /usr/X11R6/$LIB/modules/extensions/libglx.a /usr/X11R6/$LIB/modules/extensions/xxx.libglx.a.saved_by_nvidia
-
 
410
	ln -sf libglx.so.1.${nvidia_version} /usr/X11R6/$LIB/modules/extensions/libglx.so
-
 
411
	# reconfigure X
399
	    # configure for nvidia driver
412
	/usr/sbin/nvidia-xconfig >> $NVLOG 2>&1
400
	    nvidia-xconfig
413
	if [ $PSI ]; then
-
 
414
	    echo 'NVIDIA=on' >> /etc/sysconfig/psi
-
 
415
	fi
401
	fi
416
	echo "ok."
-
 
417
    fi
402
    fi
418
fi
403
fi
419
 
404
 
420
### set special video driver options for Intel Mobile
405
### set special video driver options for Intel Mobile
421
 
406