http://wiki.debian.org/NvidiaGraphicsDrivers
05.26.10
* Updated for latest versions.
* Moved Changelog to end of this post.
* Reviewed/edited for consistency & clarity.
* For a time nvidia-kernel-source was broken in Debian, this patched version worked in the meanwhile:
195.36.24-0 0
500 http://frickelplatz.de sid/non-free Packages
I'd like to say thanks for that!
* Debian Nvidia is now back on track for Sid & Testing
BEFORE you get started:
If you need X windows until such time that you are able to get the Nvidia driver built simply use the vesa or nv driver in /etc/X11/xorg.conf.
If you used the Nvidia installation script to install you should first use the Nvidia method to uninstall that driver before continuing on. I can't say that it will or won't cause problems.
____________________________________________________________
Available Nvidia versions:
- Code: Select all
$ date
Wed May 26 19:59:43 MDT 2010
$ apt-cache policy nvidia-kernel-source
nvidia-kernel-source:
Installed: 195.36.24-2
Candidate: 195.36.24-2
Version table:
*** 195.36.24-2 0
500 http://mirrors.xmission.com sid/non-free Packages
100 /var/lib/dpkg/status
195.36.24-1 0
500 http://mirrors.xmission.com testing/non-free Packages
195.36.24-0 0
500 http://frickelplatz.de sid/non-free Packages
173.14.09-5 0
500 http://mirrors.xmission.com stable/non-free Packages
Standard method
PART 1
Add contrib and non-free to /etc/apt/sources.list.d/sources.list (or whatever .list you use).
- Code: Select all
deb ftp://ftp.us.debian.org/debian/ sid main contrib non-free
deb ftp://ftp.us.debian.org/debian/ testing main contrib non-free
deb ftp://ftp.us.debian.org/debian/ stable main contrib non-free
You need some specific tools to build this:
- Code: Select all
apt-get update && apt-get install nvidia-kernel-source module-assistant nvidia-settings nvidia-xconfig
Build the driver:
- Code: Select all
m-a prepare && m-a a-i nvidia
apt-get install nvidia-glx
Optionally add -t switch for text mode
- Code: Select all
m-a prepare && m-a a-i -t nvidia
I'd switch to a VT at this point and stop your DM
- Code: Select all
CTRL+ALT+F1
/etc/init.d/gdm stop
If you're already using an nvidia driver you need to remove it first.
If you try to modprobe the new nvidia driver without first removing your existing nvidia driver it won't work.
- Code: Select all
rmmod nvidia
modprobe nvidia
Which driver is currently in use?
- Code: Select all
modinfo nvidia
PART 2
Obviously if you're already using the nvidia driver there is probably no need to edit xorg.conf. Just restart your login manager. If you have not yet set up xorg.conf to use the nvidia driver, create or modify your current file. An example from my laptop:
- Code: Select all
Section "Device"
Identifier "Device 0"
Driver "nvidia"
BoardName "nVidia Corporation GeForce 7150M"
BusID "PCI:0:18:0"
EndSection
Change your driver to nvidia in /etc/X11/xorg.conf or /etc/X11/XF86Config-4
- Code: Select all
nano /etc/X11/xorg.conf
CTRL+O to save
<enter>
CTRL+X to exit
Now just restart your DM.
- Code: Select all
/etc/init.d/gdm restart
OR if you use KDM
- Code: Select all
/etc/init.d/kdm restart
After you've gotten the driver to build and Xwindows working you can do a quick test for Direct Rendering (requires mesa-utils):
- Code: Select all
glxinfo|grep rendering
Also of interest is nvidia-settings.
- Code: Select all
nvidia-settings --glxinfo
Build the Nvidia driver for your new kernel before booting into it. It certainly is nice to just reboot and have Nvidia ready to go!
- Code: Select all
m-a a-i -t -k /usr/src/linux-headers-$<kernel-name-here> -l $<kernel-name-here> nvidia
Example:
- Code: Select all
m-a a-i -t -k linux-headers-2.6.31-1.dmz.2-liquorix-686 -l 2.6.31-1.dmz.2 nvidia
*TIPS* If you want to run nvidia-settings on log in (and not see the GUI) simply add nvidia-settings -l to your login script (whatever that may be for your desktop).
If you need help generating a working xorg.conf switch to a VT CTRL+ALT+F1, log in as root and issue:
- Code: Select all
nvidia-xconfig
At one time it was necessary to probe the driver.
- Code: Select all
grep -q ^nvidia /etc/modules || echo nvidia >> /etc/modules
EXPERIMENTAL REPO METHOD
This is for experienced users or at least those who do not mind fixing what they break.

Add an experimental repo to /etc/apt/sources.list
- Code: Select all
deb http://ftp.de.debian.org/debian experimental main contrib non-free
deb-src http://ftp.de.debian.org/debian experimental main contrib non-free
Get updated, install the necesary packages
- Code: Select all
apt-get update && apt-get install nvidia-kernel-source/experimental module-assistant nvidia-settings
Build the driver:
- Code: Select all
m-a prepare && m-a a-i nvidia
apt-get install nvidia-glx/experimental
I'd switch to a VT at this point and stop your DM
- Code: Select all
CTRL+ALT+F1
/etc/init.d/gdm stop
OR if you use KDM
- Code: Select all
/etc/init.d/kdm stop
If you're already using an nvidia driver you need to remove it first.
If you try to modprobe the new nvidia driver without first removing your existing nvidia driver it won't work.
- Code: Select all
rmmod nvidia
modprobe nvidia
Changelog:
2.19.07
Tidied up a bit.
Changed the subject line to be a bit more accuarate.
4.13.07
Tidied up some more.
Updated.
4.23.07
Updated.
7.6.07
Updated for latest Nvidia driver
Changed subject line again. Sorry.....
8.5.07
Checked for accuracy.
Added nvidia-xconfig.
10.7.07
Updated for latest Nvidia driver - added more detailed Howto for building driver before booting into new kernel.
09.14.08
Realtime kernel & nvidia?
See here.
12.08.08
Added contrib non-free sources.list entries
Added example xorg.conf Device section
Updated
01.12.09
Updated for latest Nvidia versions.
03.02.09
Updated for latest Nvidia versions.
09.03.09
Updated for latest Nvidia versions.
09.30.09
Updated for latest Nvidia versions.