Debian#
This section covers:
Debian 12
Preparation#
Perform the Pre-installation Actions.
The kernel headers and development packages for the currently running kernel can be installed with:
# apt install linux-headers-$(uname -r)
Enable the contrib repository:
# add-apt-repository contrib
Choose an installation method: Local Repository Enablement or Network Repository Enablement (amd64).
Local Repository Enablement#
Download the NVIDIA driver repository:
$ wget https://developer.download.nvidia.com/compute/nvidia-driver/${version}/local_installers/nvidia-driver-local-repo-${distro}-${version}_${arch}.debwhere
${version}is the NVIDIA driver version.Install local repository on file system:
# dpkg -i nvidia-driver-local-repo-${distro}-${version}*_${arch}.deb # apt updateEnroll ephemeral public GPG key:
# cp /var/nvidia-driver-local-repo-${distro}-${version}/nvidia-driver-*-keyring.gpg /usr/share/keyrings/
Network Repository Enablement (amd64)#
Install the new cuda-keyring package:
$ wget https://developer.download.nvidia.com/compute/cuda/repos/${distro}/x86_64/cuda-keyring_1.1-1_all.deb # dpkg -i cuda-keyring_1.1-1_all.deb # apt update
If you are unable to install the cuda-keyring package you can follow these instructions:
Enroll the new signing key:
$ wget https://developer.download.nvidia.com/compute/cuda/repos/${distro}/x86_64/cuda-archive-keyring.gpg # mv cuda-archive-keyring.gpg /usr/share/keyrings/cuda-archive-keyring.gpgEnable the network repository:
# echo "deb [signed-by=/usr/share/keyrings/cuda-archive-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/${distro}/x86_64/ /" \ | tee /etc/apt/sources.list.d/cuda-${distro}-${arch}.list
Network Repository Enablement (arm64)#
Install the new cuda-keyring package:
$ wget https://developer.download.nvidia.com/compute/cuda/repos/${distro}/sbsa/cuda-keyring_1.1-1_all.deb # dpkg -i cuda-keyring_1.1-1_all.deb # apt update
If you are unable to install the cuda-keyring package you can follow these instructions:
Enroll the new signing key:
$ wget https://developer.download.nvidia.com/compute/cuda/repos/${distro}/sbsa/cuda-archive-keyring.gpg # mv cuda-archive-keyring.gpg /usr/share/keyrings/cuda-archive-keyring.gpgEnable the network repository:
# echo "deb [signed-by=/usr/share/keyrings/cuda-archive-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/${distro}/sbsa/ /" \ | tee /etc/apt/sources.list.d/cuda-${distro}-${arch}.list
Selecting a Branch or a Specific Driver version#
To confine and pin the system to track a specific branch or driver version, install the appropriate pinning package, for example:
# apt install nvidia-driver-pinning-<branch>
or
# apt install nvidia-driver-pinning-<version>
Hint
For the best experience when locking a branch, we suggest installing the pinning package prior to installing the driver.
More information on the use and scope of these packages can be found in the recent updates section on Version locking packages for Ubuntu / Debian and explained in detail at Version locking.
Driver Installation#
These instructions apply to both local and network installations.
Open Kernel Modules
# apt -V install nvidia-open
Proprietary Kernel Modules
# apt -V install cuda-drivers
Compute-only (Headless) and Desktop-only (no Compute) Installation#
It’s possible to install the driver without all the desktop components (GL, EGL, Vulkan, X drivers, and so on) to limit the footprint and dependencies on the system. With the same logic it’s possible to install a desktop system without any compute component.
Note
The components excluded at installation time can always be added at a later stage. This will pull in all the additional dependencies required.
Compute-only System#
Open Kernel Modules
# apt -V install nvidia-driver-cuda nvidia-kernel-open-dkms
Proprietary Kernel Modules
# apt -V install nvidia-driver-cuda nvidia-kernel-dkms
Desktop-only System#
Open Kernel Modules
# apt -V install nvidia-driver nvidia-kernel-open-dkms
Proprietary Kernel Modules
# apt -V install nvidia-driver nvidia-kernel-dkms
Reboot the System#
# reboot
Perform the Post-installation Actions.