How to setup Nvidia in Plex docker for hardware transcoding?

  • Hi there, hoping someone might be able to help with my issue.


    I've followed the guides by chris_kmn and tama777, and it looks like

    • my card is working correctly according to "nvidia-smi" and "docker run --gpus all nvidia/cuda:10.0-base nvidia-smi"
    • however i see no hw transcoding occuring by plex (in nvtop or nvidia-smi) for playing h264 videos (other videos won't work at all, h264 play but not transcode)
    • worse many items (seemingly movies only) just throw an error "playback error : Err: s1001 (Network)" and will not play at all (tested native mac client, iphone, and google-android-tv)
    • many of my movies are showing with video as "none" and audio as "none" (unknown if related)



    The graphics card in my hp proliant is a "zotac p400 quadro"


    and nvidia-detect shows it as quadro p400:

    Code
    # nvidia-detect                                                                                               
    Detected NVIDIA GPUs:                                                                                                      
    07:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107GL [Quadro P400] [10de:1cb3] (rev a1)                    
                                                                                                                               
    Checking card:  NVIDIA Corporation GP107GL [Quadro P400] (rev a1)                                                          
    Your card is supported by the default drivers and legacy driver series 390.                                                
    It is recommended to install the                                                                                           
        nvidia-driver                                                                                                          
    package. 


    It recommended to install nvidia-driver, so that's what i did (along with other instructions in the tutorials).


    Testing whether it's working seems to be positive:


    and also testing with the nvidia-container:


    Lastly, I've set up the plex docker with the env variables (and set the portainer init to nvidia too).


    But i cannot seem to get anything hardware transcoding and worse lots of things now will not play at all.


    Could anyone have any tips perhaps? Let me know if there are some more logs i can grep and show etc?


    thanks a lot

  • hey thanks for the help.


    kernel:

    Code
    uname -a
    Linux hostname 5.10.0-0.bpo.7-amd64 #1 SMP Debian 5.10.40-1~bpo10+1 (2021-06-04) x86_64 GNU/Linux


    I did follow the guide, but tried to apply some interpretation to it for my own graphics card.


    and yes i definitely could have missed something :)

    (I've also tried the direct nvidia download run file (NVIDIA-Linux-x86_64-390.143.run) so i've rebooted a million times in the last few days, but i've checked all the steps a few times).


    I checked this page:

    https://wiki.debian.org/Nvidia…28via_buster-backports.29


    and i believed that according to my graphics card, i should follow the section that says

    Code
    For support of GeForce 400 series and newer GPUs

    i.e. the bit that says "Version 390.138 (legacy GPUs)".



    however it instructs you to do this:

    Code
    apt install nvidia-legacy-390xx-driver firmware-misc-nonfree

    and when i did that, i could not install the nvidia container.


    So, based on that and since "nvidia-detect" recommended "It is recommended to install the nvidia-driver", i just did exactly that (which seemed to get nvidia-smi working, so i assumed it was good).


    Should i switch to backports as you've mentioned and test that instead?


    thank you!

  • I'm hitting a road block at apt install -t buster-backports nvidia-xconfig I'm getting this message E: Unable to locate package nvidia-driver-xconfig


    There were no errors indicated while performing steps 1, 2, or the first half of step 3.


    OMV 5.6.12-1

    Kernel 5.4.124-1-pve

    Docker 5:20.10.7~3-0~debian-buster

    Xeon E3-1240v3

    X10SLM+LN4F

    32 GB Ram

    8x4 TB Ironwolf RZ2

  • hm, thats weird... did you enable the testing repository in the OMV extras tab ?


    is there a difference if you use apt-get instead of apt ?

    Same error comes up with Testing Repo enabled and trying apt-get.

    Xeon E3-1240v3

    X10SLM+LN4F

    32 GB Ram

    8x4 TB Ironwolf RZ2

  • I suppose, that your /etc/apt/sources.list might be messed up. You could compare it with my listing.

    OK, I'm confused. My sources.list per your instructions on your OMV5 tutorial:


    Under your sources.list you have:

    Code
    #buster backports
    
    deb http://deb.debian.org/debian/ buster main contrib non-free
    deb http://deb.debian.org/debian/ buster-updates main contrib non-free
    deb http://deb.debian.org/debian-security buster/updates main contrib non-free

    So should I not be using buster-backports and instead be adding contrib non-free to my buster line?


    Thanks!

    Xeon E3-1240v3

    X10SLM+LN4F

    32 GB Ram

    8x4 TB Ironwolf RZ2

  • One more thing to try is using the standard repository:


    apt-get install nvidia-xconfig

    This worked once I added contrib and non-free to the buster line. Thanks for the help!

    Xeon E3-1240v3

    X10SLM+LN4F

    32 GB Ram

    8x4 TB Ironwolf RZ2

    Einmal editiert, zuletzt von StevieBBQ () aus folgendem Grund: forgot to say thanks

  • However, I'm not sure why, but I don't seem to have the drivers installed.


    OMV: 5.6.16-1 (Usul)


    uname -r

    5.9.0-0.bpo.5-amd64


    nvidia-detect

    Detected NVIDIA GPUs:

    0a:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] [10de:1c82] (rev a1)


    Checking card: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)

    Your card is supported by the default drivers and legacy driver series 390.

    It is recommended to install the

    nvidia-driver


    nvidia-smi

    NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.


    m-a prepare

    Getting source for kernel version: 5.9.0-0.bpo.5-amd64

    apt-get install linux-headers-5.9.0-0.bpo.5-amd64

    Reading package lists... Done

    Building dependency tree

    Reading state information... Done

    E: Unable to locate package linux-headers-5.9.0-0.bpo.5-amd64

    E: Couldn't find any package by glob 'linux-headers-5.9.0-0.bpo.5-amd64'

    E: Couldn't find any package by regex 'linux-headers-5.9.0-0.bpo.5-amd64'

    apt-get install build-essential

    Reading package lists... Done

    Building dependency tree

    Reading state information... Done

    build-essential is already the newest version (12.6).

    0 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.

  • I am very new to linux and have followed all the steps provided.

    I have got to the point where I am trying to play videos from plex with hardware acceleration on and i get the following error:


    If i turn off hardware acceleration the CPU maxes out and tries to transcode and plays (even though it pauses every seconds for ages).


    And direct play through the app works perfectly fine so i dont see how its a network error? it only happens with hardware acceleration turned on.


    No idea why this is happening. Any help would be great thanks.

  • Hi,


    Please install the latest nvidia driver first:

    Code
    wget https://us.download.nvidia.com/XFree86/Linux-x86_64/510.54/NVIDIA-Linux-x86_64-510.54.run
    Code
    bash NVIDIA-Linux-x86_64-510.54.run

    Then run the following from the command line as root:

    Code
    docker run --gpus all nvidia / cuda: 10.0-base nvidia-smi

    What is the output? If this:

    then hardware acceleration should work!


    Is the same problem with another videos or movies? If so, try transcoding with Jellyfin as well to see if hardware acceleration works.


              

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!