Differences between revisions 88 and 89
Revision 88 as of 2008-11-04 09:25:57
Size: 43993
Comment: this is the same problem as the one described just above
Revision 89 as of 2008-11-05 09:06:05
Size: 37435
Comment: mostly update. drop sarge support (now archived)
Deletions are marked like this. Additions are marked like this.
Line 51: Line 51:
=== Target audience ===
The following method should work with Linux 2.4 or 2.6, with either stock or custom kernels, and with ["Sarge"] or ["Etch"].
Line 58: Line 55:
 * 1. Install the kernel module
 * 2. Install the user-space GLX libraries
 * 3. Configure X to use the '''nvidia''' driver
 * 4. For
ce the kernel module to load at boot

Steps 2, 3 and 4 have to be performed only once. Step 1 has to be repeated every time the kernel is changed. With the help of '''module-assistant''', '''apt-get''', and '''make-kpkg''', it is easy.
 * 1. Determine which drivers version should be installed.
 * 2.
Install the kernel module
 * 3. Install the user-space GLX libraries
 * 4. Configure X to use the '''nvidia''' driver

Steps
3 and 4 have to be performed only once. Step 2 has to be repeated every time the kernel is changed. With the help of '''module-assistant''', '''apt-get''', and '''make-kpkg''', it is easy.
Line 69: Line 66:

==== Drivers version ====
[[Anchor(Legacy)]]
The current drivers do not support some legacy NVIDIA cards. Up to now, the NVIDIA drivers dropped support for some legacy cards 3 times. However, NVIDIA maintains the last driver version released before a legacy cards support drop. This means there are currently 4 drivers series maintained by NVIDIA. The first support drop happened in 2005, so the oldest legacy drivers series (71''xx'') should support cards released before 2005 but not those released after 2005. The second support drop happened in 2006, leading to the 96''xx'' legacy drivers series. The third support drop happened in 2008, leading to the 173.14 legacy drivers series.

Both Debian Etch and Debian Lenny only contain 2 drivers series from the 4 available. Due to the lacking versions, both suites do not officially support all NVIDIA cards, although it is possible to install unofficial packages if your card requires a drivers series not available in your suite. Lenny contains the second oldest drivers series, 96.43. Etch contains a previous version of the drivers, 1.0.8776, which supports the same cards as 96.43. Additionally, Etch contains the oldest drivers series, 71xx. Lenny contains the newest legacy series, 173.14. This means that Etch lacks support for new card, while Lenny lacks support for the newest and oldest cards. The current version of the drivers is only available in Debian experimental.

The 71xx version is the only one to support RIVA TNT, RIVA TNT2/TNT2 Pro, RIVA TNT2 Ultra, Vanta/Vanta LT RIVA TNT2 Model 64/Model 64 Pro, Aladdin TNT2, GeForce 256 GeForce DDR, Quadro, GeForce2 GTS/GeForce2 Pro, GeForce2 Ti GeForce2 Ultra, and Quadro2 Pro. The current version - which is ulterior to the latest version available in Etch - does not support GeForce2 and GeForce4 card.

Debian distributes several versions of the drivers using several packages with different names. For example, user-space libraries from the current series are in the '''nvidia-glx''' package. In Etch, the older drivers are in the '''nvidia-glx-legacy''' package. However, with time, the current drivers become legacy drivers, so the '''nvidia-glx''' package in Etch is not current anymore.

