Nvidia-driver-branch-470 and kmod-nvidia-latest-dkms

In CentOS 7.9, when attempting to use the 470 stable branch instead of the latest along with the cuda-11-0 metapackage, kmod-nvidia-latest-dkms gets deployed and causes yum update to fail since it wants to upgrade from the stack deployed by nvidia-driver-branch-470. Clearly we can work around this by using yum update --exclude=kmod-nvidia-latest-dkms each time, but it would be logical for nvidia-driver-branch-470 to satisfy any dependency on kmod-nvidia-latest. Some of us can’t run the latest driver branch.

A yum remove kmod-nvidia-latest-dkms will cause the following packages to be removed, so likely some dependency issues to work out with the rpm

$ sudo yum update
NVIDIA: No kernel module package kmod-nvidia-latest for kernel-3.10.0-1160.59.1.el7.x86_64 and 3:nvidia-driver-latest-510.47.03-1.el7.x86_64 found. Ignoring the new kernel
Error: nvidia-driver-latest conflicts with 3:nvidia-driver-branch-470-470.103.01-1.el7.x86_64
Error: nvidia-driver-branch-470 conflicts with 3:nvidia-driver-latest-510.47.03-1.el7.x86_64

If you want to take control over the nvidia driver version installed, you should rather use the metapackage cuda-toolkit-11-0 instead of cuda-11-0, which installs nvidia-latest.

Thanks for the tip on that cuda-toolkit-11-0 metapackage.

Consider the other issue, one that does not involve any cuda package…

After purging all cuda related packages and doing a yum install nvidia-driver-branch-470, kmod-nvidia-latest-dkms is automatically deployed. The 470 version of said package is selected correctly, but subsequent yum update will try to pull down the 510 version without version pinning. Perhaps we need a kmod-nvidia-470-dkms?

Either the dependencies of the packages are completely broken or there’s something else installed that will pull in nvidia-latest. Please check reverse dependencies using
rpm -q --requires

Hello @generix and @qhaas

  1. I’m having the same issue with my RHEL7 workstations as @qhaas reported.

yum update fails due to the nvidia-driver-branch-470 package (which we need for our older k5000 cards) trying to update
from: kmod-nvidia-latest-dkms.x86_64 3:470.141.03-1.el7
to: kmod-nvidia-latest-dkms.x86_64 3:515.65.01-1.el7

Resolving Dependencies
--> Running transaction check
---> Package kernel.x86_64 0:3.10.0-1160.76.1.el7 will be installed
---> Package kernel-devel.x86_64 0:3.10.0-1160.76.1.el7 will be installed
---> Package kmod-nvidia-latest-dkms.x86_64 3:470.141.03-1.el7 will be updated
--> Processing Dependency: nvidia-kmod = 3:470.141.03 for package: 3:nvidia-driver-branch-470-470.141.03-1.el7.x86_64
---> Package kmod-nvidia-latest-dkms.x86_64 3:515.65.01-1.el7 will be an update
  1. Here is the command output to check the reverse dependencies that you suggested doing:
rpm -q --requires nvidia-driver-branch-470.x86_64
config(nvidia-driver-branch-470) = 3:470.141.03-1.el7
nvidia-driver-branch-470-NVML(x86-64) = 3:470.141.03
nvidia-driver-branch-470-NvFBCOpenGL(x86-64) = 3:470.141.03
nvidia-driver-branch-470-cuda(x86-64) = 3:470.141.03
nvidia-driver-branch-470-cuda-libs(x86-64) = 3:470.141.03
nvidia-driver-branch-470-devel(x86-64) = 3:470.141.03
nvidia-driver-branch-470-libs(x86-64) = 3:470.141.03
nvidia-kmod = 3:470.141.03
nvidia-modprobe-branch-470(x86-64) = 3:470.141.03
nvidia-xconfig-branch-470(x86-64) = 3:470.141.03
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
xorg-x11-server-Xorg(x86-64) >= 1.16
rpmlib(PayloadIsXz) <= 5.2-1

When the install for nvidia-driver-branch-470.x86_64, it works but it can not find kmod-nvidia-branch-470 to install. It does install kmod-nvidia-latest-dkms version 3:470.141.03-1.el7 which allows nvidia-driver-branch-470.x86_64 to install but also leads to failure when yum update runs trying to update the kmod-nvidia-latest-dkms and it does not update the current kernel.

I end up removing the Nvidia and Cuda drivers, updating the system, and then reinstalling.

Any insight that you have would be appreciated. I have attached a file with output from the install and update commands for reference.

nvidia-driver-branch-470_issues.txt (14.1 KB)

I don’t really know how to solve this, to me this looks like a bug in yum.
nvidia-driver-branch-470 has a dependency on
(kmod-nvidia-branch-470 doesn’t exist, those would be precompiled modules, the alternative to the -dkms package. It’s fine, just ignore)
When you then run yum update, it tries to update (only!) the dependency kmod-nvidia-latest-dkms:470 to kmod-nvidia-latest-dkms:515 which just shouldn’t happen. You might check if yum versionlock works around this.