NVidia
Latest Nvidia driver version: 290.10
Latest legacy GPU (GeForce 5) version: 173.14.31
Latest legacy GPU (GeForce 2 through GeForce 4) version: 96.43.20
Latest legacy GPU (Riva TNT through GeForce 2) version: 71.86.15
The installation of the Nvidia driver in Linux is already really easy. But some small tips for the installation never hurt ;)
Earlier I offered a script "NvInstall" for the easy installation of the Nvidia driver, but that became obsolete.
Contents |
Nvidia driver installation
Please follow these steps as root.
Note
- As of Debian 6.0 (Squeeze) the new driver/module 'nouveau' is used for the framebuffer as well as X. This conflicts with the 'nvidia' kernel module and thus 'nouveau' must be blacklisted (or uninstalled). If you follow The Debian Way this happens automatically. If you wish to use the official driver from Nvidia you must do that manually (see below for more information).
The Debian Way
If you don't need the latest driver versions for any specific reason, I recommend installing the Nvidia drivers the Debian way. This method is easier, faster and less vulnerable to kernel changes.
An extensive description is given in the Debian Wiki, especially the section about the DKMS is important. Here I'll just summarize the steps for your (and my) convenience that are specific for Debian Squeeze (and the latest Nvidia cards).
Just install some necessary tools:apt-get install linux-headers-`uname -r` nvidia-kernel-dkms
That's it already, you can now continue with the configuration of X!
Official Nvidia drivers
If you need the latest driver for any reason, please follow these steps for the installation of the official Nvidia driver.
Blacklisting 'nouveau'
This is only relevant if you use Debian GNU/Linux 6.0 (Squeeze) or later.
Because the 'nouveau' kernel module conflicts with the 'nvidia' kernel module, you will need to blacklist or uninstall it before you can begin the installation.
To accomplish this create a new file nouveau.conf in /etc/modprobe.d/ and add this line:
blacklist nouveau
When done, reboot your system and you can proceed with the Nvidia driver installation.
Installing the driver
- Download the latest driver from Nvidia, afterwards make it executable.
- Install your Kernel headers and some build tools. On Debian (Etch or later) run this:
apt-get install linux-headers-`uname -r` build-essential
- Invoke the Nvidia Installer. I, personally, prefer a few options as well (see below for an explanation):
./NVIDIA-Linux-<version>.run -a -n -N -s
- Edit your X-configuration file (usually /etc/X11/xorg.conf), I don't trust the script to do that accurately. See below for the steps.
That's it!
For more useful information make sure you read the Nvidia README[1], it is really extensive. If everything went well you should have 2D and 3D acceleration in X. Enjoy!
Explanations of the used options
- -a
- Accept the license agreement
- -n
- Don't use precompiled drivers
- -N
- Don't check the Nvidia site for precompiled modules
- -s
- Use the default answer on most questions (silent/quiet mode)
X configuration
The following steps have to be performed on your X configuration file, this is one of the following files (depending on your distribution):
- /etc/X11/xorg.conf
- /etc/X11/XF86Config-4
- /etc/X11/XF86Config
You can download my xorg.conf for comparison with yours and a better understanding of the steps below. This file also contains a configuration for a Samsung SyncMaster 215TW connected via DVI and a Logitech RX1000 and RX1500 mouse w/ evdev.
Note that there is no xorg.conf file anymore as of Debian Squeeze, so you'll have to create the file manually!
Section "Module"
- If they exist, comment these lines:
Load "GLcore"
Load "dri"
- Add this line:
Load "glx"
Section "Device"
- Look for one of these lines:
Driver "vesa"
Driver "nv"
and replace it withDriver "nvidia"
Section "DRI"
- Comment the whole section if it exists
Troubleshooting
As a general rule for troubleshooting: check the logs! In /var/log/Xorg.?.log you can find very useful information why e.g. your X-server didn't start or why the screen stays blank/black. Check especially for lines beginning with (EE).
It often also helps to start X manually from a console. Just log in as user en run startx. If you land back on the console the last messages often give a clue what went wrong.
Is 3D Acceleration working?
To check if the 3D acceleration is actually working, just start a terminal and run this command:
glxinfo|head
There should be a line direct rendering: Yes which indicates that the 3D acceleration actually works.
GCC errors
If you get GCC errors while installing the Nvidia drivers please read this information. GCC errors can happen using the Debian way as well as with the official Nvidia drivers. GCC errors occur if the compiler used to compile the kernel is not the same as used to compile the Nvidia driver module.
For example in Lenny the kernel is compiled w/ gcc-4.1 whereas gcc-4.3 is the default compiler.
To install the latest Nvidia driver in Lenny you should:
- Install gcc-4.1:
apt-get install gcc-4.1
- Use at least version 177.76 of the driver. Beta-drivers can be found on the Nvidia forums
- Run this to install:
export CC=gcc-4.1; ./NVIDIA-Linux-<version>.run -a -n -N -s
To check which compiler version was used to compile your kernel you can use the command cat /proc/version (look for the part named "gcc version").
Notes
- ↑ Found on the same page as the driver download, on the tab "Additional Information".