Nvidia driver mismatch

Hello i have just updated my Fedora Linux 40 Workstation with “sudo dnf update” command and it’s updated nvidia driver from version 550 to 555 but after installation finished and rebooting; typing “nvidia-smi” in terminal, give this:

Failed to initialize NVML: Driver/library version mismatch
NVML library version: 555.58

and when i type cat /proc/driver/nvidia/version i get NVRM version: NVIDIA UNIX x86_64 Kernel Module 550.90.07 Fri May 31 09:35:42 UTC 2024 GCC version: gcc version 14.1.1 20240620 (Red Hat 14.1.1-6) (GCC)

I dont understand what is the problem. What should i do?

Well, it’s weird but after shutting down the computer and starting it back solved the problem somehow. But i am still curious why i had the problem at the first place.

If the nvidia drivers were not built before you shutdown they are built when the system starts up.

After dnf update completes the drivers are built in the background.
You can check to see if they are still building with systemctl list-jobs if you see a akmods job running then it’s still building the nvidia drivers.

1 Like

So i should wait a little bit before rebooting my system so akmod have a time to build drivers?

  1. The installed drivers remain active until the reboot. However the software that is not actually in use has been updated so when trying to use that software (nvidia-smi) the software version does not match the already loaded drivers and provides the error you noted.

  2. Only after the reboot with the new driver version loaded into the kernel will that version mismatch be resolved.

  3. Yes, there should always be a delay between the completion of the upgrade and the timing of the reboot. The new driver version is locally compiled and installed after the upgrade completes so time must be allowed for that task to complete before the new driver can be loaded during the reboot. If you run the command dnf list installed kmod-nvidia\* and it shows the new driver version for the latest kernel then a reboot should load it properly.

2 Likes

Correct. And you can use systemctl list-jobs to check that it is safe to reboot.

1 Like