How to install NVIDIA drivers on a Debian system

NVIDIA in Debian

First guided posibility
NOTE: this requires that you know how to compile the kernel in Debian and how to configure the GRUB or LILO with your new kernel. If you do not know what GRUB or LILO is, than you risk to be unable to restart your computer again without learning about GRUB or LILO in details (and having a live CD...). See grub for more details.

NOTE2: this guide is not yet ready, please correct it.


 * modify the NVDIST variable to testing or stable or whatever you have. (NVDIST=testing)
 * apt-get install module-assistant to install module-assistant
 * go to [apt-get.org apt-get] and search for nvidia-kernel-common (usually "deb http://www-users.cs.umn.edu/~sdier/debian updates/wup/ " for testing and "deb http://mirror.xaranet.de/debian-backports/debian stable all" if you have a stable system)
 * add the result to /etc/apt/sources.list as usual and then do apt-get update
 * install nvidia-kernel-common with apt-get install nvidia-kernel-common
 * auto install:
 * module-assistant auto-install nvidia
 * module-assistant -k /usr/src/linux get nvidia
 * module-assistant -k /usr/src/linux build nvidia
 * module-assistant -k /usr/src/linux install nvidia
 * or manual install (only if it does not work):
 * type apt-get -t $NVDIST install nvidia-kernel-source nvidia-kernel-common
 * cd /usr/src
 * tar xzvf nvidia-kernel-source.tar.gz
 * cd /usr/src/linux
 * compiele your module like this:
 * make menuconfig or make xconfig
 * make-kpkg clean
 * make-kpkg kernel-image
 * make-kpkg modules-image
 * dpkg -i ../kernel-image-*.deb ../nvidia-kernel-*.deb to install it
 * now to finish you type: apt-get -t $NVDIST install nvidia-glx
 * addgroup --system video
 * adduser $USER video
 * grep -q ^nvidia /etc/modules || echo nvidia >> /etc/modules - auto load at boot
 * cp -p /etc/X11/xorg.conf /etc/X11/xorg.conf.bak - backup
 * edit the /etc/X11/xorg.conf file and replace in Section "Device" the name "nv" with "nvidia"
 * be sure to have in Section "Module" the line Load "glx"
 * and delete/comment with # the lines: Load "dri" and Load "GLcore" (optional)
 * restart the X server...

Official driver
Other solution is to install the official driver directly.

In this case and on a Debian system (or other new operating system with xorg), you MUSt use the command line option to the installer: --x-module-path=/usr/lib/xorg/modules/

External guides

 * (fr) andesi
 * (fr) stephane

From HowTo Wiki, a Wikia wiki.