How to Install NVIDIA Drivers on Debian

NVIDIA drivers unlock GPU acceleration for gaming, graphics rendering, and CUDA computational workloads on Debian. This guide covers installing NVIDIA drivers using two methods: Debian’s default repositories for tested stability, and NVIDIA’s CUDA repository for cutting-edge drivers and newest GPU support. By the end, you will have working NVIDIA drivers with GPU acceleration verified through nvidia-smi.

Choose Your NVIDIA Driver Installation Method

Debian provides two distinct paths for NVIDIA driver installation, each targeting different use cases and update preferences. Understanding the trade-offs between repository stability and feature currency helps you select the method that matches your hardware requirements and risk tolerance.

MethodDebian Version SupportStabilityBest For
Debian Default RepositoryAll supported Debian versions (13 Trixie, 12 Bookworm, 11 Bullseye)High stability, conservative updates, thorough distribution testingProduction servers, conservative desktop setups, users prioritizing reliability
NVIDIA CUDA RepositoryDebian 13, 12, and 11 (x86_64 architecture)Cutting-edge features, frequent updates, minimal delay from NVIDIA releaseGaming with latest optimizations, machine learning workloads, CUDA development, newest GPU hardware support

Specifically, for most desktop users and gaming workloads, the NVIDIA CUDA repository offers the best balance of performance and hardware support. It provides immediate access to performance improvements, security patches, and support for the latest GPU models. Conversely, production servers and risk-averse environments should favor Debian’s default repositories for their proven stability and integration with the distribution’s support lifecycle.

Pre-Installation Steps

Update System Packages

First, update your package index and upgrade existing packages to ensure kernel headers and dependencies match your current system state:

sudo apt update

Proceed to upgrade any outdated packages using the following command.

sudo apt upgrade

Remove Previous NVIDIA Driver Installations (If Switching Methods)

Mixing NVIDIA driver installation methods causes conflicts, especially when switching from Debian’s default repository to the NVIDIA CUDA repository or vice versa. If you previously installed drivers using one method and want to switch to another, removing the existing installation prevents package conflicts and system instability.

Choose the removal method that matches your previous installation:

Remove APT-Installed NVIDIA Drivers

Uninstall NVIDIA drivers installed through APT package manager:

sudo apt autoremove nvidia* --purge

Remove Runfile-Installed NVIDIA Drivers

Use the runfile uninstaller to remove NVIDIA drivers:

sudo /usr/bin/nvidia-uninstall

Remove CUDA Toolkit Runfile Installation

Clean up a CUDA toolkit installed via runfile (replace X.Y with your version):

sudo /usr/local/cuda-X.Y/bin/cuda-uninstall

Enable Contrib and Non-Free Repositories

NVIDIA drivers reside in Debian’s non-free repositories due to their proprietary licensing. Before installation, you must enable the contrib and non-free repositories. The required components differ by version: Debian 12+ needs contrib non-free non-free-firmware, while Debian 11 uses only contrib non-free.

On Debian 13 and 12 (using DEB822 format), edit your sources file directly:

sudo sed -i 's/Components: main/Components: main contrib non-free non-free-firmware/' /etc/apt/sources.list.d/debian.sources

On Debian 11 (using legacy sources.list format), append the components:

sudo sed -i 's/main$/main contrib non-free/' /etc/apt/sources.list

Refresh your package cache after modifying repository sources:

sudo apt update

Method 1: Install NVIDIA Drivers via Debian Default Repository

Driver availability differs by release. On Debian 13 Trixie, driver versions 550.163.01 (primary) and 535.261.03 (Tesla 535 series) support Maxwell through Ada Lovelace architectures. Meanwhile, Bookworm packages driver version 535.183.01 for Maxwell through Ampere GPUs, while Bullseye offers driver version 470.129.06 (primary) for Kepler through Ampere hardware plus legacy driver 390.144 for older Fermi and Kepler GPUs. Therefore, use nvidia-detect to identify which driver package your GPU requires.

NVIDIA drivers include proprietary firmware and closed-source components necessary for full GPU functionality. The drivers integrate with DKMS (Dynamic Kernel Module Support), which automatically rebuilds kernel modules when you install kernel updates, maintaining driver functionality across kernel upgrades without manual intervention.

Systems with Secure Boot enabled require enrolling a Machine Owner Key (MOK) to load DKMS-built kernel modules. Debian provides detailed instructions for MOK enrollment with DKMS and Secure Boot. Complete MOK enrollment before installing NVIDIA drivers to avoid rebuilding the kernel image. Alternatively, temporarily disable Secure Boot in BIOS/UEFI settings during installation.

Install Linux Kernel Headers

NVIDIA drivers compile kernel modules against your running kernel, which requires matching kernel headers. Therefore, the safest approach installs headers that match the exact kernel you are running:

sudo apt install linux-headers-$(uname -r)

This command installs headers for the exact kernel version currently running. Consequently, this prevents DKMS build failures caused by mismatched header packages.

Alternatively, for 64-bit systems, install the headers directly:

sudo apt install linux-headers-amd64

On 32-bit systems (rare on modern hardware), specify the architecture manually. Non-PAE kernel systems (32-bit) use:

sudo apt install linux-headers-686

PAE kernel systems (32-bit with Physical Address Extension) use:

sudo apt install linux-headers-686-pae

Install NVIDIA Drivers Using nvidia-detect

The nvidia-detect utility analyzes your hardware and recommends the optimal driver package for your specific GPU model. Install nvidia-detect to identify the correct driver:

sudo apt install nvidia-detect

Run nvidia-detect to identify your NVIDIA GPU:

nvidia-detect

Example output:

Detected NVIDIA GPUs:
03:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117 [GeForce GTX 1650] [10de:1f82] (rev a1)

Checking card: NVIDIA Corporation TU117 [GeForce GTX 1650] (rev a1)
Your card is supported by the default drivers.
It is recommended to install the
    nvidia-driver
package.

Install the recommended driver package along with required firmware:

sudo apt install nvidia-driver firmware-misc-nonfree

Debian 13 Trixie users have two driver options: the primary nvidia-driver package (version 550.x, recommended for most users) and nvidia-tesla-535-driver (version 535.x, older but tested). Both support Maxwell through Ada Lovelace GPUs. Debian 12 Bookworm and Debian 11 Bullseye ship a single primary driver version (535.x and 470.x respectively) via the nvidia-driver package. Use nvidia-detect’s recommendation unless you have specific compatibility requirements.

During installation, you will typically see a notification about the open-source Nouveau driver conflicting with NVIDIA’s proprietary driver. The system requires a reboot to unload Nouveau and activate the NVIDIA driver. To proceed, press the ENTER key to continue the installation, then reboot.

Before rebooting, optionally verify DKMS successfully built the kernel module:

sudo dkms status

Expected output (driver built successfully):

nvidia/5xx.xx.xx, 6.x.x-x-amd64, x86_64: installed

The output should show the nvidia module with status “installed” for your running kernel. If DKMS reports build failures, troubleshoot before rebooting to avoid boot issues.

