Proxmox: Intel iGPU pass-through to unprivileged LXC containers for hardware transcoding
On proxmox host:
chmod 666 /dev/dri/renderD128
# For a persistent way to give the permissions (this worked for me the first time but later on stopped working)
cat > /etc/udev/rules.d/99-intel-chmod666.rules << 'EOF'
KERNEL=="renderD128", MODE="0666"
KERNEL=="card0", MODE="0666"
EOF
# Reboot proxmox host
cat >> /etc/pve/lxc/xyz.conf <<EOF
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file 0, 0
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
EOF
apt install vainfo
vainfo
To check the usage of the iGPU one can run on the proxmox host the command:
sudo apt install intel-gpu-tools
sudo intel_gpu_top

Resources:
