# Proxmox: Intel iGPU pass-through to unprivileged LXC containers for hardware transcoding

On *proxmox* host:

```bash
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:

```bash
sudo apt install intel-gpu-tools
sudo intel_gpu_top
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1690028499703/88cba78c-fcb9-4896-8137-377fc405ac28.png align="center")

Resources:

* [https://ketanvijayvargiya.com/302-hardware-transcoding-inside-an-unprivileged-lxc-container-on-proxmox/](https://ketanvijayvargiya.com/302-hardware-transcoding-inside-an-unprivileged-lxc-container-on-proxmox/)
    
* [https://github.com/blakeblackshear/frigate/discussions/5773](https://github.com/blakeblackshear/frigate/discussions/5773)
    
* [https://bookstack.swigg.net/books/linux/page/lxc-gpu-access](https://bookstack.swigg.net/books/linux/page/lxc-gpu-access)
    
* [https://forum.proxmox.com/threads/mediated-device-passthrough-to-lxc-container.128636/](https://forum.proxmox.com/threads/mediated-device-passthrough-to-lxc-container.128636/)
    
* [https://forum.proxmox.com/threads/lxc-emby-dont-detect-hardware-acceleration.117173/](https://forum.proxmox.com/threads/lxc-emby-dont-detect-hardware-acceleration.117173/)
    
* [https://forum.proxmox.com/threads/lxc-i9-12900t-gpu-plex-passthrough.109439/](https://forum.proxmox.com/threads/lxc-i9-12900t-gpu-plex-passthrough.109439/)
