"NVIDIA kernel module missing" error after CPU upgrade

I upgraded my CPU yesterday and booted into Windows 11 on my other SSD to run some benchmarks. That’s when I realized the day after that Fedora fails to boot. I’m met by a “nvidia kernel module missing. Falling back to nouveau” error for a brief moment before my monitor is frozen with glitched output. Attempts at booting into Fedora is unsuccessful, it freezes every time.

The GRUB boot options show that nouveau is blacklisted. Attempts at removing the blacklist only gives me a black screen when trying to boot.

I use Secure Boot on my system so is it possible that the NVIDIA kernel module fails to start because of a new Secure Boot key? Windows 11 operates fine so maybe it decided to overwrite the key..?

If this is the likely cause of the problem, how do I re-enroll the keys, are there other modules possibly affected by this that I’m unaware of, and more importantly how should I log back into the system? System recovery states that my root account is locked.

Help and ideas are much appreciated.

It may also simply be due to have stopped your machine before the kernel nvidia driver
has been build by akmods. This is actually almost always the case if you did an offline update.

The recommended way to install the proprietary nvidia driver is to use akmods and the
rpmfusion repository: Is it your case?

See: rpmfusion rpmfusion Howto

You should keep the blacklist of nouveau in GRUB.

To troubleshoot add to the GRUB kernel command line: systemd.unit=multi-user.target
then log in textual mode.

Look at the journal, paste (as text please, using the </> button) the output of:

lsmod | grep nvidia
dnf list --installed kernel kmod-\*

Sorry, being in textual mode, pasting is not possible.
Execute that instead:

bash # In case your shell is not bash
(
  set -x
  lsmod | grep nvidia
  modinfo -n nvidia
  dnf list --installed kernel kmod-\*
  inxi -Fzxx

) |& fpaste

Then paste in this topic the URL given by fpaste

Yes I use akmods and RPM Fusion. I followed the steps in this guide to install the drivers when I first installed Fedora (step 11 skipped): GitHub - roworu/nvidia-fedora-secureboot

How do I login into textual mode?

Type Ctrl-Alt-F2 (or F3 ..), then give your login name and password.

Thanks, I will be able to give this a try 7 hours from now.

I’m unable to switch into any of the TTY. Am I doing this correctly?

  1. In GRUB boot manager, I press E on the latest Fedora kernel in the list
  2. I add systemd.unit=multi-user.target to the last line
  3. I press F10 to boot
  4. My screen glitches out again as seen in my first post. Ctrl-alt F2, F3, .. none work

Just to be clear, it’s not the LAST line of the grub entry - it’s the line with rhgb and quiet. You’re passing another parameter to the kernel just as you would pass a parameter to a program on the command line.

Feel free to place that systemd directive immediately before rhgb… less moving of the cursor and it’ll be on the correct line of the stanza.

I made some progress on my own - I set rw and init=/bin/bash in the GRUB boot command, and then I rerolled the existing keypair as root:

mokutil --import /etc/pki/akmods/certs/public_key.der

Then I did a hard reboot and enrolled the key using the MOK manager.

The nvidia drivers now appear to load correctly, but now I’m met with another issue… The login manager (I use KDE Plasma) doesn’t let me login anymore. I even tried changing the password as root in the init bash state using passwd myuser, but the login manager still rejects access. The credentials are correct but I keep getting “Login incorrect” in the TTY view, and “Login Failed” in the desktop environment login manager.

Because I can’t access the Internet in the init state, I have attempted to copy everything manually off-screen from /var/log/messages that might give a hint of the problem..?

fedora audit[1878]: AVC avc:  denied  { read } for pid=1878 comm=”unix_chkpwd” name=”shadow” dev=”nvme1n1p3” ino=6834216 scontext=system_u:system_r:chkpwd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file permissive=0
fedora audit[1876]: AUDIT1100 pid=1876 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 msg=’op=PAM:authentication grantors=? acct=”myuser” exe=”/usr/libexec/sddm-helper” "hostname=”?” addr=? terminal=? res=failed’
fedora sddm-greeter-qt6[1805]: QWaylandGLContext: Failed to create the decorations EGLContext. Decorations will not be drawn.
fedora sddm-helper[1876]: [PAM] authenticate: Authentication failure
fedora sddm[1743]: Authentication error: SDDM::Auth::ERROR_AUTHENTICATION “Authentication failure”
fedora sddm-helper[1876]: [PAM] Asked to close the session but it wasn’t previously open
fedora sddm[1743]: Auth: sddm-helper exited with 1

Third edit: Looks like SELinux is the culprit. Adding selinux=0 to the linux line in the GRUB boot command allows me to log back in just fine without issues… In addition I fixed the issue by running sudo touch /.autorelabel followed by a reboot afterwards (ChatGPT helped me here, as sad as it is to admit).

What happened, and why was SELinux upset?