How to Fix "NVIDIA Kernel Module Missing" Error on Fedora

The "NVIDIA Kernel Module Missing" error on Fedora usually occurs because the proprietary NVIDIA kernel modules were not rebuilt after a kernel update, or the `akmod-nvidia` package is missing.

How to Fix "NVIDIA Kernel Module Missing" Error on Fedora

You reboot after a routine dnf upgrade and the desktop environment fails to start. The login screen appears, you type your password, and the screen flickers back to the login prompt. Or worse, you drop to a TTY and nvidia-smi returns NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. The kernel updated, but the proprietary driver did not keep up. This is the "NVIDIA Kernel Module Missing" error. It happens because Fedora updates the kernel frequently, and the NVIDIA driver must be rebuilt to match the new kernel version.

What's actually happening

The Linux kernel is the core of the operating system. It manages hardware access. The NVIDIA driver is a kernel module, a piece of code that plugs into the kernel to talk to your GPU. When the kernel updates, the internal interfaces change slightly. The old NVIDIA module no longer fits the new kernel. The system refuses to load the mismatched module for safety.

Fedora uses akmod to handle this automatically. akmod stands for automatic kernel module. It compiles the driver against the new kernel headers in the background. When akmod fails, or hasn't finished, you get the missing module error. The package akmod-nvidia contains the source code and the build scripts. The package kmod-nvidia contains pre-compiled binaries for a specific kernel. Fedora prefers akmod so the driver stays compatible across kernel updates without requiring a new package release.

Run journalctl -xe first. Read the actual error before guessing. The logs tell you whether the build failed, was interrupted, or is blocked by Secure Boot.

The fix

Check the build logs to see if the compilation failed or is still running. The akmod service runs as a systemd unit. You can inspect its status and recent output directly.

# Check the akmod service status and recent logs for build errors
# -x adds explanatory text, -e jumps to the end of the journal
journalctl -xeu akmod-nvidia

If the service shows active (exited) and the logs show no errors, the build likely succeeded. The module might just need to be loaded. If the service shows failed or the logs show compilation errors, proceed to the next steps.

Verify the akmod-nvidia package and kernel headers are present. The build process requires the kernel development files that match the running kernel. Fedora usually installs these automatically, but they can drift if you manually removed packages or switched kernels.

# Install akmod-nvidia if missing, and ensure headers match the running kernel
# kernel-devel provides the build environment akmod needs
sudo dnf install akmod-nvidia kernel-devel-$(uname -r) kernel-headers-$(uname -r)

Trigger a manual rebuild of the module for the current kernel. This forces akmods to recompile the driver immediately. The build can take several minutes on slower hardware. Do not interrupt the process.

# Force akmods to rebuild all pending modules for the running kernel
# --force skips checks and recompiles even if files exist
sudo akmods --force

Load the module into the kernel. Once the build completes, the module file exists in /lib/modules/, but it is not loaded until requested. modprobe loads the module and handles dependencies.

# Load the nvidia module into the kernel immediately
# modprobe handles dependencies automatically
sudo modprobe nvidia

Wait for the build to finish. Interrupting akmods leaves the system in a broken state.

Verify it worked

Confirm the driver is loaded and communicating with the GPU. nvidia-smi queries the driver directly via the kernel module. If the module is missing, this command fails.

# Verify the module is loaded and the driver version matches the package
# nvidia-smi queries the driver directly via the kernel module
nvidia-smi

You should see a table with GPU information. The output includes the driver version and GPU utilization.

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 550.54.14              Driver Version: 550.54.14    CUDA Version: 12.4 |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |

If nvidia-smi works, the module is loaded. Reboot the system to ensure the module loads correctly on startup.

Run nvidia-smi after the reboot. If the command works, the fix is persistent.

Common pitfalls and what the error looks like

SELinux denials

Fedora enforces strict SELinux policies by default. If the NVIDIA module files have incorrect SELinux contexts, the kernel may refuse to load them. You might see avc: denied messages in the audit log.

Check for SELinux denials related to NVIDIA. The setroubleshoot service summarizes denials in plain text.

# Check for SELinux denials related to nvidia
# setroubleshoot summarizes denials in plain text
journalctl -t setroubleshoot | grep nvidia

If you see denials, restore the correct SELinux contexts on the NVIDIA files. This fixes the labeling without disabling security.

# Restore correct SELinux contexts on NVIDIA files
# -R recursive, -v verbose output
sudo restorecon -Rv /usr/lib/nvidia*

SELinux denials show up in journalctl -t setroubleshoot with a one-line summary. Read those before disabling SELinux. Disabling SELinux is rarely the correct solution.

Secure Boot

Secure Boot requires all kernel modules to be signed with a key trusted by the firmware. akmod attempts to sign the NVIDIA module automatically. If the signing key is not enrolled in the MOK (Machine Owner Key) database, the kernel rejects the module.

Check if Secure Boot is enabled.

# Check if Secure Boot is enabled
# Returns 'SecureBoot enabled' or 'SecureBoot disabled'
mokutil --sb-state

If Secure Boot is enabled and the module is missing, you may need to enroll the key. Import the akmod signing key to trigger the enrollment process.

# Import the akmod signing key for MOK enrollment
# This triggers the enrollment process on the next reboot
sudo mokutil --import /etc/pki/akmods/certs/public_key.der

Reboot the system. The UEFI interface will prompt you to enroll the new key. Follow the on-screen instructions. You will need to set a one-time password and confirm the enrollment.

Check Secure Boot. An unsigned module will never load on a locked bootloader.

Wayland and display server issues

Modern Fedora uses Wayland by default. NVIDIA drivers support Wayland, but the implementation relies on DRM kernel modesetting. If the kernel module is missing, Wayland cannot initialize the GPU and may fall back to software rendering or fail entirely. X11 is more tolerant of driver issues because it can run in user-space modesetting.

If you are stuck in a login loop, switch to X11 at the GDM login screen. Click the gear icon in the bottom right corner and select "GNOME on Xorg". This lets you log in and fix the driver.

Switch to X11 to recover. Fix the driver before returning to Wayland.

Build environment failures

Sometimes akmods fails because of missing build tools or a corrupted environment. Check /var/log/akmods.log for specific errors. Common errors include missing gcc or make.

Install the development tools group if the build fails due to missing compilers.

# Install build tools if akmod fails due to missing compilers
# @development-tools group includes gcc, make, and other essentials
sudo dnf group install "Development Tools"

Kernel version mismatch

If you have multiple kernels installed, akmod builds for the newest one. If you booted into an older kernel, the module might be missing for that version. You can force a build for a specific kernel version.

# Build modules for a specific kernel version
# Replace 6.7.0-100.fc39.x86_64 with your target kernel
sudo akmods --kver 6.7.0-100.fc39.x86_64

When to use this vs alternatives

Use akmod-nvidia when you want the driver to rebuild automatically after kernel updates. Use kmod-nvidia when you need a pre-compiled binary module and cannot compile on the target machine. Use nouveau when you prefer open-source drivers and do not need CUDA or high-performance gaming. Switch to X11 when Wayland exhibits flickering or black screens with older NVIDIA hardware. Stay on the default display server if your GPU is Turing architecture or newer and you are on Fedora 39 or later.

Where to go next