Jere's Techblog

Install Nvidia Driver on Fedora 43 (Secure Boot + Akmods)

This document summarizes the steps shown in the referenced video for installing NVIDIA drivers on Fedora systems using akmods with Secure Boot enabled.

I used this guide: https://rpmfusion.org/Howto/NVIDIA to install the drivers for my Nvidia Geforce RTX 3070 on Fedora 43


1. Update System Packages

Ensure your system is fully up to date before proceeding.

sudo dnf update

-> may require reboot


2. Disable Extra Boot Devices

In your system BIOS/UEFI:

  • Disable unnecessary boot entries (USB, network boot, etc.)
  • Keep only the primary OS boot option enabled

This helps avoid Secure Boot and driver loading issues. (recommended if using dualboot)


3. Identify Your GPU Model

Determine whether your system uses a desktop or laptop GPU.

Desktop GPU:

/sbin/lspci | grep -e VGA

Laptop GPU:

/sbin/lspci | grep -e 3D

4. Prepare Secure Boot for Akmods

Install required tools and generate a signing key for kernel modules. ( i recommend to use a easy password like ‘1234’ cause akmods maye have english as a keyboard language when booting)

sudo dnf install kmodtool akmods mokutil openssl
sudo kmodgenca -a
sudo mokutil --import /etc/pki/akmods/certs/public_key.der
systemctl reboot

5. Enroll MOK (Machine Owner Key)

After reboot:

  • The MOK enrollment screen will appear
  • Select Enroll MOK
  • Confirm the key and reboot again

This allows NVIDIA kernel modules to load under Secure Boot.


6. Install NVIDIA Driver

Install the NVIDIA driver using akmods.

sudo dnf install akmod-nvidia


‼️After the installation is complete, please wait 2–3 minutes before rebooting. The system is still building the drivers in the background via akmods, and restarting too early may cause issues.

Main Log: Check /var/log/akmods/akmods.log for the overall build status.
Error Log: If the build fails, you can find detailed information in /var/cache/akmods/nvidia/. Look for a file ending in .failed.log.

⚠️ if akmod-nividia isn’t found you need to Enable RPM Fusion, maybe u got an Error like this:
Failed to resolve the transaction:
No match for argument: akmod-nvidia

Enable RPM Fusion (Required)

Run these commands for your Fedora version:

sudo dnf install \
https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

Then refresh metadata:

sudo dnf update --refresh

and now go again with:

sudo dnf install akmod-nvidia

7. Install CUDA / NVENC Support (Optional)

For CUDA and NVENC functionality:

sudo dnf install xorg-x11-drv-nvidia-cuda

8. Final Reboot

Reboot the system to complete installation.

sudo reboot

Notes

  • Secure Boot must remain enabled
  • Kernel updates will automatically rebuild NVIDIA modules via akmods
  • Verify driver installation with:
nvidia-smi

or

modinfo -F version nvidia

reboot


Troubleshooting / Common Issues

Troubleshooting Guide: Akmods Driver Installation

1. Check the Logs

To verify the installation status or troubleshoot issues, you can check the following log files. Note that you may need root privileges (sudo) to view these files.

  • Main Log: Check /var/log/akmods/akmods.log for the overall build status and general information.
  • Error Log: If the build fails, you can find detailed error information within the cache directory: /var/cache/akmods/nvidia/. Look for a file ending in .failed.log for specific compilation errors.

2. Dealing with a Black Screen Error

A common issue that can occur is a black screen, either immediately after rebooting or after logging in to your user account. Do not panic. This usually means the graphics driver was not loaded correctly.

You can switch to a virtual terminal (TTY console) to investigate:

  • Press Control + Alt + F3 (F1 through F6 usually work; F3 is often a good choice).
  • This will give you a text-based terminal where you can log in with your username and password.

3. Verifying the Driver Status in TTY

Once you are in the TTY terminal:

  • Run the command nvidia-smi.
  • If this command shows information about your GPU and driver version, the driver is installed correctly.
  • If nvidia-smi fails or returns an error, the driver is likely corrupted or was not built correctly.

4. The Recommended Fix (Driver rebuild)

If the driver is not working (as indicated by nvidia-smi), it is recommended to force a rebuild and ensure you wait for completion:

Run the command: sudo akmods --force –rebuild

Crucial Step: Wait at least 2 to 3 minutes after the command finishes before attempting to reboot your system again. This ensures that the driver modules are properly built and installed in the background.

Continue reading...