Nvidia Fedora Notes

1. Driver Installation

1.1. Prerequisites

Identify Graphics Card . Run the following command to identify the graphics card:

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

1.2. Install Nvidia Driver

  1. Add the graphics drivers PPA

    sudo apt update && sudo add-apt-repository ppa:graphics-drivers/ppa
  2. Identify graphics card and list suggested drivers

    ubuntu-drivers devices
    Sample
    == /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
    modalias : pci:v000010DEd00001E07sv00003842sd00002382bc03sc00i00
    vendor   : NVIDIA Corporation
    model    : TU102 [GeForce RTX 2080 Ti Rev. A]
    driver   : nvidia-driver-418-server - distro non-free
    driver   : nvidia-driver-470-server - distro non-free
    driver   : nvidia-driver-535 - distro non-free recommended
    driver   : nvidia-driver-545 - distro non-free
    driver   : nvidia-driver-450-server - distro non-free
    driver   : nvidia-driver-470 - distro non-free
    driver   : nvidia-driver-535-server - distro non-free
    driver   : nvidia-driver-545-open - distro non-free
    driver   : nvidia-driver-535-server-open - distro non-free
    driver   : nvidia-driver-535-open - distro non-free
    driver   : xserver-xorg-video-nouveau - distro free builtin
  3. Install

    Specific driver
    sudo ubuntu-drivers install nvidia-driver-xxx

    Reboot after installation:

    sudo reboot
  4. Confirm the installation by running:

    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.3. Install the Nvidia Toolkit:

  1. Add NVIDIA package repository and GPG key

    curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
      && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
        sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
        sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
  2. Update

    sudo apt update
  3. Install

    sudo apt-get install -y nvidia-container-toolkit
  4. Confirm

    which nvidia-ctk

2. Generate the CDI Specification

  1. Mkdir

    sudo mkdir -p /etc/cdi
  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-91437e5f-12345-12345-1234-b3c6a1304e7f
    nvidia.com/gpu=all

2.1. Podman

  1. Test:

    podman run --rm --device nvidia.com/gpu=all --security-opt=label=disable docker.io/nvidia/cuda:12.4.1-base-ubuntu22.04 nvidia-smi
    Show sample output
    Sample output
    +-----------------------------------------------------------------------------------------+
    | NVIDIA-SMI 595.84                 Driver Version: 595.84         CUDA Version: 13.2     |
    +-----------------------------------------+------------------------+----------------------+
    | 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%   45C    P8             24W /  350W |       1MiB /  24576MiB |      0%      Default |
    |                                         |                        |                  N/A |
    +-----------------------------------------+------------------------+----------------------+
    
    +-----------------------------------------------------------------------------------------+
    | Processes:                                                                              |
    |  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
    |        ID   ID                                                               Usage      |
    |=========================================================================================|
    |  No running processes found                                                             |
    +-----------------------------------------------------------------------------------------+