Use current drivers if possible. Supported cards in Etch are listed in [http://http.download.nvidia.com/XFree86/Linux-x86/1.0-8776/README/appendix-a.html Appendix A of NVIDIA's 1.0-8776 driver README] by NVIDIA chip name and Device PCI ID. If you do not use Etch, you can determine which cards are supported by consulting [http://us.download.nvidia.com/XFree86/Linux-x86/173.14.09/README/appendix-a.html Appendix A of NVIDIA's 173.14.09 driver README].

To find the name of a card, you can try '''lspci'''. To determine which version you should use, you can run [attachment:nvidia-legacy-check.sh this script], which will propose to set a VERSION variable which the rest of the instructions will refer to.
Line 77: Line 89:
and check if the output looks like 2.*.*-small number-architecture (e.g. 2.4.27-2-386 or 2.6.8-2-k7). If it does, you're most likely running a stock kernel.

===== Legacy drivers? =====
[[Anchor(Legacy)]]
Debian 4.0, or Etch, (released in 2007), has separate packages for older nvidia card drivers; these packages all have "legacy" in the name.

Debian 3.1, or Sarge, (released in 2005), predates the "legacy" split; Sarge users should skip to the [#Methods Methods section].

Etch has two versions of NVIDIA's proprietary drivers: current and legacy. For example, user-space libraries for newer GPUs are in the '''nvidia-glx''' package, and the older GPU drivers are in '''nvidia-glx-legacy''' package.

In post-Etch versions of Debian Unstable, ("Sid"), the legacy driver itself was forked into two versions: a 71xx and a 96xx Version.

The 71xx version supports RIVA TNT, RIVA TNT2/TNT2 Pro, RIVA TNT2 Ultra, Vanta/Vanta LT RIVA TNT2 Model 64/Model 64 Pro, Aladdin TNT2, GeForce 256 GeForce DDR, Quadro, GeForce2 GTS/GeForce2 Pro, GeForce2 Ti GeForce2 Ultra, and Quadro2 Pro.

The 96xx version supports GeForce2 MX/MX 400, GeForce2 MX 100/200, GeForce2 Go, Quadro2 MXR/EX/Go GeForce4 MX 460, GeForce4 MX 440, GeForce4 MX 420, GeForce4 MX 440-SE GeForce4 440 Go, GeForce4 420 Go, GeForce4 420 Go 32M, GeForce4 460 Go Quadro4 550 XGL, GeForce4 440 Go 64M, Quadro NVS, Quadro4 500 GoGL, GeForce4 410 Go 16M, GeForce4 MX 440 with AGP8X, GeForce4 MX 440SE with AGP8X GeForce4 MX 420 with AGP8, GeForce4 MX 4000, Quadro4 580 XGL, Quadro NVS 280 SD, Quadro4 380 XGL, Quadro NVS 50 PCI, GeForce2 Integrated GPU, GeForce4 MX Integrated GPU, GeForce3, GeForce3 Ti 200, GeForce3 Ti 500, Quadro DCC, GeForce4 Ti 4600 GeForce4 Ti 4400, GeForce4 Ti 4200, Quadro4 900 XGL, Quadro4 750 XGL, Quadro4 700 XGL, GeForce4 Ti 4800, GeForce4 Ti 4200 with AGP8X, GeForce4 Ti 4800 SE, GeForce4 4200 Go, Quadro4 980 XGL, Quadro4 780 XGL, and Quadro4 700 GoGL.

Use current drivers if possible. Supported cards in Etch are listed in [http://http.download.nvidia.com/XFree86/Linux-x86/1.0-8776/README/appendix-a.html Appendix A of NVIDIA's 1.0-8776 driver README] by NVIDIA chip name and Device PCI ID. Supported cards in post-Etch versions of Debian Unstable ("Sid") are listed in [http://us.download.nvidia.com/XFree86/Linux-x86/173.14.09/README/appendix-a.html Appendix A of NVIDIA's 173.14.09 driver README].

To find the name of an unknown card, try '''lspci'''; or run [attachment:nvidia-legacy-check.sh this script] to see if the current drivers would work.
and check if the output looks like 2.*.*-small number-architecture (e.g. or 2.6.18-5-486). If it does, you're most likely running a stock kernel.
Line 105: Line 99:
It needs module-assistant, gcc, and nvidia-kernel-common. To install them with apt-get:
{{{
# apt-get install module-assistant gcc nvidia-kernel-common
}}}
Then run:
{{{
# m-a update
}}}
and
{{{
# m-a prepare
}}}
Run the following command, but substitute ''nvidia'' by ''nvidia-kernel-legacy-source'' if you want to install the [#Legacy legacy drivers] OR ''nvidia-kernel-legacy-XXxx'' if you are using Sid replacing XXxx one of the packages listed [#Legacy here].
{{{
# m-a auto-install nvidia
}}}
And that's it. If all went well, your '''nvidia''' kernel module is now built and installed; you may [#Libraries proceed to step 2]. If not, read the rest of this section.
It needs module-assistant and nvidia-kernel-common. To install them with apt-get:
{{{
# apt-get install module-assistant nvidia-kernel-common
}}}
Run the following command:
{{{
# m-a auto-install nvidia-kernel${VERSION}-source
}}}
And that's it. If all went well, your '''nvidia''' kernel module is now built and installed; you may [#Libraries proceed to step 3]. If not, read the rest of this section.
Line 134: Line 120:
====== Use module-assistant (lenny) ======
This should be an updated guide to the above section which applies to lenny. -- AndresMejia Tue, 10 Jun 2008 20:17:06 -0400

Note: If you are running 32 bit applications with 3d acceleration, get the nVidia drivers from their website (as explained below)
It seems the 32 bit compatibility is not included in the Debian .deb versions and they will not benefit from the driver.

First you'll need to edit your {{{sources.list}}} file to use the contrib and non-free section of the archive.
{{{
$ nano /etc/apt/sources.list
}}}

Edit the file so that it contains this snippet
{{{
deb http://ftp.<country_code>.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.<country_code>.debian.org/debian/ lenny main contrib non-free

deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free
}}}

Once you've updated the {{{sources.list}}} file, update.
{{{
$ apt-get update
}}}

Now you'll need to install some needed packages. Currently, two packages have to be manually downloaded from the archive as they have not entered testing yet.
{{{
$ apt-get install module-assistant nvidia-kernel-common nvidia-xconfig
$ cd /tmp
$ wget -c http://ftp.<country_code>.debian.org/debian/pool/non-free/n/nvidia-graphics-drivers/nvidia-kernel-source_<version>_<arch>.deb
$ wget -c http://ftp.<country_code>.debian.org/debian/pool/non-free/n/nvidia-graphics-drivers/nvidia-glx_<version>_<arch>.deb
$ dpkg -i *.deb
$ apt-get -f install
}}}
BUG: There is a bug when you 'apt-get install nvidia-kernel-common' you are asked to insall 40+ packages. (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=303521)

FIX: This not a actual fix, but rather a work around. Type 'apt-get -o 'APT::Install-Recommends="false"' install nvidia-kernel-common'.

NOTE: The last step is just a quick way to satisfy the dependencies of the manually downloaded packages, since the next to last step will fail because of missing dependencies.

Now go into the {{{/usr/src}}} directory and extract the nvidia-kernel tarball.
{{{
$ cd /usr/src
$ tar -xjf nvidia-kernel.tar.bz2
}}}

Now you're ready to use the module-assistant tools to build the drivers.
{{{
$ m-a update
$ m-a --non-inter prepare
$ m-a auto-install nvidia
}}}
NOTE: m-a prepare will install for you some necessary packages like gcc and the linux-kernel-headers appropriate for your system.

You should now have an {{{nvidia-kernel-<$(uname -r)>}}} package installed in your system. Check by using this command.
{{{
$ dpkg -s nvidia-kernel-$(uname -r)
}}}

Now update your {{{xorg.conf}}} file using {{{nvidia-xconfig}}}.
{{{
$ nvidia-xconfig
}}}

NOTE: Using {{{nvidia-xconfig}}} for the first time will probably give you an error such as this.
{{{
VALIDATION ERROR: Data incomplete in file /etc/X11/xorg.conf.
                  Device section "Configured Video Device" must have a
                  Driver line.
}}}
You can simply run {{{nvidia-xconfig}}} again to resolve this.
Line 208: Line 122:
This method is easy if you're running a recent stock kernel for which a pre-built module is available; it will not work at all if you're running a custom kernel or Debian 3.1 amd64. If the module-assistant method doesn't work for you and there are pre-built modules available for your kernel, use this method.

In Sarge, pre-built modules are only available for kernel 2.4.27, Sarge's default kernel. There are no pre-built modules for 2.6.8. If you don't know your kernel version, run
This method is easy if you're running a recent stock kernel for which a pre-built module is available; it will not work at all if you're running a custom kernel or Debian 4 with Linux 2.6.24. There are pre-built modules available for all the kernels installed by default by Debian Etch and Lenny. If the module-assistant method doesn't work for you and there are pre-built modules available for your kernel, use this method.

If you don't know your kernel version, run
Line 214: Line 128:
If there is a pre-built module for your kernel, install its package. The name starts with "nvidia-kernel-". This is followed by "legacy-" if you want to install the [#Legacy legacy drivers]. The name ends by the identifier of your stock kernel package. For example, to install the current drivers with apt-get:
{{{
# apt-get install nvidia-kernel-$(uname -r)
If there is a pre-built module for your kernel, install its package. The name starts with "nvidia-kernel-". This is followed by an indication of the drivers series you want (this string is empty for "current" drivers). The name ends by the identifier of your stock kernel package. For example with apt-get:
{{{
# apt-get install nvidia-kernel${VERSION}-$(uname -r)
Line 225: Line 139:
1. Install the kernel module source. It comes in the ''nvidia-kernel-source'' package for the current drivers, or in ''nvidia-kernel-legacy-source'' if you want to install the [#Legacy legacy drivers]. For example, to install the current drivers with apt-get:
{{{
# apt-get install nvidia-kernel-source
}}}
This will install a source tarball in ''/usr/src/nvidia-kernel[-legacy]-source.tar.gz''. Unpack it in ''/usr/src''. For example, to unpack the source tarball of the current driver:
1. Install the kernel module source. For example, with apt-get:
{{{
# apt-get install nvidia-kernel${VERSION}-source
}}}
This will install a source tarball in ''/usr/src/''. Unpack it in ''/usr/src'':
Line 232: Line 146:
# tar -zxf nvidia-kernel-source.tar.gz
}}}
This will unpack the kernel module sources into ''/usr/src/modules/nvidia-kernel[-legacy]''.
# tar -xf nvidia-kernel-*.tar.gz
}}}
This will unpack the kernel module sources into ''/usr/src/modules/nvidia-kernel[something]''.
Line 256: Line 170:
The result of the above command will be two Debian package files, { kernel | linux }-image-*.deb and nvidia-kernel-*.deb, both in /usr/src or /usr/src/modules. The first file contains your kernel, and the second contains your '''nvidia''' kernel module. The result of the above command will be two Debian package files, linux-image-*.deb and nvidia-kernel-*.deb, both in /usr/src or /usr/src/modules. The first file contains your kernel, and the second contains your '''nvidia''' kernel module.
Line 263: Line 177:
# dpkg -i /path/kernel-image-*.deb /path/nvidia-kernel-*.deb
}}}
Use the fileglobs as above if you want, but watch out that you don't have more than one kernel image or nvidia-kernel package file lying around in /usr/src. If you do you'll get a blizzard of error messages. It's probably better to explicitly type all of the version information rendered as * above.
# dpkg -i /path/linux-image-*.deb /path/nvidia-kernel-*.deb
}}}
Use the fileglobs as above if you want, but watch out that you don't have more than one Linux image or nvidia-kernel package file lying around in /usr/src. If you do you'll get a blizzard of error messages. It's probably better to explicitly type all of the version information rendered as * above.
Line 273: Line 187:
Use this method if you're running a stock kernel and the two first methods failed or didn't apply to you. module-assistant should automate this process. In other words, if the first method failed but this one works, you should probably submit a bug report against module-assistant. Use this method if you're running a stock kernel and the two first methods failed. module-assistant should automate this process. In other words, if the first method failed but this one works, you should probably submit a bug report against module-assistant.
Line 319: Line 233:
Install the ''nvidia-glx'' package for the current drivers, or ''nvidia-glx-legacy'' if you want to install the [#Legacy legacy drivers]. For example, to install the current drivers with apt-get:
{{{
# apt-get install nvidia-glx
Install the user-space libraries package. For example, with apt-get:
{{{
# apt-get install nvidia-glx${VERSION}
Line 349: Line 263:
Run the following command.
For XFree86 (Sarge):
{{{
# dpkg-reconfigure xserver-xfree86
}}}
For X.org (Etch):
Run
Line 358: Line 267:
This will ask you a long series of questions, some of which you should have already seen at least when you installed Debian. You only need to change your answer to 2 of those questions. When asked to choose an X server driver, choose '''nvidia'''. Then, when asked to select X server modules, deselect (uncheck) GLCore (if present) and dri, and select (check) glx.

Finally, if you use Sarge, you may want to verify that your X config file was written. To do so, run:
{{{
$ ls -l /etc/X11/XF86Config-4
}}}
and check that the date printed is current. If this is not the case, you'll have to use the manual way. Otherwise, your X configuration should have been updated for the use of the '''nvidia''' driver.
This will ask you questions, some of which you should have already seen at least when you installed Debian. You only need to change your answer to 2 of those questions. When asked to choose an X server driver, choose '''nvidia'''. Then, when asked to select X server modules, deselect (uncheck) GLCore (if present) and dri, and select (check) glx.
Line 367: Line 270:
This method will allow you to preserve customizations you've made to your X config file.
Etch users should simply install and use '''nvidia-xconfig'''. The rest of this section is for Sarge users.

Watch out for typos, and check your X log if things go wrong.

Edit your X config file:
 * In the "Module" section, be sure that you have a line:
 {{{
 Load "glx"
 }}}
 and remove or comment out (prepend with a #) any lines that refer to the "dri" or "GLCore" modules.
 * In the "Device" section for your video card, change the driver (normally nv or vesa) to '''nvidia''':
 {{{
 Driver "nvidia"
 }}}

==== Force the kernel module to load at boot ====
Since X is going to use the '''nvidia''' driver, it will need to have the '''nvidia''' kernel module loaded.
Ensure that the nvidia module gets inserted into your kernel automatically at boot, by adding it to /etc/modules if it's not already there:
{{{
# grep -q ^nvidia /etc/modules || echo nvidia >> /etc/modules
}}}
Install and run '''nvidia-xconfig'''.
Line 391: Line 273:
This is the easiest but probably most crucial step. If it doesn't work for some reason, and you want to get back to X before fixing the problem, you'll have to revert step 3 (by choosing a free X driver again). When you think you've fixed the problem, you can do step 3 again and retry starting X. Remember that even if it works you'll want to read the [#Upgrades next section] to avoid future trouble. And if it doesn't...check the Troubleshooting section. This is the easiest but probably most crucial step. If it doesn't work for some reason, and you want to get back to X before fixing the problem, you'll have to revert step 4 (by choosing a free X driver again). When you think you've fixed the problem, you can do step 3 again and retry starting X. Remember that even if it works you'll want to read the [#Upgrades next section] to avoid future trouble. And if it doesn't...check the Troubleshooting section.
Line 416: Line 298:
Step 1 builds an '''nvidia''' kernel module for a specific kernel and NVIDIA driver version. You'll have to do it for each kernel, and you'll have to redo it for each new driver version. Step 2 builds an '''nvidia''' kernel module for a specific kernel and NVIDIA driver version. You'll have to do it for each kernel, and you'll have to redo it for each new driver version.
Line 420: Line 302:
If you're using Sarge, this won't happen until you upgrade to the next Debian release, but it will happen then.

In all cases, this will happen when the nvidia-glx package is upgraded. All versions of nvidia-glx depend on an nvidia-kernel-'''version''' virtual package. When you followed step 1, you built or installed a package providing this virtual package. However, if you upgrade nvidia-glx before doing step 1 again, APT will attempt to satisfy the virtual package by installing a prebuilt kernel module. You'll notice some new nvidia-kernel-'''something''' package being installed (or upgraded if you already had it). This may be what you want if you're using a 2.4 kernel. If you're not, APT will be installing a useless package. Instead of letting it do, do step 1 again to get an appropriate kernel module. Then, the virtual package will be satisfied and you can upgrade nvidia-glx safely and without installing a useless package.
If you're using Debian stable, this won't happen until you upgrade to the next Debian release, but it will happen then.

In all cases, this will happen when the nvidia-glx package is upgraded. All versions of nvidia-glx depend on an nvidia-kernel-'''version''' virtual package. When you followed step 2, you built or installed a package providing this virtual package. However, if you upgrade nvidia-glx before doing step 2 again, APT will attempt to satisfy the virtual package by installing a basically randomly chosen prebuilt kernel module. You'll notice some new nvidia-kernel-'''something''' package being installed (or upgraded if you already had it). Instead of letting it do, do step 2 again to get an appropriate kernel module. Then, the virtual package will be satisfied and you can upgrade nvidia-glx safely and without installing a useless package.
Line 427: Line 309:
If you install a kernel with a new ABI, a new kernel image package will be installed. For example, if the 2.4.27 kernel gets a new ABI and you currently use kernel-image-2.4.27-2-386, you will have to install the kernel-image-2.4.27-3-386 package to get the new kernel (the "-2" and "-3" part of the package names indicate respectively that these packages contain the second and third ABI of Debian's 2.4.27 i386 stock kernels). This may happen without your intervention when upgrading your system if the kernel-image-2.4-386 meta package is installed.
This can also happen if you install a different kernel. For example, you can have both 2.4.27 and 2.6.8 in Sarge. If you did step 1 for 2.4.27 only, you'll need to do it for 2.6.8 too.
You'll notice that a new kernel is installed when a new kernel-image-'''something''' or linux-image-'''something''' package is installed. X will fail to start after you booted a new kernel until you perform step 1 for that kernel.
If you install a kernel with a new ABI, a new kernel image package will be installed. For example, if the 2.6.18 kernel gets a new ABI and you currently use kernel-image-2.6.18-4-486, you will have to install the kernel-image-2.6.18-5-486 package to get the new kernel (the "-4" and "-5" part of the package names indicate respectively that these packages contain the fourth and fifth ABI of Debian's 2.6.18 i386 stock kernels). This may happen without your intervention when upgrading your system if the linux-image-2.6-486 meta package is installed.
This can also happen if you install a different kernel. For example, you can have both 2.6.18 and 2.6.24 in Etch. If you did step 1 for 2.6.18 only, you'll need to do it for 2.6.24 too.
You'll notice that a new kernel is installed when a new linux-image-'''something''' package is installed. X will fail to start after you booted a new kernel until you perform step 2 for that kernel.
Line 447: Line 329:
 * Make sure that your problem is related to the '''nvidia''' driver. Try switching back to a free driver: go back and repeat step 3, but this time select driver '''nv''' or '''vesa''' instead of '''nvidia'''. Then restart your X server. If it still won't start, then you have other problems that precede NVIDIA's drivers.  * Make sure that your problem is related to the '''nvidia''' driver. Try switching back to a free driver: go back and repeat step 4, but this time select driver '''nv''' or '''vesa''' instead of '''nvidia'''. Then restart your X server. If it still won't start, then you have other problems that precede NVIDIA's drivers.
Line 520: Line 402:

== Trouble with Linux 2.6 ==
Watch the kernel version you use.

Any reasonably recent version of Linux 2.4 should work with the NVIDIA drivers. However, Linux 2.6 is the development branch of Linux and has changing kernel interfaces. Each release of the NVIDIA 3D drivers can only warrant compatibility with already released Linux versions. This flaw comes from the fact that NVIDIA's 3D drivers are non-free and therefore can't enter the main Linux kernel tree. It is consequently possible that a version of the NVIDIA 3D drivers working with the Linux 2.6 minor version already in Debian enters unstable and testing, and then that a new minor version of Linux 2.6, incompatible with the version of the NVIDIA 3D drivers in Debian, enters Debian. In this case, problems that result from the incompatibilities should be reported in the [http://bugs.debian.org Bug Tracking System] against the NVIDIA 3D drivers. So, before installing the drivers for the first time, or before upgrading your kernel, check if the versions of both are compatible. If the NVIDIA drivers are more recent than Linux, there should be no problem. In the opposite case, consider checking whether problems were reported, in the Debian BTS are somewhere else. If you install the drivers or upgrade your kernel despite potential incompatibilities and then get undocumented issues, check if the issues exist with a compatible Linux version.

Despite this, you should try using a recent Linux kernel. Many old versions have bugs that are problematic with the NVIDIA 3D drivers. In summary, try using either the Linux 2.6 version in your Debian release, or the latest Linux version compatible with the drivers.
  * This issue should be confirmed. If this solution helped you, please [mailto:chealer@gmail.com?subject=Debian-NVIDIA tell the maintainer].
Line 541: Line 417:

  * This issue should be confirmed. If this solution helped you, please [mailto:chealer@gmail.com?subject=Debian-NVIDIA tell the maintainer].
Line 546: Line 424:
$ grep Driver /etc/X11/XF86Config-4 /etc/X11/xorg.conf 2>&1|grep nvidia $ grep Driver /etc/X11/xorg.conf 2>&1|grep nvidia
Line 572: Line 450:
Look in your X log file (/var/log/XFree86.0.log for XFree86, /var/log/Xorg.0.log for X.org). The X server writes a lot of information there about what configuration files it's reading, what display modes it's trying, and errors (EE) it encounters along the way. You can very often find hints there to the source of whatever problem you're having. Look in your X log file (/var/log/Xorg.0.log). The X server writes a lot of information there about what configuration files it's reading, what display modes it's trying, and errors (EE) it encounters along the way. You can very often find hints there to the source of whatever problem you're having.
Line 578: Line 456:
  * This issue should be confirmed. If this solution helped you, please [mailto:chealer@gmail.com?subject=Debian-NVIDIA tell the maintainer].
Line 580: Line 459:
If you get such a warning message on your console or in your syslog, don't worry. Your kernel is fine...or at least as fine as a kernel that can run NVIDIA's 3D driver can be. All this message means is that because your driver isn't open source, you won't get any support from the kernel maintainers if anything goes wrong with your kernel while the module is loaded. See the [http://www.tux.org/lkml/#s1-18 LKML FAQ] for more. If you get such a warning message on your console or in your syslog, don't worry. Your kernel is fine...or at least as fine as a kernel that can run NVIDIA's 3D driver can be. All this message means is that because your driver isn't open source, you won't get any support from the Linux maintainers if anything goes wrong with your kernel while the module is loaded. See the [http://www.tux.org/lkml/#s1-18 LKML FAQ] for more.
Line 588: Line 467:
  * /usr/share/doc/nvidia-glx/README.gz
  * /usr/share/doc/nvidia-kernel-source/README.Debian
  * /usr/share/doc/nvidia-glx/README.txt.gz
Line 593: Line 471:
 * [http://people.debian.org/~rdonald/index.php The Debian page of Randall Donald], the maintainer of Debian's NVIDIA packages, has news about the packaging work being done.

This document explains how to make use of NVIDIA video hardware on a ["Debian"] GNU/Linux system. The [#free following section] shortly describes the free drivers while the [#non-free rest of the document] covers the non-free but 3D-accelerated drivers.

?TableOfContents

free drivers

?Anchor(free) Debian has two free drivers that support NVIDIA cards. The vesa driver is a generic video driver. The nv driver usually gives better results. You can see which one is in use by looking at the output of

$ grep Driver /etc/X11/XF86Config-4 /etc/X11/xorg.conf 2>&1|grep 'nv\|vesa'

You can simply [wiki:ConfigureX configure X] to change the free driver to use.

However, both of these drivers do not support 3D acceleration. Only the non-free nvidia drivers support this. If you are willing to use these drivers despite the fact that they are non-free, read the following section. If you do, keep in mind that using the non-free drivers is considerably more complex and X is much more likely to break. If this happens and you have trouble getting X to work again due to the nvidia drivers, remember that simply switching back to one of the free drivers should let you run X again until you find a way to get 3D acceleration working again.

non-free drivers

?Anchor(non-free)

Why use a Debian-specific method?

To install the NVIDIA drivers, you can use either NVIDIA's official installer or the Debian driver packages. Each method has its advantages, described below. NVIDIA's installer used to be easier to use; but with the advent of module-assistant, the Debian way is probably easier. Even when building a driver module manually, in the long run the Debian way will probably save labor. The Debian way is of course the most reliable.

Unless you had issues with the Debian way, you probably just want to [#Installation skip to the Installation section]. NVIDIA's installer is already documented at other places (such as [?NvidiaGraphicsDriversNvidiaWay this one]), so the Installation section of this HOWTO only describes the Debian way.

Users who want to try the Debian way can [#Installation skip to the Installation section]. Because NVIDIA's installer is already described [?NvidiaGraphicsDriversNvidiaWay elsewhere], this HOWTO just describes the Debian way.

Whichever installation method, the [#Troubleshooting troubleshooting section] may help.

Comparison of nvidia-installer and the Debian way

Advantages of "the Debian way":

  • More automated, which saves work if the kernel is changed.
  • Uses Debian package management tools, so it's cleaner. If your system is broken after using the Debian way, this will be considered a bug and won't persist for years.
  • Can be done while X is running. (X must be restarted to apply the driver change.)
  • Users of make-kpkg should find it fits easily into their existing build procedure.

  • Users of make-kpkg who build unofficial kernel modules, (e.g. lm-sensors or fuse), have all their driver packages built with a single invocation of make-kpkg.

  • No need to download anything from nvidia.com, since the Debian packages contain all necessary parts.

Advantages of NVIDIA's official installer:

  • Most recent NVIDIA driver versions. Debian packages commonly lag behind a month or more. You can compare the [http://www.nvidia.com/object/unix.html current version] and the [http://packages.debian.org/nvidia-glx version in your Debian release] to see how much difference there is.

  • Easy to use. (But users who often rebuild their kernel might get tired of rerunning it every time -- rebuilding a kernel requires waiting through a reboot, watching the now incompatible old X server to die, navigating the installer menus, then starting X. It gets old. That's why this guide was written. :) )

  • Some users who failed using the Debian way reported that the NVIDIA installer worked.

Installation

?Anchor(Installation) Here are the instructions for installing the NVIDIA 3D drivers, the Debian way.

Overview

The NVIDIA 3D drivers consist of two parts: a kernel module, and a collection of user-space libraries. The libraries (sometimes called the "binary driver" or GLX libraries) are distributed in binary form by NVIDIA, and packaged for Debian in the nvidia-glx packages. Since NVIDIA's 3D drivers are not open source, you will need non-free APT sources to be able to install them. The kernel module (aka the "kernel interface to the binary driver") is distributed in source form (though with one binary component), and packaged for Debian in the nvidia-kernel-source packages. The version of the kernel module has to match the version of the libraries. The user libraries only have to be installed once, but the kernel module must be recompiled every time the kernel is changed. Here's what to do:

  • 0. Make sure APT has non-free and contrib sources (consult sources.list(5) manpage for help on doing this)

  • 1. Determine which drivers version should be installed.
  • 2. Install the kernel module
  • 3. Install the user-space GLX libraries
  • 4. Configure X to use the nvidia driver

Steps 3 and 4 have to be performed only once. Step 2 has to be repeated every time the kernel is changed. With the help of module-assistant, apt-get, and make-kpkg, it is easy.

Current issues

Testing users: Maintainance of this document was halted over a year ago. Filipus Klutiero plans to update before lenny's release.

Steps

Drivers version

?Anchor(Legacy) The current drivers do not support some legacy NVIDIA cards. Up to now, the NVIDIA drivers dropped support for some legacy cards 3 times. However, NVIDIA maintains the last driver version released before a legacy cards support drop. This means there are currently 4 drivers series maintained by NVIDIA. The first support drop happened in 2005, so the oldest legacy drivers series (71xx) should support cards released before 2005 but not those released after 2005. The second support drop happened in 2006, leading to the 96xx legacy drivers series. The third support drop happened in 2008, leading to the 173.14 legacy drivers series.

Both Debian Etch and Debian Lenny only contain 2 drivers series from the 4 available. Due to the lacking versions, both suites do not officially support all NVIDIA cards, although it is possible to install unofficial packages if your card requires a drivers series not available in your suite. Lenny contains the second oldest drivers series, 96.43. Etch contains a previous version of the drivers, 1.0.8776, which supports the same cards as 96.43. Additionally, Etch contains the oldest drivers series, 71xx. Lenny contains the newest legacy series, 173.14. This means that Etch lacks support for new card, while Lenny lacks support for the newest and oldest cards. The current version of the drivers is only available in Debian experimental.

The 71xx version is the only one to support RIVA TNT, RIVA TNT2/TNT2 Pro, RIVA TNT2 Ultra, Vanta/Vanta LT RIVA TNT2 Model 64/Model 64 Pro, Aladdin TNT2, ?GeForce 256 ?GeForce DDR, Quadro, ?GeForce2 GTS/GeForce2 Pro, ?GeForce2 Ti ?GeForce2 Ultra, and Quadro2 Pro. The current version - which is ulterior to the latest version available in Etch - does not support ?GeForce2 and ?GeForce4 card.

Debian distributes several versions of the drivers using several packages with different names. For example, user-space libraries from the current series are in the nvidia-glx package. In Etch, the older drivers are in the nvidia-glx-legacy package. However, with time, the current drivers become legacy drivers, so the nvidia-glx package in Etch is not current anymore.

Use current drivers if possible. Supported cards in Etch are listed in [http://http.download.nvidia.com/XFree86/Linux-x86/1.0-8776/README/appendix-a.html Appendix A of NVIDIA's 1.0-8776 driver README] by NVIDIA chip name and Device PCI ID. If you do not use Etch, you can determine which cards are supported by consulting [http://us.download.nvidia.com/XFree86/Linux-x86/173.14.09/README/appendix-a.html Appendix A of NVIDIA's 173.14.09 driver README].

To find the name of a card, you can try lspci. To determine which version you should use, you can run [attachment:nvidia-legacy-check.sh this script], which will propose to set a VERSION variable which the rest of the instructions will refer to.

Install the kernel module

Stock or Custom Kernel?

Some of the installation methods below depend on whether you're running a stock kernel, i.e. a prebuilt kernel from the Debian distribution. If you know which kind of kernel you have, you can skip to the [#Legacy following section].

By default, Debian comes with a stock kernel. If you don't know what kind of kernel you're running, then it's probably a stock kernel. If you're not sure, run

$ uname -r

and check if the output looks like 2.*.*-small number-architecture (e.g. or 2.6.18-5-486). If it does, you're most likely running a stock kernel.

Methods

?Anchor(Methods) There are four different methods for installing the kernel module.

Use module-assistant

?Anchor(Method1) This method is easy, and should work with most stock or custom kernels.

It needs module-assistant and nvidia-kernel-common. To install them with apt-get:

# apt-get install module-assistant nvidia-kernel-common

Run the following command:

# m-a auto-install nvidia-kernel${VERSION}-source

And that's it. If all went well, your nvidia kernel module is now built and installed; you may [#Libraries proceed to step 3]. If not, read the rest of this section.

You must use the same version of gcc to build your nvidia kernel module as was used to build your kernel. This might be a problem if you are running a stock kernel. If module-assistant fails, read its log output and look for messages suggesting that you need, for example, gcc-4.0 instead of gcc-4.1. Then install the corresponding package and retry auto-install.

The auto-install step is the biggest step of the procedure, and is the most likely to fail. auto-install can be divided in smaller module-assistant steps, which can help debugging:

  • get

  • build

  • install

If # m-a get nvidia; fails, try installing the nvidia-kernel-source package. If APT fails to install nvidia-kernel-source, you should go back to step 0 and make sure you didn't miss something.

If you are unable to install the module using module-assistant, try [#Method2 installing a pre-built module] if you use a stock kernel or try to [#Method3 build manually, with a custom kernel].

Install a pre-built module

?Anchor(Method2) This method is easy if you're running a recent stock kernel for which a pre-built module is available; it will not work at all if you're running a custom kernel or Debian 4 with Linux 2.6.24. There are pre-built modules available for all the kernels installed by default by Debian Etch and Lenny. If the module-assistant method doesn't work for you and there are pre-built modules available for your kernel, use this method.

If you don't know your kernel version, run

$ uname -r

If there is a pre-built module for your kernel, install its package. The name starts with "nvidia-kernel-". This is followed by an indication of the drivers series you want (this string is empty for "current" drivers). The name ends by the identifier of your stock kernel package. For example with apt-get:

# apt-get install nvidia-kernel${VERSION}-$(uname -r)

If this step succeeds, you may now [#Libraries proceed to step 2]. If there are no pre-built modules for your kernel, and [#Method1 method 1] fails, you may want to try [#Method4 method 4].

Build manually, with a custom kernel

?Anchor(Method3) Use this method if you're configuring and building a custom kernel.

1. Install the kernel module source. For example, with apt-get:

# apt-get install nvidia-kernel${VERSION}-source

This will install a source tarball in /usr/src/. Unpack it in /usr/src:

$ cd /usr/src
# tar -xf nvidia-kernel-*.tar.gz 

This will unpack the kernel module sources into /usr/src/modules/nvidia-kernel[something].

2. Configure your kernel. This step isn't documented here; if you need to learn how, see the kernel-package documentation. But in summary, what you have to do is

$ cd /usr/src/linux
# make xconfig

and then choose the options you want. Note, however, that each of the following kernel options has been reported to cause trouble with the nvidia driver:

  • Device drivers –> Graphics Support –> nVidia Riva support (FB_RIVA)

  • Device drivers –> Graphics support –> nVidia Framebuffer Support (FB_NVIDIA) (only found in kernels > 2.6.11)

  • Device drivers –> Graphics support –> VESA VGA graphics support (FB_VESA)

  • Processor Type and Features –> Local APIC support on uniprocessors (X86_UP_APIC) (not available if you have an SMP kernel, including hyperthreading)

It is therefore recommended that you disable all of the above options in your kernel configuration. If for some reason you don't disable them, and then your X display doesn't work properly with the nvidia driver, you should suspect these options as the likely cause of the trouble. For more details, see the Troubleshooting section.

3. Build the kernel and the nvidia kernel module:

$ cd /usr/src/linux
# make-kpkg clean
# make-kpkg kernel_image modules_image

For an introduction to using make-kpkg to build kernel packages, see [http://newbiedoc.sourceforge.net/system/kernel-pkg.html Creating custom kernels with Debian's kernel-package system], or [http://www.debianuniverse.com/readonline/chapter/21 Compiling Kernels the Debian Way]. See also the make-kpkg man page, for a description of other options and targets that you can use in this command.

The result of the above command will be two Debian package files, linux-image-*.deb and nvidia-kernel-*.deb, both in /usr/src or /usr/src/modules. The first file contains your kernel, and the second contains your nvidia kernel module.

At the same time, if you have sources for any other add-on kernel modules in /usr/src/modules, then the "modules_image" target will cause make-kpkg to build Debian package files for them, too. For example, if you install the fuse-source package you'll get a source archive /usr/src/fuse.tar.gz, which you can unpack to get fuse module sources in /usr/src/modules/fuse. If you've done this, then this same invocation of make-kpkg will also build a fuse module package file, /usr/src/fuse-*.deb, that's specific to your new kernel.

4. Install the new kernel and kernel module:

$ cd /usr/src
# dpkg -i /path/linux-image-*.deb /path/nvidia-kernel-*.deb

Use the fileglobs as above if you want, but watch out that you don't have more than one Linux image or nvidia-kernel package file lying around in /usr/src. If you do you'll get a blizzard of error messages. It's probably better to explicitly type all of the version information rendered as * above.

5. Boot your new kernel. Before trying to get the NVIDIA 3D drivers to work, make sure that the new kernel boots and that X starts well using a free X driver.

[#Libraries Proceed to step 2].

Build manually, with a stock kernel

?Anchor(Method4) Use this method if you're running a stock kernel and the two first methods failed. module-assistant should automate this process. In other words, if the first method failed but this one works, you should probably submit a bug report against module-assistant.

The following procedure is adapted from the instructions in /usr/share/doc/nvidia-kernel-source/README.Debian and is known to be potentially inexact.

  1. Save the release number of your kernel (e.g. 2.4.27-2-k7 or 2.6.8-1-686) in a couple of environment variables:

                export KVERS=$(uname -r)
                export KSRC=/usr/src/linux-headers-$KVERS 
  • Note that these variables are used by the build commands below, so you really do need to set and export them, as in the above commands.
  1. Install the kernel module source: run

                apt-get install nvidia-kernel-source nvidia-kernel-common 
  • This will give you a source tarball /usr/src/nvidia-kernel-source.tar.gz. Unpack it with

                cd /usr/src
                tar -zxf nvidia-kernel-source.tar.gz 
  • This will unpack the kernel module sources into /usr/src/modules/nvidia-kernel.
  1. Install the header files for your kernel:

                apt-get install linux-headers-$KVERS 
  • This will give you kernel header files in /usr/src/linux-headers-$KVERS. Be sure to check that the installed kernel image and kernel header packages have the same version number: run

                apt-cache policy kernel-image-$KVERS linux-headers-$KVERS 
  • and check that the version number listed as Installed is the same for both packages. If it isn't, find the distribution that has the version of linux-headers that you need, e.g. testing, and rerun the above installation command, adding '-t testing' (or whichever).
  1. Build the kernel module package:

                cd /usr/src/modules/nvidia-kernel
                debian/rules binary_modules 
  • The result will be a package file /usr/src/nvidia-kernel-*.deb, which contains your kernel module. Note: several users have told me recently that their nvidia package file ends up in /usr/src/modules, instead of /usr/src. I don't know yet why this happens. If this is your case, please adjust the next command appropriately.
  1. Install the kernel module:

                dpkg -i /usr/src/nvidia-kernel-*.deb 
  • Use the fileglob as above if you want, but watch out that you don't have more than one nvidia-kernel package file lying around in /usr/src. If you do you'll get a blizzard of error messages. It's probably better to explicitly type all of the version information that I rendered as * above.
  • Now proceed to step 2, below.

Install the NVIDIA user-space libraries

?Anchor(Libraries) Install the user-space libraries package. For example, with apt-get:

# apt-get install nvidia-glx${VERSION}

Note: The reason this step has to come after step 1 is that nvidia-glx depends on a virtual package called 'nvidia-kernel-$NVVERSION', where $NVVERSION is the upstream part of the version of the nvidia-glx package. This virtual package should be provided by the kernel module package that you installed in step 1; so you have to complete that step first. If the installation of nvidia-glx fails because the 'nvidia-kernel-$NVVERSION' isn't satisfied, you should probably make sure that step 1 went OK.

Configure X to use the nvidia driver

Update your X configuration. There are two ways to do this. The one you should use depends on whether you manually edited your X configuration file. If you don't know if you did, you probably didn't. If you run Sarge and choose the debconf way but you did edit your X config file, your changes will be quietly ignored. To make sure, run one of the following commands, depending on your X server.

For XFree86 (Sarge):

$ md5sum /etc/X11/XF86Config-4|diff -sq /var/lib/xfree86/XF86Config-4.md5sum -

For X.org (Etch):

$ md5sum /etc/X11/xorg.conf|diff -sq /var/lib/x11/xorg.conf.md5sum -

If the files differ, choose the second way (the manual way).

As a suggestion, save yourself some possible grief later by backing up your current X config file. For XFree86 (Sarge):

# cp -p /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.bak

For X.org (Etch):

# cp -p /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

The debconf way

Run

# dpkg-reconfigure xserver-xorg

This will ask you questions, some of which you should have already seen at least when you installed Debian. You only need to change your answer to 2 of those questions. When asked to choose an X server driver, choose nvidia. Then, when asked to select X server modules, deselect (uncheck) GLCore (if present) and dri, and select (check) glx.

The manual way

Install and run nvidia-xconfig.

Load the kernel module and restart X

This is the easiest but probably most crucial step. If it doesn't work for some reason, and you want to get back to X before fixing the problem, you'll have to revert step 4 (by choosing a free X driver again). When you think you've fixed the problem, you can do step 3 again and retry starting X. Remember that even if it works you'll want to read the [#Upgrades next section] to avoid future trouble. And if it doesn't...check the Troubleshooting section.

To avoid rebooting your system instead of just restarting X, load the nvidia module. You can do it that way:

# modprobe nvidia

Now to restart X. If you don't use a display manager, simply close your session. That should bring to a console. If it doesn't, you must be using a display manager (such as gdm, kdm or xdm). First identify which one you're using. If you don't know, it's probably gdm. You can know by checking whether a process ending with "dm" is running. Once you determined which one you use, close your session and go run the appropriate init script in a console. Here's an example for gdm:

# invoke-rc.d gdm restart

If you can't figure out how to restart X with those instructions, you can simply reboot your system. Otherwise, the keyboard shortcut Ctrl+Alt+Backspace should be reliable, despite being somewhat "unfriendly".

Check that it worked

To check that the acceleration is working, glxinfo can be used. This program is in the mesa-utils package. If

$ glxinfo |grep rendering

returns "direct rendering: Yes", acceleration is working. If it returns No, [#nodri see section "Hardware acceleration, aka direct rendering, doesn't work"]. If it returns Yes, 3D acceleration (in games such as PlanetPenguin Racer and Neverball) should work. If it works in these games but not in a particular application you expected to be able to use, [#oldgame check section "Some old game doesn't start"].

How to deal with kernel changes and driver upgrades

?Anchor(Upgrades) Steps 2 and 3 are done for good. However, you'll have to repeat step 1 in certain situations. If you don't realize such a situation happens, X will fail to start. You can take two approaches with this : either remember when this will happen and try to prevent it, or remember to come back here when your X fails to start. Either way, you're not done for life. If X fails to start because of this, you can again revert step 3 (by choosing a free X driver again) and redo it when you want to retry using the nvidia driver for X.

When

Step 2 builds an nvidia kernel module for a specific kernel and NVIDIA driver version. You'll have to do it for each kernel, and you'll have to redo it for each new driver version. If you don't know what this means, read on.

...will the NVIDIA driver version change

If you're using Debian stable, this won't happen until you upgrade to the next Debian release, but it will happen then.

In all cases, this will happen when the nvidia-glx package is upgraded. All versions of nvidia-glx depend on an nvidia-kernel-version virtual package. When you followed step 2, you built or installed a package providing this virtual package. However, if you upgrade nvidia-glx before doing step 2 again, APT will attempt to satisfy the virtual package by installing a basically randomly chosen prebuilt kernel module. You'll notice some new nvidia-kernel-something package being installed (or upgraded if you already had it). Instead of letting it do, do step 2 again to get an appropriate kernel module. Then, the virtual package will be satisfied and you can upgrade nvidia-glx safely and without installing a useless package.

...will your kernel change

If you build other modules using module-assistant, you have to redo step 1 everytime you'd have to run module-assistant for other modules, that is for every new kernel ABI. If you don't know what that means, read on.

If you install a kernel with a new ABI, a new kernel image package will be installed. For example, if the 2.6.18 kernel gets a new ABI and you currently use kernel-image-2.6.18-4-486, you will have to install the kernel-image-2.6.18-5-486 package to get the new kernel (the "-4" and "-5" part of the package names indicate respectively that these packages contain the fourth and fifth ABI of Debian's 2.6.18 i386 stock kernels). This may happen without your intervention when upgrading your system if the linux-image-2.6-486 meta package is installed. This can also happen if you install a different kernel. For example, you can have both 2.6.18 and 2.6.24 in Etch. If you did step 1 for 2.6.18 only, you'll need to do it for 2.6.24 too. You'll notice that a new kernel is installed when a new linux-image-something package is installed. X will fail to start after you booted a new kernel until you perform step 2 for that kernel.

Troubleshooting

X doesn't start

  • Make sure the nvidia module is loaded into your kernel:

     $ lsmod | grep nvidia

    If it's not, then use modprobe or modconf to load it, or else have it load automatically at boot by adding nvidia to /etc/modules.

  • Check that you have device files /dev/nvidia0 and /dev/nvidiactl:
     $ ls -l /dev/nvidia*
     crw-rw----    1 root     video    195,   0 date /dev/nvidia0
     crw-rw----    1 root     video    195, 255 date /dev/nvidiactl

    In Sarge, those files should be created by udev or devfs when the nvidia kernel module is loaded. Therefore, the absence of these files is most likely to be fixed by the previous solution. If the module is loaded but the files aren't created, you should verify that either udev or devfs is working correctly. If you use a kernel above 2.6.12, nvidia-kernel-common's /etc/init.d/nvidia-kernel is responsible for creating those files.

  • Make sure that your problem is related to the nvidia driver. Try switching back to a free driver: go back and repeat step 4, but this time select driver nv or vesa instead of nvidia. Then restart your X server. If it still won't start, then you have other problems that precede NVIDIA's drivers.

  • Maybe X cannot find/load the lib libwfb.ko. You need this lib for the Geforce 8800 cards. The lib could be in /usr/lib/xorg/modules with a different name, e. g. libnvidia-wfb.so.1.0.9746. The solution is to make a symlink like that:
     cd /usr/lib/xorg/modules
    
     ln -s libnvidia-wfb.so.1.0.9746 /usr/lib/xorg/modules/libwfb.so 

    See also (http://www.nvnews.net/vbulletin/showthread.php?t=83214)

  • If you previously used nvidia-installer and forgot to uninstall it, X may still be loading those libraries instead of the Debian ones. In your X log file with a good installation, you should see module loading lines like this:
     (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
     (II) Module glx: vendor="NVIDIA Corporation"
            compiled for 4.0.2, module version = 1.0.7184
            Module class: XFree86 Server Extension
            ABI class: XFree86 Server Extension, version 0.1
    
     (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.o
     (II) Module nvidia: vendor="NVIDIA Corporation"
            compiled for 4.0.2, module version = 1.0.7184
            Module class: XFree86 Video Driver
    
     (II) v4l driver for Video4Linux
     (II) NVIDIA X Driver  1.0-7184  Tue Aug  1 18:41:01 PDT 2006
    You need to make sure that "module version" is the same for all of these. If an incorrect module is being picked up it might look like this:
     (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
     (II) Module glx: vendor="NVIDIA Corporation"
            compiled for 4.0.2, module version = 1.0.7184
            Module class: XFree86 Server Extension
            ABI class: XFree86 Server Extension, version 0.1
    
     (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
     (II) Module nvidia: vendor="NVIDIA Corporation"
            compiled for 4.0.2, module version = 1.0.8776
            Module class: X.Org Video Driver
    
     (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X
     (EE) NVIDIA(0):     log file that the GLX module has been loaded in your X
     (EE) NVIDIA(0):     server, and that the module is the NVIDIA GLX module.  If
     (EE) NVIDIA(0):     you continue to encounter problems, Please try
     (EE) NVIDIA(0):     reinstalling the NVIDIA driver.
    If this is the case, remove the incorrect file (easiest to copy-and-paste the filename from your log as above):
     rm /usr/lib/xorg/modules/drivers/nvidia_drv.so

Lost Your Console

This may only apply to the nvidia packages in etch.

If you happen to lose your virtual terminals (Ctrl+Alt+F1) [i.e. the console is displaying garbage] after xorg starts, this might be a fix (it was for me):

# apt-get install nvidia-settings
$ nvidia-settings
click OpenGL Settings and check "Sync to VBlanc".

It should work now.

X (or the complete machine when running X) is unstable

  • Check whether you use a framebuffer, such as rivafb, nvidiafb and vesafb. The rivafb driver is known to conflict with NVIDIA's drivers. vesafb is known to work in some cases but also to be problematic in other cases. All of these drivers are compiled as modules in stock kernels, except for vesafb after 2.6.12. To see if you have one of these modules inserted in your kernel, run
     $ lsmod|grep 'rivafb\|vesafb\|nvidiafb'
    If this outputs something, get rid of the module(s) displayed.
     # rmmod rivafb vesafb nvidiafb

    will remove the modules temporarily (for this boot). If something causes one of the modules to load automatically at boot, blacklist the modules. If you are using a custom kernel, do not compile these modules in (Device drivers –> Graphics support –> nVidia Riva support (FB_RIVA), Device drivers –> Graphics support –> VESA VGA graphics support (FB_VESA) and Device drivers –> Graphics support –> nVidia Framebuffer Support (FB_NVIDIA)).

  • Several users have reported that they had hard lockups when switching virtual terminals or shutting down their X servers, until they recompiled their kernels with local APIC disabled. Local APIC support on uniprocessors (X86_UP_APIC) is enabled in stock non-SMP kernels. Note that the local APIC option isn't available if you have an SMP (e.g. hyperthreading) kernel. In that case the local APIC option probably has no effect, but one user reported that he still had success disabling it by manually editing /usr/src/linux/.config to comment out the line with CONFIG_X86_LOCAL_APIC. He also had to repeat the operation every time he reconfigured his kernel. Alternatively, you might have to turn off SMP and then disable local APIC. :(

Hardware acceleration, aka direct rendering, doesn't work

?Anchor(nodri) We've covered how to check that the installation worked in section "Check that it worked". If it doesn't, check that you adjusted your X configuration properly. You can do so by checking that

$ grep Driver /etc/X11/xorg.conf 2>&1|grep nvidia

returns something. If this is the case and X was restarted since the configuration was changed, you may be affected by [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=208198 Debian bug #208198]. You can check if this is the case by running

$ glxinfo | egrep "glx (vendor|version)" 

If you see different vendors or versions for the client and server, this is your problem. In that case you can run

# NVVER=`dpkg -s nvidia-glx|grep Version|cut -d ' ' -f2|cut -d '-' -f1`
# ln -fs /usr/lib/libGL.so.$NVVER /usr/X11R6/lib/libGL.so
# ln -fs /usr/lib/libGL.so.$NVVER /usr/X11R6/lib/libGL.so.1
# ln -fs          libGL.so.$NVVER /usr/lib/libGL.so.1.2

to fix the problem.

If that's not your problem but you get an error when trying to use OpenGL apps like glxinfo that looks like this one:

Error: Could not open /dev/nvidiactl because the permissions
are too resticitive.  Please see the FREQUENTLY ASKED QUESTIONS
section of /usr/share/doc/NVIDIA_GLX-1.0/README for steps
to correct.
Fatal signal: Segmentation Fault

you should make sure that the user running the application is in the video group.

Various problems with X

Look in your X log file (/var/log/Xorg.0.log). The X server writes a lot of information there about what configuration files it's reading, what display modes it's trying, and errors (EE) it encounters along the way. You can very often find hints there to the source of whatever problem you're having.

Some old game doesn't start

?Anchor(oldgame) If some software (probably old games) complains about missing libGL.so, try installing nvidia-glx-dev. If this doesn't help, this application is probably buggy or doesn't support your system. This document probably can't help you with these problems.

"nvidia license taints kernel"

If you get such a warning message on your console or in your syslog, don't worry. Your kernel is fine...or at least as fine as a kernel that can run NVIDIA's 3D driver can be. All this message means is that because your driver isn't open source, you won't get any support from the Linux maintainers if anything goes wrong with your kernel while the module is loaded. See the [http://www.tux.org/lkml/#s1-18 LKML FAQ] for more.

Last resort

You can check [http://www.nvnews.net/vbulletin/forumdisplay.php?f=14 the NVIDIA Linux Forum at nvnews.net] for issues not related to Debian packaging. For Debian-specific issues, you may look at the bug tracking system or ask a question on Debian help resources, such as the debian-user mailing list and #debian on irc.debian.org. If you still have a problem that you can't solve, you can write and [mailto:andrex@alumni.utexas.net?subject=Debian-NVIDIA tell the author] about it. He'll do what he can to help, subject to his knowledge and time constraints.

More information

  • For more information about the drivers, see:
    • /usr/share/doc/nvidia-glx/README.Debian
    • /usr/share/doc/nvidia-glx/README.txt.gz

    These files have loads of information about options and for troubleshooting NVIDIA's proprietary drivers. Here's an enticement for you to read them: somewhere in one of them you can find an explanation of how to suppress the NVIDIA splash screen every time you start an X server (hint: search for "NoLogo").

  • You can adjust the clock rates of your GPU and video RAM by running nvclock, nvclock_gtk, or nvclock_qt, available respectively in the nvclock, nvclock-gtk, and nvclock-qt packages. Obligatory warning: you can destroy your video hardware with these tools if you're not careful.
  • You can adjust some other, relatively obscure settings of the driver by running nvidia-settings, available in the nvidia-settings package.

About this document

This wiki page was created by Filipus Klutiero to publish an update to Andrew's Debian-nVidia HOWTO. You are free to modify this page as long as you agree to let copyright of your changes to the author. For problems, comments, or questions about the information in this document, you can [mailto:chealer@gmail.com?subject=Debian-NVIDIA write to the maintainer]. He's no expert, but he'll do his best to make the document useful.

Credits

Thanks to Andrew Schulman for publishing his HOWTO, agreeing to share his rights on it, and making the HOWTO link to this page since it stopped being maintained.

Licensing

This document is Copyright 2005, by Andrew E. Schulman. Permission is hereby granted to freely copy, distribute, and/or modify any of the contents of this document in any way and for any purpose.


CategoryXWindowSystem