Jellyfin hardware transcoding in a Proxmox LXC with Intel iGPU: the config that finally work
From 95% CPU to 8%, with every line of config
Contents
Problem: when my parents watch something on the phone, Jellyfin transcode on CPU and the i5-8500T go to 95%, fans loud, and everything else on that node become slow. The iGPU (UHD 630) was sitting there doing nothing. It took me 2 evenings to make Quick Sync work inside an unprivileged LXC, so here is everything.
1. Check the host
ls -l /dev/dri
crw-rw---- 1 root video 226, 0 ... card0
crw-rw---- 1 root render 226, 128 ... renderD128
renderD128 is what we need. Major number 226.
2. Pass it into the container
On Proxmox 8.2 and newer it is one line in /etc/pve/lxc/105.conf (105 is my Jellyfin container):
dev0: /dev/dri/renderD128,gid=104
The gid must be the render group inside the container. Check with getent group render inside. Mine is 104, yours can be different.
On older Proxmox the old way:
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
With the old way in an unprivileged container you also fight with uid/gid mapping. The dev0 line save you from that, upgrade if you can.
3. Inside the container
usermod -aG render jellyfin
apt install intel-media-va-driver-non-free # needs non-free in sources
/usr/lib/jellyfin-ffmpeg/vainfo --display drm --device /dev/dri/renderD128
vainfo must print "Intel iHD driver" and a list of profiles (H264, HEVC Main, HEVC Main10...). If it say permission denied, go back to the gid.
4. Jellyfin settings
Dashboard, Playback, Transcoding:
- Hardware acceleration: Intel QuickSync (QSV)
- Enable hardware decoding for: H264, HEVC, HEVC 10bit, VP9. Not AV1, 8th gen cannot decode AV1
- Enable hardware encoding: yes
- Low power encoding: I leave OFF. On 8th gen it needs GuC/HuC firmware enabled on the host kernel, not worth the drama for me
- Tone mapping: on, if you have HDR files
5. Check it really work
On the host install intel-gpu-tools and run intel_gpu_top while you play something that need transcode. The "Video" engine must be busy. If the CPU still go 95%, something fall back to software, check the Jellyfin ffmpeg log for that playback.
Result
- One 1080p HEVC 10-bit to H264 stream: CPU 95% → 8%
- 4 streams at once: iGPU ~30%, CPU ~20%
- Power at the wall during transcode: from ~45W to ~19W on that node
hope this help :)
Written by
Nguyễn Minh Hiếu
Proxmox, Docker, ZFS, and a power bill my wife asks about. HCMC 🇻🇳 Backend dev by day, homelab by night. Founder of Self Hosted. Back up your data, seriously.
Get the best of #self_hosted weekly
One email each Monday with the most useful posts. No spam; unsubscribe in one click.
Comments
Sign in to join the conversation.
Sign in to comment