yes, i tried your link aswell, but no success.
I’m also wondering why i dont have nvidia-uvm. Is this necessary?
Btw. i use a GTX 750
yes, i tried your link aswell, but no success.
I’m also wondering why i dont have nvidia-uvm. Is this necessary?
Btw. i use a GTX 750
It is necessary, it’s usually not present because the Nvidia persistence daemon isn’t running.
Can you confirm via systemctl status that it’s running?
Sorry for delay:
root@proxmox:/etc# systemctl status nvidia-persistenced.service
● nvidia-persistenced.service - NVIDIA Persistence Daemon
Loaded: loaded (/etc/systemd/system/nvidia-persistenced.service; enabled; ven
Active: active (running) since Thu 2019-11-07 13:54:11 CET; 35s ago
Process: 18963 ExecStart=/usr/bin/nvidia-persistenced --user nvidia-persistenc
Main PID: 18964 (nvidia-persiste)
Tasks: 1 (limit: 4915)
Memory: 400.0K
CGroup: /system.slice/nvidia-persistenced.service
└─18964 /usr/bin/nvidia-persistenced --user nvidia-persistenced
Nov 07 13:54:11 proxmox systemd[1]: Starting NVIDIA Persistence Daemon...
Nov 07 13:54:11 proxmox nvidia-persistenced[18964]: Started (18964)
Nov 07 13:54:11 proxmox systemd[1]: Started NVIDIA Persistence Daemon.
after doing 1 to 1 everything from your tutorial, it is working smoothly. I’M SOO HAPPY!!
Again Link for next reader
Glad you got it figured out and it helped you.
Hey guys, I got a problem since I’ve upgraded my kernel and updated my driver. Hopefully one of you guys can help.
I am runninx Proxmox VE on my server. I upgraded this from PVE 5.4 to 6.1, effectively upgrading my kernel to Linux 4.15.X to Linux 5.3.13-1. Together with this, I also updated my Nvidia driver from 430.X to 440.44. I reran almost all of @constiens guide he posted above. After some troubleshooting I finally got something working, unfortunately. I only got decoding working. Plex does not seem to want to use the NVENC at all, I have applied keylases patch on both host and lxc.
I also saw that the keylase nvidia patch now has a NvFBC patch as well, anyone can explain me what this does and if it is interesting for any of us?
Anyone know what I might be doing wrong if I only get hardward decoding working?
I’m currently running driver version 440.36 and did the upgrade to 6.1 as well. It does require that you re-run almost all the steps in my guide on the server side to get it up and running again.
Some thoughts to check:
Did you install the latest headers apt-get install pve-headers-$(uname -r) after you upgraded the kernel and before you ran the NVIDIA-Linux-x86_64-440.4.run file?
Did you upgrade the nvidia driver in your plex container too? The version of the driver on the server and the container must match.
Did your cgroups change? In my case when I did the update I had to add cgroup 234 to my .conf file
Make sure the persistance daemon is still running systemctl status nvidia-persistenced without errors.
Thanks for the quick reply!
I’ve unfortunately litterally done everything mentioned above. I’d ran the pve-headers command, these were already installed.
I firstly uninstalled NVIDIA driver in the container, then I proceeded to uninstall the driver on the host - rebooted - Installed new driver with the --nouveau flag - rebooted - installed again with no flag, applied patch - rebooted - checked my devices ls -l /dev/nv*
. These cgroups were indeed slightly changed, corrected this. Checked the nvidia-persistenced. I saw last file on github was updated 13 days ago. So pulled again, installed again (for good measure). Checked persistence with nvidia-smi
, seemed to be on. Started container, installed driver with--no-kernel-module
on container and installed patch. Checked if devices showed up on container. This all seemed to work. When testing on Plex, only decoding working strange enough.
Couldn’t get anything useful from the Plex logs either unfortunately
Tomorrow morning I will try the steps I mention above again from scratch when nobody is watching. maybe I missed something. Something else I should add to my steps above?
I tried all the steps I could take again. I did also have the:
lxc.autodev: 1
lxc.hook.autodev: /var/lib/lxc/101/mount_hook.sh
snippet in my config with the appropriate script in mount_hook.sh
. I did try the complete your way of doing it and removed this snippet. Also, without the keylase patch altogether, since without the patch it should still be able to do at least 2 encode streams.
But still, Plex does not seem to want to use my encoder. Is there a command I could call to simply chech whether I can actually call upon the encoder myself from the container? (or out of it)
Sorry, I just got back to this, I haven’t seen the issue where it won’t use the encoder but is using the decoder, that does seem strange.
You’ve looked through most of the things I would suggest. If it’s using the decoder that would imply to me that it’s correct in your proxmox setup.
What about spinning up a new plex LXC just to test that there’s nothing crazy with the plex install? I’ve done that before and had good luck narrowing down where the issues are.
Thanks for getting back at me, I’ve been wanting to do this as well. Spinning up a new LXC and see if that would solve some things.
I’m pretty sure that the fact I’m still running 16.04 LTS in my Plex container does not help, so I was thinking of trying an in-place upgrade to 18.04 LTS soonish, last time I tried this things stopped working and I rolled back to my backup of yesterday.
I’ll try both test/upgrade soon and let you know the result, hopefully upgrade will fix things
EDIT: Newest Plex version 1.18.5.2260 seemed to have fixed the problem. I read in the patchnotes that they included extra options for HW transcoding. Now there is a checkmark that enables/disables HW accelerated video encoding. Checked thix boxes and everything started working again
Hey, glad it works now, I didn’t realize they added more options, I’ll have to check it out!
Hi there, Is it mandatory to use a privileged container to run Plex Server with GPU passthrough or not?
Currently everything works properly with a privileged container, I just wanted to better understand this case.
@constiens Do you have any tips to give me?
I use privileged because I want to be able to access my NAS through CIFS. If the LXC container had direct access to the drives through proxmox I don’t believe you would need to use a privileged container.
You are giving specific access to the GPU hardware via the lxc.cgroup commands in the .conf file for the container.
I tried to create an unprivileged container and to give direct access to the GPU as on this guide:
but it didn’t work, the container doesn’t even start.
Probably, it is the part where it tries to execute the commands written in the mount_hook.sh file that gives problems.
I would follow my guide instead: Plex HW acceleration in LXC container - anyone with success?
Yes, those instructions only work on privileged LXC containers. Does anyone have a way to enable this passthrough on unprivileged boxes for intel iGPU/Iris Graphics? The only guides I’ve seen that work on unprivileged containers are for dGPU/nVidia.
I’m in the same situation, I’ve an Intel NUC with a Intel iGPU, I’ve followed this guide and it worked perfectly:
The only thing is that it will work only for privileged containers, if you will found a way to do that into an unprivileged one let me know!
@constiens I’ve had some inconsistent behaviour of the transcoder recently. Where I found a fix that might be of interest if it is an issue for more people.
I noticed that Plex on random instances would sometimes simply not initiate the hardware transcoder and for some streams it would. After going through some logs, I noticed the following line before a transcoder job:
[0x7fa7d2ffd700] DEBUG - TPU: hardware transcoding: enabled, but no hardware decode accelerator found
[0x7fa7d2ffd700] DEBUG - TPU: hardware transcoding: zero-copy support not present
[0x7fa7d2ffd700] DEBUG - TPU: hardware transcoding: final decoder: , final encoder:
This log was made with all correct drivers/settings as described in your guide. I also saw that Plex installer gives information during installation if there is any hardware acceleration present or not. Also here the installer returned something like:
PlexMediaServer install: Transcoding HW: Not Found
So I was wondering what was different from my host compared to my LXC that Plex would think there wasn’t any hardware installed. And the only difference I could find, is that my host has the following devices available with ls -l /dev/dri/
total 0
drwxr-xr-x 2 root root 100 Apr 2 20:22 by-path
crw-rw---- 1 root video 226, 0 Apr 2 20:22 card0
crw-rw---- 1 root video 226, 1 Apr 2 20:22 card1
crw-rw---- 1 root render 226, 128 Apr 2 20:22 renderD128
Where card1
is just a Matrox display adapter, but card0
and renderD128
refer to my Nvidia GPU. So I went ahead and forwarded these devices to my LXC in the same way as described by you, to see if this made a difference, added the following lines to my /etc/pve/lxc/101.conf
lxc.cgroup.devices.allow: c 226:* rwm
lxc.mount.entry: /dev/dri/card0 dev/dri/card0 none bind,optional,create=file
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
After which I started my LXC and started a transcode to see what the Plex logs would say when I grep on “TPU”:
[0x7fe22affd700] DEBUG - TPU: hardware transcoding: using hardware decode accelerator nvdec
[0x7fe22affd700] DEBUG - TPU: hardware transcoding: zero-copy support present
[0x7fe22affd700] DEBUG - TPU: hardware transcoding: using zero-copy transcoding
[0x7fe22affd700] DEBUG - TPU: hardware transcoding: final decoder: nvdec, final encoder: nvenc
So yeah, it seems like Plex checks the /dev/dri/
folder to see what hardware accelerators are present? Any chance you could look what your logs say when you look for “TPU”. I’m curious if I’m the only one with this behaviour or not.