dimanche 3 février 2008

NVIDIA Auto Re-install script (Linux)

Hi !
You use NVIDIA Drivers for Linux but sometime, after an update/upgrade of Xorg or your Kernel, you need have to re-install Nvidia drivers. This is a script to auto install nvidia driver when it's needed.

/sbin/modinfo nvidia > /dev/null

# test if nvidia driver is correctly installed
if [[ -h "/usr/lib/xorg/modules/extensions/libglx.so" && $NV -eq 0 ]]
echo "NVIDIA Driver is [OK]"
echo "NVIDIA Driver is [NOTOK]
export IGNORE_CC_MISMATCH=1 # Ignore gcc version (when gcc kernel version is different with installed gcc)
/etc/init.d/gdm stop # stop gdm
sh /root/NVIDIA-Linux-* -s --no-x-check # install nvidia without any questions
/etc/init.d/gdm start # re-start gdm

1 commentaire: