There are some steps that is not documented in the RPMFusion's installation guide. Here's how I install NVIDIA driver on Fedora 41.
- Update all packages and reboot
- Install
akmod-nvidia
from RPMFusion, optionally with packages for CUDA or NVENC. - For some reason, after akmod installation, I didn't see modeset=1 on kernel option, so:
#!/bin/bash
sudo grubby --update-kernel=ALL --args='nvidia-drm.modeset=1'
- Create file
/etc/dracut.conf.d/nvidia.conf
with the following content:
add_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm "
install_items+=" /etc/modprobe.d/nvidia.conf "
- Create file
/etc/modprobe.d/nvidia.conf
with the following content:
options nvidia_drm modeset=1
- Wait until akmod done building the drivers.
- Rebuild initramfs
sudo dracut --regenerate-all --force
- The system is ready to reboot.
The script has not been tested.
#!/bin/bash
sudo dnf install akmod-nvidia \
xorg-x11-drv-nvidia-cuda xorg-x11-drv-nvidia-cuda-libs \
xorg-x11-drv-nvidia-power \
nvidia-vaapi-driver libva-utils vdpauinfo
sudo grubby --update-kernel=ALL --args='nvidia-drm.modeset=1'
cat << EOF | sudo tee /etc/dracut.conf.d/nvidia.conf
add_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm "
install_items+=" /etc/modprobe.d/nvidia.conf "
EOF
cat << EOF | sudo tee /etc/modprobe.d/nvidia.conf
options nvidia_drm modeset=1
EOF
while pgrep akmod; do
sleep 5
done
sudo dracut --regenerate-all --force