After Upgrade to F39 from F38 Nvidia Drivers No Longer Work

I’m using an HP ENVY m7 Notebook

According to:

$ /sbin/lspci | grep -e VGA
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02)
$ /sbin/lspci | grep -e 3D
04:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940MX] (rev a2)

I have upgraded this computer from at least F34 without issue so that it uses the Nvidia graphics card full time since it is really used as a desktop computer that is always plugged in.

I used this guide in the past to install the Nvidia driver and use it full time.

When I run the following commands, everything seems to be installed correctly, already, but I repeated the suggested steps from the guide again just to make sure.

$ sudo dnf install gcc kernel-headers kernel-devel akmod-nvidia xorg-x11-drv-nvidia xorg-x11-drv-nvidia-libs xorg-x11-drv-nvidia-libs.i686
[sudo] password for mowest: 
Last metadata expiration check: 0:52:44 ago on Mon 01 Jan 2024 09:15:29 PM EST.
Package gcc-13.2.1-6.fc39.x86_64 is already installed.
Package kernel-headers-6.6.3-200.fc39.x86_64 is already installed.
Package kernel-devel-6.6.6-100.fc38.x86_64 is already installed.
Package kernel-devel-6.6.8-100.fc38.x86_64 is already installed.
Package kernel-devel-6.6.8-200.fc39.x86_64 is already installed.
Package akmod-nvidia-3:545.29.06-2.fc39.x86_64 is already installed.
Package xorg-x11-drv-nvidia-3:545.29.06-2.fc39.x86_64 is already installed.
Package xorg-x11-drv-nvidia-libs-3:545.29.06-2.fc39.i686 is already installed.
Package xorg-x11-drv-nvidia-libs-3:545.29.06-2.fc39.x86_64 is already installed.
Package xorg-x11-drv-nvidia-libs-3:545.29.06-2.fc39.i686 is already installed.
Dependencies resolved.
Nothing to do.
$ sudo akmods --force
Checking kmods exist for 6.6.8-200.fc39.x86_64             [  OK  ]
$ sudo dracut --force

When I reboot (which I have done many times) I get the message in the Plymouth boot screen saying, “Can’t find Nvidia Kernel Module, using nouveau driver”.

Any thoughts on what might be different between F38 and F39 that would be causing an issue with the kernel module not being found even though it is installed?

This may be a result of the common issue shown here.

Simple fix for most.
sudo dnf remove kmod-nvidia-6.6.8-200.fc39.x86_64
sudo akmods --force

It seems that with F39 especially the driver may not get properly built before the system reboots during the system upgrade. There appears to be a proper driver installed but it fails and users often have to remove the driver then rebuild it with the 2 steps above. The dracut step usually is not needed, but it is good insurance.

If you do use dracut it seems best to remove the relevant initramfs image before running dracut. In your case that would be sudo rm /boot/initramfs-6.6.8-200.fc39.x86_64.img before running dracut.

Would you also show the output from dnf list installed \*nvidia\* please.

Just for future reference, that guide is somewhat out of date. The only packages needing to be installed are akmod-nvidia and possibly xorg-x11-drv-nvidia-cuda. Dnf with the dependencies it pulls in handle everything else needed.
dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda is much simpler than the long and unnecessary list of packages in that guide.

Thank you @computersavvy. This simple fix worked. I rebooted after akmods --force finished running, and I did not get the message in Plymouth about “using the nouveau driver”. Also, when I look under “System Details” in “Settings: About”, it says that the graphics it is using is “NVIDIA GeForce 940MX” under “Graphics” and “Graphics 1”, so I believe that means that it is using the mobile NVIDIA card full time.

Here is the results of what you asked for:

$ dnf list installed \*nvidia\*
Installed Packages
akmod-nvidia.x86_64                       3:545.29.06-2.fc39   @rpmfusion-nonfree-nvidia-driver
kmod-nvidia-6.6.6-100.fc38.x86_64.x86_64  3:545.29.06-2.fc38   @@commandline                   
kmod-nvidia-6.6.8-100.fc38.x86_64.x86_64  3:545.29.06-2.fc38   @@commandline                   
kmod-nvidia-6.6.8-200.fc39.x86_64.x86_64  3:545.29.06-2.fc39   @@commandline                   
nvidia-gpu-firmware.noarch                20231211-1.fc39      @updates                        
nvidia-modprobe.x86_64                    3:545.29.06-1.fc39   @rpmfusion-nonfree-nvidia-driver
nvidia-persistenced.x86_64                3:545.29.06-1.fc39   @rpmfusion-nonfree-nvidia-driver
nvidia-settings.x86_64                    3:545.29.06-1.fc39   @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia.x86_64                3:545.29.06-2.fc39   @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda.x86_64           3:545.29.06-2.fc39   @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.i686        3:545.29.06-2.fc39   @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-cuda-libs.x86_64      3:545.29.06-2.fc39   @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-kmodsrc.x86_64        3:545.29.06-2.fc39   @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.i686             3:545.29.06-2.fc39   @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-libs.x86_64           3:545.29.06-2.fc39   @rpmfusion-nonfree-nvidia-driver
xorg-x11-drv-nvidia-power.x86_64          3:545.29.06-2.fc39   @rpmfusion-nonfree-nvidia-driver