Nvidia Fedora Notes
Table of Contents
1. Driver Installation
1.1. Prerequisites
1.1.1. Install the gcc Compiler
-
Install gcc:
sudo dnf install gcc -y -
Install gcc Development Tools
sudo dnf groupinstall "Development Tools" -y
1.1.3. Add NVIDIA Repo
-
Add NVIDIA Container Toolkit repo
sudo wget -O /etc/yum.repos.d/nvidia-container-toolkit.repo \ https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo -
Update package meta data
sudo dnf clean expire-cachesudo dnf -y makecache
1.2. Fedora Nvidia Driver Install
-
Update System
sudo dnf -y update -
Download the
Nvidia Driverfor LinuxYou’ll need to download a Linux driver from the actual Nvidia drivers downloads page. Example File to downloadNVIDIA-Linux-x86_64-570.153.02.run -
Make the file executable:
Examplechmod +x NVIDIA-Linux-x86_64-570.153.02.run -
Run the executable:
Examplesudo ./NVIDIA-Linux-x86_64-570.153.02.run-
For this interactive install, use these options:
Kernal module type NVIDIA Proprietary
Create modprobe entries Yes
Not able to perform sanity checks Continue Installation
Install 32 bit libraries Yes
Register kernal modules with DKMS Yes
Would you like to rebuild the initramfs Rebuild initramfs
Run nvidia-xconfig to configure X Yes
-
-
Reboot after the installation
sudo reboot
1.3. Confirm Installation
-
After the previous reboot, confirm the installation:
nvidia-smiShow sample output
Sun May 25 10:52:43 2025 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 570.153.02 Driver Version: 570.153.02 CUDA Version: 12.8 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA GeForce RTX 3090 Off | 00000000:2A:00.0 Off | N/A | | 0% 59C P0 72W / 350W | 0MiB / 24576MiB | 4% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | No running processes found | +-----------------------------------------------------------------------------------------+
1.4. Install the Nvidia Tookit
-
Install the
Nvidia Toolkitsudo dnf -y install nvidia-container-toolkit -
Generate the
CDIspecification:sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml -
Confirm
CDIconfig.sudo nvidia-ctk cdi list infoSample resultINFO[0000] Found 3 CDI devices nvidia.com/gpu=0 nvidia.com/gpu=GPU-12345678-12345-12345-1234-123456789abc nvidia.com/gpu=all -
Restart Container daemon
Podmansudo systemctl restart podman.socket
1.5. Create Service to recreate Nvidia CDI
|
This service is a bandaid and shouldn’t be required. |
-
Create the service file
sudo vi /etc/systemd/system/bandaid-nvidia-cdi.serviceAdd these contents[Unit] Description=This is a bandaid for generating the NVIDIA CDI Configuration upon boot After=network.target [Service] ExecStart=nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml User=root Group=root RemainAfterExit=yes [Install] WantedBy=multi-user.target -
Reload the systemd configuration:
sudo systemctl daemon-reload -
Start the service and enable it to start at boot:
sudo systemctl enable --now bandaid-nvidia-cdi.service