AlmaLinux#
This section covers:
AlmaLinux 8
AlmaLinux 9
AlmaLinux 10
Note
The next step describe the standard installation with DKMS modules as provided by NVIDIA.
An alternative to the standard installation, is the installation with Precompiled Open Kernel modules. For more information on this type of installation, plese refer to the section below Precompiled Open Kernel Modules.
Preparation#
Perform the Pre-installation Actions.
Kernel headers and development packages for the currently running kernel can be installed with:
AlmaLinux 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
AlmaLinux 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.AlmaLinux 9/10
# dnf config-manager --set-enabled crb # dnf install epel-release
AlmaLinux 8
# dnf config-manager --set-enabled powertools # dnf install epel-release
Choose an installation method: Local Repository Installation or Network Repository Installation.
Local Repository Installation#
Download the NVIDIA driver:
$ wget https://developer.download.nvidia.com/compute/nvidia-driver/$version/local_installers/nvidia-driver-local-repo-$distro.$version.$arch.rpm
where
$versionis the NVIDIA driver versionInstall local repository on file system:
# rpm --install nvidia-driver-local-repo-$distro.$version*.$arch.rpm
Network Repository Installation#
Enable the network repository. For
x86_64:# dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/$distro/$arch/cuda-$distro.repo
For
aarch64:# dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/$distro/sbsa/cuda-$distro.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:
AlmaLinux 8
AlmaLinux 9
Open Kernel Modules
# dnf module enable nvidia-driver:open-dkms
Example DKMS streams:
580-openoropen-dkms
Proprietary Kernel Modules
# dnf module enable nvidia-driver:latest-dkms
Example DKMS streams:
580-dkmsorlatest-dkmsExample precompiled streams:
580orlatest
Driver Installation#
These instructions apply to both local and network installations.
Open Kernel Modules
# dnf install nvidia-open
Proprietary Kernel Modules
# dnf 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
# dnf install nvidia-driver-cuda kmod-nvidia-open-dkms
Proprietary Kernel Modules
# dnf install nvidia-driver-cuda kmod-nvidia-latest-dkms
Desktop-only System#
Open Kernel Modules
# dnf install nvidia-driver kmod-nvidia-open-dkms
Proprietary Kernel Modules
# dnf install nvidia-driver kmod-nvidia-latest-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.
AlmaLinux 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
Or when switching from proprietary kernel modules to open kernel modules:
# dnf module reset nvidia-driver
# dnf module enable nvidia-driver:<stream>
# dnf install nvidia-open --allowerasing
AlmaLinux 10#
If DNF locking is configured on the sytem, 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
When switching from proprietary kernel modules to open kernel modules:
# dnf install nvidia-open --allowerasing
This will remove any package which would have dependencies removed.
Precompiled Open Kernel Modules#
These alternative installation instructions are valid only for the following distributions:
AlmaLinux 9
AlmaLinux 10
Note
This solution is not provided by NVIDIA but is provided by AlmaLinux. It is, nevertheless, the recommended way of installing the drivers in Secure Boot required scenarios.
For more information, please refer to the AlmaLinux wiki page.
Precompiled open kernel modules offer an optional method of streamlining the installation process. The advantages of precompiled modules:
Secure Boot: the kernel modules are signed by trusted keys in the AlmaLinux kernel
Simpler dependencies: removes kernel-devel, kernel-headers, DKMS and GCC compiler requirements
Simpler updates: the kernel modules are updated and installed like any other package
Simpler setup: all the required repositories are enabled with one command
The precompiled modules have a much simpler setup, the steps described in the Preparation section are not needed.
To proceed with this installation method, proceed directly to enable all the required repositories with one command.
# dnf install almalinux-release-nvidia-driver
This will enable the following repositories all at once:
AlmaLinux NVIDIA driver repository.
AlmaLinux CRB repository.
NVIDIA’s CUDA repository.
EPEL repository.
Note
The local installer option is not supported, as the AlmaLinux configuration automatically enables the NVIDIA online repository.
Then proceed to install the driver as normal. For example, for a desktop installation along with compute components for CUDA:
# dnf install nvidia-open-kmod nvidia-driver nvidia-driver-cuda
Same command but with 32 bit support on AlmaLinux 9:
# dnf install nvidia-open-kmod nvidia-driver nvidia-driver-cuda nvidia-driver-libs.i686
kABI Modules Information#
The format of the kernel module packages is kABI (kernel ABI), which means there is no direct one to one mapping with kernel versions and kernel module binaries, but instead the dependency between the kernel modules and kernel packages is done through versioned symbol dependencies that are part of the ABI stable list.
An example of matching symbols dependencies:
$ rpm -qp --requires kmod-nvidia-open-590.44.01-1.el10_1.x86_64.rpm | grep drm_modeset
kernel(drm_modeset_acquire_fini) = 0x3d1dada1
kernel(drm_modeset_acquire_init) = 0x091eaa38
kernel(drm_modeset_backoff) = 0x9a62789e
kernel(drm_modeset_drop_locks) = 0xed88ec0a
kernel(drm_modeset_lock_all) = 0xd3e9c304
kernel(drm_modeset_lock_all_ctx) = 0xfb8a89da
kernel(drm_modeset_unlock_all) = 0x79fa2207
$ rpm -qp --provides kernel-core-6.12.0-124.8.1.el10_1.x86_64.rpm | grep drm_modeset
kernel(drm_modeset_acquire_fini) = 0x3d1dada1
kernel(drm_modeset_acquire_init) = 0x091eaa38
kernel(drm_modeset_backoff) = 0x9a62789e
kernel(drm_modeset_drop_locks) = 0xed88ec0a
kernel(drm_modeset_lock) = 0x1511267f
kernel(drm_modeset_lock_all) = 0xd3e9c304
kernel(drm_modeset_lock_all_ctx) = 0xfb8a89da
kernel(drm_modeset_lock_init) = 0x263f5b58
kernel(drm_modeset_lock_single_interruptible) = 0xb6428d3d
kernel(drm_modeset_unlock) = 0xebe4dddc
kernel(drm_modeset_unlock_all) = 0x79fa2207
The RHEL kABI stable list is guaranteed to remain constant, with modifications documented if a change is really required due to kernel backports. This way, if a kernel module compiled during the lifetime of the distribution is using symbols from the stable ABI, are guaranteed to remain compatible, installable and usable for the lifetime of the distribution.
Due to this, there is no need for any particular enforcing mechanism for matching pre-built modules to kernels. The result is that kernel module packages can have a different cadence than the kernel and still be usable for a long time even with different kernels.