• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Nvidia GPU not detected inside Jellyfin container

     
    • 0 Vote(s) - 0 Average

    Nvidia GPU not detected inside Jellyfin container

    beckettloose
    Offline

    Junior Member

    Posts: 1
    Threads: 1
    Joined: 2025 Nov
    Reputation: 0
    #1
    2025-11-10, 04:38 PM
    Hello all,

    I'm in the process of setting up GPU transcoding for my Jellyfin server, but I'm running into an annoying issue at the moment. This is my current setup for reference:

    Host:
    • Chassis: Dell R720xd
    • CPU: 2x Intel Xeon E5-2680 v2
    • RAM: 320GB ECC Memory
    • Hypervisor OS: Proxmox VE 9.0.11
    • GPU: Nvidia Quadro P2000

    VM Specs:
    • CPU: 4 cores
    • RAM: 8gb
    • OS: Ubuntu 25.04 Server
    • Nvidia Drivers: 535.274.02
    • Nvidia Container Toolkit: 1.18.0-1


    Jellyfin playback fails whenever transcode is required, which appears to be caused by an issue with passing through the GPU from the VM to the container. In my troubleshooting, I started by checking the output of nvidia-smi on the vm itself and inside the container:

    nvidia-smi run from VM:
    Code:
    redacted@docker-02:~/docker/nvidia-test$ nvidia-smi
    Mon Nov 10 16:13:23 2025
    +---------------------------------------------------------------------------------------+
    | NVIDIA-SMI 535.274.02            Driver Version: 535.274.02  CUDA Version: 12.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  Quadro P2000                  Off | 00000000:00:10.0 Off |                  N/A |
    | 64%  51C    P0              18W /  75W |      0MiB /  5120MiB |      0%      Default |
    |                                        |                      |                  N/A |
    +-----------------------------------------+----------------------+----------------------+

    +---------------------------------------------------------------------------------------+
    | Processes:                                                                            |
    |  GPU  GI  CI        PID  Type  Process name                            GPU Memory |
    |        ID  ID                                                            Usage      |
    |=======================================================================================|
    |  No running processes found                                                          |
    +---------------------------------------------------------------------------------------+
    This gives the expected output showing the GPU is detected, and there are no active processes using it.

    nvidia-smi run inside jellyfin container:
    Code:
    redacted@docker-02:~/docker/jellyfin$ docker exec -it jellyfin /bin/bash
    I have no name!@docker-02:/$ nvidia-smi
    Mon Nov 10 16:15:49 2025
    +---------------------------------------------------------------------------------------+
    | NVIDIA-SMI 535.274.02            Driver Version: 535.274.02  CUDA Version: 12.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. |
    |=========================================+======================+======================|
    Killed
    It seemed like for some reason, the GPU passthrough was not working inside docker because nvidia-smi exited before printing the GPU info. Next, I took Jellyfin out of the equation by running nvidia-smi from a simple ubuntu image:
    Code:
    redacted@docker-02:~/docker/jellyfin$ docker run --rm --entrypoint "nvidia-smi" --runtime nvidia --gpus all ubuntu
    Mon Nov 10 16:19:15 2025
    +---------------------------------------------------------------------------------------+
    | NVIDIA-SMI 535.274.02            Driver Version: 535.274.02  CUDA Version: 12.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  Quadro P2000                  Off | 00000000:00:10.0 Off |                  N/A |
    | 67%  51C    P0              18W /  75W |      0MiB /  5120MiB |      0%      Default |
    |                                        |                      |                  N/A |
    +-----------------------------------------+----------------------+----------------------+

    +---------------------------------------------------------------------------------------+
    | Processes:                                                                            |
    |  GPU  GI  CI        PID  Type  Process name                            GPU Memory |
    |        ID  ID                                                            Usage      |
    |=======================================================================================|
    |  No running processes found                                                          |
    +---------------------------------------------------------------------------------------+

    Interestingly, this seemed to work just fine. I'm pretty sure my Jellyfin compose file is set up right, but I'll add it here regardless:
    Code:
    services:
      jellyfin:
        image: jellyfin/jellyfin
        container_name: 'jellyfin'
        user: 1000:1000
        group_add: # by id as these may not exist within the container. Needed to provide permissions to the VAAPI Devices
          - '107' #render
          - '44' #video
        # Network mode of 'host' exposes the ports on the host. This is needed for DLNA access.
        network_mode: 'host'
        volumes:
          - jellyfin_config:/config
          - jellyfin_cache:/cache
          - /mnt/media-vault:/media
        restart: always
        runtime: nvidia
        devices:
          # VAAPI Devices
          #- /dev/dri/renderD128:/dev/dri/render128
          #- /dev/dri/card0:/dev/dri/card0
          # Devices below were added during troubleshooting but don't seem to make a difference
          - /dev/nvidia-caps:/dev/nvidia-caps
          - /dev/nvidia0:/dev/nvidia0
          - /dev/nvidiactl:/dev/nvidiactl
          - /dev/nvidia-modeset:/dev/nvidia-modeset
          - /dev/nvidia-uvm:/dev/nvidia-uvm
          - /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools
        deploy:
          resources:
            reservations:
              devices:
                - driver: nvidia
                  count: all
                  capabilities: [gpu]

    Any ideas as to what's wrong here, or anything else to look at would be greatly appreciated.
    skittle
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2025 Dec
    Reputation: 0
    #2
    2025-12-08, 06:03 AM
    I have been fighting this for hours but finally got it to work, so I made an account to reply.

    Some prerequisites:
    • Follow NVIDIA guide to install the container toolkit
    • I found that it was a good sanity check to run a sample load as they document here. This proved that it wasn't a hardware, driver, or containerization issue.

    So if you get this far,

    1. You can run nvidia-smi in your host OS (or VM, doesn't matter for this)

    2. You can't run nvidia-smi in the jellyfin container. It gets killed when you try. This is running with 
    Code:
    docker exec -it jellyfin bash
    for me.

    Code:
    root@jellyfin:/# nvidia-smi
    Sun Dec  7 21:25:58 2025
    +-----------------------------------------------------------------------------------------+
    | NVIDIA-SMI 550.163.01            Driver Version: 550.163.01    CUDA Version: 12.4    |
    |-----------------------------------------+------------------------+----------------------+
    | 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. |
    |=========================================+========================+======================|
    Killed

    At this point, if you're like me, you've been beating up the container quite a bit for a while. In my case, I'm trying to rebuild a VM that worked just fine until I unfortunately deleted it and needed to start over. So, I know that something is not fundamentally wrong. Here is what worked for me. 

    Code:
    sudo apt update
    sudo apt upgrade
    sudo apt purge 'nvidia-*' 'libnvidia-*' 'cuda-*'

    # Remove any old DKMS modules
    sudo dkms status

    sudo dkms remove -m nvidia -v 550.163.01 --all
    # example

    sudo apt autoremove --purge -y
    sudo apt clean
    sudo reboot

    Okay, now we should be at a clean restarting point. Reinstall the NVIDIA driver and toolkit. 
    Code:
    sudo apt install -y linux-headers-$(uname -r) nvidia-driver firmware-misc-nonfree
    sudo reboot

    Test the driver on the host again. 

    Code:
    $ nvidia-smi
    Sun Dec  7 21:54:51 2025
    +-----------------------------------------------------------------------------------------+
    | NVIDIA-SMI 550.163.01            Driver Version: 550.163.01    CUDA Version: 12.4    |
    |-----------------------------------------+------------------------+----------------------+
    | 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  Quadro P2000                  Off |  00000000:09:00.0 Off |                  N/A |
    | 45%  32C    P8              4W /  75W |      2MiB /  5120MiB |      0%      Default |
    |                                        |                        |                  N/A |
    +-----------------------------------------+------------------------+----------------------+

    +-----------------------------------------------------------------------------------------+
    | Processes:                                                                              |
    |  GPU  GI  CI        PID  Type  Process name                              GPU Memory |
    |        ID  ID                                                              Usage      |
    |=========================================================================================|
    |  No running processes found                                                            |
    +-----------------------------------------------------------------------------------------+

    Now get to work on the container toolkit. 

    Code:
    sudo apt purge -y nvidia-container-toolkit nvidia-container-toolkit-base \
                    libnvidia-container-tools libnvidia-container1 \
                    libnvidia-container0
    sudo apt autoremove --purge -y
    sudo apt clean

    Follow installation instructions from NVIDIA website linked above. 

    ----------------------

    Now you need to work on your Docker Compose file. Make sure these are in there somewhere:

    Code:
       
    services:
      jellyfin:
        gpus: all
        environment:
          - NVIDIA_VISIBLE_DEVICES=all
          - NVIDIA_DRIVER_CAPABILITIES=compute,video,utility

    Now bring down the container and force rebuild it. 

    Code:
    $ docker compose up -d --force-recreate

    The GPU check now executed instantly, and I can die happy. 
    Code:
    $ docker exec -it jellyfin nvidia-smi
    Sun Dec  7 21:36:09 2025
    +-----------------------------------------------------------------------------------------+
    | NVIDIA-SMI 550.163.01            Driver Version: 550.163.01    CUDA Version: 12.4    |
    |-----------------------------------------+------------------------+----------------------+
    | 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  Quadro P2000                  On  |  00000000:09:00.0 Off |                  N/A |
    | 45%  33C    P8              4W /  75W |      2MiB /  5120MiB |      0%      Default |
    |                                        |                        |                  N/A |
    +-----------------------------------------+------------------------+----------------------+

    +-----------------------------------------------------------------------------------------+
    | Processes:                                                                              |
    |  GPU  GI  CI        PID  Type  Process name                              GPU Memory |
    |        ID  ID                                                              Usage      |
    |=========================================================================================|
    |  No running processes found                                                            |
    +-----------------------------------------------------------------------------------------+


    I don't know what actually happened here, but the only way that I found to fix it was basically to take a hammer to everything, get it all level, and recreate it. Something with the current NVIDIA driver was getting out of sync with the container toolkit and the container itself. Once everything was level, recreating it seemed to work for me. Good luck.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode