I am writing this series as part of my solution to document the decisions I made, as well as the challenges I faced when upgrading my home server.
Intel GPU Passthrough
The first task was pass the GPU from Proxmox to the Plex LXC container. To do this I needed to first check that the card was available on the host.
root@pve:~# ls -al /dev/dri/
total 0
drwxr-xr-x 3 root root 100 Feb 4 20:19 .
drwxr-xr-x 21 root root 4440 Feb 6 18:46 ..
drwxr-xr-x 2 root root 80 Feb 4 20:19 by-path
crw-rw---- 1 root video 226, 0 Feb 4 20:19 card0
crw-rw-rw- 1 root render 226, 128 Feb 4 20:19 renderD128
Taking note of two numbers on each of the lines card0
(226, 0) and renderD128
(226, 128). Those correspond to the first two lines below which need to be added to /etc/pve/lxc/100.conf
or whatever LXC container needs to access the iGPU. I need to check if the 3rd line is still needed.
lxc.cgroup.devices.allow: c 226:0 rwm
lxc.cgroup.devices.allow: c 226:128 rwm
lxc.cgroup.devices.allow: c 29:0 rwm # maybe not needed
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
This passes the iGPU to the LXC container, but the permissions won’t allow the LXC users to access the hardware. There are two ways to resolve this, remap the UIDs and GIDs manually like in this guide. The other option is to chmod the renderD128
device so that all users can read/write to it as this guide says. I chose to use the chmod
solution.
I added the following.
nano /etc/udev/rules.d/99-intel-chmod666.rules
KERNEL=="renderD128", MODE="0666"
Within the container the device is mapped to the nobody:nobody
user and group, but with the 666
permissions set by the chmod
command.
jason@poseidon:~$ ls -al /dev/dri/
total 0
drwxr-xr-x 3 nobody nogroup 100 Feb 5 01:19 .
drwxr-xr-x 7 root root 500 Feb 5 14:43 ..
drwxr-xr-x 2 nobody nogroup 80 Feb 5 01:19 by-path
crw-rw---- 1 nobody nogroup 226, 0 Feb 5 01:19 card0
crw-rw-rw- 1 nobody nogroup 226, 128 Feb 5 01:19 renderD128
Following these steps allowed me to pass the iGPU through to Plex following the linuxserver.io guide.