Penguin
Note: You are viewing an old revision of this page. View the current version.

To get the most out of Nvidia graphics cards, you need to download the drivers from nvidia. Because of Nvidia's licencing, these usually can not be included in Linux distributions. Most distros come with the Free nv driver. This works well but only provides basic functionality. It doesn't do 3D graphics acceleration, so can not support some games.

Preparation

Read the README file available from nvidia, this has lots of good detail on installation and troubleshooting.

To install the nvidia drivers, you will probably need the kernel source files. The nvidia driver needs components customised for the particular kernel. Although the installer has some of these for common kernel versions, it usually needs to make one for your kernel, and for this it needs the kernel source. Unless you are short on disc space, it is probably a good idea to have the kernel source installed anyway, as it may be needed to build other software. Make sure the kernel source matches the kernel version you are using. You can check this using these commands (this example is from Mandrake 10.1).

$uname -r
2.6.8.1-12mdk-i686-up-64GB
$ rpm -qa | grep kernel
kernel-2.6.8.1.12mdk-1-1mdk
kernel-source-2.6-2.6.8.1-12mdk

Installation

To install the nvidia drivers, you need to shut down the X server, run the nvidia installer script, edit the X configuration file, and restart the X server. Here it is again, in a bit more detail.

  1. Shut down the XServer by issuing init 3 as the SuperUser.
  2. Run the installer: sh NVIDIA-Linux-x86-1.0-6629-pkg1.run. (Make sure you've changed to the right directory, obviously.)
  3. Accept the licence (if you agree), and follow the instructions. If this fails, read the README file again, carefully. Also check the installer log file, /var/log/nvidia-installer.log, for any error messages.
  4. Change the X configuration, usually /etc/X11/XF86Config or /etc/X11/xorg.conf according to instructions in the README. Typically you'll change Driver "nv" to Driver "nvidia", add Load "glx" in the Modules section and remove Load "dri" and Load "GLcore" from it.
  5. Start the XServer back up: init 5

You can now run glxgears in a console to see if it worked.

Troubleshooting

If the XServer doesn't start, you typically get a black screen or drop back to the command line. Be sure to check the server messages, and if necessary, the log file (/var/log/XFree.0.log or /var/log/Xorg.0.log).

If you use a "vanilla" 2.6.9 LinuxKernel, you will probably need nvidia driver version 1.0-6629 or later. 6111 and 5336 failed to compile against 2.6.9 for me (JohnMcPherson) due to a symbol that is no longer exported to modules by the kernel.