Dnf offline reboot sometimes results in kernel/userspace NVIDIA mismatch

Hi all, I’m really perplexed by this behavior that I’m seeing pop up sometimes. I always do an offline transaction for upgrades and I see the akmod message about rebuilding the NVIDIA module each time I upgrade the kernel. However I’m intermittently getting a mismatch between the userspace and kernel version of the NVIDIA driver after offline upgrades in Fedora 44. A second reboot always fixes the problem but this seems strange as I would expect the first reboot and offline transaction would be enough. Is this be a result of upgrading the kernel or the NVIDIA packages? Do I just need to reboot twice in this scenario to fix it or is this considered a bug?

It is not necessarily a bug.
It seems to often appear with offline updates since the reboot following the update is immediate and does not wait for akmods to complete building the new driver module. Theoretically the build and loading the new driver should be completed during the next boot, but sometimes it fails.

One easy solution would be to do the update live from the cli then after waiting a few minutes do the reboot. Depending upon the machine the wait may be as little as 30 seconds or as long as 5 minutes.

To confirm the build has completed use pgrep akmods from the cli after the update completes. If it returns process IDs it is still running and if the result is empty the build is complete and a reboot should load the new driver with the new kernel.

I have used the live update using dnf from the cli for years and never have problems with the drivers.

The part I’m a bit confused about is that during the boot after the upgrade, the boot does not complete until the “Building akmods” message has finished. This leads me to believe that offline updates do not actually have the same timing problem that online upgrades do as part of the boot process after the update appears to be building the akmods. I’ll watch a little bit more closely next time I update the NVIDIA drivers because this might be where the problem is manifesting, not during kernel upgrades.

It does have the same issue, and depending on the version it may start rebooting the system before the nvidia modules has been built. There is a system service run the build process during the next boot, which may or may not fix the failed first build of the nvidia server.

If you use dnf upgrade --offline, you should probably exclude the kernel in the process by adding -x 'kernel*'. Then you can update the kernel online.

Gnome Softeware and Plasma discover doesn’t let you do that, though.