Good luck with it
How to setup Nvidia in Plex docker for hardware transcoding?
-
- OMV 4.x
- Kreavan
-
-
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"
Code
Alles anzeigen# lspci -v | grep -i vga 07:00.0 VGA compatible controller: NVIDIA Corporation GP107GL [Quadro P400] (rev a1) (prog-if 00 [VGA controller]) # lspci -v -s 07:00.0 07:00.0 VGA compatible controller: NVIDIA Corporation GP107GL [Quadro P400] (rev a1) (prog-if 00 [VGA controller]) Subsystem: NVIDIA Corporation GP107GL [Quadro P400] Physical Slot: 1 Flags: bus master, fast devsel, latency 0, IRQ 16 Memory at fb000000 (32-bit, non-prefetchable) [size=16M] Memory at e0000000 (64-bit, prefetchable) [size=256M] Memory at de000000 (64-bit, prefetchable) [size=32M] I/O ports at 4000 [size=128] [virtual] Expansion ROM at 000c0000 [disabled] [size=128K] Capabilities: [60] Power Management version 3 Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+ Capabilities: [78] Express Legacy Endpoint, MSI 00 Capabilities: [100] Virtual Channel Capabilities: [250] Latency Tolerance Reporting Capabilities: [128] Power Budgeting <?> Capabilities: [420] Advanced Error Reporting Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?> Capabilities: [900] #19 Kernel driver in use: nvidia Kernel modules: nvidia
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:
Code
Alles anzeigen# nvidia-smi Mon Jul 5 21:56:53 2021 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 418.197.02 Driver Version: 418.197.02 CUDA Version: 10.1 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 Quadro P400 Off | 00000000:07:00.0 Off | N/A | | 0% 56C P0 N/A / N/A | 0MiB / 1986MiB | 0% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | No running processes found | +-----------------------------------------------------------------------------+
and also testing with the nvidia-container:
Code
Alles anzeigen# docker run --gpus all nvidia/cuda:10.0-base nvidia-smi Mon Jul 5 11:57:03 2021 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 418.197.02 Driver Version: 418.197.02 CUDA Version: 10.1 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 Quadro P400 Off | 00000000:07:00.0 Off | N/A | | 0% 57C P0 N/A / N/A | 0MiB / 1986MiB | 0% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | No running processes found | +-----------------------------------------------------------------------------+
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
-
You are using an old nvidia driver. In a debian buster backports environment there should be driver version 460.
I suppose that you did not do everything like described in the guide. Wich kernel are you running ?
-
hey thanks for the help.
kernel:
Codeuname -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
i.e. the bit that says "Version 390.138 (legacy GPUs)".
however it instructs you to do this:
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!
-
okay, switching to the buster-backports for the nvidia-driver as referenced in tutorial here:
and
fixes the issue:
thanks for the tip chris_kmn!
-
I’m happy it worked
-
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
-
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 ?
-
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.
-
I suppose, that your /etc/apt/sources.list might be messed up. You could compare it with my listing.
-
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:
Code
Alles anzeigen# deb cdrom:[Debian GNU/Linux 10 _Buster_ - Official Snapshot amd64 LIVE/INSTALL Binary 20200921-17:33]/ buster contrib main non-free # deb cdrom:[Debian GNU/Linux 10 _Buster_ - Official Snapshot amd64 LIVE/INSTALL Binary 20200921-17:33]/ buster contrib main non-free deb http://deb.debian.org/debian/ buster main deb-src http://deb.debian.org/debian/ buster main # buster-updates, previously known as 'volatile' deb http://deb.debian.org/debian/ buster-updates main contrib non-free deb-src http://deb.debian.org/debian/ buster-updates main contrib non-free # buster-backports deb http://deb.debian.org/debian buster-backports main contrib non-free
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!
-
Good question. I honestly was not aware of that in my sources and I am not really a linux expert…
But there are some additional files in the sources.d folder.
What about backing up your sources and copy mine into your folder and see if it works ?
One more thing to try is using the standard repository:
apt-get install nvidia-xconfig
-
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!
-
👍😊
-
That fix to the sources.list worked for me as well. Thank you.
-
Very nice
-
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.
-
Success! I needed to install the kernel headers from the backport. Transcoding in Plex currently. Great stuff.
-
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:
Then run the following from the command line as root:
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!