Skip to main content

Jellyfin as LXC with onboard Graphics

Configuration of Jellyfin as LXC with passthrough of onboard iGPU

Tested on AsRock J4105 and J5005.

There is two ways of running containers in need of the onboard GPU. The easiest way is as priviledged container, since this allows for direct access to the render device of the host without the hassle of right management. This however comes with security issues, because it allows access to parts of the hosts system as root. In a system not accessible from the outside, this likely isn't a concern, but it still can be mitigated by running Jellyfin as unpriviledged LXC with UID/GID mapping to only allow isolated access to render devices. Which option you chose depends on your usecase and stance of safety and isolation.

This setup requires the appropriate driver for your GPU to be installed on the host system and the LXC. A working driver should yield output with "vainfo".

Some instructions are for older versions, but persistent on newer systems, I will thus keep the older sources.

General Installation of Jellyfin

https://www.linuxcapable.com/how-to-install-jellyfin-media-server-on-ubuntu-20-04/
https://cetteup.com/216/how-to-use-an-intel-vgpu-for-plexs-hardware-accelerated-streaming-in-a-proxmox-vm/

Priviledged:

https://www.codetd.com/de/article/11969233
https://blog.peterge.de/jellyfin/

Unpriviledged

UID/GID mapping for /dev/dri128 und /dev/render

https://forum.jellyfin.org/t/installation-uid-and-gid/821
https://pve.proxmox.com/wiki/Unprivileged_LXC_containers
https://github.com/ahuacate/pve-medialab#203-create-a-ubuntu-1804-lxc-for-jellyfin---ubuntu-1804

Common Issues

Jellyfin not upgrading:

https://github.com/jellyfin/jellyfin/issues/5448

Integration with other Services

Encoding/Decoding Issues

Make sure, i965-shaders from the non-free repo is installed, not intel-media, and version of libva and driver are the same on host and guest. Intel-media-hd as driver for i5/i7 6th Gen. and higher instead of i965.

Kodi

https://github.com/jellyfin/jellyfin-kodi

Sources