Red Hat Enterprise Linux#
This section covers:
Red Hat Enterprise Linux 8
Red Hat Enterprise Linux 9
Red Hat Enterprise Linux 10
Preparation#
Perform the Pre-installation Actions.
Precompiled streams do not require kernel headers or DKMS. For information on precompiled streams, please refer to the section Precompiled Kernel Modules.
If precompiled kernel modules are not required, the kernel headers and development packages for the currently running kernel can be installed with:
Red Hat Enterprise Linux 9/10:
# dnf install kernel-devel-matched kernel-headers
If using the 64k kernel variant on aarch64:
# dnf install kernel-64k-devel-matched kernel-headers
Red Hat Enterprise Linux 8:
# dnf install kernel-devel-$(uname -r) kernel-headers
Satisfy third-party package dependencies:
The NVIDIA driver
rpmpackages depend on other external packages. Those packages are only available on third-party repositories, such as EPEL. Any such third-party repositories must be added to the package manager repository database before installing the NVIDIA driverrpmpackages, or missing dependencies will prevent the installation from proceeding.Red Hat Enterprise Linux 10
# subscription-manager repos --enable=rhel-10-for-<arch>-appstream-rpms # subscription-manager repos --enable=rhel-10-for-<arch>-baseos-rpms # subscription-manager repos --enable=codeready-builder-for-rhel-10-<arch>-rpms # dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
Red Hat Enterprise Linux 9
# subscription-manager repos --enable=rhel-9-for-<arch>-appstream-rpms # subscription-manager repos --enable=rhel-9-for-<arch>-baseos-rpms # subscription-manager repos --enable=codeready-builder-for-rhel-9-<arch>-rpms # dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
Red Hat Enterprise Linux 8
# subscription-manager repos --enable=rhel-8-for-<arch>-appstream-rpms # subscription-manager repos --enable=rhel-8-for-<arch>-baseos-rpms # subscription-manager repos --enable=codeready-builder-for-rhel-8-<arch>-rpms # dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Choose an installation method: Local Repository Installation or Network Repository Installation.
Local Repository Installation#
Install the NVIDIA driver repository:
# dnf install https://developer.download.nvidia.com/compute/nvidia-driver/<driver-version>/local_installers/nvidia-driver-local-repo-<distribution>-<driver-version>-1.0-1.<arch>.rpm
where <driver-version> is the NVIDIA driver version
Network Repository Installation#
Enable the network repository. For
x86_64:# dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/<distribution>/<arch>/cuda-<distribution>.repo
For
aarch64:# dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/<distribution>/sbsa/cuda-<distribution>.repo
Clean DNF repository cache:
# dnf clean expire-cache
DNF module enablement#
This is required for distributions where content is not distributed as a flat repository but as a repository containing DNF module streams.
These instructions apply to both local and network installations and only for the following distributions:
Red Hat Enterprise Linux 8
Red Hat Enterprise Linux 9
Open Kernel Modules
# dnf module enable nvidia-driver:open-dkms
Example DKMS streams:
580-openoropen-dkms
For information on precompiled streams, please refer to the section Precompiled Kernel Modules.
Driver Installation#
These instructions apply to both local and network installations.
Open Kernel Modules
# dnf install nvidia-open
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
# dnf install nvidia-driver-cuda kmod-nvidia-open-dkms
Desktop-only System#
Open Kernel Modules
# dnf install nvidia-driver kmod-nvidia-open-dkms
Reboot the System#
# reboot
Perform the Post-installation Actions.
Package Upgrades#
When a new version is available, a normal package update command specific for the distribution should suffice in upgrading the driver. The various differences in distributions would take care of obsolency and package switching when performing upgrades to a different branch.
Red Hat Enterprise Linux 8/9#
When upgrading the driver to the same stream:
# dnf update
When upgrading the driver to a different stream:
# dnf module reset nvidia-driver
# dnf module enable nvidia-driver:<stream>
# dnf update --allowerasing
Red Hat Enterprise Linux 10#
If DNF locking is configured on the system, please adjust the configuration or remove the lock entirely. Please refer to the DNF 4 section of the Version locking chapter for more information.
When upgrading the driver, whether configured to a version locked branch or the latest available, the command to execute is always the same; what matters is the DNF version lock configuration:
# dnf update
Precompiled Kernel Modules#
Open kernel modules#
This section applies to:
Red Hat Enterprise Linux 10
Precompiled streams of open source modules offer an optional method of streamlining the installation process using Red Hat signed kernel modules. The advantages of precompiled streams:
UEFI Secure Boot works out of the box via trusted keys already installed in the kernel keyring by Red Hat.
Simpler dependencies: removes kernel-devel, kernel-headers, DKMS and GCC compiler requirements.
Fewer repositories: the EPEL repository is no longer needed for DKMS or for the extra EGL libraries.
When using precompiled drivers, a plugin for the DNF package manager is enabled that prevents system breakages by preventing upgrades to a kernel for which no precompiled driver yet exists. This can delay the application of kernel updates, but ensures that a tested kernel and driver combination is always used. A warning is displayed by dnf during that upgrade situation:
NVIDIA driver: some kernel packages have been filtered due to missing precompiled modules.
Please run "dnf nvidia-plugin" as a command to see a report on the filter being applied.
Additional information is shown for all kernels and precompiled modules that are available for the system by running the plugin as a standlone command. For example:
# dnf nvidia-plugin
To use the precompiled kernel module packages provided by Red Hat (examples for x86_64):
Enable the Extensions repository:
# subscription-manager repos --enable rhel-10-for-x86_64-extensions-rpms Repository 'rhel-10-for-x86_64-extensions-rpms' is enabled for this system.
Install the preferred driver combination, selecting the precompiled kernel module packages as part of the transaction:
# dnf install kmod-nvidia-open nvidia-driver nvidia-driver-cuda Updating Subscription Management repositories. Dependencies resolved. ============================================================================================================================================ Package Architecture Version Repository Size ============================================================================================================================================ Installing: kmod-nvidia-open-590.48.01-6.12.0-124.31.1 x86_64 3:590.48.01-3.el10_1 rhel-10-for-x86_64-extensions-rpms 22 M nvidia-driver x86_64 3:590.48.01-1.el10 cuda-rhel10-x86_64 4.7 M nvidia-driver-cuda x86_64 3:590.48.01-1.el10 cuda-rhel10-x86_64 534 k Installing dependencies: egl-gbm x86_64 2:1.1.2.1-1.el10_1 rhel-10-for-x86_64-extensions-rpms 21 k egl-wayland x86_64 1.1.20-1.el10_1 rhel-10-for-x86_64-extensions-rpms 45 k egl-x11 x86_64 1.0.3-1.el10_1 rhel-10-for-x86_64-extensions-rpms 55 k libnvidia-cfg x86_64 3:590.48.01-1.el10 cuda-rhel10-x86_64 151 k libnvidia-gpucomp x86_64 3:590.48.01-1.el10 cuda-rhel10-x86_64 24 M libnvidia-ml x86_64 3:590.48.01-1.el10 cuda-rhel10-x86_64 676 k libvdpau x86_64 1.5-8.el10 rhel-10-for-x86_64-appstream-rpms 20 k nvidia-driver-cuda-libs x86_64 3:590.48.01-1.el10 cuda-rhel10-x86_64 85 M nvidia-driver-libs x86_64 3:590.48.01-1.el10 cuda-rhel10-x86_64 104 M nvidia-kmod-common noarch 3:590.48.01-1.el10 cuda-rhel10-x86_64 72 M nvidia-modprobe x86_64 3:590.48.01-1.el10 cuda-rhel10-x86_64 30 k nvidia-persistenced x86_64 3:590.48.01-1.el10 cuda-rhel10-x86_64 34 k ocl-icd x86_64 2.3.2-8.el10 rhel-10-for-x86_64-baseos-rpms 69 k opencl-filesystem noarch 1.0-22.el10 rhel-10-for-x86_64-appstream-rpms 9.0 k Installing weak dependencies: dnf-plugin-nvidia noarch 2.3-1.el10 cuda-rhel10-x86_64 17 k Transaction Summary ============================================================================================================================================ Install 18 Packages Total download size: 313 M Installed size: 1.0 G Is this ok [y/N]: