Linux Jails (containers/vms) with Incus

Yes! That worked!

So, to summarize, these commands need to be run on TrueNAS host to enable “intel_gpu_top” running within a debian container to access GPU performance measures:

  1. identify the device

$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Alder Lake-UP3 GT2 [Iris Xe Graphics] (rev 0c)

  1. allow any user to access performance measures

sysctl kernel.perf_event_paranoid=0

  1. add GPU to container

sudo incus config device add idefix intel-gpu gpu pci=0000:00:02.0 gid=44 gputype=physical

I could test this by playing a movie in plex. GPU stats are nicely displayed.

Now the 2 mio dollar question - Did this enable only performance monitoring or will the container be able to use the GPU?

I’ll install a desktop environment and find out…

EDIT to share 2 updates:

  • above “sysctl” command must be run as a post-init script. This change will not survive a reboot
  • GPU works for me in a debian trixie container. I can connect using xrdp and something like “glxheads” will use the GPU.
1 Like