SOLVED: PMS on Proxmox 7.2 (7.4) container with i915 hw accell?

Server Version#: 1.32.4.7195
Player Version#:

Hi All
Back in '17 @ChuckPa made a small guide on how to get hw accelleration working on a LXC in Proxmox (PMS installation guide when using a Proxmox 5.1 LXC container).
It worked like a charm.
That was on PVE 5, and we’re long gone from that version.
I can see that pve has gone from cgroup to cgroup2, so I changed the container.conf to that:

lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 29:0 rwm
lxc.autodev: 1
lxc.hook.autodev: /var/lib/lxc/106/mount_hook.sh

That didn’t seem to help.
I then found this one:

where @quenthal explains how he got it working.

I found out that I could add the repo with the intel-media-va-driver-non-free with
apt-add-repository 'deb [arch=amd64] https://repositories.intel.com/graphics/ubuntu focal main'
When I try to install the intel-media-va-driver-non-free it tells me that it can’t install it due to failed dependencies
libc6 >=2.29
libccc-s1 >=3.0
libigdgmm12 >22.17+i419~u20.04

Now I’m stuck :-o
I have no idea where to go from there…

My PVE host is an older Intel i5-6260U NUC, so it does support quicksync, and I had it working back then.

Plex doesn’t use external dependencies for Intel Compute anymore.
All that is now built in with PMS.

The quintessential thing you must do is guarantee the full passthrough.
I’ve seen a lot of folks get tripped up with the new ProxMox and, unfortunately, there’s nothing I can do about it.

FWIW: I have QuickSyncVideo in a regular LXC on Ubuntu working without issue.

  1. Create the GPU with the proper GID for access inside the container
  2. Ensure udev sets up correctly on the host.

Screenshot from 2023-07-14 11-15-22

I know how I added it using lxc config commands. I’ll share what I can.

1 Like

Hi @ChuckPa
I know it’s not a supported setup, so I thankyou very much.
if I do this command:

lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers [8086:1904] (rev 09)
00:02.0 VGA compatible controller [0300]: Intel Corporation Iris Graphics 540 [8086:1926] (rev 0a)

but the vainfo just gives me

vainfo
error: can't connect to X server!
error: failed to initialize display

I tried getting some info from this article about GPU passthrough, but didn’t get any result from it:
https://pve.proxmox.com/wiki/PCI_Passthrough#GPU_passthrough
I then found this one:

And that seems to be quite interesting, but that is for VM’s and not LXC, so is it now necessary to do it as a proper VM, or are you still using LXC?

Using the Wundertech article, I could add the PCI device to a VM, not an LXC, but I’m not sure what to do with the ‘display’ setting in the VM (I only have the one GPU), and if I keep that there so I can see the console, I get this message:


Which I guess makes sense, as it tries to set up the GPU twice…

I tried setting the display to none, that removed the conflict, and I could start the ubuntu VM, but it still doesn’t show the i915 hardware when I install plex to it…

I found another article:

And that explained about my missing /dev/dri
So I reverted the changes made previously, removed the blacklist thing and the grub setting.
Now vainfo is happy:

vainfo
error: can't connect to X server!
libva info: VA-API version 1.10.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.10 (libva 2.10.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Skylake - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointStats
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264Main               : VAEntrypointFEI
      VAProfileH264Main               : VAEntrypointStats
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointFEI
      VAProfileH264High               : VAEntrypointStats
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD

Which is great, and if I then do a ls -l /dev/dri
I now see


root@pve:~# ls -l /dev/dri
total 0
drwxr-xr-x 2 root root         80 Jul 16 13:47 by-path
crw-rw---- 1 root video  226,   0 Jul 16 13:48 card0
crw-rw---- 1 root render 226, 128 Jul 16 13:47 renderD128

And I then reinstatted the lines previosly described into the 106.conf for the lxc:

lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 29:0 rwm
lxc.autodev: 1
lxc.hook.autodev: /var/lib/lxc/106/mount_hook.sh

I also tried with these instead of the ‘mount_hook.sh’ file:

lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file

which just mounts the hosts files into the lxc, and both versions works.

it shows
i915 Found
in the plex install now!
Why on earth didn’t it work when I just changed to cgroup2? I don’t know if a host reboot was necessary, but anyways, I’m happy again :smiley:
Thankyou for the help @ChuckPa , you are a star!

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