Translation(s): English - Español - Français - Italiano - Русский - 简体中文
NVIDIA Proprietary Driver
This page describes how to install the NVIDIA proprietary display driver on Debian systems.
NOTE: For Apple systems, follow these steps first to prevent a black screen after installing the drivers: http://askubuntu.com/a/613573/134848
Contents
Identification
The NVIDIA graphics processing unit (GPU) series/codename of an installed video card can usually be identified using the lspci command. For example:
$ lspci -nn | grep VGA 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation G80 [GeForce 8800 GTS] [10de:0193] (rev a2)
See HowToIdentifyADevice/PCI for more information. The PCI ID can be used to verify device support.
nvidia-detect
The nvidia-detect script (nvidia-detect package in non-free) can also be used to identify the GPU and required driver:
$ nvidia-detect Detected NVIDIA GPUs: 02:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF108 [GeForce GT 430] [10de:0de1] (rev a1) Your card is supported by the default drivers. It is recommended to install the nvidia-driver package.
Drivers
The proprietary "NVIDIA Accelerated Linux Graphics Driver" provides optimized hardware acceleration of OpenGL applications via a direct-rendering X server. It is a binary-only Xorg driver requiring a Linux kernel module for its use.
Multiple precompiled driver versions are available for Debian 8 "Jessie":
Version 352.79 (supported devices)
- For Kepler/Maxwell/newer GPUs.
Note that 352.79 is currently only available in unstable, but it is installable directly from unstable on Jessie and the maintainer has committed to ensuring that this remains possible.
Version 340.65 (supported devices)
For GeForce 8xxx through 7xx GPUs.
Version 304.125 (legacy GPUs) (supported devices)
For GeForce 6xxx and 7xxx GPUs.
Four driver versions are available for Debian 7 "Wheezy":
Version 340.65 (supported devices)
For GeForce 8xxx and higher GPUs.
Version 304.125 (supported devices)
For GeForce 6xxx and higher GPUs.
Version 173.14.35 (legacy GPUs) (supported devices)
For GeForce 5xxx / GeForce FX GPUs.
Version 96.43.23 (legacy GPUs) (supported devices)
For GeForce 2, GeForce 3 and GeForce 4 GPUs.
All versions above are available only for the x86 and x86-64 architectures (Debian i386 and AMD64 ports respectively).
Installation
Debian 8 "Jessie"
As of jessie, the need for the proprietary drivers is pretty much over - nouveau now works quite well and works with dual-headed displays by simple and easy configuring from within your desktop(for KDE see System_Settings/Hardware/Display_and_Monitor/Display_Configuration) . The proprietary drivers don't provide normal logging and can be a hidden source of problems. If you are doing a distribution upgrade - you should at the very least remove all the nvidia packages from wheezy - get your desktop working with nouveau - then reinstall the nvidia packages if there is a pressing reason.
Version 352.79 (via jessie-backports)
1. Add jessie-backports to your /etc/apt/sources.list, for example:
# jessie-backports deb http://httpredir.debian.org/debian jessie-backports main contrib non-free
2. Then we can install the package nvidia-driver.
# apt-get update # apt-get install -t jessie-backports nvidia-driver
DKMS will build the nvidia module for your system.
3. Restart your system to enable the nouveau blacklist.
Version 352.55 64bit (nvidia site installer)
2015.10.14 driver, for GTX 970 and higher (supported devices).
Caution: This is not a community packaged driver. Use it at your own risk.
1. Download the installer from nvidia site (md5 hash: e97025c351e420fa62431a1774d84f40 NVIDIA-Linux-x86_64-352.55.run)
(sha1 hash: 68b0da3ddc9599618520062f48efdd55df3f458d NVIDIA-Linux-x86_64-352.55.run)
2. Install the build tools and the kernel headers:
# aptitude install linux-headers-3.16.0-4-amd64 build-essential
3. The installer complains if X server is started, so go in runlevel 3:
# init 3
4. Make the installer executable:
chmod u+x NVIDIA-Linux-x86_64-352.55.run
5. Run it:
./NVIDIA-Linux-x86_64-352.55.run
6. Accept the licence
7. Then a little warning appears about 32bit library. OK
8. Say "Yes" to run the nvidia xconfig
9. Reboot
10. Enjoy
Version 352.55 64bit (SteamOS repository)
2015.10.14 driver, for GTX 970 and higher (supported devices).
Caution: This is not a community packaged driver. Use it at your own risk.
Add SteamOS repository to /etc/apt/sources.list.d/steamos.list, for example:
deb http://repo.steampowered.com/steamos brewmaster main contrib non-free
Update the list of available packages. Install the appropriate nvidia driver and related packages from SteamOS repository:
# aptitude update # aptitude install -t brewmaster libegl1-nvidia:amd64 libgl1-nvidia-glx:amd64 libgl1-nvidia-glx:i386 libgl1-nvidia-glx-i386 libgles1-nvidia:amd64 libgles2-nvidia:amd64 libnvidia-eglcore:amd64 libnvidia-ml1:amd64 libxnvctrl0 nvidia-alternative nvidia-driver nvidia-driver-bin nvidia-kernel-dkms nvidia-modprobe nvidia-settings nvidia-vdpau-driver:amd64 xserver-xorg-video-nvidia
This will also install the recommended nvidia-driver package. DKMS will build the nvidia module for your system.
- Restart your system to enable the nouveau blacklist.
Version 340.65
For support of GeForce 8xxx and higher GPUs (supported devices). For older devices, see Version 304.125 (legacy GPUs).
Add "contrib" and "non-free" components to /etc/apt/sources.list, for example:
# Debian 8 "Jessie" deb http://httpredir.debian.org/debian/ jessie main contrib non-free
Update the list of available packages. Install the appropriate linux-headers and kernel module packages:
# aptitude update # aptitude -r install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-kernel-dkms
This will also install the recommended nvidia-driver package. DKMS will build the nvidia module for your system.
Create an Xorg server configuration file.
- Restart your system to enable the nouveau blacklist.
Version 304.125 (legacy GPUs)
For support of GeForce 6xxx and 7xxx GPUs (supported devices).
Add "contrib" and "non-free" components to /etc/apt/sources.list, for example:
# Debian 8 "Jessie" deb http://httpredir.debian.org/debian/ jessie main contrib non-free
Update the list of available packages. Install the appropriate linux-headers and kernel module packages:
# aptitude update # aptitude -r install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-legacy-304xx-kernel-dkms
This will also install the recommended nvidia-legacy-304xx-driver package. DKMS will build the nvidia module for your system.
Create an Xorg server configuration file.
- Restart your system to enable the nouveau blacklist.
Debian 7 "Wheezy"
Version 340.65 (via wheezy-backports)
For support of GeForce 8xxx and higher GPUs (supported devices). This is made available from wheezy-backports.
Add wheezy-backports to your /etc/apt/sources.list, for example:
# wheezy-backports deb http://httpredir.debian.org/debian/ wheezy-backports main contrib non-free
Update the list of available packages:
# aptitude update
Install the appropriate linux-headers package:
# aptitude install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')
Install the kernel module package from wheezy-backports:
# aptitude -t wheezy-backports -r install nvidia-kernel-dkms
This will also install the recommended nvidia-driver package. DKMS will build the nvidia module for your system.
Create an Xorg server configuration file.
- Restart your system to enable the nouveau blacklist.
Version 304.125
For support of GeForce 6xxx and higher GPUs (supported devices). For older devices, see Version 173.14.35 (legacy GPUs) and Version 96.43.23 (legacy GPUs).
Add "contrib" and "non-free" components to /etc/apt/sources.list, for example:
# Debian 7 "Wheezy" deb http://httpredir.debian.org/debian/ wheezy main contrib non-free
Update the list of available packages. Install the appropriate linux-headers and kernel module packages:
# aptitude update # aptitude -r install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-kernel-dkms
This will also install the recommended nvidia-glx package. DKMS will build the nvidia module for your system.
Create an Xorg server configuration file.
- Restart your system to enable the nouveau blacklist.
Version 173.14.35 (legacy GPUs)
For support of GeForce 5xxx / GeForce FX GPUs (supported devices).
Add "contrib" and "non-free" components to /etc/apt/sources.list, for example:
# Debian 7 "Wheezy" deb http://httpredir.debian.org/debian/ wheezy main contrib non-free
Update the list of available packages. Install the appropriate linux-headers and kernel module packages:
# aptitude update # aptitude -r install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-kernel-legacy-173xx-dkms
This will also install the recommended nvidia-glx-legacy-173xx package. DKMS will build the nvidia module for your system.
Create an Xorg server configuration file.
- Restart your system to enable the nouveau blacklist.
Version 96.43.23 (legacy GPUs)
For support of GeForce 2, GeForce 3 and GeForce 4 GPUs (supported devices).
Add "contrib" and "non-free" components to /etc/apt/sources.list, for example:
# Debian 7 "Wheezy" deb http://httpredir.debian.org/debian/ wheezy main contrib non-free
Update the list of available packages. Install the appropriate linux-headers and kernel module packages:
# aptitude update # aptitude -r install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-kernel-legacy-96xx-dkms
This will also install the recommended nvidia-glx-legacy-96xx package. DKMS will build the nvidia module for your system.
Create an Xorg server configuration file.
- Restart your system to enable the nouveau blacklist.
Configuration
As the nvidia driver is not autodetected by Xorg, a configuration file is required to be supplied. However, the configuration described below should not be applied to Nvidia Optimus systems; on such systems, the primary X display is driven by your Intel GPU, which is autodetected by X. See Bumblebee for more details on how to configure an Optimus system.
Automatic
Install the nvidia-xconfig package, then run it with sudo. It will automatically generate a Xorg configuration file at /etc/X11/xorg.conf.
Manual
For example:
/etc/X11/xorg.conf.d/20-nvidia.conf
Section "Device" Identifier "My GPU" Driver "nvidia" EndSection
The configuration file above can be created using these commands:
# mkdir /etc/X11/xorg.conf.d # echo -e 'Section "Device"\n\tIdentifier "My GPU"\n\tDriver "nvidia"\nEndSection' > /etc/X11/xorg.conf.d/20-nvidia.conf
Please note that this configuration will break Xorg on Optimus systems. For such hardware, see Bumblebee instead.
Restart your system at this point to enable the nouveau driver blacklist.
Additional configuration information is available.
Troubleshooting
The NVIDIA driver conflicts with the nouveau DRM driver (580894). The nouveau kernel module is blacklisted by the glx-alternative-nvidia or nvidia-kernel-common packages.
Restart your system after configuring Xorg for the NVIDIA driver.
From xserver-xorg-video-nouveau's README.Debian:
If you decide to switch to the proprietary driver, it is highly recommended to reboot because it is incompatible with nouveau, and unloading the latter is not easy and may lead to a blank console.
If you can't change the screen brightness, open your Xorg configuration file (/etc/X11/xorg.conf or /etc/X11/xorg.conf.d/20-nvidia.conf depending on which method you used) and add
Option "RegistryDwords" "EnableBrightnessControl=1;"
to the Device section.
Additional troubleshooting information is available.