Reboot System to Activate Drivers

After installation completes, reboot your system to load the NVIDIA driver and disable Nouveau:

sudo reboot

Install Legacy NVIDIA Drivers for Older GPUs

GPUs from the 400 series and older require legacy driver branches that Debian maintains separately. If nvidia-detect recommends a legacy driver, install the 390xx series instead of the standard nvidia-driver package:

sudo apt install nvidia-legacy-390xx-driver firmware-misc-nonfree

Reboot to activate the legacy drivers:

sudo reboot

The 340xx legacy driver series is available for GeForce 8 through GeForce 300 series GPUs, but Debian strongly discourages its use. This driver is no longer included in stable Debian releases, contains serious unfixable security vulnerabilities, and may not receive timely updates for new kernels. Use the open-source Nouveau driver instead if you require security and have hardware this old. The 340xx series should only be considered as a last resort when Nouveau cannot meet your specific needs.

Method 2: Install NVIDIA Drivers via NVIDIA CUDA APT Repository

The NVIDIA CUDA APT repository delivers the latest proprietary and open-source drivers directly from NVIDIA, providing immediate access to new features, performance optimizations, and security patches as soon as they release. Furthermore, this method suits users who need cutting-edge GPU capabilities for machine learning, CUDA development, or gaming with the latest optimizations, and it includes full CUDA toolkit support for computational workloads.

Identify Your NVIDIA Graphics Card

Before installing drivers from the NVIDIA repository, verify your GPU model to ensure compatibility. While newer cards have guaranteed support, older hardware may require specific driver versions. Therefore, use lspci to identify your NVIDIA GPU:

lspci | grep -e VGA

Example output:

03:00.0 VGA compatible controller: NVIDIA Corporation TU117 [GeForce GTX 1650] (rev a1)

Import NVIDIA GPG Key and Repository

To begin, install the prerequisite packages for repository management and DKMS (Dynamic Kernel Module Support), which automatically rebuilds NVIDIA drivers when your kernel updates:

sudo apt install ca-certificates curl gnupg dkms -y

Next, download the NVIDIA GPG key directly in binary format and save it to the system keyring directory. Use the command matching your Debian version:

Debian 13 Trixie:

sudo curl -fsSLo /usr/share/keyrings/nvidia-drivers.gpg https://developer.download.nvidia.com/compute/cuda/repos/debian13/x86_64/8793F200.pub

Debian 12 Bookworm:

sudo curl -fsSLo /usr/share/keyrings/nvidia-drivers.gpg https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/3bf863cc.pub

Debian 11 Bullseye:

sudo curl -fsSLo /usr/share/keyrings/nvidia-drivers.gpg https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/3bf863cc.pub

Add NVIDIA CUDA APT Repository

Then, add the NVIDIA CUDA repository using the modern DEB822 format. Specifically, Debian 13 and 12 use .sources files as standard, while Debian 11 still primarily uses the legacy .list format.

Debian 13 Trixie:

echo "Types: deb
URIs: https://developer.download.nvidia.com/compute/cuda/repos/debian13/x86_64/
Suites: /
Signed-By: /usr/share/keyrings/nvidia-drivers.gpg" | sudo tee /etc/apt/sources.list.d/nvidia-drivers.sources

Debian 12 Bookworm:

echo "Types: deb
URIs: https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/
Suites: /
Signed-By: /usr/share/keyrings/nvidia-drivers.gpg" | sudo tee /etc/apt/sources.list.d/nvidia-drivers.sources

Debian 11 Bullseye:

echo 'deb [signed-by=/usr/share/keyrings/nvidia-drivers.gpg] https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/ /' | sudo tee /etc/apt/sources.list.d/nvidia-drivers.list

Debian 11 (Bullseye) remains in Long Term Support until August 2026 and still uses the legacy .list format shown above. Debian 12 and 13 use the modern DEB822 .sources format.

Verify the repository was added correctly by viewing the file (adjust filename for your Debian version):

cat /etc/apt/sources.list.d/nvidia-drivers.sources

Choose Between Proprietary and Open-Source Driver Variants

Starting with driver version 515, NVIDIA publishes two kernel module flavors: proprietary (closed-source) and open (open-source kernel modules with closed-source firmware and userspace). The open variant targets newer hardware from Turing architecture forward, while the proprietary variant supports legacy hardware. Blackwell is the first architecture that requires the open variant exclusively.

Architecture support breakdown:

  • Open variant: Turing (GTX 16/RTX 20 series), Ampere (RTX 30 series), Ada Lovelace (RTX 40 series), and Blackwell (RTX 50 series) architectures
  • Proprietary variant: Maxwell (GTX 900/10 series), Pascal (GTX 10 series), Volta, Turing, Ampere, and Ada Lovelace architectures
  • Legacy drivers (390xx, 340xx): Older architectures (Kepler, Fermi, etc.) not supported by current drivers

Generally, most users should choose proprietary drivers for proven stability and full feature support. However, the open variant offers better Linux kernel integration but may have reduced performance on some GPU models. Choose open drivers when you need open-source licensing, better kernel compatibility, or have Blackwell-series hardware that requires them.

Finally, update your package cache to reflect the newly added repository:

sudo apt update

Install the latest NVIDIA drivers, choosing between proprietary or open-source versions. For comprehensive CUDA development environments including CUDA toolkit, libraries, and samples, refer to the dedicated CUDA installation guide for Debian.

Proprietary NVIDIA Drivers

sudo apt install nvidia-driver nvidia-settings

The nvidia-driver metapackage automatically installs nvidia-smi as a dependency at the correct matching version. Do not install nvidia-smi explicitly, as this can cause version conflicts between the driver and monitoring utility.

Open-Source NVIDIA Drivers

sudo apt install nvidia-driver nvidia-kernel-open-dkms nvidia-settings

The open kernel module variant requires driver branches 515 and newer. Debian 12 Bookworm (default or CUDA repository) provides these packages, but Debian 11’s default repository tops out at the 470 branch and cannot install nvidia-kernel-open-dkms, so use the proprietary package there unless you have added NVIDIA’s CUDA repository with a newer branch. If you have pre-existing NVIDIA drivers from a different installation method, the package manager will prompt you to remove them before proceeding. Select Yes to avoid driver conflicts that cause system instability.

Reboot

During the final phase of the installation, most users will typically see a message like the image below:

To activate the installation, reboot your system. You can use the following command after completing the installation:

sudo reboot

Specialized Installation Options

Additionally, NVIDIA supports specialized installations that limit components to reduce system footprint and dependencies. These options target specific use cases where full desktop graphics or compute capabilities aren’t needed.

Compute-Only Installation (Headless Servers)

For GPU compute workloads without desktop graphics (machine learning servers, rendering farms, scientific computing clusters), install only the compute components to minimize dependencies and system resources:

sudo apt install nvidia-driver-cuda nvidia-kernel-dkms

Consequently, this excludes OpenGL, EGL, Vulkan, and X server drivers while retaining CUDA and compute capabilities. The installation remains minimal and focused on computational tasks.

