Talk: Third-party modules (e.g. Nvidia) are not rebuilt during system upgrade

For what it’s worth, I haven’t seen in any other thread the specific solution order that Jeff V put together here:

Which, expanded out to include the commands from the README file, would read something like the Proposed Addition below, I think.

This complete set and order of instructions worked for me when the individual steps posted in the current Common Issues thread, and elsewhere online, never did work correctly. Should these be added to the Common Issues thread in order to help it address the broadest possible scope of folks’ issues?

–Proposed Addition–

IF you have installed the Nvidia drivers from RPMFusion (and nowhere else), and are getting the “NVIDIA kernel module missing. Falling back to nouveau” message during startup, run the following commands from a terminal:

  1. sudo kmodgenca --auto --force - This creates the certificate for the Nvidia drivers that can then be enrolled in the UEFI, and ensures that they have been freshly created for the currently installed driver version
  2. sudo mokutil --import /etc/pki/akmods/certs/public_key.der - This places the certificate for the Nvidia drivers in the UEFI, ready to be “enrolled” (accepted) by you later - use a password that you’ll enter in a few minutes at the MOK Management prompt
  3. sudo dnf remove kmod-nvidia-$(uname -r) - This removes any Nvidia kernel modules that weren’t properly signed to match this new certificate
  4. sudo akmods --force - This rebuilds Nvidia kernel modules with the proper signature to match the new certificate
  5. Reboot the system
  6. Respond to the MOK Management prompt - usually involves pressing Enter, then using the Up and Down arrows to select to enroll the new key, and using the password that you entered in Step 2