Advanced Options#
This section contains information on some advanced setup scenarios which are not covered in the basic instructions above.
Switching between Driver Module Flavors#
Use the following steps to switch between the NVIDIA driver proprietary and open module flavors on your system.
Note
Replace XXX with the NVIDIA driver branch number such as 595.
Red Hat Enterprise Linux 8/9, AlmaLinux 8/9, Rocky Linux 8/9, Oracle Linux 8/9, Amazon Linux 2023, KylinOS 11
To switch between proprietary and open kernel modules:
# dnf -y module switch-to nvidia-driver:<stream> --allowerasing
Red Hat Enterprise Linux 10, AlmaLinux 10, Rocky Linux 10, Fedora 43
To switch from proprietary to open:
# dnf install --allowerasing nvidia-open
To switch from open to proprietary:
# dnf install --allowerasing cuda-drivers
If you have done a desktop or compute-only installation, you can just switch the kernel module package. For example to go from proprietary to open:
# dnf install --allowerasing kmod-nvidia-open-dkms
Azure Linux 3
Only the open kernel modules are supported, no switching is possible.
Debian 12/13
To switch from proprietary to open:
# apt install --autoremove --purge nvidia-open
To switch from open to proprietary:
# apt install --autoremove --purge cuda-drivers
Ubuntu 22.04/24.04
To switch from proprietary to open:
# apt install --autoremove --purge nvidia-open nvidia-driver-open
To switch from open to proprietary:
# apt install --autoremove --purge cuda-drivers nvidia-driver
SUSE Linux Enterprise Server 15/16, OpenSUSE Leap 15/16
To switch from proprietary to open:
# zypper install --details --force-resolution nvidia-open
To switch from open to proprietary:
# zypper install --details --force-resolution cuda-drivers
Meta Packages#
Meta packages are rpm/deb packages which contain no (or few) files but have multiple dependencies. They are used to install many CUDA packages when you may not know the details of the packages you want. The following table lists the meta packages. Not all of the packages listed below are available on every distribution. Sometime they are provided by other packages, sometimes they are not needed as there are other mechanisms offered by the distribution to provide branch segregation (ex. DNF modules).
Meta Package |
Purpose |
|---|---|
|
Installs all NVIDIA Open GPU kernel modules Driver packages. Handles upgrading to the next version of the driver packages when they are released. |
|
Installs all NVIDIA Open GPU kernel modules Driver packages. Will not upgrade beyond the 595.xxx branch drivers. |
|
Installs all NVIDIA proprietary kernel modules Driver packages. Handles upgrading to the next version of the Driver packages when they are released. |
|
Installs all NVIDIA proprietary kernel modules Driver packages. Will not upgrade beyond the 595.xx branch drivers. |
Modularity Profiles#
Modularity profiles work with any supported modularity stream and allow for additional use cases. These modularity profiles are available on Amazon Linux 2023, KylinOS 10, and Red Hat Enterprise Linux 8/9.
Stream |
Profile |
Use Case |
|---|---|---|
Default |
|
Installs all the driver packages in a stream. |
NVSwitch Fabric |
|
Installs all the driver packages plus components required for bootstrapping an NVSwitch system (including the Fabric Manager and NSCQ telemetry). |
For example:
# dnf module install nvidia-driver:<stream>/default
# dnf module install nvidia-driver:<stream>/fm
You can install multiple modularity profiles using BASH curly brace expansion, for example:
# dnf module install nvidia-driver:latest/{default,fm}
Please refer to the Developer Blog for more information.
Kickstart Installation#
Edit the Kickstart configuration file to add the necessary configuration. Replace the placeholder with the appropriate architecture.
Red Hat Enterprise Linux 8, AlmaLinux 8, Rocky Linux 8, Oracle Linux 8
Enable the EPEL repository:
repo --name=epel --baseurl=http://download.fedoraproject.org/pub/epel/8/Everything/${arch}Enable the CUDA repository:
repo --name=cuda-rhel8 --baseurl=https://developer.download.nvidia.com/compute/cuda/repos/rhel8/${arch}Make sure the bootloader configuration is updated with the necessary parameters (ex. disabling
nouveau, etc.) by adding the following line in the%postsection:nvidia-boot-update post
This is the same command that is executed on a live system when installing the packages.
Perform the Post-installation Actions.
Red Hat Enterprise Linux 9, AlmaLinux 9, Rocky Linux 9, Oracle Linux 9
Enable the EPEL repository:
repo --name=epel --baseurl=http://download.fedoraproject.org/pub/epel/9/Everything/${arch}Enable the CUDA repository:
repo --name=cuda-rhel9 --baseurl=https://developer.download.nvidia.com/compute/cuda/repos/rhel9/${arch}/Make sure the bootloader configuration is updated with the necessary parameters (ex. disabling
nouveau, etc.) by adding the following line in the%postsection:nvidia-boot-update post
This is the same command that is executed on a live system when installing the packages.
Red Hat Enterprise Linux 10, AlmaLinux 10, Rocky Linux 10
Enable the EPEL repository:
repo --name=epel --baseurl=http://download.fedoraproject.org/pub/epel/9/Everything/${arch}Enable the CUDA repository:
repo --name=cuda-rhel9 --baseurl=https://developer.download.nvidia.com/compute/cuda/repos/rhel9/${arch}/Make sure the bootloader configuration is updated with the necessary parameters (ex. disabling
nouveau, etc.) by adding the following line in the%postsection:nvidia-boot-update post
This is the same command that is executed on a live system when installing the packages.
Kylin 11
Enable the CUDA repository:
repo --name=cuda-rhel9 --baseurl=https://developer.download.nvidia.com/compute/cuda/repos/kylin10/${arch}/Make sure the bootloader configuration is updated with the necessary parameters (ex. disabling
nouveau, etc.) by adding the following line in the%postsection:nvidia-boot-update post
This is the same command that is executed on a live system when installing the packages.
Perform the Post-installation Actions.
SUSE Vendor Change#
Starting with driver version 575, all the driver packages for openSUSE Leap and SUSE Enterprise Linux Server have a vendor of “NVIDIA”. The system will prevent the update of packages hosted in the other repositories unless there is an override for the vendor.
More information on the topic is available in the Vendor Change page of openSUSE.
This can be triggered on the command line:
# zypper update --allow-vendor-change
Loading repository data...
Reading installed packages...
The following package is going to be upgraded:
dkms
The following package is going to change vendor:
dkms openSUSE -> NVIDIA
1 package to upgrade, 1 to change vendor.
Package download size: 58.0 KiB
Package install size change:
| 148.7 KiB required by packages that will be installed
5.4 KiB | - 143.3 KiB released by packages that will be removed
Backend: classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y):
Or by adding the vendor equivalence to a Zypper configuration file. For example, in the case of openSUSE, just add “NVIDIA” at the end of this configuration file:
$ cat /etc/zypp/vendors.d/00-openSUSE.conf
[main]
vendors=openSUSE,SUSE,SUSE LLC <https://www.suse.com/>,NVIDIA
And then the upgrade can happen allowing the vendor change:
# zypper update --details
Loading repository data...
Reading installed packages...
The following package is going to be upgraded:
dkms 3.0.11-bp156.1.2 -> 3.1.5-1 noarch test NVIDIA
1 package to upgrade.
Package download size: 58.0 KiB
Package install size change:
| 148.7 KiB required by packages that will be installed
5.4 KiB | - 143.3 KiB released by packages that will be removed
Backend: classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y):
Restrict APT to Look for Specific Architectures#
Modify Ubuntu’s apt package manager to query specific architectures for specific repositories. This is useful when a foreign architecture has been added, causing “404 Not Found” errors to appear when the repository meta-data is updated.
Each repository you wish to restrict to specific architectures must have its sources.list entry modified. This is done by modifying the /etc/apt/sources.list file and any files containing repositories you wish to restrict under the /etc/apt/sources.list.d/ directory. Normally, it is sufficient to modify only the entries in /etc/apt/sources.list.
An architecture-restricted repository entry looks like:
deb [arch=<arch1>,<arch2>] <url>
For example, if you wanted to restrict a repository to only the amd64 and i386 architectures, it would look like:
deb [arch=amd64,i386] <url>
It is not necessary to restrict the deb-src repositories, as these repositories don’t provide architecture-specific packages.
For more details, see the sources.list manpage.
APT Repository File not Found#
In case of the error: E: Failed to fetch file:/var/cuda-repo File not found on Debian and Ubuntu systems.
This can occur when installing CUDA after uninstalling a different version. Use the following command before installation:
# rm -v /var/lib/apt/lists/*cuda* /var/lib/apt/lists/*nvidia*
Verbose Versions when Using APT#
Use the --verbose-versions flag, for example:
# apt install --verbose-versions nvidia-open