Desktop-Only Installation (No Compute)

Alternatively, for systems using NVIDIA GPUs purely for desktop graphics without CUDA or compute requirements (office workstations, general desktop use):

sudo apt install nvidia-driver nvidia-kernel-dkms

This installs graphics drivers, OpenGL, Vulkan, and X server components while omitting CUDA libraries and compute frameworks. Components excluded at installation time can be added later by installing the appropriate packages.

Install 32-bit Support for NVIDIA Drivers

Furthermore, many 32-bit applications and games (particularly through Steam or Wine) require 32-bit NVIDIA libraries even on 64-bit systems. Enable multilib support and install the corresponding 32-bit driver libraries matching your installed driver version.

Enable 32-bit architecture support:

sudo dpkg --add-architecture i386
sudo apt update

Install 32-bit libraries for the primary nvidia-driver package:

sudo apt install nvidia-driver-libs:i386

If you installed a legacy driver instead of the standard nvidia-driver package, install the corresponding 32-bit libraries: nvidia-legacy-390xx-driver-libs:i386 for the 390xx series, or nvidia-legacy-340xx-driver-libs:i386 for the 340xx series. Match the 32-bit library package to your installed driver version to avoid conflicts.

Restart your applications (or reboot your system) to activate the 32-bit NVIDIA libraries. Steam and Wine applications now have access to proper GPU acceleration through the 32-bit library stack.

Confirm NVIDIA Drivers Installation

Verify NVIDIA Drivers via CLI Command

Verify the installation by running nvidia-smi, NVIDIA’s System Management Interface utility:

nvidia-smi

Example output:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 5xx.xx.xx    Driver Version: 5xx.xx.xx    CUDA Version: 1x.x     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:03:00.0  On |                  N/A |
| 35%   45C    P8    10W / 200W |    350MiB /  8192MiB |      2%      Default |
+-------------------------------+----------------------+----------------------+

Successful installation displays GPU model, driver version, CUDA version, and current GPU utilization. If this command fails or reports no NVIDIA devices, verify that /dev/nvidia* device files exist with correct permissions and confirm the nouveau driver is blacklisted.

For systems with compute capabilities, NVIDIA recommends testing GPU communication with the cuda-samples repository. The deviceQuery and bandwidthTest utilities confirm proper CUDA operation and validate that the driver, CUDA runtime, and GPU hardware communicate correctly for computational workloads. Download and build the samples following the repository instructions to perform comprehensive verification beyond basic driver detection.

The nvidia-smi output provides essential system information:

Verify NVIDIA Drivers via GUI

Open the NVIDIA Settings GUI using the following command:

nvidia-settings

Or launch the application icon from the applications menu:

Activities > Show Applications > NVIDIA X Server

The interface displays all NVIDIA driver settings and system information, confirming successful installation.

Additional screenshots show the NVIDIA Settings GUI interface for users new to Linux:

Configure Wayland Support (Optional)

Debian 12 Bookworm and newer default to Wayland sessions for GNOME and KDE Plasma desktops. Wayland is the modern display server that offers improved security, better performance, and stronger isolation compared to the legacy X11 server. However, NVIDIA driver version 495+ supports Wayland, but proper configuration ensures display managers recognize the driver and enable Wayland sessions. Therefore, most users should configure Wayland support to benefit from these improvements. Skip this section only if you deliberately use X11 exclusively.

Enable Kernel Modesetting

Check if NVIDIA kernel modesetting is enabled:

cat /sys/module/nvidia_drm/parameters/modeset

Expected output:

Y

If the output shows N, enable modesetting by adding the parameter to the NVIDIA module configuration:

echo "options nvidia-drm modeset=1" | sudo tee -a /etc/modprobe.d/nvidia-options.conf

Update the initramfs to apply the change:

sudo update-initramfs -u

Enable Power Management for Suspend and Resume

GNOME on Wayland requires video memory preservation for proper suspend/resume functionality and Wayland session availability. Enable the power management parameter:

echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1" | sudo tee -a /etc/modprobe.d/nvidia-power-management.conf

Skip the NVreg_PreserveVideoMemoryAllocations parameter if you have Optimus hybrid graphics (Intel + NVIDIA). Hybrid systems require different power management configurations covered in dedicated Optimus guides.

Install and enable NVIDIA suspend/hibernate systemd services:

sudo apt install nvidia-suspend-common
sudo systemctl enable nvidia-suspend.service
sudo systemctl enable nvidia-hibernate.service
sudo systemctl enable nvidia-resume.service

Reboot your system to apply all Wayland configuration changes:

sudo reboot

After rebooting, verify modesetting is enabled (Y output) and your display manager offers Wayland sessions at login.

Dracut Configuration (Debian 13 Trixie Systems)

Specifically, Debian 13 Trixie uses dracut for initramfs generation instead of initramfs-tools. Systems using dracut require explicit modprobe configuration file inclusion to ensure NVIDIA drivers load correctly during early boot. Skip this section if you use Debian 12 or 11.

Create a dracut configuration file that includes NVIDIA modprobe settings:

echo 'install_items+=" /etc/modprobe.d/nvidia-blacklists-nouveau.conf /etc/modprobe.d/nvidia.conf /etc/modprobe.d/nvidia-options.conf "' | sudo tee /etc/dracut.conf.d/10-nvidia.conf

The spaces inside the quotes are required for proper syntax. These modprobe configuration files are created automatically by the nvidia-driver package installation.

Configure dracut before installing NVIDIA drivers to avoid boot issues. If you already installed drivers without this configuration, create the dracut config file and rebuild your initramfs:

sudo dracut --force

Advanced Configuration Options

Lock Driver to Specific Version or Branch (Optional)

By default, Debian’s package manager updates NVIDIA drivers when newer versions become available. For production systems or environments requiring stability, NVIDIA provides version-locking packages that prevent automatic driver upgrades. These packages pin your system to track a specific driver branch (e.g., 535.x series) or exact version.

To lock your system to a specific branch:

sudo apt install nvidia-driver-pinning-<branch>

To lock to an exact driver version:

sudo apt install nvidia-driver-pinning-<version>

For example, sudo apt install nvidia-driver-pinning-535 locks to the 535.x branch, preventing upgrades to 550.x or later. Version pinning suits scenarios where application compatibility matters more than bleeding-edge features, or when validating driver stability before production deployment.

Install the pinning package before installing the driver for cleanest results. Pinning packages work with both Debian repository and NVIDIA CUDA repository installations. For detailed version locking documentation, consult NVIDIA’s official version locking guide.

Troubleshooting Common NVIDIA Driver Issues

Black Screen or No Display After Installation

If your system boots to a black screen after installing NVIDIA drivers, the Nouveau driver may still be loading or the display manager failed to start. In this case, boot into recovery mode or a virtual console (Ctrl+Alt+F3) and verify the driver loaded correctly:

lsmod | grep nvidia

Expected output (driver loaded successfully):

nvidia_drm             77824  2
nvidia_modeset       1294336  1 nvidia_drm
nvidia              56946688  12 nvidia_modeset
video                  69632  1 nvidia_modeset

