I have been unable to make this work. Is this possible?
I figured it out. I needed to set the gid of the video group from the container.
lxc config device add container gpu gpu gid=44
Every Ubuntu container has the gid for the video group as 44.
I have now done this with an Nvidia GPU and an Intel iGPU. I even tested and was able to switch between the encoding on Jellyfin.
Hi! Does it work for you with non-privileged containers?
Yes, it was working in unprivileged containers. It seems a recent update to Ubuntu has borken things though. I haven’t changed any configuration but the pasthrough for intel GPU has stopped working.