Nvidia Fedora Notes

1. Driver Installation

1.1. Prerequisites

1.1.1. Install the gcc Compiler

  1. Install gcc:

    sudo dnf install gcc -y
  2. Install gcc Development Tools

    sudo dnf groupinstall "Development Tools" -y

1.1.2. Install Libraries

  1. Install libs

    sudo dnf install -y pkgconf-pkg-config libglvnd-devel

1.1.3. Add NVIDIA Repo

  1. 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
  2. Update package meta data

    sudo dnf clean expire-cache
    sudo dnf -y makecache

1.1.4. Confirm Secure Boot is not enabled

  1. Run

    mokutil --sb-state
    Sample Result
    SecureBoot disabled
    Platform is in Setup Mode

1.1.5. Identify Graphics Card

  1. Run

    lspci | grep -E "VGA|3D"
    Sample Result
    2a:00.0 VGA compatible controller: NVIDIA Corporation GA102 [GeForce RTX 3090] (rev a1)

1.2. Fedora Nvidia Driver Install

  1. Update System

    sudo dnf -y update
  2. Download the Nvidia Driver for Linux

    You’ll need to download a Linux driver from the actual Nvidia drivers downloads page.
    Example File to download
    NVIDIA-Linux-x86_64-570.153.02.run
  3. Make the file executable:

    Example
    chmod +x NVIDIA-Linux-x86_64-570.153.02.run
  4. Run the executable:

    Example
    sudo ./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

  5. Reboot after the installation

    sudo reboot

1.3. Confirm Installation

  1. After the previous reboot, confirm the installation:

    nvidia-smi
    Show 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

  1. Install the Nvidia Toolkit

    sudo dnf -y install nvidia-container-toolkit
  2. Generate the CDI specification:

    sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml
  3. Confirm CDI config.

    sudo nvidia-ctk cdi list info
    Sample result
    INFO[0000] Found 3 CDI devices
    nvidia.com/gpu=0
    nvidia.com/gpu=GPU-12345678-12345-12345-1234-123456789abc
    nvidia.com/gpu=all
  4. Restart Container daemon

    Podman
    sudo systemctl restart podman.socket

1.5. Create Service to recreate Nvidia CDI

This service is a bandaid and shouldn’t be required.
It will regenerate the CDI specification automatically upon booting the system.

  1. Create the service file

    sudo vi /etc/systemd/system/bandaid-nvidia-cdi.service
    Add 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
  2. Reload the systemd configuration:

    sudo systemctl daemon-reload
  3. Start the service and enable it to start at boot:

    sudo systemctl enable --now bandaid-nvidia-cdi.service