If no output appears, the driver failed to load. Additionally, check DKMS build status:

sudo dkms status

Expected output (driver built successfully):

nvidia/5xx.xx.xx, 6.x.x-x-amd64, x86_64: installed

Rebuild the driver if needed:

sudo dkms autoinstall

Secure Boot Conflicts

Systems with Secure Boot enabled block unsigned kernel modules, preventing NVIDIA drivers from loading. Therefore, you have two options: disable Secure Boot in BIOS/UEFI settings, or enroll a Machine Owner Key (MOK) to sign DKMS-built modules.

For MOK enrollment, Debian provides comprehensive instructions for signing DKMS modules with Secure Boot enabled. The enrollment process involves generating a key pair, registering the public key with the system firmware, and configuring DKMS to automatically sign modules during builds. This approach maintains Secure Boot protection while allowing custom kernel modules.

For most users, temporarily disabling Secure Boot in BIOS/UEFI settings during driver installation provides the simplest path forward. Re-enable Secure Boot after confirming drivers work correctly, or complete MOK enrollment if you need Secure Boot active.

DKMS Build Failures After Kernel Updates

If DKMS fails to rebuild drivers after a kernel update, ensure kernel headers match your running kernel:

uname -r
sudo apt install linux-headers-$(uname -r)

Then force DKMS to rebuild:

sudo dkms autoinstall && sudo update-initramfs -u

Nouveau Driver Conflicts

If the proprietary NVIDIA driver and open-source Nouveau driver load simultaneously, blacklist Nouveau permanently. Create a blacklist configuration file:

echo "blacklist nouveau
options nouveau modeset=0" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf

Update the initramfs and reboot:

sudo update-initramfs -u && sudo reboot

Performance Issues or GPU Not Detected

Verify the NVIDIA driver recognizes your GPU and displays correct power management state:

nvidia-smi -q | grep -E "Product Name|Performance State"

For laptops with hybrid graphics (Intel + NVIDIA), the system may not automatically use the discrete GPU. Install nvidia-prime for GPU switching and select the NVIDIA GPU as primary:

sudo apt install nvidia-prime
sudo prime-select nvidia

Optimus hybrid graphics systems require additional configuration beyond standard driver installation. Debian provides detailed NVIDIA Optimus setup instructions covering PRIME profiles, render offloading, and power management specific to hybrid graphics configurations.

Xorg Fails on First Boot with DRM Modesetting (Debian 13)

On Debian 13 Trixie systems using nvidia-open drivers with kernel modesetting enabled, Xorg may crash immediately after boot but work correctly if you manually restart the display manager from a virtual console. This race condition occurs because the display manager starts before NVIDIA’s DRM render nodes (/dev/dri/renderD128) are fully initialized. The Xorg log typically shows a backtrace with glamor_init failing inside modesetting_drv.so, followed by “Caught signal 6 (Aborted)”.

Typical error pattern in /var/log/Xorg.0.log:

(II) Loading sub module "fb"
(EE) Backtrace:
(EE) 7: /usr/lib/xorg/modules/libglamoregl.so (glamor_init+0xcc)
(EE) 8: /usr/lib/xorg/modules/drivers/modesetting_drv.so
Fatal server error:
(EE) Caught signal 6 (Aborted). Server aborting

Specifically, the issue affects systems with all three conditions: nvidia-open kernel modules (not proprietary), DRM modesetting enabled (nvidia-drm modeset=1), and Debian 13 using dracut for initramfs. The workaround of restarting your display manager (SDDM, GDM, or LightDM) from tty2 works because the render nodes are ready by that point.

Solution 1: Load NVIDIA Modules During Early Boot (Recommended)

Force NVIDIA modules to load during initramfs rather than on-demand after boot. This ensures the DRM subsystem is fully initialized before the display manager starts. Create a dracut configuration file that adds the NVIDIA modules to early boot:

echo 'add_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm "' | sudo tee /etc/dracut.conf.d/nvidia-early-load.conf

Rebuild the initramfs to apply the change:

sudo dracut --force

The spaces inside the quotes are required for dracut’s syntax. After rebooting, the NVIDIA modules load during the initramfs phase, well before systemd starts the display manager. This addresses the root cause rather than working around the timing issue.

Solution 2: Delay Display Manager Startup (Fallback)

If Solution 1 alone does not resolve the issue, add a brief delay before the display manager starts. This gives the DRM render nodes time to initialize. Create a systemd service override for your display manager (the example uses SDDM, but the pattern works for GDM or LightDM by changing the service name):

sudo mkdir -p /etc/systemd/system/sddm.service.d
echo '[Service]
ExecStartPre=/bin/sleep 2' | sudo tee /etc/systemd/system/sddm.service.d/nvidia-wait.conf
sudo systemctl daemon-reload

For GDM (GNOME), replace sddm.service.d with gdm.service.d. For LightDM, use lightdm.service.d. After rebooting, verify that Xorg starts successfully on the first attempt without requiring manual intervention.

This race condition primarily affects nvidia-open (open-source kernel modules) rather than the proprietary nvidia-driver package. If you encounter this issue with proprietary drivers, switching to nvidia-open or vice versa may help isolate the problem. The nvidia-open modules generally require Turing architecture or newer (GTX 16/RTX 20 series and later).

Remove NVIDIA Drivers from Debian

If you need to uninstall NVIDIA drivers entirely and revert to the open-source Nouveau driver, follow these steps. This is useful when troubleshooting, switching installation methods, or returning to default Debian graphics.

Warning: Removing NVIDIA drivers will disable GPU acceleration until you reinstall drivers or reboot with Nouveau. Ensure you can access a terminal (SSH or TTY) in case the graphical session fails after removal.

Remove NVIDIA Driver Packages

Remove all NVIDIA driver packages and their dependencies:

sudo apt autoremove nvidia* --purge

Remove any remaining NVIDIA-related packages installed from the CUDA repository (if applicable):

sudo apt autoremove cuda* libnvidia* --purge

Remove NVIDIA CUDA Repository (If Used)

If you installed drivers from the NVIDIA CUDA repository (Method 2), remove the repository configuration and GPG key:

sudo rm -f /etc/apt/sources.list.d/nvidia-drivers.sources /etc/apt/sources.list.d/nvidia-drivers.list
sudo rm -f /usr/share/keyrings/nvidia-drivers.gpg
sudo apt update

Re-enable Nouveau Driver

Remove the Nouveau blacklist configuration to allow the open-source driver to load:

sudo rm -f /etc/modprobe.d/blacklist-nouveau.conf /etc/modprobe.d/nvidia-installer-disable-nouveau.conf

Regenerate the initramfs and reboot to activate Nouveau:

sudo update-initramfs -u
sudo reboot

Verify Driver Removal

After rebooting, confirm that NVIDIA drivers are no longer installed:

dpkg -l | grep nvidia

Expected output:

(no output indicates all NVIDIA packages removed)

Confirm Nouveau is now active:

lsmod | grep nouveau

Expected output:

