- NVIDIA
- Contents
- Installation
- Unsupported drivers
- Custom kernel
- DRM kernel mode setting
- Early loading
- Hardware accelerated video decoding
- Hardware accelerated video encoding with NVENC
- Xorg configuration
- Automatic configuration
- nvidia-settings
- Manual configuration
- Minimal configuration
- Disabling the logo on startup
- Overriding monitor detection
- Enabling brightness control
- Enabling SLI
- Multiple monitors
- Using nvidia-settings
- ConnectedMonitor
- TwinView
- Mosaic mode
- Wayland
- NvidiaGraphicsDrivers
- Identification
- nvidia-detect
- Desktop Drivers
- Prerequisites
- Kernel headers
- Kernel
- Installation
- Debian Unstable «Sid»
- Debian 12 «Bookworm»
- Debian 11 «Bullseye»
- Debian 10 «Buster»
- Debian 9 «Stretch»
- Installing 32-bit libraries on a 64-bit system
- Wayland
- Tesla Drivers
- Configuration
- Automatic
- Manual
- Debian Unstable «Sid»
- Debian 11 «Bullseye»
- Debian 10 «Buster»
- Debian 9 «Stretch»
- Troubleshooting
- Build failures
- Driver stops working after upgrading Debian
- GPU isn’t functional, even with a compatible driver version installed
- Miscellaneous
- Uninstallation
NVIDIA
This article covers the proprietary NVIDIA graphics card driver. For the open-source driver, see Nouveau. If you have a laptop with hybrid Intel/NVIDIA graphics, see NVIDIA Optimus instead.
Contents
Installation
These instructions are for those using the stock linux or linux-lts packages. For custom kernel setup, skip to the next subsection.
1. If you do not know what graphics card you have, find out by issuing:
2. Determine the necessary driver version for your card by:
- Finding the code name (e.g. NV50, NVC0, etc.) on Nouveau wiki’s code names page or [1].
- Looking up the name in NVIDIA’s legacy card list: if your card is not there you can use the latest driver.
- Visiting NVIDIA’s driver download site.
3. Install the appropriate driver for your card:
- For GeForce 630-900, 10-20, and Quadro/Tesla/Tegra K-series cards and newer [NVE0, NV110 and newer family cards from around 2010 and later], install the nvidia package (for use with the linux kernel) or nvidia-lts (for use with the linux-lts kernel) package.
- If these packages do not work, nvidia-betaAUR may have a newer driver version that offers support.
- For GeForce 400/500/600 series cards [NVCx and NVDx] from around 2010-2011, install the nvidia-390xx-dkmsAUR package.
- For even older cards (released in 2010 or earlier), have a look at #Unsupported drivers.
4. For 32-bit application support, also install the corresponding lib32 nvidia package from the multilib repository (e.g. lib32-nvidia-utils ).
5. Reboot. The nvidia package contains a file which blacklists the nouveau module, so rebooting is necessary.
Once the driver has been installed, continue to #Xorg configuration.
Unsupported drivers
If you have a GeForce 300 series card or older (released in 2010 or earlier), Nvidia no longer supports drivers for your card. This means that these drivers do not support the current Xorg version. It thus might be easier if you use the Nouveau driver, which supports the old cards with the current Xorg.
However, Nvidia’s legacy drivers are still available and might provide better 3D performance/stability.
- For GeForce 8/9, ION and 100-300 series cards [NV5x, NV8x, NV9x and NVAx], install the nvidia-340xx-dkmsAUR package.
- GeForce 7 series cards and older [NV6x, NV4x and lower] do not have a driver packaged for Arch Linux.
Custom kernel
If you are using a custom kernel, compilation of the Nvidia kernel modules can be automated with DKMS.
Install the nvidia-dkms package (or a specific branch). The Nvidia module will be rebuilt after every Nvidia or kernel update thanks to the DKMS pacman hook.
DRM kernel mode setting
Early loading
For basic functionality, just adding the kernel parameter should suffice. If you want to ensure it’s loaded at the earliest possible occasion, or are noticing startup issues (such as the nvidia kernel module being loaded after the display manager) you can add nvidia , nvidia_modeset , nvidia_uvm and nvidia_drm to the initramfs according to Mkinitcpio#MODULES.
If added to the initramfs, do not forget to run mkinitcpio every time there is a nvidia driver update. See #Pacman hook to automate these steps.
Pacman hook
To avoid the possibility of forgetting to update initramfs after an NVIDIA driver upgrade, you may want to use a pacman hook:
Make sure the Target package set in this hook is the one you have installed in steps above (e.g. nvidia , nvidia-dkms , nvidia-lts or nvidia-ck-something ).
Hardware accelerated video decoding
Accelerated video decoding with VDPAU is supported on GeForce 8 series cards and newer. Accelerated video decoding with NVDEC is supported on Fermi (
400 series) cards and newer. See Hardware video acceleration for details.
Hardware accelerated video encoding with NVENC
NVENC requires the nvidia_uvm module and the creation of related device nodes under /dev . Manually loading the nvidia_uvm module will not create the device nodes, but invoking the nvidia-modprobe utility will. Create /etc/udev/rules.d/70-nvidia.rules :
Xorg configuration
The proprietary NVIDIA graphics card driver does not need any Xorg server configuration file. You can start X to see if the Xorg server will function correctly without a configuration file. However, it may be required to create a configuration file (prefer /etc/X11/xorg.conf.d/20-nvidia.conf over /etc/X11/xorg.conf ) in order to adjust various settings. This configuration can be generated by the NVIDIA Xorg configuration tool, or it can be created manually. If created manually, it can be a minimal configuration (in the sense that it will only pass the basic options to the Xorg server), or it can include a number of settings that can bypass Xorg’s auto-discovered or pre-configured options.
Automatic configuration
The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file ( xorg.conf ) and can be run by:
This command will auto-detect and create (or edit, if already present) the /etc/X11/xorg.conf configuration according to present hardware.
If there are instances of DRI, ensure they are commented out:
Double check your /etc/X11/xorg.conf to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.
nvidia-settings
The nvidia-settings tool lets you configure many options using either CLI or GUI. Running nvidia-settings without any options launches the GUI, for CLI options see nvidia-settings(1) .
You can run the CLI/GUI as a non-root user and save the settings to
/.nvidia-settings-rc or save it as xorg.conf by using the option Save to X configuration File for a multi-user environment.
/.nvidia-settings-rc for the current user:
See Autostarting to start this command on every boot.
/.nvidia-settings-rc and/or Xorg file(s) should recover normal startup.
Manual configuration
Several tweaks (which cannot be enabled automatically or with nvidia-settings) can be performed by editing your configuration file. The Xorg server will need to be restarted before any changes are applied.
Minimal configuration
A basic configuration block in 20-nvidia.conf (or deprecated in xorg.conf ) would look like this:
Disabling the logo on startup
Add the «NoLogo» option under section Device :
Overriding monitor detection
The «ConnectedMonitor» option under section Device allows to override monitor detection when X server starts, which may save a significant amount of time at start up. The available options are: «CRT» for analog connections, «DFP» for digital monitors and «TV» for televisions.
The following statement forces the NVIDIA driver to bypass startup checks and recognize the monitor as DFP:
Enabling brightness control
This article or section is out of date.
Add to kernel paremeters:
Alternatively, add the following under section Device :
If brightness control still does not work with this option, try installing nvidia-bl-dkms AUR .
Enabling SLI
Taken from the NVIDIA driver’s README Appendix B: This option controls the configuration of SLI rendering in supported configurations. A «supported configuration» is a computer equipped with an SLI-Certified Motherboard and 2 or 3 SLI-Certified GeForce GPUs.
Find the first GPU’s PCI Bus ID using lspci :
Add the BusID (3 in the previous example) under section Device :
Add the desired SLI rendering mode value under section Screen :
The following table presents the available rendering modes.
Value | Behavior |
---|---|
0, no, off, false, Single | Use only a single GPU when rendering. |
1, yes, on, true, Auto | Enable SLI and allow the driver to automatically select the appropriate rendering mode. |
AFR | Enable SLI and use the alternate frame rendering mode. |
SFR | Enable SLI and use the split frame rendering mode. |
AA | Enable SLI and use SLI antialiasing. Use this in conjunction with full scene antialiasing to improve visual quality. |
Alternatively, you can use the nvidia-xconfig utility to insert these changes into xorg.conf with a single command:
To verify that SLI mode is enabled from a shell:
If this configuration does not work, you may need to use the PCI Bus ID provided by nvidia-settings ,
and comment out the PrimaryGPU option in your xorg.d configuration,
Using this configuration may also solve any graphical boot issues.
Multiple monitors
See Multihead for more general information.
Using nvidia-settings
The nvidia-settings tool can configure multiple monitors.
For CLI configuration, first get the CurrentMetaMode by running:
Save everything after the :: to the end of the attribute (in this case: DPY-1: 2880×1620 @2880×1620 +0+0
ConnectedMonitor
If the driver does not properly detect a second monitor, you can force it to do so with ConnectedMonitor.
The duplicated device with Screen is how you get X to use two monitors on one card without TwinView . Note that nvidia-settings will strip out any ConnectedMonitor options you have added.
TwinView
You want only one big screen instead of two. Set the TwinView argument to 1 . This option should be used if you desire compositing. TwinView only works on a per card basis, when all participating monitors are connected to the same card.
If you have multiple cards that are SLI capable, it is possible to run more than one monitor attached to separate cards (for example: two cards in SLI with one monitor attached to each). The «MetaModes» option in conjunction with SLI Mosaic mode enables this. Below is a configuration which works for the aforementioned example and runs GNOME flawlessly.
Vertical sync using TwinView
If you are using TwinView and vertical sync (the «Sync to VBlank» option in nvidia-settings), you will notice that only one screen is being properly synced, unless you have two identical monitors. Although nvidia-settings does offer an option to change which screen is being synced (the «Sync to this display device» option), this does not always work. A solution is to add the following environment variables at startup, for example append in /etc/profile :
You can change DFP-0 with your preferred screen ( DFP-0 is the DVI port and CRT-0 is the VGA port). You can find the identifier for your display from nvidia-settings in the «X Server XVideoSettings» section.
Gaming using TwinView
In case you want to play fullscreen games when using TwinView, you will notice that games recognize the two screens as being one big screen. While this is technically correct (the virtual X screen really is the size of your screens combined), you probably do not want to play on both screens at the same time.
To correct this behavior for SDL, try:
For OpenGL, add the appropriate Metamodes to your xorg.conf in section Device and restart X:
Another method that may either work alone or in conjunction with those mentioned above is starting games in a separate X server.
Mosaic mode
Mosaic mode is the only way to use more than 2 monitors across multiple graphics cards with compositing. Your window manager may or may not recognize the distinction between each monitor. Mosaic mode requires a valid SLI configuration. Even if using Base mode without SLI, the GPUs must still be SLI capable/compatible.
Base Mosaic
Base Mosaic mode works on any set of Geforce 8000 series or higher GPUs. It cannot be enabled from within the nvidia-setting GUI. You must either use the nvidia-xconfig command line program or edit xorg.conf by hand. Metamodes must be specified. The following is an example for four DFPs in a 2×2 configuration, each running at 1920×1024, with two DFPs connected to two cards:
SLI Mosaic
If you have an SLI configuration and each GPU is a Quadro FX 5800, Quadro Fermi or newer then you can use SLI Mosaic mode. It can be enabled from within the nvidia-settings GUI or from the command line with:
Wayland
For now only a few Wayland compositors support NVIDIA’s buffer API, see Wayland#Requirements for more information.
For further configuration options, take a look at the wiki pages or documentation of the respective compositor.
Regarding XWayland take a look at Wayland#XWayland.
Источник
- NvidiaGraphicsDrivers
This page describes how to install the NVIDIA proprietary display driver on Debian systems.
Commands in this article prefixed with a # indicate they must be run as root. Replace this character with sudo or switch user to root in your terminal beforehand as necessary.
NOTE: For Apple systems, follow these steps first to prevent a black screen after installing the drivers: https://askubuntu.com/a/613573/134848
Identification
The NVIDIA graphics processing unit (GPU) series/codename of an installed video card can usually be identified using the lspci command. For example:
See HowToIdentifyADevice/PCI for more information. The PCI ID can be used to verify device support.
Note: if this lspci command returns more than one line of output, you have an Optimus (hybrid) graphics chipset. After you install the necessary driver package, you’ll still need to choose one of the methods on the NVIDIA Optimus page in order to activate and make use of your NVIDIA card.
nvidia-detect
The nvidia-detect script (found in the nvidia-detect package in the non-free section) can also be used to identify the GPU and the recommended driver package to install:
Desktop Drivers
The proprietary «NVIDIA Accelerated Linux Graphics Driver» provides optimized hardware acceleration of OpenGL and Vulkan applications through either Xorg or Wayland. It is a binary-only driver requiring a Linux kernel module for its use.
Multiple precompiled driver versions are available for Debian Unstable «Sid»:
Version 470.57.02 (supported devices)
- Supports Kepler, Maxwell, Pascal, Turing, and all current Ampere GPUs. Supports Vulkan 1.2 and OpenGL 4.6.
Version 390.144 (supported devices)
- Supports Fermi, Kepler, Maxwell, and most Pascal GPUs. Supports Vulkan 1.0 on Kepler and newer, supports up to OpenGL 4.5 depending on your card.
Older legacy driver, for GeForce 8 series through GeForce 300 series. No Vulkan support, supports up to OpenGL 3.3 depending on your card.
Use of the 340-series driver is strongly discouraged. It is not included in stable releases of Debian anymore, has serious unfixable security vulnerabilities, and may not be updated for new kernels in a timely manner. You are highly recommended to use the built-in Nouveau driver if security is a priority.
Multiple precompiled driver versions are available for Debian 12 «Bookworm»:
Version 470.57.02 (supported devices)
- Supports Kepler, Maxwell, Pascal, Turing, and all current Ampere GPUs. Supports Vulkan 1.2 and OpenGL 4.6.
Version 390.144 (supported devices)
- Supports Fermi, Kepler, Maxwell, and most Pascal GPUs. Supports Vulkan 1.0 on Kepler and newer, supports up to OpenGL 4.5 depending on your card.
Multiple precompiled driver versions are available for Debian 11 «Bullseye»:
Version 460.91.03 (supported devices)
- Supports Kepler, Maxwell, Pascal, Turing, and all current Ampere GPUs. Supports Vulkan 1.2 and OpenGL 4.6.
Version 390.144 (supported devices)
- Supports Fermi, Kepler, Maxwell, and most Pascal GPUs. Supports Vulkan 1.0 on Kepler and newer, supports up to OpenGL 4.5 depending on your card.
Multiple precompiled driver versions are available for Debian 10 «Buster»:
Version 460.73.01 (supported devices)
- Supports Kepler, Maxwell, Pascal, Turing, and all current Ampere GPUs. Supports Vulkan 1.2 and OpenGL 4.6.
- Note that 460.73.01 is only available in buster-backports.
Version 418.197.02 (supported devices)
- Supports Kepler, Maxwell, Pascal, and most Turing GPUs. Supports Vulkan 1.1 and OpenGL 4.6.
Version 390.143 (supported devices)
- Supports Fermi, Kepler, Maxwell, and most Pascal GPUs. Supports Vulkan 1.0 on Kepler and newer, supports up to OpenGL 4.5 depending on your card.
Older legacy driver, for GeForce 8 series through GeForce 300 series. No Vulkan support, supports up to OpenGL 3.3 depending on your card.
Multiple precompiled driver versions are available for Debian 9 «Stretch»:
Version 418.152 (supported devices)
- Supports Kepler, Maxwell, Pascal, and most Turing GPUs. Supports Vulkan 1.1 and OpenGL 4.6.
- Note that 418.152 is only available in stretch-backports.
Version 390.138 (supported devices)
- Supports Fermi, Kepler, Maxwell, and most Pascal GPUs. Supports Vulkan 1.0 on Kepler and newer, supports up to OpenGL 4.5 depending on your card.
Older legacy driver, for GeForce 8 series through GeForce 300 series. No Vulkan support, supports up to OpenGL 3.3 depending on your card.
Even older legacy driver, for GeForce 6 series and GeForce 7 series. Only supports OpenGL 2.1.
All driver versions up to, and including, the 418-series, are only available for the x86, x86-64, and 32-bit ARMv7 architectures (Debian i386, AMD64, and ARMHF ports respectively).
The 450-series and newer has dropped support for 32-bit architectures, now only supporting x86-64 and ARMv8 (Debian AMD64 and ARM64 ports respectively).
Prerequisites
Kernel headers
Before installing the drivers, you must obtain the proper kernel headers for the NVIDIA driver to build with.
For a typical 64-bit system using the default kernel, you can simply run:
For 32-bit systems with the non-PAE kernel, you’d instead install:
Or, for 32-bit systems with the PAE kernel:
If you’re using the kernel from Debian Backports, you must run the same command but with the -t flag followed by the name of your backports source. For instance, if you’re using backports on a 64-bit Debian 10 system, you might run:
Kernel
In some cases, if you’re aiming to install the bleeding-edge version of the NVIDIA driver from Debian Backports, you may also need to install the kernel from backports to match it. For Debian 10, you might do this with:
Exchange «buster-backports» with your own version’s backports repository as necessary.
Installation
Debian Unstable «Sid»
Version 470.57.02
For support of GeForce 600 series and newer GPUs (supported devices). For older devices, see Version 390 (legacy GPUs).
Add «contrib» and «non-free» components to /etc/apt/sources.list, for example:
Update the list of available packages, then we can install the nvidia-driver package, plus the necessary firmware:
DKMS will build the nvidia module for your system, via the nvidia-kernel-dkms package.
Version 390.144
For support of GeForce 400 series and newer GPUs (supported devices).
Add «contrib» and «non-free» components to /etc/apt/sources.list, for example:
Update the list of available packages, then we can install the nvidia-legacy-390xx-driver package, plus the necessary firmware:
DKMS will build the nvidia module for your system, via the nvidia-legacy-390xx-kernel-dkms package.
Version 340.108
For support of GeForce 8 series through GeForce 300 series GPUs(supported devices).
Use of the 340-series driver is strongly discouraged. It is not included in stable releases of Debian anymore, has serious unfixable security vulnerabilities, and may not be updated for new kernels in a timely manner. You are highly recommended to use the built-in Nouveau driver if security is a priority.
Add «contrib» and «non-free» components to /etc/apt/sources.list, for example:
Update the list of available packages, then we can install the nvidia-legacy-340xx-driver package, plus the necessary firmware:
DKMS will build the nvidia module for your system, via the nvidia-legacy-340xx-kernel-dkms package.
Debian 12 «Bookworm»
Version 470.57.02
For support of GeForce 600 series and newer GPUs (supported devices). For older devices, see Version 390 (legacy GPUs).
Add «contrib» and «non-free» components to /etc/apt/sources.list, for example:
Update the list of available packages, then we can install the nvidia-driver package, plus the necessary firmware:
DKMS will build the nvidia module for your system, via the nvidia-kernel-dkms package.
Version 390.144
For support of GeForce 400 series and newer GPUs (supported devices).
Add «contrib» and «non-free» components to /etc/apt/sources.list, for example:
Update the list of available packages, then we can install the nvidia-legacy-390xx-driver package, plus the necessary firmware:
DKMS will build the nvidia module for your system, via the nvidia-legacy-390xx-kernel-dkms package.
Debian 11 «Bullseye»
Version 460.91.03
For support of GeForce 600 series and newer GPUs (supported devices). For older devices, see Version 390 (legacy GPUs).
Add «contrib» and «non-free» components to /etc/apt/sources.list, for example:
Update the list of available packages, then we can install the nvidia-driver package, plus the necessary firmware:
DKMS will build the nvidia module for your system, via the nvidia-kernel-dkms package.
Version 390.144
For support of GeForce 400 series and newer GPUs (supported devices).
Add «contrib» and «non-free» components to /etc/apt/sources.list, for example:
Update the list of available packages, then we can install the nvidia-legacy-390xx-driver package, plus the necessary firmware:
DKMS will build the nvidia module for your system, via the nvidia-legacy-390xx-kernel-dkms package.
Debian 10 «Buster»
Version 460.73.01 (via buster-backports)
For support of GeForce 600 series and newer GPUs (supported devices). For older devices, see Version 390 (legacy GPUs) and Version 340 (legacy GPUs).
Add buster-backports as an additional new line to your /etc/apt/sources.list, for example:
Update the list of available packages, then we can install the nvidia-driver package, plus the necessary firmware, from the backports repository:
DKMS will build the nvidia module for your system, via the nvidia-kernel-dkms package.
Version 418.197.02
For support of GeForce 600 series and newer GPUs (supported devices). For older devices, see Version 390 (legacy GPUs) and Version 340 (legacy GPUs).
Add «contrib» and «non-free» components to /etc/apt/sources.list, for example:
Update the list of available packages, then we can install the nvidia-driver package, plus the necessary firmware:
DKMS will build the nvidia module for your system, via the nvidia-kernel-dkms package.
Version 390.138 (legacy GPUs)
For support of GeForce 400 series and newer GPUs (supported devices).
Add «contrib» and «non-free» components to /etc/apt/sources.list, for example:
Update the list of available packages, then we can install the nvidia-legacy-390xx-driver package, plus the necessary firmware:
DKMS will build the nvidia module for your system, via the nvidia-legacy-390xx-kernel-dkms package.
Version 340.108 (legacy GPUs)
For support of GeForce 8 series through GeForce 300 series GPUs. (supported devices).
Add «contrib» and «non-free» components to /etc/apt/sources.list, for example:
Update the list of available packages, then we can install the nvidia-legacy-340xx-driver package:
DKMS will build the nvidia module for your system, via the nvidia-legacy-340xx-kernel-dkms package.
After, create an Xorg server configuration file and then restart your system to enable the nouveau blacklist.
Debian 9 «Stretch»
As of stretch, you don’t need nvidia-xconfig anymore, and a xorg.conf file is not needed either in most situations. Also, the 340 series has been forked into its own series of packages to support older cards.
In some situations running nvidia-xconfig is still required for screen-locking and suspend/resume to work properly (922679 Xfce/lightdm/light-locker)
Version 418.152 (via stretch-backports)
For support of GeForce 700 series and newer GPUs (supported devices). For older devices, see Version 340 (legacy GPUs) and Version 304 (legacy GPUs).
Add stretch-backports as an additional new line to your /etc/apt/sources.list, for example:
Update the list of available packages, then we can install the nvidia-driver package, plus the necessary firmware, from the backports repository:
DKMS will build the nvidia module for your system, via the nvidia-kernel-dkms package.
Version 390.138
For support of GeForce 400 series and higher GPUs (supported devices). For older devices, see Version 340 (legacy GPUs) and Version 304 (legacy GPUs).
Add «contrib» and «non-free» components to /etc/apt/sources.list, for example:
Update the list of available packages, then we can install the nvidia-driver package, plus the necessary firmware:
DKMS will build the nvidia module for your system, via the nvidia-kernel-dkms package.
Version 340.108 (legacy GPUs)
For support of GeForce 8 series through GeForce 300 series GPUs (supported devices).
Add «contrib» and «non-free» components to /etc/apt/sources.list, for example:
Update the list of available packages, then we can install the nvidia-legacy-340xx-driver package:
DKMS will build the nvidia module for your system, via the nvidia-legacy-340xx-kernel-dkms package.
After, create an Xorg server configuration file and then restart your system to enable the nouveau blacklist.
Version 304.137 (legacy GPUs)
For support of GeForce 6 series and GeForce 7 series GPUs (supported devices).
Add «contrib» and «non-free» components to /etc/apt/sources.list, for example:
Update the list of available packages, then we can install the nvidia-legacy-304xx-driver package:
DKMS will build the nvidia module for your system, via the nvidia-legacy-304xx-kernel-dkms package.
After, create an Xorg server configuration file and then restart your system to enable the nouveau blacklist.
Installing 32-bit libraries on a 64-bit system
In many cases, such as when running proprietary 32-bit games from Steam or in Wine, you may need 32-bit graphics libraries on your 64-bit system in order for them to function properly. This has been made much easier since Debian 9/Stretch and now requires minimal extra work.
Note that the following instructions assume that sudo is configured on your system. If it isn’t, either follow the instructions on the sudo wiki page or omit the sudo and run these commands as root.
After installing the drivers, enable 32-bit multiarch and update your repository listing by running:
Afterwards, to install the 32-bit version of the NVIDIA libraries package, run:
Restarting the relevant applications may be necessary before they function correctly.
WARNING: If you’re forced to use a legacy driver, you will want to instead install one of nvidia-legacy-390xx-driver-libs:i386, nvidia-legacy-340xx-driver-libs:i386, or nvidia-legacy-304xx-driver-libs:i386.
Wayland
The NVIDIA driver supports Wayland, albeit through a different API than the free-and-open-source drivers for other GPUs have chosen to support. The NVIDIA method, «EGLStreams», is only supported by two major desktops, KDE Plasma and GNOME.
The NVIDIA driver also lacks support for accelerated XWayland applications. This means that if you run a Xorg-only application on your NVIDIA Wayland desktop (often proprietary video games), they will only be able to render on the CPU without taking advantage of GPU acceleration, leading to incredibly poor performance. NVIDIA has submitted patches to Xorg to enable acceleration under XWayland however they are still under review, and thus XWayland acceleration is not available in Debian 10, and will likely be unavailable in Debian 11.
In terms of specific desktop support, GNOME supports NVIDIA Wayland sessions in both Debian 10 and Debian 11, though they call their support «preliminary». KDE Plasma supports NVIDIA Wayland sessions starting with Debian 11, though it requires some extra hoops to enable. Refer to the Wayland section of the Debian KDE wiki page for up-to-date information: https://wiki.debian.org/KDE#Wayland.2C_touchscreens.2C_autorotation.2C_hi-DPI
Tesla Drivers
The NVIDIA line-up of programmable «Tesla» devices, used primarily for simulations and large-scale calculations, also require separate driver packages to function correctly compared to the consumer-grade GeForce GPUs that are instead targeted for desktop and gaming usage.
In Debian 10/Buster, the default nvidia-driver package is based on the Tesla release. This was done in order to resolve several critical security issues, but it means that there is no need to install the separate package for Tesla devices to work. If you need a newer release, the 450-series driver is available in backports via the nvidia-tesla-450-driver package.
In Debian 11/Bullseye, the major 418, 440, and 450 releases of the Tesla driver are available and distinct from the default driver. They can be found in the nvidia-tesla-418-driver, nvidia-tesla-440-driver, and nvidia-tesla-450-driver packages respectively.
The 32-bit libraries can be obtained by installing nvidia-tesla-418-driver-libs:i386, nvidia-tesla-440-driver:i386, or nvidia-tesla-450-driver:i386 based on the version of your driver. Multiarch must be enabled.
Configuration
As the NVIDIA driver is not autodetected by Xorg, a configuration file is required to be supplied. Modern Debian packages for the NVIDIA driver should not require you to do anything listed here as they handle this automatically during installation, but if you run into issues, or are using a much older version of Debian, you may try going through these steps.
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
The configuration file above can be created using these commands:
Please note that this configuration will break Xorg on Optimus systems. For such hardware, see NVIDIA Optimus instead.
Restart your system at this point to enable the nouveau driver blacklist.
Debian Unstable «Sid»
CUDA 11.2.2 is available from the non-free repository:
This installs nvcc and friends. The visual profiler is in a separate package named nvidia-visual-profiler.
Debian 11 «Bullseye»
CUDA 11.2.1 is available from the non-free repository:
This installs nvcc and friends. The visual profiler is in a separate package named nvidia-visual-profiler.
Debian 10 «Buster»
CUDA 9.2.148 is available from the non-free repository:
And, if Backports are enabled, CUDA 11.2.1 is available similarly:
This installs nvcc and friends. The visual profiler is in a separate package named nvidia-visual-profiler.
Debian 9 «Stretch»
CUDA 8.0.44 is available from the non-free repository:
And, if Backports are enabled, CUDA 9.1.85 is available similarly:
This installs nvcc and friends. The visual profiler is in a separate package named nvidia-visual-profiler.
CUDA 8 only supports gcc 5.3.1, which is not available for Stretch. To compile you need to add -ccbin clang-3.8 to the nvcc command line.
The Debian CUDA packages unfortunately do not include the Toolkit samples. To install these yourself you need to download the «Ubuntu 16.04» .run install file for CUDA 8 from https://developer.nvidia.com/cuda-downloads. Execute the .run file and (after accepting the license and agreeing to run on a non-supported system) skip the driver and toolkit installation and just select «Samples». Note before this step you must
To compile the samples, you first need to set
Troubleshooting
Build failures
The NVIDIA driver can fail to build for several potential reasons.
1. You’ve installed a kernel from backports without installing the NVIDIA driver from backports. This can, in some cases, mean that the kernel is too new for the driver version you’re attempting to use. Check this by viewing the package description for the NVIDIA driver where it will mention something along the lines of, «Building the kernel module has been tested up to Linux X.X» to figure out what’s supported.
2. Particularly if you’re on Debian Testing or Debian Unstable, the driver might not support your kernel yet. Often, new versions of the Linux kernel will explicitly require an update to the driver in order to be supported, so if the kernel package updates before the driver has a chance to be patched for it, you won’t be able to use the NVIDIA driver. Solutions for this, from most to least recommended, are temporarily using an older kernel until the driver is updated, installing a newer version of the driver from Debian Experimental if one is available that supports your kernel version, or finding a patch for the build failure online that can be added to DKMS. The last two options are for advanced users and may break your system or, in the case of adding a third-party patch, introduce security issues, forcing you to potentially reinstall completely or spend hours recovering your system. Caveat emptor.
3. Legacy versions of the NVIDIA driver may not always support the latest kernel. For instance, the 304xx series driver, though available in the Debian Unstable repository, does not support Linux 5.0 or newer. As necessary, you might consider using an older Debian version, or using Nouveau instead. Nouveau has decent performance with GPUs that are old enough to no longer be supported by the proprietary driver.
Driver stops working after upgrading Debian
When going between two major Debian releases (e.g., upgrading from Debian 9/Stretch to Debian 10/Buster), it’s possible that the driver will stop functioning despite the build succeeding and no other issues being easily visible. This is most often caused by the nvidia-driver package updating to a newer major release that no longer supports your hardware, as NVIDIA regularly drops support for older hardware generations. You will need to uninstall all your existing NVIDIA packages (refer to the section below for instructions on how to do so), and instead install the most recent legacy driver that still supports your GPU.
GPU isn’t functional, even with a compatible driver version installed
If you have an extremely modern NVIDIA GPU that was manufactured after the release of your Debian version, it may not work even after installing the newest backported driver that claims to support your card. If so, you likely need to upgrade the non-free firmware package on your system as well by installing the firmware-misc-nonfree package from backports. For instance, on a Debian 10 system with backports enabled:
After rebooting, the driver should be able to load the appropriate firmware.
Miscellaneous
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.
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
to the Device section. In some case (eg. GeForce GT 650M Mac Edition) it may cause screen flickering during boot time (just after grub screen), and system will not boot. In this case you should use instead add the following:
to the file: /etc/rc.local
You can check whether or not the kernel module for the NVIDIA driver has been loaded, in addition to what version is currently loaded, by running /sbin/modinfo -F version nvidia-current
Uninstallation
If you run into issues with the drivers, switch to a different card, or simply want to use the open-source Nouveau drivers instead, uninstallation is made easy with recent versions of the drivers.
Also note that if issues with the driver prevent you from accessing a desktop, you can access a full-screen TTY with Ctrl-Alt-F3 (or almost any of the «F» keys).
You can remove all packages on your system with nvidia in the name by running:
And then reboot the system with:
This should leave you with a functioning system in almost all cases. If it seems to still be having issues, you may also try running:
Источник