The NVIDIA GPU drivers are essential for utilizing the full capabilities of NVIDIA graphics cards on Linux systems. Whether you’re setting up a bare metal Debian installation or configuring GPU passthrough in a virtualized environment, the driver installation process remains consistent. This guide will walk you through installing the proprietary NVIDIA drivers on Debian 13 (Trixie), ensuring your graphics card is properly recognized and functional for gaming, CUDA computing, or professional workloads.
Software Requirements and Linux Command Line Conventions
Category
Requirements, Conventions or Software Version Used
System
Debian 12 (Bookworm) or Debian 13 (Trixie)
Software
nvidia-driver 550+, DKMS, kernel headers
Other
NVIDIA GPU (GeForce, RTX, or Quadro series)
Conventions
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command $ – requires given linux commands to be executed as a regular non-privileged user
Installing NVIDIA Drivers on Debian
DEBIAN 13 NVIDIA DRIVER INSTALLATION NOTE
As of September 2025, unlike previous Debian versions, Debian 13 with kernel 6.12 LTS requires explicit installation of kernel headers before installing the NVIDIA driver. Simply running apt install nvidia-driver and rebooting will fail because DKMS cannot build the kernel module without the headers present. The kernel headers must be installed first with apt install linux-headers-$(uname -r), then the nvidia-driver and nvidia-kernel-dkms packages can be installed. This change from previous Debian releases is due to the newer kernel 6.12 not including headers by default and the DKMS build process not automatically pulling them as dependencies. Following the complete installation steps in this guide ensures the NVIDIA module builds correctly and loads after reboot.
The NVIDIA proprietary drivers provide superior performance compared to the open-source Nouveau drivers. These drivers are distributed through Debian’s non-free repository, which must be enabled before installation. The process involves configuring package sources, installing the driver packages, and ensuring the kernel modules are properly built for your system.
Enable Non-Free Repositories: First, add the non-free repositories to your APT sources to access the proprietary NVIDIA packages
The sed command modifies your sources.list file to include both non-free and contrib components alongside the main repository. This is necessary because NVIDIA drivers are proprietary software not included in Debian’s main repository.
The kernel headers matching your current kernel version are essential for building the NVIDIA kernel module. The nvidia-detect command will identify your GPU and recommend the appropriate driver version.
The nvidia-driver metapackage pulls in all necessary components including libraries and utilities. The nvidia-kernel-dkms package ensures the kernel module is automatically rebuilt when you update your kernel. A reboot is required to load the new driver.
Verify Driver Installation: After rebooting, confirm the driver is loaded and functioning
$ nvidia-smi
The nvidia-smi utility displays detailed information about your GPU including driver version, temperature, power usage, and memory utilization. If this command shows your GPU details, the installation was successful.
If you encounter the error NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver, this typically means the kernel module isn’t loaded or wasn’t built for your current kernel version. This commonly occurs after kernel updates or when using newer kernels from backports.
Check if NVIDIA Module is Loaded: Verify whether the nvidia kernel module is currently loaded
$ lsmod | grep nvidia
If no output appears, the module isn’t loaded. Proceed to the next steps to rebuild and load it.
Verify Kernel Headers are Installed: Ensure headers for your current kernel are present
Replace 550.163.01 with your actual version number from the previous step. The build command compiles the module, and the install command installs it to your kernel.
Load the Module and Verify: Manually load the nvidia module and test functionality
$ sudo modprobe nvidia
$ nvidia-smi
If successful, nvidia-smi should now display your GPU information. If modprobe fails, check dmesg for specific error messages using sudo dmesg | grep -i nvidia.
Alternative: Reinstall DKMS Module: If the above steps don’t work, completely reinstall the DKMS module
You have successfully installed the NVIDIA proprietary drivers on your Debian system. The drivers are now active and your GPU is ready for use with applications requiring hardware acceleration, CUDA computing, or high-performance graphics. Remember that kernel updates may require the NVIDIA module to be rebuilt, but with DKMS installed, this process happens automatically. If you encounter issues after a kernel update, following the troubleshooting steps will resolve most driver communication problems. For persistent issues, ensure your system is fully updated and consider checking the Debian NVIDIA documentation for version-specific considerations.