nouveau              2818048  1
drm_ttm_helper         12288  1 nouveau
ttm                    90112  2 drm_ttm_helper,nouveau

Conclusion

NVIDIA driver installation on Debian delivers full GPU acceleration for gaming, graphics rendering, machine learning, and CUDA computational workloads. Debian’s default repositories provide stable, tested drivers suitable for production environments, while NVIDIA’s CUDA repository offers cutting-edge features and immediate security patches for all supported Debian versions. DKMS automatically rebuilds drivers during kernel updates, maintaining consistent GPU functionality across system upgrades. Wayland support requires kernel modesetting and power management configuration, while Debian 13 users need dracut configuration for proper initramfs integration. Your Debian system now runs production-ready NVIDIA drivers verified through nvidia-smi, with GPU acceleration available immediately for gaming, CUDA development, machine learning frameworks, or graphics rendering.

39 thoughts on “How to Install NVIDIA Drivers on Debian”

  1. Hi,
    I’ve installed the nvidia-open version on Trixie, to replace the drive 550 in the debian vanilla repository (they show some error in the logs, I prefer update).

    Now, if I use drm, xorg do not start BUT if I restart the service sddm in tty2, it works.
    The xorg error is:

    [ 17.478] (II) Loading sub module “fb”
    [ 17.478] (II) LoadModule: “fb”
    [ 17.478] (II) Module “fb” already built-in
    [ 17.478] (EE)
    [ 17.478] (EE) Backtrace:
    [ 17.479] (EE) unw_get_proc_name failed: no unwind info found [-10]
    [ 17.479] (EE) 0: /usr/lib/xorg/Xorg (?+0x0) [0x55b32d1cec6d]
    [ 17.479] (EE) unw_get_proc_name failed: no unwind info found [-10]
    [ 17.480] (EE) 1: /lib/x86_64-linux-gnu/libc.so.6 (?+0x0) [0x7f17b9577df0]
    [ 17.480] (EE) unw_get_proc_name failed: no unwind info found [-10]
    [ 17.480] (EE) 2: /lib/x86_64-linux-gnu/libc.so.6 (?+0x0) [0x7f17b95cc95c]
    [ 17.480] (EE) 3: /lib/x86_64-linux-gnu/libc.so.6 (gsignal+0x12) [0x7f17b9577cc2]
    [ 17.481] (EE) 4: /lib/x86_64-linux-gnu/libc.so.6 (abort+0x22) [0x7f17b95604ac]
    [ 17.481] (EE) unw_get_proc_name failed: no unwind info found [-10]
    [ 17.481] (EE) 5: /lib/x86_64-linux-gnu/libc.so.6 (?+0x0) [0x7f17b9560420]
    [ 17.481] (EE) unw_get_proc_name failed: no unwind info found [-10]
    [ 17.481] (EE) 6: /usr/lib/xorg/Xorg (?+0x0) [0x55b32d0300d7]
    [ 17.481] (EE) 7: /usr/lib/xorg/modules/libglamoregl.so (glamor_init+0xcc) [0x7f17b0f5167c]
    [ 17.482] (EE) unw_get_proc_name failed: no unwind info found [-10]
    [ 17.482] (EE) 8: /usr/lib/xorg/modules/drivers/modesetting_drv.so (?+0x0) [0x7f17b0f92728]
    [ 17.482] (EE) unw_get_proc_name failed: no unwind info found [-10]
    [ 17.482] (EE) 9: /usr/lib/xorg/modules/drivers/modesetting_drv.so (?+0x0) [0x7f17b0f887fe]
    [ 17.482] (EE) 10: /usr/lib/xorg/Xorg (AddGPUScreen+0xf4) [0x55b32d052044]
    [ 17.482] (EE) unw_get_proc_name failed: no unwind info found [-10]
    [ 17.482] (EE) 11: /usr/lib/xorg/Xorg (?+0x0) [0x55b32d0b0191]
    [ 17.482] (EE) unw_get_proc_name failed: no unwind info found [-10]
    [ 17.482] (EE) 12: /usr/lib/xorg/Xorg (?+0x0) [0x55b32d0b5e65]
    [ 17.482] (EE) unw_get_proc_name failed: no unwind info found [-10]
    [ 17.482] (EE) 13: /usr/lib/xorg/Xorg (?+0x0) [0x55b32d0b23ca]
    [ 17.482] (EE) unw_get_proc_name failed: no unwind info found [-10]
    [ 17.482] (EE) 14: /usr/lib/xorg/Xorg (?+0x0) [0x55b32d0b2b23]
    [ 17.482] (EE) 15: /usr/lib/xorg/Xorg (config_init+0xd) [0x55b32d0b139d]
    [ 17.483] (EE) 16: /usr/lib/xorg/Xorg (InitInput+0xc1) [0x55b32d094531]
    [ 17.483] (EE) unw_get_proc_name failed: no unwind info found [-10]
    [ 17.483] (EE) 17: /usr/lib/xorg/Xorg (?+0x0) [0x55b32d055c8d]
    [ 17.483] (EE) unw_get_proc_name failed: no unwind info found [-10]
    [ 17.483] (EE) 18: /lib/x86_64-linux-gnu/libc.so.6 (?+0x0) [0x7f17b9561ca8]
    [ 17.483] (EE) 19: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0x85) [0x7f17b9561d65]
    [ 17.483] (EE) 20: /usr/lib/xorg/Xorg (_start+0x21) [0x55b32d03e641]
    [ 17.483] (EE)
    [ 17.483] (EE)
    Fatal server error:
    [ 17.483] (EE) Caught signal 6 (Aborted). Server aborting
    [ 17.483] (EE)
    [ 17.484] (EE)
    Please consult the The X.Org Foundation support
    at http://wiki.x.org
    for help.
    [ 17.484] (EE) Please also check the log file at “/var/log/Xorg.0.log” for additional information.
    [ 17.484] (EE)
    [ 17.619] (EE) Server terminated with error (1). Closing log file.

    Reply
    • Thanks for the detailed report and Xorg log, Lorenzo. The backtrace points to a known race condition on Debian Trixie with nvidia-open drivers and kernel modesetting. At first boot, SDDM starts before the NVIDIA DRM render nodes (/dev/dri/renderD128) are fully initialized, causing the modesetting X driver to crash when glamor_init tries to use them. Your workaround of restarting SDDM manually works because by then the render nodes are ready.

      This timing issue affects systems using nvidia-open with DRM modesetting, particularly on dracut-based Debian 13 installations. Two approaches can resolve it:

      Option 1: Add NVIDIA modules to early boot

      Force NVIDIA modules to load during initramfs by adding them to the dracut configuration:

      echo 'add_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm "' | sudo tee /etc/dracut.conf.d/nvidia-modules.conf
      sudo dracut --force

      Option 2: Delay display manager startup

      Create an override to add a delay before SDDM starts, giving the render nodes time to initialize:

      sudo mkdir -p /etc/systemd/system/sddm.service.d
      echo '[Service]
      ExecStartPre=/bin/sleep 2' | sudo tee /etc/systemd/system/sddm.service.d/nvidia-wait.conf
      sudo systemctl daemon-reload

      Try Option 1 first since it addresses the root cause. The nvidia-open modules initialize faster when loaded early in the boot process rather than on-demand. If Option 1 alone does not resolve it, add Option 2 as a fallback. After either change, reboot and verify that SDDM starts successfully on the first attempt.

      I have added this troubleshooting section to the article under “Xorg Fails on First Boot with DRM Modesetting (Debian 13)” so future readers with the same issue can find it directly. Thanks for the detailed Xorg log, it made pinpointing the race condition much easier.

      Reply
  2. The Nvidia APT repo method does not seem to work (anymore?). APT complains about unresolved dependencies (and rightly so!)

    For example I run:
    > sudo apt install nvidia-driver cuda nvidia-settings nvidia-smi

    I get errors:
    Unsatisfied dependencies:
    nvidia-driver-cuda : Conflicts: nvidia-smi
    nvidia-driver-libs : Depends: libnvidia-egl-xcb1 (<= 575.51.03-1) but 1:1.0.1-1 is to be installed
    Depends: libnvidia-egl-xlib1 (<= 575.51.03-1) but 1:1.0.1-1 is to be installed
    Recommends: nvidia-driver-libs:i386 (= 575.51.03-1)
    nvidia-smi : Depends: nvidia-alternative (= 560.35.05-1)
    Depends: libnvidia-ml1 (= 560.35.05-1) but 575.51.03-1 is to be installed

    Indeed if you look at the "nvidia-smi" package in your web browser here:
    https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/
    There's basically no package since version 560.xx

    Looks like the dependencies on these packages are a giant mess now and not all of them are being generated for all the driver versions being released.

    Reply
    • Thanks for reporting this, arustictop. You’ve identified a legitimate packaging issue with NVIDIA’s CUDA repository where nvidia-smi versions lag behind current driver releases, creating dependency conflicts. This affects Debian 12 and 11 users specifically.

      The conflict happens because nvidia-driver-cuda (part of the full driver stack) conflicts with the standalone nvidia-smi package when you try to install both explicitly. The solution is to avoid listing nvidia-smi separately since it’s already included as a dependency when you install the driver metapackage. Use this command instead:

      sudo apt install nvidia-driver nvidia-settings

      For the proprietary driver variant. If you need the open-source kernel modules, use:

      sudo apt install nvidia-driver nvidia-kernel-open-dkms nvidia-settings

      The nvidia-driver metapackage automatically pulls in nvidia-smi as a dependency at the correct matching version, avoiding the version mismatch you encountered. The article has been updated to reflect this working installation command pattern based on NVIDIA’s official Debian installation guide.

      The libnvidia-egl-xcb1 and libnvidia-egl-xlib1 dependency issues you mentioned stem from Debian’s base packages having newer versions than what the NVIDIA CUDA repository expects. These conflicts typically resolve themselves when you let APT handle dependencies automatically rather than forcing specific package combinations. If you still encounter version conflicts, verify your system is fully updated with sudo apt update && sudo apt upgrade before attempting driver installation.

      For Debian 13 Trixie users: NVIDIA’s CUDA repository currently doesn’t support Debian 13, so you must use Debian’s default repositories instead (Method 1 in the guide). Debian 13 ships driver versions 550.x and 535.x through the standard repositories without these packaging conflicts.

      Reply
  3. Hi Joshua, what do you mean by “it is recommended to install all the drivers”? I’ve just installed the “NVIDIA Drivers With Cuda Support (Proprietary)” for my gtx1060 6gb, but are you recommending I also install the opensource cuda support driver too?
    Thanks,
    Tim

    Reply
    • Thanks for the question, Tim. You only need to install ONE driver variant, not both. The GTX 1060 is a Pascal architecture GPU, so you should stick with the proprietary NVIDIA driver you already installed. You’re all set.

      The “recommended to install all drivers” language was unclear and has been removed from the guide. Here’s what actually matters for your GTX 1060:

      • Proprietary driver (what you installed): Best choice for GTX 1060. Mature, stable, full feature support including CUDA for compute workloads.
      • Open-source driver (nvidia-kernel-open-dkms): Alternative option with open kernel modules, but the proprietary variant delivers better performance and stability for Pascal GPUs like yours.

      Installing both simultaneously creates conflicts and serves no purpose. The system uses one driver at a time. The open-source variant targets newer hardware (Turing/Ampere/Ada Lovelace) where NVIDIA invested more optimization effort. For Pascal-generation cards, the proprietary driver remains the recommended choice.

      Your current setup with the proprietary driver and CUDA support is exactly what you need for gaming, rendering, or machine learning workloads on the GTX 1060. No additional driver installation necessary.

      Reply
      • I have 5090 and installed proxmox and get the error:

        root@pve:~# apt install nvidia-driver nvidia-kernel-open-dkms cuda nvidia-smi nvidia-settings
        Reading package lists… Done
        Building dependency tree… Done
        Reading state information… Done
        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:
        nvidia-driver-cuda : Conflicts: nvidia-smi
        nvidia-driver-libs : Depends: libnvidia-egl-xcb1 (<= 575.51.03-1) but 1:1.0.1-2 is to be installed
        Depends: libnvidia-egl-xlib1 (<= 575.51.03-1) but 1:1.0.1-2 is to be installed
        Recommends: nvidia-driver-libs:i386 (= 575.51.03-1)
        nvidia-smi : Depends: nvidia-alternative (= 560.35.05-1)
        Depends: libnvidia-ml1 (= 560.35.05-1) but 575.51.03-1 is to be installed
        Recommends: nvidia-kernel-dkms (= 560.35.05-1) but it is not installable or
        nvidia-kernel-560.35.05 or
        nvidia-open-kernel-560.35.05 but it is not installable
        E: Unable to correct problems, you have held broken packages.

        Reply
        • Thanks for reporting this, Steven. The RTX 5090 is Blackwell architecture, which requires NVIDIA’s open-source kernel modules exclusively. Your error shows version conflicts because you explicitly installed nvidia-smi as a separate package, which creates mismatches between nvidia-smi 560.x and the driver stack 575.x.

          The nvidia-driver metapackage automatically includes nvidia-smi at the correct matching version, so installing it separately causes the dependency conflicts you are seeing. Additionally, nvidia-driver-cuda explicitly conflicts with standalone nvidia-smi installations.

          Remove the conflicting packages first:

          sudo apt autoremove nvidia-smi nvidia-driver-cuda nvidia-driver-libs --purge

          Update your package cache to reflect the removal:

          sudo apt update

          Install the driver without explicitly specifying nvidia-smi:

          sudo apt install nvidia-driver nvidia-kernel-open-dkms nvidia-settings

          After installation completes, reboot to activate the driver:

          sudo reboot

          Once the system restarts, verify the driver loaded correctly:

          nvidia-smi

          The nvidia-smi binary comes from nvidia-driver automatically, keeping versions synchronized. Proxmox uses its own kernel, so before installation verify your kernel headers match your running kernel with uname -r, then install the corresponding Proxmox kernel headers package (typically pve-headers-$(uname -r)). If conflicts persist, ensure you enabled both contrib and non-free repositories per the guide’s pre-installation steps.

          Reply
  4. Hi!
    At the step “Debian 12 Bookworm Import GPG Key for Nvidia” the error occurs “curl: (22) The requested URL returned error: 403
    gpg: no OpenPGP format data found”

    Reply
    • Thanks for reporting this, Zinoviev. The 403 error indicates NVIDIA changed how they distribute their repository GPG key. The direct .pub file download method is no longer working.

      Use this updated method to import the NVIDIA GPG key. First, install the CUDA keyring package which handles the GPG key automatically:

      For Debian 12 Bookworm:

      wget https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/cuda-keyring_1.1-1_all.deb
      sudo dpkg -i cuda-keyring_1.1-1_all.deb
      sudo apt update

      For Debian 11 Bullseye:

      wget https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/cuda-keyring_1.1-1_all.deb
      sudo dpkg -i cuda-keyring_1.1-1_all.deb
      sudo apt update

      This keyring package installs the GPG key and repository configuration automatically, replacing the manual curl method. After running these commands, proceed with the driver installation steps from the guide. The article has been updated to reflect this change.

      Reply
    • Thanks for sharing this, Bob. Unexpected driver upgrades breaking a stable setup is exactly what NVIDIA’s version pinning packages prevent. You can lock your system to the 535 driver branch to avoid automatic upgrades to 560 or newer versions.

      First, downgrade back to the 535 driver if you haven’t already:

      sudo apt install nvidia-driver=535.* nvidia-kernel-dkms=535.*

      Then install the pinning package to lock your system to the 535 branch:

      sudo apt install nvidia-driver-pinning-535

      This prevents APT from upgrading to 560 or any newer driver branches while still receiving security updates within the 535.x series. The pinning package creates an APT preference that tells the package manager to stick with 535.

      Verify the pinning is active:

      apt-cache policy nvidia-driver

      You should see the 535 version marked as the candidate even if newer versions exist in the repository. The guide’s “Lock Driver to Specific Version or Branch” section covers this feature in detail for future reference.

      Reply
  5. nvidia-detect was not available within non-free-firmware. I had to add “non-free” to make it visible to `sudo apt install`.
    So, here is the entire command I propose to modify the corresponding one in this tutorial :
    `sudo add-apt-repository contrib non-free-firmware non-free`

    Reply
  6. Thank you so much for this tutorial and keeping it up-to-date! One problem though… The 32-bit support is at version 555, while the 64-bit support is at 560. Is there coming an update for it, or can I install 64-bit version 555?

    Reply
    • Thanks for the kind words, Arthur. The version mismatch between 64-bit drivers (560) and 32-bit libraries (555) was temporary and happened when NVIDIA released new driver versions before the corresponding 32-bit packages finished building and testing.

      Your system worked fine with this mismatch for most applications. The 32-bit libraries (nvidia-driver-libs:i386) provided compatibility for older 32-bit games and applications, while your primary 64-bit driver handled all GPU operations. The version difference didn’t affect stability or performance.

      The 32-bit packages typically caught up within a few days to weeks. You could have either waited for the 555 32-bit libraries to update to 560, or downgraded your 64-bit driver to 555 if you needed exact version matching:

      sudo apt install nvidia-driver=555.* nvidia-kernel-dkms=555.*

      By now, the 32-bit packages have updated to match the 64-bit version through regular system updates. This type of temporary version lag is normal in NVIDIA’s release cycle and resolves itself automatically.

      Reply
  7. Hello and thank you for the tutorial. Very well written and easy to follow.

    Everything works well, but unfortunately, after rebooting, the system gets stuck on the login screen (keeps returning to it).
    The system is a fresh Debian 12 KDE with Nvidia drivers including Cuda and Wayland. It’s a 2-monitor setup with a GTX 2080.

    When I switch to X11 at login, I can sign in. However, the graphics are unusual: multiple backgrounds and windows on both monitors. I can open a CLI, the keyboard is QWERTY instead of QWERTZ. But that’s manageable.
    As a Linux newbie, I’m a bit lost and hoping for some help here. Unfortunately, I couldn’t find anything suitable online 🙁

    Best regards,
    Elmar

    Reply
    • Thanks for the detailed report, Elmar. The login loop on Wayland with your GTX 2080 indicated missing kernel modesetting configuration, which was required for NVIDIA Wayland support. The unusual multi-monitor behavior in X11 suggested display configuration conflicts.

      First, verify kernel modesetting was enabled for NVIDIA:

      cat /sys/module/nvidia_drm/parameters/modeset

      If this showed N, enable it with:

      echo "options nvidia-drm modeset=1" | sudo tee /etc/modprobe.d/nvidia-options.conf
      sudo update-initramfs -u
      sudo reboot

      Additionally, enable NVIDIA power management for proper suspend/resume and Wayland session availability:

      echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1" | sudo tee /etc/modprobe.d/nvidia-power-management.conf
      sudo apt install nvidia-suspend-common
      sudo systemctl enable nvidia-suspend.service nvidia-hibernate.service nvidia-resume.service
      sudo reboot

      These steps are detailed in the guide’s “Configure Wayland Support” section. The keyboard layout reverting to QWERTY suggested KDE wasn’t loading your user session properly due to the Wayland initialization failure. Once modesetting was configured, both Wayland sessions and proper multi-monitor X11 behavior should have worked correctly.

      Reply
      • Hello Joshua,

        Thank you very much for your tips. I have now tried several fresh installations and installed the drivers both via the repository using your method and directly as *.run files. The error remains the same. I’m now going to check under udev.d to see if all the rules are present (a tip from another forum pointed to a rule that is blocking the Nvidia driver). Setting up a new system doesn’t take long.

        Under X11, the NVIDIA driver is present, but the regional settings are disabled. This has set the keyboard layout to English, and I cannot activate German or add the language, even though it was available before.
        Wayland is important to me because I have monitors of different sizes, all of which can do 4k. I need to be able to scale them individually; otherwise, I can’t use the setup for graphics and video. I need the NVIDIA drivers to make full use of Davinci Resolve.

        I will follow your tips and report back.

        Best regards,
        Elmar

        Reply
        • Thanks for the detailed follow-up, Elmar. The fact that the issue persisted across multiple fresh installations and both APT and runfile methods pointed to either a configuration conflict or hardware-specific quirk with your multi-monitor 4K setup rather than installation problems.

          The udev rules investigation was a good direction. Check if any custom udev rules were interfering with NVIDIA device initialization:

          ls -la /etc/udev/rules.d/ | grep nvidia
          ls -la /lib/udev/rules.d/ | grep nvidia

          For the KDE regional settings being disabled under X11, this typically indicated the plasma-desktop session wasn’t loading your user configuration properly. Verify your display manager configuration recognized the NVIDIA driver:

          cat /etc/sddm.conf.d/kde_settings.conf

          For your DaVinci Resolve workflow with mixed 4K monitors requiring per-display scaling, Wayland was indeed the right choice. The kernel modesetting and power management configuration from the previous reply should have enabled proper Wayland sessions. Additionally, verify your monitors were detected correctly:

          xrandr --listproviders
          nvidia-smi

          If you discovered specific udev rules or configuration files causing conflicts, sharing those details would have helped identify the root cause for your particular hardware combination.

          Reply
      • Hi, Joshua,

        Having an issue when I use Method 2.

        After following the steps and arriving at:

        `sudo apt install nvidia-driver nvidia-smi nvidia-settings`

        I get an error claiming the installation failed due to unmet dependencies:

        `nvidia-alternative : Depends: glx-alternative-nvidia (>= 1.2) but it is not installable`
        `E: Unable to correct problems, you have held broken packages.`

        This is on a fresh install of Debian 12. Any ideas?

        Reply
        • Hello Joshua!
          I have an issue when I use Method 2 the similar like Mat.
          How you can see on Nvidia’s website:
          https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/
          the latest version of nvidia-driver, nvidia-msi and nvidia-settings are 560.35.03-1.

          But when I am using:
          echo ‘deb [signed-by=/usr/share/keyrings/nvidia-drivers.gpg] https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/ /’ | sudo tee /etc/apt/sources.list.d/nvidia-drivers.list,
          and after this:
          apt search nvidia-driver,
          apt search nvidia-settinds,
          apt search nvidia-smi,
          I see that latest version of nvidia-driver and nvidia-settings are: 565.57.01-1 amd64,
          and latest version of nvidia-smi is: 560.35.03-1 amd64.
          565.57.01-1 is beta-version (how you can see on Vnidia website).
          And when I try:
          apt install nvidia-driver nvidia-smi nvidia-settings,
          I receive error:
          Packages with unsatisfied dependencies:
          nvidia-smi : Dependencies: nvidia-alternative (= 560.35.03-1)
          Dependencies: libnvidia-ml1 (= 560.35.03-1) but 565.57.01-1 will be installed
          Recommends: nvidia-kernel-dkms (= 560.35.03-1) but 565.57.01-1 will be installed or
          nvidia-kernel-560.35.03 or
          nvidia-open-kernel-560.35.03 but it cannot be installed
          E: Unable to troubleshoot, you have broken fixed packages.

          P.S. I used your tutorial long time. But few days ago I received update 565.57.01-1 for nvidia and all broked.
          I purged nvidia and tried install again like you wrote. And now I receive error.
          Your Method 1 is work. Installing *.run-file from Nvidia work. But Method 2 not work.

          Please, tell me how I can fix this, because Method 2 is the best.
          Thank you!

          Reply
          • Thanks for the detailed report, conscious. You identified exactly what was happening: NVIDIA pushed beta driver 565.57.01 to their CUDA repository before the supporting packages (nvidia-smi 560.35.03) were updated to match, creating version conflicts.

            The explicit nvidia-smi installation caused this issue. The nvidia-driver metapackage automatically includes nvidia-smi as a dependency at the correct matching version. Installing it separately forced APT to resolve conflicting version requirements between the beta driver and stable nvidia-smi.

            Remove nvidia-smi from the installation command:

            sudo apt install nvidia-driver nvidia-settings

            If you wanted to avoid beta drivers entirely and stick with stable 560.x, pin the driver to that specific version:

            sudo apt install nvidia-driver=560.* nvidia-settings=560.*

            Then install the version pinning package to prevent future beta upgrades:

            sudo apt install nvidia-driver-pinning-560

            The guide has been updated to remove the explicit nvidia-smi installation, which was causing these version conflicts. APT handles nvidia-smi automatically when you install nvidia-driver, ensuring version consistency.

        • Thanks for reporting this, Mat. The glx-alternative-nvidia dependency error indicated a conflict between NVIDIA’s CUDA repository packages and Debian’s default repository packages. This typically happened when package priorities weren’t set correctly or when mixing installation methods.

          First, verify which repositories were providing NVIDIA packages:

          apt-cache policy nvidia-driver glx-alternative-nvidia

          The nvidia-smi package should not have been installed explicitly, as it’s automatically included as a dependency of nvidia-driver. Installing it separately could have caused version conflicts. The correct command was:

          sudo apt install nvidia-driver nvidia-settings

          To resolve the dependency conflict, remove any partially installed NVIDIA packages and reinstall cleanly:

          sudo apt autoremove --purge nvidia*
          sudo apt update
          sudo apt install nvidia-driver nvidia-settings

          If the issue persisted, ensuring Debian’s contrib repository was enabled often resolved the glx-alternative-nvidia dependency:

          sudo add-apt-repository contrib
          sudo apt update
          sudo apt install nvidia-driver nvidia-settings

          The guide has been updated to remove the explicit nvidia-smi installation, as it’s automatically provided by nvidia-driver.

          Reply
    • Thanks for asking, Chris. To switch from the NVIDIA CUDA repository back to Debian’s default repository, remove the NVIDIA repository configuration and purge the installed drivers:

      sudo rm /etc/apt/sources.list.d/nvidia-drivers.list
      sudo rm /usr/share/keyrings/nvidia-drivers.gpg
      sudo apt update
      sudo apt autoremove --purge nvidia*

      Then install drivers from Debian’s default repository following Method 1 in the guide:

      sudo apt update
      sudo apt install nvidia-driver firmware-misc-nonfree
      sudo reboot

      This removed the NVIDIA CUDA repository, cleaned up any CUDA-sourced driver packages, and installed the stable Debian-tested drivers instead. The Debian repository provides more conservative driver versions with thorough distribution testing.

      Reply
  8. Thanks, got me up to 545.23.08 on debain 12 sadly I think 550.40+ is required for the new 6GB 3050

    Detected NVIDIA GPUs:
    01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA107 [GeForce RTX 3050 6GB] [10de:2584] (rev a1)

    Checking card: NVIDIA Corporation GA107 [GeForce RTX 3050 6GB] (rev a1)
    Uh oh. Your card is not supported by any driver version up to 545.23.08.
    A newer driver may add support for your card.
    Newer driver releases may be available in backports, unstable or experimental.

    Guess I am risking the vendor run/installer

    Reply
      • Thanks, Billy, for posting the feedback.

        Currently I have this as a method for Fedora Nvidia Drivers installation, as currently Nvidia and Fedora from 38 onwards is a complete mess. I will add the same method for Debian as well as an optional back up method if all else fails.

        Reply
  9. It worked perfectly. I’ve chosen the option “Install NVIDIA Drivers Without Cuda Support (Proprietary)”.
    Normally I would never leave comment on a website/blog/forum. You’ve helped me we with a problem that I have been struggling for over 5 years, now I can finally connect to a monitor with HDMI. None of the other solutions provided on the internet worked for me (Connect Debian to external monitors, while having a hybrid GPU (Nvidia/Intel)). The only resort I had, was to choose Linux Mint.

    Many thanks, keep this good work alive!

    Reply

Leave a Comment