Translation(s): English - Español - Français - Русский - 简体中文
This page describes how to install Nvidia's proprietary GPU drivers on Debian systems.
Those who prefer open source drivers, for security, privacy, or ideological reasons, may want to avoid these drivers and use the built-in open-source nouveau driver (community developed), although the latter is unfortunately still much less functional and performant than Nvidia's proprietary drivers.
As a consequence of the closed-source nature of the drivers, you should expect planned obsolescence problems, compatibility problems, performance problems and general instability problems in certain configurations. If you don't have knowledge or patience to deal with such, you should instead consider AMD or Intel GPUs that come with open-source drivers maintained by their respective manufacturers in the mainline kernel repo, so they work out of the box in most cases and no additional steps are required.
Commands in this article prefixed with a $ may be run by normal users, while those with # must be run as root. Switch user to root in your terminal or use sudo as necessary (while this article tries to avoid such situations, remember that in case of commands chained with && or | or ; each sub-command needs to be prefixed with sudo).
As this page has several levels of nested subsections and uses tables, it is recommended to switch to modern theme in your userprefs for a better readability (you need to be logged-in).
Want to share feedback about this page? Please join the discussion in this Debian forum thread: improvement suggestions are always welcome! :)
Want to share a link to some specific section of this page? Chapter names tend to change sometimes, but an effort is made to keep anchors marked with "🔗" character stable.
Contents
- GPU identification
- Current driver types
- Community driver recommendations for Trixie & Bookworm (D-13 & D-12)
- Installation prerequisites (ALL driver types)
- Debian drivers
- Nvidia-packaged data-center drivers
- Tesla Drivers
- Suspend and Hibernate configuration
- Wayland configuration
- X11 configuration
- Optional addons
- Redirecting Nvidia GPUs to QEMU+libvirt VMs
- Troubleshooting
- Uninstallation
- See Also
GPU identification
You can use lspci to check if you have an Nvidia GPU:
$ lspci | grep -iE "3d|display|vga" | grep -i nvidia
A non-empty output (usually a single line) means that an Nvidia GPU is present in the system, for example:
07:00.0 VGA compatible controller: NVIDIA Corporation GM206 [GeForce GTX 960] (rev a1)
Multiple lines indicate multiple Nvidia GPUs. See HowToIdentifyADevice/PCI for more information.
You can also list all types of GPUs in your system: this may be useful for configuring X11 or troubleshooting:
$ lspci | grep -iE "3d|display|vga"
Here is an example output on a computer with an Nvidia RTX 3090 and an AMD Strix iGPU:
0b:00.0 VGA compatible controller: NVIDIA Corporation GA102 [GeForce RTX 3090] (rev a1) 65:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Strix [Radeon 880M / 890M] (rev c1)
Current driver types
Development model and licensing (flavor)
In May 2022 Nvidia announced that starting with version 515 of the drivers, they would move to a more open development model and started publishing source-code for their kernel modules on Github. It is important to note however, that these modules are still tightly coupled with other Nvidia's closed-source components such as firmware and user-space libraries, so as a whole, the driver is definitely not a free software by any means. Since then, each released driver version is available in two flavors:
"open": using the mentioned open-source kernel modules and intended for newer hardware, supports Turing (16xx/20xx) and newer GPUs. Note however that Turing's data-center variant Volta (Titan V, Quadro GV100) is not supported.
This flavor is tightly coupled with Nvidia's GSP firmware and cannot function without it."proprietary": using the older proprietary closed-source kernel modules and intended for legacy hardware. It does not support Blackwell (50xx) or newer GPUs.
This flavor is able to function without GSP firmware by setting NVreg_EnableGpuFirmware param to 0 for nvidia module, but in some scenarios the performance will suffer significantly in such case.
Packaging methods
There are three major ways that Nvidia drivers are packaged these days:
Debian-packaged desktop drivers: referred to simply as "Debian drivers", these used to be the most recommended drivers for most users, but they haven't been updated in ages. As a consequence, they don't support the recent GPU generations and don't even compile on modern kernels from trixie-backports suite. On Trixie currently only the proprietary flavor on the base suite kernels compiles and supports GPU archs up to Ada (RTX 40xx or older).
Nvidia-packaged desktop drivers: referred to by Nvidia as "Unix drivers", these drivers are packaged as distribution-agnostic executable installer files (referred to as "dot-run" or "runfile"). As such they may conflict with other components of a Debian system (see DontBreakDebian). Furthermore, some users reported problems with uninstallation, leaving their systems permanently polluted. Starting with release v595, Debian-13 is completely unsupported by these drivers. They may be downloaded from Nvidia's website (older versions archive). See also their feature deprecation schedule.
Nvidia-packaged datacenter drivers: referred to as "NV DC drivers", despite their name, they do contain desktop components as well, but are mostly intended for compute workloads. They are packaged using distro-specific methods and in case of Debian, Nvidia provided apt repos for Debian versions 10-13.
All 3 types of packaging usually allow to install either open or proprietary flavor for newer versions.
Historically, there were also Debian-packaged data-center drivers, referred to as "Tesla drivers".
When switching between driver packaging methods, it is critical to first purge the old driver before installing the new one.
Failure to do so will result in a mix that almost certainly won't work.
Except of issues with Debian packaging itself, problems with all types of Nvidia drivers should generally be reported to Nvidia developer forum. Reports should always include nvidia-bug-report.log.gz file generated using nvidia-bug-report.sh script. Refer to the official guidelines for reporting. It also may be useful to ask the online community for assistance in case of ad-hoc issues.
Community driver recommendations for Trixie & Bookworm (D-13 & D-12)
The below recommendations are based on user feedback on the Nvidia and Debian forums. They are mostly focused on maximizing supported features and functionality and may differ from so called "official" recommendations.
Don't just blindly apply the instructions in the linked sections!
You should still read the surrounding context and related disclaimers: the fact that something works well even for a majority of cases, does not imply that it is the best solution for your specific scenario.
GPU arch |
recommended driver |
older than Kepler |
built-in Nouveau |
security-sensitive context: built-in Nouveau |
|
NV DC driver v595 or the most recent (slight perf variations between these), open flavor |
Note for external posts: anchors named directly after Nvidia architectures (for example as in the first column of the table above), will be updated to the most recommended driver for a given architecture as old drivers get obsoleted or new are added. If you instead need a stable link to some specific driver type installation instructions, scroll/navigate to the desired section and use its 🔗 anchor.
Installation prerequisites (ALL driver types)
apt components
All components (main, non-free-firmware, non-free and contrib) must be enabled at least for the base suite (like bookworm or trxie or fortky etc depending on your Debian version) and for the -security suite in your /etc/apt/sources.list file. For example for Trixie, you should have at least entries similar to the two below: (the order of components does not matter)
deb http://deb.debian.org/debian/ trixie main contrib non-free non-free-firmware deb http://security.debian.org/debian-security/ trixie-security contrib non-free main non-free-firmware
...and usually also for the -updates:
deb http://deb.debian.org/debian/ trixie-updates non-free-firmware non-free contrib main
Generally, if any entry in /etc/apt/sources.list related to the official Debian suites (like trixie, trixie-security in case of Trixie and possibly also trixie-updates and trixie-backports if you use them) misses any of the mentioned components, you should append them accordingly.
If you have any corresponding deb-src entries configured (for source packages), it is highly recommended to add the components to them as well.
Component non-free-firmware was first introduced in Bookworm, so in case of Bullseye or ealier releases, you may remove it (keeping it won't break anything, but will cause certain apt operations to generate warnings).
Afterwards run
# apt update
This will fetch information about the new components from remote Debian repositories.
You can check SourcesList for more information on configuring apt sources.
Kernel headers
In standard cases you can just ask apt to install linux-headers-generic virtual package and it will pick the right blend for you:
# apt install linux-headers-generic
This will install for example linux-headers-amd64 if you have an AMD/Intel CPU or linux-headers-arm64 if you have an ARM CPU: these are meta-packages that always depend on the most recent version of the official headers package for a given arch, so whenever a new official kernel package is released, its headers will also be installed automatically during a system upgrade.
If you use some special features kernel like -rt or -cloud (otherwise you can skip the rest of this point), you need to explicitly point the corresponding feature-set headers for your architecture instead of the generic ones mentioned above, for example:
# apt install linux-headers-rt-amd64
SecureBoot
If you have SecureBoot enabled (otherwise you can skip this point), you need to enroll your machine owner's key (MOK) to sign & verify the Nvidia modules. Detailed instructions are available here.
dracut
If your system uses dracut (otherwise you can skip this point), you must tell it to include the Nvidia modprobe config files. Create a file somewhere in /etc/dracut.conf.d/ folder, for example /etc/dracut.conf.d/10-nvidia.conf, with the following contents:
install_items+=" /etc/modprobe.d/nvidia* "
Note: do not omit the spaces between the quotes and the inner string.
Backports (optional)
Certain version ranges of the driver and of the kernel are tightly coupled with each other (for example "vanilla" drivers older than v580 will not compile on kernels 6.16+). Therefore if you use a kernel from a Backports suite, then in case of Debian drivers and Tesla drivers, you need to install a driver from the Backports as well (and vice-versa). Also as a side note, if you use a kernel from a Backports suite, it is often necessary to use firmware packages from the Backports as well.
If you want to use a driver from a Backports suite, make sure your system is prepared according to the below steps:
All 4 components (main, contrib, non-free and non-free-firmware) must be enabled for the -backports suite corresponding to your Debian release, for example for Trixie, make sure you have an entry similar to the below somewhere in /etc/apt/sources.list.d/ folder, for example in /etc/apt/sources.list.d/backports.list file:
deb http://deb.debian.org/debian/ trixie-backports main contrib non-free non-free-firmware
For other Debian releases, replace trixie-backports appropriately with bookworm-backports or bullseye-backports etc.
If you have a deb-src entry configured for other suites, it is recommended to add it for the Backports as well.
Note, that while it is not recommended, it may happen that the -backports suite entries are already configured directly in /etc/apt/sources.list file: in such case you may edit the list of components there or move them into /etc/apt/sources.list.d/ folder as described here.
To ensure that all kernel and firmware related packages come from the Backports suite, pin them with priority 500 somewhere in /etc/apt/preferences.d/ folder, for example in /etc/apt/preferences.d/kernel-firmware-backports.preffile:
Package: src:linux src:linux-signed-amd64 src:linux-base firmware-* *-microcode Pin: release n=trixie-backports Pin-Priority: 500
In case of an ARM CPU, change linux-signed-amd64 to linux-signed-arm64.
For other Debian releases, replace trixie-backports appropriately with bookworm-backports or bullseye-backports etc.
You can check the official reference regarding package priorities.
Update apt's DB and upgrade linux-base package first as other kernel packages pre-depend on it:
# apt update # apt install -t trixie-backports linux-base
For other Debian releases, replace trixie-backports appropriately...
Upgrade the rest of your kernel and firmware packages to the versions from the Backports:
# apt dist-upgrade
You can also check the official Backports repo instructions page (note: it uses the "modernized" sources format as opposed to the "traditional" one-line used above: both ways work fine).
32bit Intel apps support (optional)
If you intend to run 32bit Intel GUI apps (for example most Windows games via Wine or Steam), it is recommended to enable i386 architecture before installing the driver: this way 32bit libs will be automatically pulled in:
# dpkg --add-architecture i386 # apt update
Debian drivers
Below is the list of available driver versions for each Debian release, together with a brief list of supported GPUs.
Before installing any of the below drivers, MAKE SURE that you've completed mandatory steps described in the prerequisites section.
Currently no Debian-packaged version supports Blackwell GPUs (for example RTX 50xx series).
A wishlist bug has been filed: 1123801. If you have a Blackwell GPU, consider other packaging methods until this is fixed.
Driver versions available for Debian Unstable "Sid": (last updated: 2025-12-16)
550.xx.yy series: supports Maxwell, Pascal, Volta, Turing, Ampere and Ada/Hopper GPUs (the full list of supported devices).
Version 390.157: legacy driver for Fermi and Kepler GPUs (the full list of supported devices).
Version 340.108: legacy driver for G8x, G9x, and GT2xx series GPUs (the full list of supported devices).
Driver versions available for Debian 13 "Trixie": (last updated: 2025-12-15)
550.xx.yy series: supports Maxwell, Pascal, Volta, Turing, Ampere and Ada/Hopper GPUs (the full list of supported devices).
550.xx.yy series from Backports: the variant of the above patched to work with kernels from trixie-backports.
Driver versions available for Debian 12 "Bookworm": (last updated: 2025-12-16)
535.xx.yy series supports Maxwell, Pascal, Volta, Turing, Ampere and Ada/Hopper GPUs (the full list of supported devices).
Driver versions available for Debian 11 "Bullseye": (last updated: 2025-12-16)
Version 470.256.02 supports Kepler, Maxwell, Pascal, Turing, and Ampere GPUs. (the full list of supported devices).
Debian Unstable "Sid"
550.xx.yy series
This version series supports Maxwell, Pascal, Volta, Turing, Ampere and Ada/Hopper GPUs, it does not support Blackwell (the full list of supported devices). For Blackwell consider other packaging methods.
This version is no longer maintained and contains several security issues.
It should be used only in properly isolated, trusted environments.
Choose a flavor to install:
To install the proprietary flavor, packages nvidia-kernel-dkms and nvidia-driver should be installed:
# apt install nvidia-kernel-dkms nvidia-driver
To instead install the open flavor, packages nvidia-open-kernel-dkms and nvidia-driver should be installed:
(reminder: Maxwell, Pascal and Volta GPUs are not supported by this flavor)# apt install nvidia-open-kernel-dkms nvidia-driver
DKMS will build the modules for your system from either nvidia-kernel-dkms or nvidia-open-kernel-dkms package.
Proceed to post-installation steps.
Version 390.157
This version supports Fermi, Kepler, Maxwell and most Pascal GPUs (the full list of supported devices)
This version is no longer maintained and contains several security issues.
It should be used only in properly isolated, trusted environments.
Install the nvidia-legacy-390xx-driver package, plus the necessary firmware:
# apt install nvidia-legacy-390xx-driver firmware-misc-nonfree
DKMS will build the nvidia module for your system, via the nvidia-legacy-390xx-kernel-dkms package.
Proceed to post-installation steps.
Version 340.108
This is the last version that supports G8x, G9x, and GT2xx series GPUs (the full list of supported devices).
This version is no longer maintained and contains several security issues.
It should be used only in properly isolated, trusted environments.
Install the nvidia-legacy-340xx-driver package, plus the necessary firmware:
# apt install nvidia-legacy-340xx-driver firmware-misc-nonfree
DKMS will build the nvidia module for your system, via the nvidia-legacy-340xx-kernel-dkms package.
Proceed to post-installation steps.
Post-installation steps for Sid
Optionally verify the result of the DKMS module compilation:
# dkms status 'nvidia*'
This should result in 1 or more lines (1 per each installed kernel version) similar to the below: (the exact versions may differ)
nvidia/550.163.01, 6.12.57+deb13-amd64, x86_64: installed
Anything other than installed at the end means there was some problem: see Troubleshooting section in such case.
If you intend to use suspend or hibernate, configure the related options accordingly.
If you intend to use the NV GPU as a GUI display device, check Wayland or X11 section respectively.
- In most cases a reboot of the system is recommended to fully load the new driver.
Debian 13 "Trixie"
550.xx.yy series
This version series supports Maxwell, Pascal, Volta, Turing, Ampere and Ada/Hopper GPUs, it does not support Blackwell (the full list of supported devices). For older devices, use nouveau, which should be already installed and in use. For Blackwell consider other packaging methods.
Note: this version will not work with kernels 6.16 or newer like the current one from trixie-backports: use the the corresponding version from trixie-backports instead.
This version is no longer maintained and contains several security issues.
It should be used only in properly isolated, trusted environments.
Choose a flavor to install:
To install the proprietary flavor, packages nvidia-kernel-dkms and nvidia-driver should be installed:
# apt install nvidia-kernel-dkms nvidia-driver
To instead install the open flavor, packages nvidia-open-kernel-dkms and nvidia-driver should be installed:
(reminder: Maxwell, Pascal and Volta GPUs are not supported by this flavor)# apt install nvidia-open-kernel-dkms nvidia-driver
As of kernel 6.12.100, the open flavor of this driver (550.163.01-2) no longer compiles (1143204).
Consider using either the proprietary flavor described above or other packaging methods until this is fixed.
DKMS will build the modules for your system from either nvidia-kernel-dkms or nvidia-open-kernel-dkms package.
Proceed to post-installation steps.
550.xx.yy series from Backports
This is a variant of the above 550.xx.yy that was patched to work with kernels from trixie-backports.
As of kernels 6.19.x recently released to trixie-backports, this driver (550.163.01-4~bpo13+1) no longer compiles.
If you need a kernel v6.19+, consider other packaging methods until this is fixed.
This version is no longer maintained and contains several security issues.
It should be used only in properly isolated, trusted environments.
Make sure your system is prepared as described in Backports section.
Choose a flavor to install:
To install the proprietary flavor, packages nvidia-kernel-dkms and nvidia-driver should be installed:
# apt install -t trixie-backports nvidia-kernel-dkms nvidia-driver
To instead install the open flavor, packages nvidia-open-kernel-dkms and nvidia-driver should be installed:
(reminder: Maxwell, Pascal and Volta GPUs are not supported by this flavor)# apt install -t trixie-backports nvidia-open-kernel-dkms nvidia-driver
DKMS will build the modules for your system from either nvidia-kernel-dkms or nvidia-open-kernel-dkms package.
Proceed to post-installation steps.
Post-installation steps for Trixie
Optionally verify the result of the DKMS module compilation:
# dkms status 'nvidia*'
This should result in 1 or more lines (1 per each installed kernel version) similar to the below: (the exact versions may differ)
nvidia/550.163.01, 6.12.57+deb13-amd64, x86_64: installed
Anything other than installed at the end means there was some problem: see Troubleshooting section in such case.
If you intend to use suspend or hibernate, configure the related options accordingly.
If you intend to use the NV GPU as a GUI display device, check Wayland or X11 section respectively.
- In most cases a reboot of the system is recommended to fully load the new driver.
Debian 12 "Bookworm"
535.xx.yy series
This version series supports Maxwell, Pascal, Volta, Turing, Ampere and Ada/Hopper GPUs, it does not support Blackwell (the full list of supported devices). For older devices, use nouveau, which should be already installed and in use. For Blackwell consider other packaging methods.
This version is not maintained since June 2026 and may contain security issues.
It should be used only in properly isolated, trusted environments.
Choose a flavor to install:
To install the proprietary flavor, package nvidia-driver should be installed:
# apt install nvidia-driver
To instead install the open flavor:
Make sure you understand the limitations mentioned in the README (most importantly Maxwell, Pascal and Volta GPUs are not supported by this flavor).
In case of most cards, param NVreg_OpenRmEnableUnsupportedGpus must be set to 1 in somewhere in /etc/modprobe.d/ folder, for example in /etc/modprobe.d/nvidia-open.conf file:
options nvidia NVreg_OpenRmEnableUnsupportedGpus=1
Package nvidia-open-kernel-dkms must be additionally installed:
# apt install nvidia-open-kernel-dkms nvidia-driver
DKMS will build the modules for your system from either nvidia-kernel-dkms or nvidia-open-kernel-dkms package.
Optionally verify the result of the DKMS module compilation:
# dkms status 'nvidia*'
This should result in 1 or more lines (1 per each installed kernel version) similar to the below: (the exact versions may differ)
nvidia/550.163.01, 6.12.57+deb13-amd64, x86_64: installed
Anything other than installed at the end means there was some problem: see Troubleshooting section in such case.
If you intend to use suspend or hibernate, configure the related options accordingly.
If you intend to use the NV GPU as a GUI display device, check Wayland or X11 section respectively.
- In most cases a reboot of the system is recommended to fully load the new driver.
Debian 11 "Bullseye"
Version 470.256.02
This version supports supports Kepler, Maxwell, Pascal, Turing, and Ampere GPUs. (the full list of supported devices).
This version is no longer maintained and contains several security issues.
It should be used only in properly isolated, trusted environments.
Install the nvidia-driver package, plus the necessary firmware:
# apt install nvidia-driver firmware-misc-nonfree
DKMS will build the nvidia module for your system, via the nvidia-kernel-dkms package.
Optionally verify the result of the DKMS module compilation:
# dkms status 'nvidia*'
This should result in 1 or more lines (1 per each installed kernel version) similar to the below: (the exact versions may differ)
nvidia/550.163.01, 6.12.57+deb13-amd64, x86_64: installed
Anything other than installed at the end means there was some problem: see Troubleshooting section in such case.
- Reboot your system to load the new driver.
Nvidia-packaged data-center drivers
These drivers (often referred to as "NV DC drivers") are intended mostly for compute workloads, but they do contain all the desktop components as well. It is important to note nevertheless, that releases of fixes or new features to desktop components may lag and are usually delayed until something related to compute needs to be released. Nvidia publishes these drivers in distro-specific ways: in case of Debian, apt repos for Debian versions 10-13 are provided, but not all of these versions are still supported: refer to the table below:
(last updated: 2026-02-27)
Debian |
currently |
released |
flavor support |
supported GPU archs |
released CUDA |
10 |
no |
455 - 555 |
yes / no |
Kepler to Ampere with v470 (legacy LTS); |
11, 12 |
11 |
no |
495 - 560 |
yes / only v560 |
Maxwell to Ampere with early versions; |
11, 12 |
12 |
yes |
545 - onwards |
up to v610 / from v560 |
Maxwell to Blackwell with v580 (LTS until June 2028); |
12, 13 |
13 |
yes |
590 - onwards |
up to v610 / yes |
Turing (but not Volta), Ampere, Ada/Hopper, Blackwell |
13 |
Refer to the official guide regarding installation and usage instructions (simplified version for inexperienced users is here). Some related notes:
The prerequisites for the NV DC drivers are almost a full subset of those in the general prerequisites section, which have a few tiny bits more (for example some more apt components). Therefore if you completed the mandatory steps described there, your system is ready for an installation of the NV DC drivers as well.
Utility add-apt-repository used in the official guide, is not present on modern Debian versions by default: add components manually similarly as described in the general prerequisites section.
Installing linux-headers-$(uname -r) as recommended in the official guide, would install headers for the currently running kernel only, which would result in DKMS build being skipped during subsequent kernel upgrades, similarly as described in Troubleshooting section. Use meta-packages instead as described in the general prerequisites section.
The values for distro var used across the official guide are debian12, debian13 etc respectively.
These drivers usually work fine with kernels from Backports suites as well.
To install a specific driver version (like for example v580 for Maxwell or Pascal cards), use nvidia-driver-pinning-* packages as described in Pinning Packages section of the official guide.
For news and updates consider tracking this thread on the Nvidia forum.
General notes:
The scripts that NV uses internally to manage these repos are available on Github.
"Raw" runfiles corresponding to each release can be downloaded from URLs of the form https://international.download.nvidia.com/tesla/${VERSION}/NVIDIA-Linux-${ARCH}-${VERSION}.run, for example https://international.download.nvidia.com/tesla/610.57.04/NVIDIA-Linux-x86_64-610.57.04.run. As of 2026, in case of exactly matching release versions, these are exactly the same runfiles as for Nvidia Unix drivers.
Debianization probably used to be based on the contents of this Github repo, but Nvidia stopped to update its contents after Bullseye.
CUDA toolkit
To install CUDA toolkit on top of the NV DC drivers, follow the official CUDA toolkit installation guide.
Isolated environments
Nvidia also provides their apt repos packaged as local files to ease up installations in isolated environments. These can be downloaded from the following locations: (choose deb local as Installer Type)
Follow the same official driver and CUDA toolkit installation guides as mentioned above.
Simplified NV DC driver installation instructions on D-12 & D-13
This section is mostly intended for inexperienced users to make the installation as easy as possible (except the Maxwell/Pascal on D-13 case, which is royally messed-up for everyone). It does not cover several supported customizations (like flavor choosing, compute-only or desktop-only installations etc) and always installs the full driver. For full instructions, refer to the official docs linked above.
Jump to the subsection appropriate for your system:
Turing or newer GPUs on Trixie & Bookworm (D-13 & D-12)
This section covers Turing (GTX-16xx, RTX-20xx), Ampere (RTX-30xx), Ada/Hopper (RTX-40xx / Hx00) and Blackwell (RTX-50xx, Bx00) GPUs supported by the current mainline drivers. See the full list of supported devices.
MAKE SURE that you've completed mandatory steps described in the prerequisites section.
Export distro env var according to your Debian version:
D-12 "Bookworm":
$ export distro="debian12"
D-13 "Trixie":
$ export distro="debian13"
Download the package with Nvidia apt sources config appropriate for your CPU arch:
Intel and AMD CPUs:
$ wget "https://developer.download.nvidia.com/compute/cuda/repos/${distro}/x86_64/cuda-keyring_1.1-1_all.deb"ARM CPUs:
$ wget "https://developer.download.nvidia.com/compute/cuda/repos/${distro}/sbsa/cuda-keyring_1.1-1_all.deb"
Install the downloaded package, update apt's DB and upgrade the system as the Nvidia repo provides newer versions of some system utilities (most notably DKMS) :
# dpkg -i cuda-keyring_1.1-1_all.deb # apt update # apt dist-upgrade
Optionally, if you want some specific version of the driver instead of the latest, install nvidia-driver-pinning-${VERSION} package and update apt DB, for example for v595:
# apt install nvidia-driver-pinning-595 # apt update
See the version designations here.
Install nvidia-open meta-package:
# apt install nvidia-open
Proceed to post-installation steps.
Maxwell, Pascal and Volta GPUs on Bookworm (D-12)
This section covers GTX-9xx and GTX-10xx desktop GPUs and data-center GPUs such as V100 family on Debian-12. Nvidia dropped support for these architectures in their drivers after version 580, but 580 series is an LTS that will be receiving critical updates until June 2028. See the full list of devices it supports.
The installation procedure is very similar as for newer GPUs above, with the following changes:
As v580 is required, it is mandatory to install nvidia-driver-pinning-580 in point 5.
As proprietary flavor is required, cuda-drivers meta-package must be installed instead of nvidia-open in point 6.
Everything else is identical.
Maxwell, Pascal and Volta GPUs on Trixie (D-13)
580 LTS series of the driver required for Maxwell/Pascal/Volta support (see the details above), is not available in the D-13 repo, but several users reported, that drivers from the Debian-12 repo generally worked well with Debian-13 as well. This section covers all the work-arounds needed for such installation.
Note: so far this method has been tested only on amd64 CPU arch (Intel/AMD), hence that's what the below instructions assume.
Using drivers originally intended for a different release is at least a bit of a dirty hack and borderline "FrankenDebian".
Proceed at your own risk.
MAKE SURE that you've completed mandatory steps described in the prerequisites section.
Since 2026-02-01, Debian-13 rejects signatures using SHA1 used in the NV D-12 repo. Additionally, D-13 migrated signature verification tool from gpgv to sqv that does not accept additional options from apt sources. To workaround it all, you need to:
Revert back to using gpgv by adding the below config option somewhere in /etc/apt/apt.conf.d/ folder, for example in /etc/apt/apt.conf.d/10gpgv file:
APT::Key::GPGVCommand "/usr/bin/gpgv";
Configure apt sources with relaxed verification policy: add the below Nvidia D-12 repo somewhere in /etc/apt/sources.list.d/ folder, for example in /etc/apt/sources.list.d/nvidia-d12.list file:
deb [signed-by=/etc/apt/keyrings/nvidia-d12-archive.key allow-insecure=yes] http://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/ /
Download and extract the original Nvidia D-12 repo definition also containing the key:
$ wget -O /tmp/nv-d12-repo-config.deb https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/cuda-keyring_1.1-1_all.deb $ dpkg -x /tmp/nv-d12-repo-config.deb /tmp/nv-d12-repo-config
Copy the Nvidia key to the location pointed in the repo definition from the 2nd point, update apt's DB and upgrade the system as the Nvidia repo provides newer versions of some system utilities (most notably DKMS) :
# cp /tmp/nv-d12-repo-config/usr/share/keyrings/cuda-archive-keyring.gpg /etc/apt/keyrings/nvidia-d12-archive.key # apt update # apt dist-upgrade
Install nvidia-driver-pinning-580 package to stay on v580 series of the driver and update apt DB again:
# apt install nvidia-driver-pinning-580 # apt update
Install cuda-drivers meta-package:
# apt install cuda-drivers
DKMS will build the proprietary modules for your system.
Proceed to post-installation steps.
If you also install CUDA toolkit to develop/build CUDA apps, depending on the toolkit version, you may need to apply a few tiny patches to one of the header files as described in this thread and this thread. Versions >= 13.2 should not require patching anymore.
Post-installation steps for NV DC drivers
Optionally verify the result of the DKMS module compilation:
# dkms status 'nvidia*'
This should result in 1 or more lines (1 per each installed kernel version) similar to the below: (the exact versions may differ)
nvidia/550.163.01, 6.12.57+deb13-amd64, x86_64: installed
Anything other than installed at the end means there was some problem: see Troubleshooting section in such case.
If you intend to use suspend or hibernate, configure the related options accordingly.
If you have multiple GPUs in your machine and intend to use X11, then proceed to X11 section (Wayland should just work).
- In most cases a reboot of the system is recommended to fully load the new driver.
Tesla Drivers
Tesla drivers are Debian-packaged data-center drivers (same branch as Nvidia-packaged data-center drivers). As of 2026, all available versions in any Debian realease have reached their EOL upstream and thus should not be used for any DC deployments. Use the mentioned NV DC drivers instead.
The name comes from the Nvidia's first DC-dedicated architecture. It is sometimes still used across NV's documentation and URLs.
Kepler GPUs on Trixie & Bookworm (D-13 & D-12)
Version 470.256.02 is the last that supports Kepler GPUs. Its Tesla variant is available in bookworm, bookworm-backports and unstable suites and can be easily installed also on Trixie when using 6.12 kernel from the main trixie suite. Patches for kernels 7.x are available also, so with some gymnastics, it is possible to install it when using kernels from trixie-backports as well.
This version is no longer maintained and contains several security issues.
It should be used only in properly isolated, trusted environments: on virtual machines or spare computers that don't have network access to any other systems and that ideally have their drives wiped clean on a regular basis.
First, MAKE SURE that you've completed mandatory steps described in the prerequisites section, then proceed to the subsection appropriate for your system:
Bookworm, kernels 6.1.x
Install nvidia-tesla-470-driver package:
# apt install nvidia-tesla-470-driver
DKMS will build the modules for your system.
Proceed to post-installation steps.
Bookworm, kernels 6.12.x from Backports
Make sure your system is prepared as described in Backports section.
Install nvidia-tesla-470-driver package from bookworm-backports:
# apt install -t bookworm-backports nvidia-tesla-470-driver
DKMS will build the modules for your system.
Proceed to post-installation steps.
Trixie, kernels 6.12.x
The procedure consists of configuring apt sources in a way that will not affect unrelated parts of the system and then installing the driver.
Note: using bookworm-backports is usually preferred over unstable as the latter tends to pull some additional dependencies outside of Nvidia driver packages (under certain circumstances apt may even replace the whole glibc when installing this driver from unstable). Moreover, while the version from unstable seems newer, it is based on the same proprietary binaries anyway and currently does not compile on 7.3.x kernels either. If you however have a strong preference for unstable, then replace all occurrences of bookworm-backports / n=bookworm-backports with unstable / a=unstable in the below configs and it should generally work fine: just pay attention during any subsequent apt operations if you are not upgrading half of your system to Sid.
Using drivers originally intended for a different release is at least a bit of a dirty hack and borderline "FrankenDebian".
Proceed at your own risk.
Add bookworm-backports sources somewhere in /etc/apt/sources.list.d/ folder, for example in /etc/apt/sources.list.d/bookworm-backports.list file:
deb http://deb.debian.org/debian/ bookworm-backports non-free-firmware non-free contrib main deb-src http://deb.debian.org/debian/ bookworm-backports non-free-firmware non-free contrib main
To ensure that related packages always come from bookworm-backports suite, including during system upgrades, while unrelated packages don't conflict with trixie-backports (in case you have it enabled), add a file with the below contents somewhere in /etc/apt/preferences.d/ folder, for example in /etc/apt/preferences.d/nvidia-kepler.pref file:
Package: * Pin: release n=bookworm-backports Pin-Priority: 90 Package: *nvidia-tesla-470* Pin: release n=bookworm-backports Pin-Priority: 510
Update apt DB:
# apt update
If you intend to install 32-bit libs (nvidia-tesla-470-driver-libs:i386), it is recommended to first install libglx0:i386 and libegl1:i386 from trixie suite before the driver:
# apt install libglx0:i386 libegl1:i386
This should make the next step install nvidia-tesla-470-driver-libs:i386 automatically (depending on your other configured sources, apt may sometimes fail to calculate dependencies coming from different suites).
Install nvidia-tesla-470-driver package:
# apt install nvidia-tesla-470-driver
DKMS will build the modules for your system.
Proceed to post-installation steps.
Trixie, kernels 7.x
The procedure consists of configuring patch overriding for the DKMS module sources and then proceeding the same way as in the case of kernels 6.12.x.
Many ppl would call this "a full-blown FrankenDebian"...
...but that's a sad consequence of planned obsolescence by Nvidia
Applying kernel patches from 3rd party community repos DRAMATICALLY increases the risk of supply-chain attacks!!
If you don't have a knowledge to verify the patches before following the below procedure, you should treat any machine using the patched modules as TOTALLY PWND until a complete OS reinstallation.
When loading the driver on kernels 7.x, a warning will be generated in system logs: "Unpatched return thunk in use. This should not happen!". This seems to be mostly harmless, see details in this Nvidia forums thread.
Recently released to unstable version 470.256.02-10 does compile on kernels up to 7.2.x, so if you don't plan to use kernels 7.3.x or newer in a near future, you can proceed to the instructions for kernels 6.12.x right away and use unstable instead of bookworm-backports as explained in the initial note there.
DKMS version 3.4.x is required for support of patch overriding: it's not yet available even in Sid, so download and install it from the NV DC repo, currently v3.4.3:
$ wget -O /tmp/dkms.deb https://developer.download.nvidia.com/compute/cuda/repos/debian13/x86_64/dkms_3.4.3-1_all.deb # apt install /tmp/dkms.deb
If you prefer, you can instead add the NV DC repo to apt sources as described at the beginning of the instructions for NV DC drivers and install just dkms from there (up to and including point 4). The advantage is that this way you will receive any future upgrades to DKMS automatically.
Clone the patches repo and copy them into /etc/dkms/nvidia-tesla-470/patches/ folder:
$ git clone --depth=1 https://github.com/joanbm/nvidia-470xx-linux-mainline.git /tmp/nvidia-470xx-linux-mainline # mkdir -p /etc/dkms/nvidia-tesla-470/patches/ # cp /tmp/nvidia-470xx-linux-mainline/patches/*.patch /etc/dkms/nvidia-tesla-470/patches/
Create a patch override config replacing all 28 patches from nvidia-tesla-470-kernel-dkms=470.256.02-5~bpo12+1 package with the ones copied above:
$ grep '^apply_patch ' /tmp/nvidia-470xx-linux-mainline/extract_and_patch |sed -e 's@apply_patch @@' >/tmp/nvidia-tesla-470-patches.txt $ i=0; while read filename; do echo "PATCH[${i}]=${filename}"; i=$(( i + 1 )); done </tmp/nvidia-tesla-470-patches.txt >/tmp/nvidia-tesla-470.conf $ for (( ; i < 28; i++)); do echo "PATCH[${i}]="; done >>/tmp/nvidia-tesla-470.conf # cp /tmp/nvidia-tesla-470.conf /etc/dkms/As of commit b68e153, the resulting /etc/dkms/nvidia-tesla-470.conf file should look like the below:
PATCH[0]=0001-Fix-conftest-to-ignore-implicit-function-declaration.patch PATCH[1]=0002-Fix-conftest-to-use-a-short-wchar_t.patch PATCH[2]=0003-Fix-conftest-to-use-nv_drm_gem_vmap-which-has-the-se.patch PATCH[3]=kernel-6.10.patch PATCH[4]=kernel-6.12.patch PATCH[5]=nvidia-470xx-fix-gcc-15.patch PATCH[6]=nvidia-470xx-fix-linux-6.13.patch PATCH[7]=nvidia-470xx-fix-linux-6.14.patch PATCH[8]=nvidia-470xx-fix-linux-6.15.patch PATCH[9]=nvidia-470xx-fix-linux-6.17.patch PATCH[10]=nvidia-470xx-fix-linux-6.19-part1.patch PATCH[11]=nvidia-470xx-fix-linux-6.19-part2.patch PATCH[12]=nvidia-470xx-fix-linux-7.0.patch PATCH[13]=nvidia-470xx-fix-linux-7.2-part1.patch PATCH[14]=nvidia-470xx-fix-linux-7.2-part2.patch PATCH[15]=nvidia-470xx-fix-linux-7.2-part3.patch PATCH[16]=nvidia-470xx-fix-linux-7.3.patch PATCH[17]=disable-objtool-override.patch PATCH[18]=enable-drm-modeset-by-default.patch PATCH[19]= PATCH[20]= PATCH[21]= PATCH[22]= PATCH[23]= PATCH[24]= PATCH[25]= PATCH[26]= PATCH[27]=
Proceed to the instructions for kernels 6.12.x.
Post-installation steps for Kepler GPUs
Fix the supported Vulkan version from 1.3.xxx (wrongly provided by driver v535/550) to the actual 1.2.175 in /usr/share/vulkan/implicit_layer.d/nvidia_layers.json and /usr/share/vulkan/implicit_layer.d/nvidia_layers.json files:
$ sed -e 's@"api_version" : "1.3...."@"api_version" : "1.2.175"@' /usr/share/vulkan/icd.d/nvidia_icd.json >/tmp/nvidia_icd.json # cp /tmp/nvidia_icd.json /usr/share/vulkan/icd.d/nvidia_icd.json $ sed -e 's@"api_version" : "1.3...."@"api_version" : "1.2.175"@' /usr/share/vulkan/implicit_layer.d/nvidia_layers.json >/tmp/nvidia_layers.json # cp /tmp/nvidia_layers.json /usr/share/vulkan/implicit_layer.d/nvidia_layers.json
This driver does not support nvidia-persistenced available in Bookworm/Trixie repos (v535/v550), so disable it:
# systemctl disable nvidia-persistenced.service
Legacy persistence mode still works regardless and if you need it, it may be enabled with the below command after the driver is loaded:
# nvidia-smi -pm 1
If you intend to use suspend or hibernate, configure the related options accordingly.
If you intend to use the NV GPU as a GUI display device, check X11 section (Wayland is very unlikely to work on Kepler GPUs).
- In most cases a reboot of the system is recommended to fully load the new driver.
If you intend to use DXVK, note that the current versions will not work on Kepler GPUs as they require Vulkan-1.3 support at least, so you will need to stick to 1.10.x series at most (latest release as of Sep 2026: 1.10.3) and corresponding DXVK-NVAPI versions (0.4, 0.5.x or 0.6). Also some recent version of Wine Staging may be needed for some programs.
- When this driver is loaded, certain versions of Wine will fail to start, if the display is not on the Nvidia GPU (the process will just hang until killed).
Suspend and Hibernate configuration
Suspend and hibernate have been quite problematic with NV GPUs, this to some extent may have been caused by the configuration defaults of power management options that do not work well in many scenarios.
in case of proprietary flavor and versions up to 590 of open flavor, enabling NVreg_PreserveVideoMemoryAllocations in combination with /proc/driver/nvidia/suspend interface (handled by NV-provided Systemd services) seems to work best on most machines. Some additional notes:
On some Optimus laptops NVreg_PreserveVideoMemoryAllocations may break things.
On systems that support S0ix (most modern hardware), enabling additionally NVreg_EnableS0ixPowerManagement may improve suspend/resume times.
On systems that use tmpfs for /tmp/ (default since Trixie), NVreg_TemporaryFilePath should be set to some persistent storage location like /var/tmp/.
See the v580 docs for details.
in case of open flavor, versions 595 and newer, additionally to the above, NVreg_UseKernelSuspendNotifiers should be enabled which obsoletes the related Systemd services (nvidia-suspend.service, nvidia-suspend-then-hibernate.service, nvidia-hibernate.service, nvidia-resume.service), so they must be disabled. It's safest to leave NVreg_PreserveVideoMemoryAllocations to the default 2, meaning "autodetect", but on most non-Optimus hardware it can be also forced to 1. See the v595 docs for details.
Verifying S0ix support
Install acpica-tools:
# apt install acpica-tools
In some temporary folder (like /tmp/) run
# acpidump -b
This will produce a bunch of *.dat files.
In the same folder run
$ iasl -d *.dat
This will produce a (mostly) human-readable file named facp.dsl among others.
Check the value of of Low Power S0 Idle inside that file:
$ grep "Low Power S0 Idle" facp.dsl
1 means that S0ix is supported.
See this article for details.
Debian drivers config
Both Trixie and Bookworm packages provide /etc/modprobe.d/nvidia-options.conf that contains a template of options for proprietary flavor and older versions of open one (including versions currently packaged by Debian), but all the settings are commented out. Therefore, unless you have an Optimus laptop:
Uncomment the entry enabling NVreg_PreserveVideoMemoryAllocations.
If your system supports S0ix, then uncomment also the entry for NVreg_EnableS0ixPowerManagement
- Depending on your Debian release:
In case of Trixie, additionally append
options nvidia NVreg_TemporaryFilePath=/var/tmp
at the end of the file.In case of Bookworm, /proc/driver/nvidia/suspend related Systemd services are usually disabled by default, so enable them with the below commands:
# systemctl enable nvidia-suspend.service nvidia-hibernate.service nvidia-resume.service
NV DC drivers config
Versions up to 590
The packages for both Trixie and Bookworm provide /etc/modprobe.d/nvidia.conf that should work fine on most hardware with both flavors, so you usually do not need to do anything. If however your machine does not support S0ix, you need to remove NVreg_EnableS0ixPowerManagement line from the config file.
Versions 595 and 610
The packages for both Trixie and Bookworm provide /etc/modprobe.d/nvidia.conf that contains configuration for proprietary. Therefore if you use:
proprietary flavor, you don't need to do anything on most hardware.
open flavor, then:
Append
options nvidia NVreg_UseKernelSuspendNotifiers=1
at the end of the file.Disable /proc/driver/nvidia/suspend related Systemd services:
# systemctl disable nvidia-suspend.service nvidia-suspend-then-hibernate.service nvidia-hibernate.service nvidia-resume.service
In both cases, if your machine does not support S0ix, you need to remove NVreg_EnableS0ixPowerManagement line from the config file.
Versions from 615 onwards
As proprietary flavor was dropped, packages now provide /etc/modprobe.d/nvidia.conf that should work on most supported configurations: NVreg_UseKernelSuspendNotifiers, NVreg_PreserveVideoMemoryAllocations and NVreg_EnableS0ixPowerManagement are all enabled. If however your machine does not support S0ix, you need to remove NVreg_EnableS0ixPowerManagement line from the config file.
Wayland configuration
Wayland is a project aiming to replace X11. Gnome uses it by default on systems using any open-source graphic driver. In case of the NV proprietary driver, specific kernel module options need to be enabled and even then it may not function properly on certain hardware configurations (in which case Gnome will automatically fallback to X11).
Make sure that you have configured suspend+hibernate related options accordingly to your driver type: in case of proprietary flavor, option NVreg_PreserveVideoMemoryAllocations is mandatory for Wayland.
Options modeset and fbdev of nvidia_drm module must be enabled. You can verify it by the contents of /sys/module/nvidia_drm/parameters/modeset and /sys/module/nvidia_drm/parameters/fbdev virtual files: they both should contain Y.
In case of Nvidia-packaged drivers v580+, all these options are enabled by default.
In case of Debian-packaged drivers, it is usually sufficient to create a file with the following contents somewhere in /etc/modprobe.d/ folder, for example in /etc/modprobe.d/nvidia-wayland.conf file:
options nvidia-drm modeset=1 options nvidia-drm fbdev=1
X11 configuration
X11 is a "traditional" base of Linux GUI system. It is used for example by such desktop-environments as MATE of XFCE.
Note: in the reminder of this section, any identifier starting with My may be changed to whatever name you like, you just need to change its other occurrences accordingly.
Single GPU
If Nvidia is the only single GPU in your system and the driver is functioning properly, X11 should be able to auto-configure itself without any help.
If that's not the case, you may add a Device entry in some file in /etc/X11/xorg.conf.d/ folder, for example in /etc/X11/xorg.conf.d/20-nvidia.conf file:
Section "Device"
Identifier "My Nvidia GPU"
Driver "nvidia"
EndSection
Multiple GPUs
If you have multiple GPUs in your system (Nvidia or others), you may need to point the GPU with its PCIe bus ID:
Section "Device"
Identifier "My Nvidia GPU"
Driver "nvidia"
BusID "PCI:11:0:0"
EndSectionBus ID may be obtained from the output of lspci: numbers from the first column need to be converted from hexadecimal to decimal and separated with colons, so 0b:0.0 from the example output becomes 11:0:0 in the config above.
In some situations you may instead decide to run X11 on another GPU and use the Nvidia one to offload only certain tasks: see PRIME offloading section in the driver's README. It is for example common on laptops to run X11 on iGPU for power-saving reasons. In such case AutoAddGPU server flag should be set to false to prevent X11 from autoconfiguring any Nvidia or other cards not configured explicitly:
Section "ServerFlags"
Option "AutoAddGPU" "false"
EndSection
Section "Device"
Identifier "My AMD iGPU"
Driver "amdgpu"
BusID "PCI:101:0:0"
EndSectionNote that when AutoAddGPU is false, then xrandr --listproviders will not show any other GPUs, but PRIME offloading will still work as long as the kernel driver is functioning properly.
Displays connected to other GPUs
If you have multiple GPUs in your system, it is also possible to use displays connected to those other than the Nvidia one (like for example your laptop's internal display connected to the iGPU). First, modeset and fbdev params of nvidia_drm module need to be enabled, similarly like in the case of Wayland. Next, you usually need to configure such setup explicitly (in some cases X does auto-configure everything reasonably well, but often it's not even exactly obvious what the best config is in a given situation), For example in case of the example output in lspci section, you could use the following config:
In /etc/X11/xorg.conf.d/20-nvidia.conf file:
Section "Device"
Identifier "My Nvidia GPU"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration" "true"
BusID "PCI:11:0:0"
EndSectionOption AllowEmptyInitialConfiguration tells nvidia driver to ignore the fact that no displays may be connected to a given GPU. Depending on the driver version, it may refuse to start otherwise. See the full list of recognized options for details.
In /etc/X11/xorg.conf.d/20-amd.conf file:
Section "Device"
Identifier "My AMD iGPU"
Driver "amdgpu"
BusID "PCI:101:0:0"
EndSectionIn /etc/X11/xorg.conf.d/70-screen.conf file:
Section "Screen"
Identifier "My dual GPU screen"
Device "My Nvidia GPU"
GPUDevice "My AMD iGPU"
EndSectionThe Screen section tells X to use My Nvidia GPU as the main GPU performing rendering and My AMD iGPU as an additional one only providing more displays. If you have more GPUs in your system you can add them also as a GPUDevice in your Screen config.
Other scenarios and resources
If you use your Nvidia card as an eGPU, check the relevant subsection on eGPU page.
Optional addons
CUDA toolkit
This section refers to Debian-packaged CUDA toolkit. If you use Nvidia-packaged DC drivers, you also need to use the Nvidia-packaged toolkit.
To install CUDA toolkit (nvcc, libs, headers, profilers etc) run the following command:
# apt install nvidia-cuda-dev nvidia-cuda-toolkit
Below are the currently available versions:
(last updated: in times before the light...)
Debian |
CUDA toolkit |
unstable "Sid" |
12.4.127 |
13 "Trixie" |
12.4.127 |
12 "Bookworm" |
11.8.89 |
11 "Bullseye" |
11.2.2 |
32bit Intel libs
If you didn't configure 32bit support before installing the driver, but decided later you needed it, you can add the support anytime later:
Add 32bit sources to apt:
# dpkg --add-architecture i386 # apt update
Install 32bit version of the NVIDIA libraries:
# apt install nvidia-driver-libs:i386
If you're forced to use a legacy driver, you will need to instead install one of nvidia-tesla-470-driver-libs:i386. nvidia-legacy-390xx-driver-libs:i386, nvidia-legacy-340xx-driver-libs:i386 etc.
Wine DX driver extension
If you use Wine with Vulkan DX drivers (DXVK, VKD3D-proton), then it is hightly recommended to also install DXVK-NVAPI. This allows several programs to properly detect your NV GPU.
VAAPI driver
Nvidia does not provide a VA-API driver needed for hardware video acceleration in browsers like Firefox, but a 3rd party open-source driver built on top of NVAPI / NVDEC exists: nvidia-vaapi-driver. Refer to the project's README file for configuration details.
OptiX
Debian-packaged driver meta-packages do not pull OptiX Ray Tracing runtime by default, but it can be installed separately:
# apt install libnvoptix1
In case of Tesla drivers, the corresponding package is named libnvidia-tesla-${VERSION}-nvoptix1, for example for v470:
# apt install libnvidia-tesla-470-nvoptix1
Nvidia-packaged drivers pull OptiX in by default.
Redirecting Nvidia GPUs to QEMU+libvirt VMs
When redirecting PCIe devices to a VM, QEMU needs to allocate right away and keep the whole amount of the VM's configured RAM.
Unless it's a headless server, make sure the display is handled by another GPU and that no processes run on the GPU to be redirected (as reported by nvidia-smi).
Either dynamically unbind or statically blacklist the GPU from nvidia and nouveau modules on the supervisor host machine.
If the Nvidia card provides an audio controller, it must be also unbound or blacklisted from snd_hda_intel module.
Both PCIe devices provided by the card (if both are present that is) must be redirected to the target guest VM in its definition via vfio_pci module, for example:
GPU:
<hostdev mode="subsystem" type="pci" managed="yes"> <source> <address domain="0x0000" bus="0x03" slot="0x00" function="0x0"/> </source> <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0" multifunction="on"/> </hostdev>audio:
<hostdev mode="subsystem" type="pci" managed="yes"> <source> <address domain="0x0000" bus="0x03" slot="0x00" function="0x1"/> </source> <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x1"/> </hostdev>
If you use virt-manager GUI:
Inside the VM window switch to details (the light bulb button in the top bar)
Click Add Hardware button in the bottom-left corner.
Select PCI Host Device in the left menu of the dialog window.
- Choose the GPU first.
- Repeat the process for the audio controller (if present).
By default the audio controller will end up as a separate PCIe device with a different bus ID than the GPU. While not strictly necessary, it is recommended to edit its XML (select it in the left list of the VM devices, then switch to XML tab in the top bar of the subwindow) to be function 0x1 of the same bus and slot as the GPU: see the above XMLs (this should automatically add multifunction="on" to the GPU's XML).
Optionally the PCIe devices may be statically bound to vfio_pci module on the supervisor host using ids param: this will prevent them from binding to nouveau and snd_hda_intel modules and will also slightly speed up the VM start. It is still recommended to blacklist the GPU from nvidia module on the host if possible (and if it's installed at all) as this one sometimes precedes vfio_pci.
- Inside the guest VM, all that is necessary is to install the Nvidia driver.
Drivers pre-535 on guest VMs
Older versions of Nvidia drivers blatantly refuse to load on VMs, resulting in RmInitAdapter failed (0x22:0x56:667) message in the logs. Fortunately this no longer the case since v535, but if you are forced to use some ancient version (for example for Kepler GPUs), then you must configure the VM to trick the driver to think it's not a VM:
the virtual CPU must be a passthrough of the host's CPU (mode="host-passthrough" attribute of the <cpu> element, this is the default).
add <feature policy="disable" name="hypervisor"/> subelement to the <cpu> element.
add <kvm><hidden state="on"/></kvm> subelement to the <features> element.
For example:
<domain type="kvm">
<!--
other stuff here...
-->
<features>
<acpi/>
<apic/>
<kvm>
<hidden state="on"/>
</kvm>
<vmport state="off"/>
</features>
<cpu mode="host-passthrough" check="none" migratable="on">
<feature policy="disable" name="hypervisor"/>
</cpu>
<!--
other stuff here...
-->
</domain>See this Proxmox article for details.
Troubleshooting
Installation problems
Package dependency problems
Symptoms:
apt install command output contains a text similar to the following:
Solving dependencies... Error! Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies:
Possible reasons and resolutions:
This is usually due to apt sources misconfiguration:
Make sure that you've added necessary components as described in apt components section.
If you are trying to install a driver from Backports, check sources configuration in Backports section. After that repeat the apt install command and resume the installation procedure.
If you have or previously had some packages from Backports or Sid installed and now you are trying to install a driver from the base suite, it is possible, that apt is confused by too high versions of some of your (remaining) installed packages: either downgrade all packages to the base suite or install a driver from Backports/Sid.
Kernel modules build skipped
Symptoms:
apt install command output contains a text similar to the following: (kernel version will likely differ)
WARNING: No kernel headers were found, skipping module build. To get the headers for the running kernel (6.17.11+deb14-amd64) please install the linux-headers-6.17.11+deb14-amd64 package.Output of /sbin/dkms status 'nvidia*' does not mention the module being installed for all installed kernel versions, for example:
nvidia/595.71.05, 6.12.88+deb13-amd64, x86_64: installed
...while the output of apt list --installed '?name(linux-image-[[0-9]]*)' contains more entries:
linux-image-6.12.88+deb13-amd64/stable-security,now 6.12.88-1 amd64 [installed,automatic] linux-image-7.0.7+deb13-amd64/stable-backports,now 7.0.7-1~bpo13+1 amd64 [installed,automatic]
Possible reasons and resolutions:
This is due to missing kernel headers appropriate for one of your installed kernels. Make sure that you have appropriate headers packages installed as described in Kernel headers section. Also, the above output provides a hint, but only for the exact kernel version you are currently running, so if you blindly follow and install only this exact package, it may stop working after booting to another kernel version. Generalize the hint by removing the ABI version from the suggested package name, so in this case change linux-headers-6.17.11+deb14-amd64 to linux-headers-amd64 and install it:
# apt install linux-headers-amd64
This will often trigger the module build process right away, but sometimes you may need to reconfigure the kernel modules package with one of the following commands:
in case you are trying to install a proprietary flavor:
# dpkg-reconfigure nvidia-kernel-dkms
in case you are trying to install a Debian-packaged open flavor:
# dpkg-reconfigure nvidia-open-kernel-dkms
to make it more fun (please kill me), in case you are trying to install an Nvidia-packaged open flavor, the package name is slightly different:
# dpkg-reconfigure nvidia-kernel-open-dkms
After that, resume the installation procedure.
Kernel modules build failures
Symptoms:
apt install command output contains a text similar to the following: (kernel and driver versions will likely differ)
Building module(s).........(bad exit status: 2) Failed command: 'make' -j24 modules KERNEL_UNAME=6.17.12+deb14-amd64 NV_VERBOSE=1 Error! Bad return status for module build on kernel: 6.17.12+deb14-amd64 (x86_64) Consult /var/lib/dkms/nvidia/575.57.08/build/make.log for more information.
Possible reasons and resolutions:
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.
Operational problems
Black screen right after boot menu
ToDo: explain:
- how to try to switch to a text console
- how to check all outputs for signal
- how to use GRUB to boot to text mode and proceed to the next section.
Nvidia graphics don't work but a text terminal or iGPU graphics available
ToDo: explain:
how to check for SecureBoot problems
- how to check for conflicts with Nouveau
- how to check for unsupported GPUs symptoms
critical module params like modesetting and fbdev
- in what order to try other flavors and versions
GPU has fallen off the bus
Symptoms:
Everything initially works, but suddenly applications crash or the system freezes completely. In the logs there are messages similar to the below: (PCI bus ID will likely differ)
NVRM: Xid (PCI:0000:01:00): 79, GPU has fallen off the bus.
Possible reasons and resolutions:
In the words of an Nvidia eng, "GPU falling off the bus is often a bios, power supply or thermal issue", therefore:
- Make sure you are using the latest possible driver version for your GPU as it may be bringing GSP firmware fixes.
- Check if there's a firmware update available for your mobo from its manufacturer: this often resolves the issue.
- Make sure your PSU is able to deliver sufficient amount of juice, don't use off-brand PSUs or models known to cause issues.
- Watch your thermals and if they exceed 90 degrees, check the cooling system (fans, thermal paste).
High-end Blackwell models (5080, 5090, Pro 5000, Pro 6000) are notorious (1, 2) for falling off buses without any reason. It is speculated that they are actually overheating, but the firmware hides this fact from users. Some users reported that limiting maximum clock speed or locking it permanently to a fixed value with nvidia-smi -lgc mitigates the issue, but it does not help in every case. For example:
nvidia-smi -lgc 180,2400
See man nvidia-smi for details.
- In case of external GPUs, falling off the bus may be an indicator of an unstable connection:
- Verify your cable quality and condition.
In case of OCuLink, consider using redrivers on both sides.
PCIe tunneling over TB5 is currently unstable on Linux in most cases.
- Physical damage to PCIe connectors.
Other operational problems
ToDo: explain:
- most common related module params
- in what order to try other flavors and versions
- How to check version-feedback threads on the Nvidia forum
Miscellaneous
ToDo: this subsection may be partially out of date.
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.
Reboot 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. 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:
setpci -v -H1 -s 00:01.00 BRIDGE_CONTROL=0
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
Additional troubleshooting information is available.
Where and how to ask the community for help
Relevant Debian and Nvidia subforums:
Required info when asking for assistance:
- mobo/laptop model, ideally also CPU model
list of all GPUs in the system as reported by
$ lspci | grep -iE "3d|display|vga"
current kernel as reported by
$ uname -a
driver packaging method
exact driver version and flavor, ideally as an output of
$ apt list --installed "nvidia*dkms"
output of
# dkms status 'nvidia*'
- if possible to check, the exact commands that were used to install kernel headers and the driver
related log excerpts: at least output of
# journalctl -b |grep -iE 'nvidia|nvrm|nvl|gsp|nouveau'
- steps to reproduce the problem
Also recommended is a bug report file created by sudo nvidia-bug-report.sh, note however that this file may contain some personal identifiable info, such as serial numbers, network addresses, usernames etc, so check before posting.
Uninstallation
The first step depends on the packaging method that was used to install the driver:
In case of Debian-packaged drivers and Nvidia-packaged data-center drivers, you can simply remove all packages with nvidia and cuda in their names together with their configs and automatic dependencies:
# apt purge --auto-remove '*nvidia*' '*nvidia*:i386' '*cuda*' '*cuda*:i386'
In case of dot-run installers, you may try --uninstall option, but a complete reinstallation of the OS is more recommended.
If you configured X11 explicitly to use nvidia driver, you must revert it (unless you intend to install another proprietary driver right away).
- If you want to use the open-source Nouveau driver after that, then follow the below sub-steps:
- Install the firmware needed by Nouveau:
On Trixie it is in a dedicated firmware-nvidia-graphics package:
# apt install firmware-nvidia-graphics
If you use a kernel from trixie-backports, then instead install the version from trixie-backports as well:
# apt install -t trixie-backports firmware-nvidia-graphics
On Bookworm, if you use a kernel from the Backports, the firmware is also in firmware-nvidia-graphics:
# apt install -t bookworm-backports firmware-nvidia-graphics
In Bookworm's base suite and on Bullseye, the firmware is a part of firmware-misc-nonfree:
# apt install firmware-misc-nonfree
On older Debian versions you may also need to reinstall X11 drivers:
# apt install --reinstall xserver-xorg-core xserver-xorg-video-nouveau
- Install the firmware needed by Nouveau:
- In most cases a reboot of the system is recommended to fully purge the old driver. In case you intend to install another driver, you can usually defer a reboot to post-installation.
See Also
- Libre Source (Open Source) alternative to Nvidia Graphics Drivers

Note for editors:
See the dedicated Debian forum thread before editing this page.