PMS + lxc + nvidia

Server Version#: 1.14.1.5488
Player Version#: (web player)
Plex Media Server Logs_2019-01-16_17-21-46.zip (334.7 KB)

Hey,

i have trouble to get HW encoding to work.

  • nvidia gpu is showing up in lxc container:
root@plex:/opt# nvidia-smi
Wed Jan 16 17:23:45 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.78       Driver Version: 410.78       CUDA Version: 10.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 750     Off  | 00000000:01:00.0 Off |                  N/A |
| 33%   40C    P0     1W /  38W |      0MiB /   981MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

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

here my lxc config:

cat /etc/pve/lxc/109.conf
arch: amd64
cores: 4
hostname: plex
memory: 1024
mp0: /media/XXX/m,mp=/media/XXX/m
mp1: /media/XXX/m,mp=/media/XXX/m
nameserver: XXX.XXX.X.XX
net0: name=eth0,bridge=vmbr0,gw=XXX.XXX.X.XX,hwaddr=XX:XX:31:F3:XX:XX,ip=XXX.XXX.X.XX/16,type=veth
onboot: 0
ostype: debian
rootfs: local:109/vm-109-disk-1.raw,size=12G
searchdomain: XXX.XXX.X.XX
swap: 0
lxc.cgroup.devices.allow = c 195:* rwm
lxc.cgroup.devices.allow = c 241:* rwm
lxc.mount.entry = /dev/nvidia0 dev/nvidia0 none bind,optional,create=file
lxc.mount.entry = /dev/nvidiactl dev/nvidiactl none bind,optional,create=file
lxc.mount.entry = /dev/nvidia-uvm dev/nvidia-uvm none bind,optional,create=file
lxc.mount.entry = /dev/nvidia-modeset dev/nvidia-modeset none bind,optional,create=file
lxc.mount.entry = /dev/nvidia-uvm-tools dev/nvidia-uvm-tools none bind,optional,create=file

if i can provide you something more, please tell me.

You must make the host’s real /dev/dri directory available and mapped identically inside the container.

this is the same type problem as faced in GPU-Passthrough for VMs.

I suspect you don’t actually need /dev/nvidia0 for the sake of HW transcoding - however, check the major/minor node numbers (particularly minor) from the devices.allow lines. These are not necessarily stable and sometimes change.

Also, I do believe the nvidia drivers on the VM and on the hypervisor must also match, so careful with that also.

Best of luck!

Plex HW transcoding, regardless of whether Intel GPU/ASIC or lib-vaapi interfaced, uses the vaapi device names.

These are identified as /dev/dri/renderD128 and /dev/dri/card0
Plex uses these interface names. It does not use the proprietary device driver names (e.g. /dev/nvidia0)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.