Trixie - Jellyfin under Docker with Nvidia transcode?

  • Hello everyone.


    I just migrated to OMV8, without any issues whatsoever, great job!!


    I also just switched from Plex and its new policy to Jellyfin, running under Docker.


    I'm trying, without success, to get hardware transcoding working.


    The tutorial by chris_kmn that I was using for Plex no longer works.


    Installing the drivers under Trixie with the Nvidia Container Toolkit isn't straightforward, but even when I manage it and my Quadro P2200 is recognized by nvidia_smi, I can't get transcoding to work without Jellyfin crashing.


    Has anyone managed to get this working?

    chris_kmn, is an update to the guide planned?


    Thank you very much.

  • Hi, run into the same issue yesterday.

    After a lot of testing and failing it is working now for me.

    Had also the problem with Card is recognized from nvidia-smi and Container is starting, but transcoding is failing.


    I will get you some info, just to need translate a little bit, maybe we could figure out what went wrong and we could create a small guide for it.

  • :!: Disclaimer :!:


    I'm not a Linux Pro, just a bsic user. This steps where collected to the best of my knowledge and belief.

    Maybe some steps are useless or not needed. Please correct my way doing it, if you know some improvements, youre welcome :saint:


    Running on:

    • HP Micro Server Gen8 with Intel(R) Xeon(R) CPU E3-1265L V2
    • Nvidia Quadro P400
    • OMV Version 8.0.6-1 (Synchrony)
    • Kernel Linux 6.17.13+deb13-amd64
    • Latest Plex and Jellyfin Docker from "linuxserver"


    All is based on the great Tutorial from chris_kmn

    Something added from official Sources (Debian, Nvidia) and Community Posts (Boards, Reddit,...)


    Activate Backports in OMV Extras!


    Check Grub

    Code
    cat /etc/default/grub.d/cgroup.cfg

    Check for this entry:

    GRUB_CMDLINE_LINUX=systemd.unified_cgroup_hierarchy=false


    Doing the Updates and a reboot, because BackPort Kernel was installed.

    Code
    apt-get update
    apt-get upgrade
    reboot


    Cleanup before beginning:

    Code
    apt-get purge *nvidia*
    apt autoremove
    apt autoclean
    
    sudo apt-get remove --purge '^nvidia-.*'
    apt autoremove
    apt autoclean
    
    apt update


    Preparation:

    Code
    apt install libdw1
    apt install -t trixie-backports linux-headers-generic
    apt install module-assistant
    sudo m-a prepare

    Driver install:

    Code
    apt update
    apt install -t trixie-backports nvidia-kernel-dkms nvidia-driver nvidia-smi
    reboot

    Check if module is installed and card is recognized


    Code
    # dkms status

    My output:

    nvidia-current/550.163.01, 6.1.0-30-amd64, x86_64: installed

    nvidia-current/550.163.01, 6.1.0-31-amd64, x86_64: installed

    nvidia-current/550.163.01, 6.17.13+deb13-amd64, x86_64: installed


    Code
    # nvidia-smi


    It shows my GPU and driver version, Cuda version is empty.


    Configure:

    Code
    apt update
    apt install nvidia-xconfig
    sudo nvidia-xconfig


    Now i was following the official Nvidia Guide from -> https://docs.nvidia.com/datace…latest/install-guide.html

    Code
    sudo apt-get update && sudo apt-get install -y --no-install-recommends \
       curl \
       gnupg2
    Code
    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
    Code
    sudo sed -i -e '/experimental/ s/^#//g' /etc/apt/sources.list.d/nvidia-container-toolkit.list
    Code
    sudo apt-get update


    Code
    export NVIDIA_CONTAINER_TOOLKIT_VERSION=1.18.1-1
      sudo apt-get install -y \
          nvidia-container-toolkit=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
          nvidia-container-toolkit-base=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
          libnvidia-container-tools=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
          libnvidia-container1=${NVIDIA_CONTAINER_TOOLKIT_VERSION}


    Code
    sudo nvidia-ctk runtime configure --runtime=docker
    sudo systemctl restart docker


    Code
    nano /etc/nvidia-container-runtime/config.toml


    activate (remove # in front):

    accept-nvidia-visible-devices-envvar-when-unprivileged = true


    Code
    sudo systemctl restart docker



    --- At this Point, the card was recognized, but Jellyfin/Plex Container did not start. ---



    Code
    apt update
    apt upgrade


    Update the "NVIDIA_CONTAINER_TOOLKIT" to Version 1.19.0 happened. 




    Repeated some steps, which i think have to be done, when Toolkit is updated.

    Code
    sudo nvidia-ctk runtime configure --runtime=docker
    sudo systemctl restart docker


    Code
    nano /etc/nvidia-container-runtime/config.toml


    activate (remove # in front):

    accept-nvidia-visible-devices-envvar-when-unprivileged = true


    Code
    sudo systemctl restart docker


    --- At this Point, card was recognized and Container was starting without problems. But Transcoding was crashing with Message "ffmpeg exited with code 255" ---


    Now i was trying some hints i found in several Boards/Reddit/StackOverflow....


    Code
    apt install opencl-c-headers:amd64
    Code
    apt install -t trixie-backports libnvidia-encode1
    Code
    apt install nvidia-cuda-mps
    Code
    apt install nvidia-persistenced
    Code
    sudo systemctl restart docker


    Finally here it started to working as expected :thumbup:



    Configs in my Container:

    - NVIDIA_DRIVER_CAPABILITIES=all

    - NVIDIA_VISIBLE_DEVICES=all


    and

    runtime: nvidia

  • Oh no!!!


    I made a rookie mistake and crashed my system...


    Not much time tonight, but I wanted to do a fresh install anyway.


    I'll take advantage of it.

    I'll get back to you as soon as it's ready and I can test your process!


    Thanks again.


  • Hi bugado,


    can you report at wich point and with what error message the installation followed by my guide fails ?


    And did you do a fresh install of OMV8 or an upgrade from 7 ? There might be issues with the sources.list when you upgrade from 7….


    vcdwelt : don‘t get me wrong, but it seems you are mixing and may be messing things up that might lead to problems later.


    If you are providing info on errors I can try to update my tutorial for trixie.


    Cheers, Chris

  • I upgrade from 7.


    I followed your guide a little too quickly... by doing several things at the same time


    So i launch

    Code
    apt install libdw1
    apt install -t trixie-backports linux-headers-generic

    But then I wasn't sure I had cleaned my system properly and I launch

    Code
    apt-get purge *nvidia*
    apt autoremove
    apt autoclean
    
    sudo apt-get remove --purge '^nvidia-.*'
    apt autoremove
    apt autoclean
    
    apt update

    And that's where the big problem started.


    I deleted a lot of system packages (madm, samba, etc.) and can't reboot.

    I hope it help you!


    I backup every month with the backup plugin with dd full disk and the last backup was from 01-01-26.

    But impossible to extract the ISO with Clonezilla, an other post in sight...


    So I'm currently setting up a fresh installation.

    I've got quite a bit of work to do.

    When everything is finished, I'll get back to it.


    Thanks for your help vcdwelt anyway and a big thanks chris_kmn for your fantastic tutorial for OMV 7 and earlier versions!!

  • chris_kmn yes, because of i did not know what exactly happens i added the disclaimer ;)

    You are completely right, possible i mix some things up and it is not the right way to do it.

    But at least it is working now without any errors for me.


    the error with not starting container was: unresolvable CDI devices runtime.nvidia.com/gpu=all

    the error from not playing was: ffmpeg exited with code 255


  • There is nothing written about installing anything with trixie-backports in my tutorial. You did not follow the OMV7 guide unfortunately, but you definitely should.


    The cdi issue might be related to the compose-file for plex (or jellyfin).


    Try to add following to your compose config file for your container:

    Code
    deploy:
         resources:
            reservations:
              devices:
                - driver: nvidia
                  count: all
                  capabilities: [gpu]


    So the whole file should look like this.


  • Sitenote:

    At least for me the Nvidia Driver without Backport did not install well. I had to use the Backport Driver, as described on Debian Wiki. If Backport Kernel is not in use, the default Driver should be choosen, if Backport Kernel is in use, the Backport Driver should be used.


    NvidiaGraphicsDrivers - Debian Wiki

    -> Note: this version will not work with kernels 6.16 or newer like the current one from trixie-backports: use the the corresponding version from trixie-backports instead.


    So far my understanding about the Wiki Entry.


    The Part of log, where i tried the default driver on Backport Kernel.

  • There is nothing written about installing anything with trixie-backports in my tutorial. You did not follow the OMV7 guide unfortunately, but you definitely should.

    Absolutely, the errors are entirely my responsibility.


    Does the OMV7 guide work under Debian 13? Driver and Nvidia container toolkit?

  • Sitenote:

    At least for me the Nvidia Driver without Backport did not install well. I had to use the Backport Driver, as described on Debian Wiki. If Backport Kernel is not in use, the default Driver should be choosen, if Backport Kernel is in use, the Backport Driver should be used.


    Yes, but you should use the OMV GUI for activating backports. As described in tutorial. I suppose, that OMV8 still has that option ?!


    I expect that the OMV7 tutorial should work for 8. Only Step X has to be modified (debian13 instead debian12).

  • The Part of log, where i tried the default driver on Backport Kernel.

    This looks as if you‘ve installed the driver from a .run file from nvidia and not from the repository. And the error messages seems to show, that you have mixed open driver and proprietary.


    Stick to the guide and try Step X if you need newest drivers. Change debian12 to debian13:


    Code
    wget https://developer.download.nvidia.com/compute/cuda/repos/debian13/x86_64/cuda-keyring_1.1-1_all.deb
    
    dpkg -i cuda-keyring_1.1-1_all.deb
    
    apt-get update


    And use nvidia-driver-assistant !

  • - No don't used a run File, only from Repo.

    - I have activated Backports via Gui in OMV Extras


    Driver Assist is not working, because it loads a driver, which is not working with P400 anymore (too new, or something else e.g. Open Flavour). This was also so in OMV 7 for me. Only worked with Driver 550, the one from driver assist did not even detect my card.

    • New
    • Official Post

    I backup every month with the backup plugin with dd full disk and the last backup was from 01-01-26.

    But impossible to extract the ISO with Clonezilla, an other post in sight...

    I understood you know have done a fresh install. For future occasions, you can use dd or usbimager to restore a dd_full backup.

  • - No don't used a run File, only from Repo.

    - I have activated Backports via Gui in OMV Extras


    Driver Assist is not working, because it loads a driver, which is not working with P400 anymore (too new, or something else e.g. Open Flavour). This was also so in OMV 7 for me. Only worked with Driver 550, the one from driver assist did not even detect my card.

    Ok, it looked somehow strange to me. But I haven‘t upgraded to OMV8 until now.


    There is a way to pin the driver to a certain version. Nefertiti did you try to pin the driver version and have a recommendation ?


    From my understanding you could pin-install a driver-version by the following:


    Code
    apt-get install nvidia-driver-pinning-550


    Which would lock to the 550 version branch.


    See also: Nvidia version locking

  • Stick to the guide and try Step X if you need newest drivers. Change debian12 to debian13:

    I started following the tutorial for OMV7, but I'm stuck at step 2.

    Code
    add-apt-repository contrib

    It return

    Quote

    -bash: add-apt-repository: command not found

    It seems that adding a PPA repository is not simple...

  • Chris, Thanks for the procedure. Trying to follow to the letter.


    Updated OMV 7 to 8. Getting an error that module-assistant package cannot be located.


    When I do a apt search module-assistant it says:


    module-assistant/stable,now 0.11.14 all [installed]

    tool to make module package creation easier


    Any suggestions. Do I just move forward?


    Thanks. ML

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!