How to Install nVidia drivers in Fedora

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
4,408
Reaction score
4,601
Credits
41,638


This works for most RPM based distro's.

( Redhat, SuSE, CentOS, AlmaLinux, RockyLinux, OracleLinux, AmazonLinux, and ScientificLinux )

The main difference, is that you also need to enable the epel repos.

 
Last edited:
On my Rocky Linux 9 system I just use the Nvidia Cuda repo.

The link you gave was for rhel8, but it looks like now they support rhel9 (as od Feb 10, 2025)

 
For Fedora 41, there are a few more options.

Go ahead and add the rpmfusion repo.

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

sudo dnf config-manager setopt fedora-cisco-openh264.enabled=1

Then we can install these packages. This is more or less everything. This includes the automated kernel updates.
Code:
dnf install -y akmod-nvidia kmod-nvidia libva-nvidia-driver nvidia-gpu-firmware nvidia-modprobe nvidia-settings nvidia-xconfig xorg-x11-drv-nvidia xorg-x11-drv-nvidia-cuda xorg-x11-drv-nvidia-kmodsrc Cg nv-codec-headers gwe nvidia-texture-tools

If you go this route, the kernel modules get updated every time the kernel gets updated. If you use the nvidia drivers on the nvidia website (which are the same versions) then you'll manually have to to re-install every time you get a kernel update.
 
The link you gave was for rhel8, but it looks like now they support rhel9 (as od Feb 10, 2025)
Yeah it was, I had been using the RHEL9 one for a while, if you look at the dates in the repo you can see it's been active for a while.
I recently upgraded that system that was using that repo from CentOS Stream 9 to CentOS Stream 10, so I am currently just using the run file with dkms to use the Nvidia drivers which works fine as well.
 


Follow Linux.org

Members online


Top