Proxmox LXC Container Intel CPU iGPU Passthrough

Aus Laub-Home Wiki
  1. Restart your machine and enter BIOS. Enable intel integrated graphics and disable IOMMU. Save settings and exit BIOS.
  2. In ProxMox open a PVE shell and run "ls -l /dev/dri" at the command prompt. If you get "No such file or directory" or similar, Intel graphics is not enabled correctly.
    root@proxmox:~# ls -l /dev/dri
    total 0
    drwxr-xr-x 2 root root         80 Jan 29 21:33 by-path
    crw-rw---- 1 root video  226,   0 Jan 29 21:33 card0
    crw-rw---- 1 root render 226, 128 Jan 29 21:33 renderD128
    
  3. Create a privileged LXC container.
  4. Open a pve shell and edit the container config file "/etc/pve/lxc/???.conf" (replace ??? with the ID of your container). Add these lines to the bottom of the file:
    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.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
    lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file
    
    change 226 and 128 if needed so the numbers are the same as in the output of the "ls" command in 2)
  5. Start the container and open a shell in it. Run "ls -l /dev/dri" and you should get a similar result as in 2)
  6. Enable "Hardware Acceleration Encoding" in plex settings -> transcoder
  7. Check if working within plex dashboard and a running transcoding stream; when hardware acceleration is being used, you should see (hw) next to the Video format