Turning nVidia driver on on machines that have the libraries and an NVidia card

Jurjen Bokma

June 2008

The following script can be put in /etc/init.d and linked to from /etc/rcS.d in order to modify the default Debian vesa video driver on machines that have an NVidia card and have the NVidia drivers installed:



if [ -f ${NVIDIA_LIBS_INDICATOR} ] && lspci|grep VGA|grep nVidia > /dev/null ; then
  sed -i 's%\([ \t]*Driver[ \t]\{1,\}\)"vesa"%\1"nvidia"%' ${XORG_CONF}

On Debian machines, the proper links in /etc/rcn.d can be created with the command: sudo update-rc.d nvidia defaults


The above script doesn't ensure that the drivers are actually suitable for the card, and it certainly doesn't finetune the xorg.conf for use with the NVidia card.