Jellyfin Forum
Hardware Transcoding with Intel UHD Graphics 605 on Proxmox Privileged LXC - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Hardware Transcoding with Intel UHD Graphics 605 on Proxmox Privileged LXC (/t-hardware-transcoding-with-intel-uhd-graphics-605-on-proxmox-privileged-lxc)



Hardware Transcoding with Intel UHD Graphics 605 on Proxmox Privileged LXC - designingbeing - 2024-08-24

Jellyfin is giving the error "Playback failed due to a fatal player error" whenever I enable hardware transcoding.

I've followed the Jellyfin tutorial for Proxmox LXCs as best as I can and found a lot of threads on the subject but I'm not having success:

FFmpeg logs show 
Code:
No VA display found for any default device. 
Device creation failed: -22

The only thing that stands out to me is that
Code:
getent group render
gives different values on LXC=106, Proxmox Host=104. I'm not sure if this is even an issue, or what to do about it.


[*]Jellyfin 10.9.9
[*]Debian 12 running as a Privileged LXC container on Proxmox 8.2.4
[*]Installed via curl https://repo.jellyfin.org/install-debuntu.sh | sudo bash
[*]J5005 processor which iirc is Gemini Lake, based on Kaby Lake with Intel UHD Graphics 605




Output from commands run on LXC Container:
vainfo
.txt   vainfo - LXC.txt (Size: 1.32 KB / Downloads: 21)
getent group video, getent group render
.txt   getent group video render - LXC.txt (Size: 89 bytes / Downloads: 19)
groups jellyfin
.txt   groups jellyfin - LXC.txt (Size: 51 bytes / Downloads: 21)
ls -la /dev/dri
.txt   ls -la devdri - LXC.txt (Size: 178 bytes / Downloads: 20)
usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=vaConfused-facedev/dri/renderD128 -init_hw_device opencl@va
.txt   usrlibjellyfin-ffmpegffmpeg - LXC .txt (Size: 2.33 KB / Downloads: 22)



Output from commands run on Proxmox Host:
getent group video, getent group render
.txt   getent group video render - PROXMOX.txt (Size: 73 bytes / Downloads: 19)
ls -la /dev/dri 
.txt   ls -la devdri - PROXMOX.txt (Size: 299 bytes / Downloads: 21)



LXC Configuration file:

.txt   LXC.conf.txt (Size: 674 bytes / Downloads: 22)



FFmpeg logs:

.txt   FFmpeg.Transcode-2024-08-24_22-34-40_ebf5e9fffb88af435b038fe26661932d_6a2c85e4.log.txt (Size: 12.61 KB / Downloads: 22)
.txt   FFmpeg.Transcode-2024-08-24_22-34-42_ebf5e9fffb88af435b038fe26661932d_b511f466.log.txt (Size: 12.58 KB / Downloads: 18)
.txt   FFmpeg.Transcode-2024-08-24_22-34-43_ebf5e9fffb88af435b038fe26661932d_60cec405.log.txt (Size: 12.58 KB / Downloads: 20)
.txt   FFmpeg.Transcode-2024-08-24_22-34-43_ebf5e9fffb88af435b038fe26661932d_74996ef6.log.txt (Size: 12.61 KB / Downloads: 20)
.txt   FFmpeg.Transcode-2024-08-24_22-34-46_ebf5e9fffb88af435b038fe26661932d_32634eca.log.txt (Size: 12.58 KB / Downloads: 18)
.txt   FFmpeg.Transcode-2024-08-24_22-34-47_ebf5e9fffb88af435b038fe26661932d_3e01173c.log.txt (Size: 12.58 KB / Downloads: 16)
.txt   FFmpeg.Transcode-2024-08-24_22-34-47_ebf5e9fffb88af435b038fe26661932d_ff05bcb8.log.txt (Size: 12.61 KB / Downloads: 22)



Jellyfin log 1/2 https://pastebin.com/bnq8306r
Jellyfin log 2/2 https://pastebin.com/H6N0am7u


RE: Hardware Transcoding with Intel UHD Graphics 605 on Proxmox Privileged LXC - TheDreadPirate - 2024-08-25

Did you pass the GPU into the LXC?

https://jellyfin.org/docs/general/administration/hardware-acceleration/intel/#lxc-on-proxmox


RE: Hardware Transcoding with Intel UHD Graphics 605 on Proxmox Privileged LXC - Fate - 2024-08-25

My mounts look a bit different in lxc conf:
Code:
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/fb0 dev/fb0 none bind,optional,create=file
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file

Was your container always privileged? I think if you have changed from unprivileged to privileged you have to reset the user/group ids. (probably easier to reinstall the container)

I would recommend tteck scripts to create your container if you are unsure.

Which intel drivers did you install on the proxmox and on the lxc side?


RE: Hardware Transcoding with Intel UHD Graphics 605 on Proxmox Privileged LXC - designingbeing - 2024-08-25

Thanks for the reply

(2024-08-25, 12:49 AM)TheDreadPirate Wrote: Did you pass the GPU into the LXC?

https://jellyfin.org/docs/general/administration/hardware-acceleration/intel/#lxc-on-proxmox

Yeah, I'm pretty sure I did at least. I added the following lines to my LXC.conf:

Code:
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.hook.pre-start: sh -c "chown 0:104 /dev/dri/renderD128"

which contains variables (226:0, 226:128 ) based on the output of "ls -la /dev/dri" run on the proxmox host
Code:
total 0
drwxr-xr-x  3 root root        100 Aug 25 04:32 .
drwxr-xr-x 20 root root      4780 Aug 25 04:50 ..
drwxr-xr-x  2 root root        80 Aug 25 04:32 by-path
crw-rw----  1 root video  226,  0 Aug 25 04:32 card0
crw-rw----  1 root render 226, 128 Aug 25 04:32 renderD128

I've tried changing the 104 in "chown 0:104 /dev/dri/renderD128" to 106 as well, to cover the render getent group in both Proxmox host as well as LXC guest.


RE: Hardware Transcoding with Intel UHD Graphics 605 on Proxmox Privileged LXC - Fate - 2024-08-25

(2024-08-25, 10:39 AM)designingbeing Wrote: Thanks for the reply

(2024-08-25, 12:49 AM)TheDreadPirate Wrote: Did you pass the GPU into the LXC?

https://jellyfin.org/docs/general/administration/hardware-acceleration/intel/#lxc-on-proxmox

Yeah, I'm pretty sure I did at least. I added the following lines to my LXC.conf:

Code:
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.hook.pre-start: sh -c "chown 0:104 /dev/dri/renderD128"

which contains variables (226:0, 226:128 ) based on the output of "ls -la /dev/dri" run on the proxmox host
Code:
total 0
drwxr-xr-x  3 root root        100 Aug 25 04:32 .
drwxr-xr-x 20 root root      4780 Aug 25 04:50 ..
drwxr-xr-x  2 root root        80 Aug 25 04:32 by-path
crw-rw----  1 root video  226,  0 Aug 25 04:32 card0
crw-rw----  1 root render 226, 128 Aug 25 04:32 renderD128

I've tried changing the 104 in "chown 0:104 /dev/dri/renderD128" to 106 as well, to cover the render getent group in both Proxmox host as well as LXC guest.
On my proxmox:
Code:
root@pvx:/dev/dri# ls -lh
total 0
drwxr-xr-x 2 root root        80 Jun  5 00:03 by-path
crw-rw---- 1 root video  226,  0 Jun  5 00:03 card0
crw-rw---- 1 root render 226, 128 Jun  5 00:03 renderD128

on my lxc:
Code:
[root@kuroko dri]# ls -lh
total 0
drwxr-xr-x 2 root root        80 Jun  5 00:03 by-path
crw-rw---- 1 root video  226,  0 Jun  5 00:03 card0
crw-rw---- 1 root render 226, 128 Jun  5 00:03 renderD128

Looking at your log earlier it seems to mismatch your proxmox side, so I'm pretty sure this is your issue.

Could you spawn a test container with tteck scrit and compare how the script mounts your devices?

Just to make sure can oyu post
dmesg | grep i915 on proxmox side?


RE: Hardware Transcoding with Intel UHD Graphics 605 on Proxmox Privileged LXC - designingbeing - 2024-08-25

Thanks for the reply

(2024-08-25, 09:48 AM)Fate Wrote: My mounts look a bit different in lxc conf:
Code:
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/fb0 dev/fb0 none bind,optional,create=file
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file

Was your container always privileged? I think if you have changed from unprivileged to privileged you have to reset the user/group ids. (probably easier to reinstall the container)

I would recommend tteck scripts to create your container if you are unsure.

Which intel drivers did you install on the proxmox and on the lxc side?

- My container was always privileged

- I think the drivers might have been the issue.

On Proxmox host I could see:
Code:
i965-va-driver-shaders/stable,now 2.4.1-1 amd64 [installed]
intel-media-va-driver-non-free/stable,now 23.1.1+ds1-1 amd64 [installed]

On the LXC guest I could see:
Code:
i965-va-driver/stable,now 2.4.1+dfsg1-1 amd64 [installed,automatic]
intel-media-va-driver/stable,now 23.1.1+dfsg1-1 amd64 [installed,automatic]

On the LXC guest I then ran:
Code:
apt install software-properties-common -y
add-apt-repository -y non-free
apt install intel-media-va-driver-non-free -y

and on the proxmox host, updated my LXC.conf with the value from "getent group render | cut -d":" -f3" as run on the LXC guest
Code:
lxc.hook.pre-start: sh -c "chown 0:{LXC getent output} /dev/dri/renderD128"

then rebooted the LXC.

After this I forced a transcode and for the first time saw activity in "intel_gpu_top" as run on the Proxmox host
[Image: PFfsMiv.png]

I'm cautiously optimistic that this has resolved the issue. Thank you for your input.


RE: Hardware Transcoding with Intel UHD Graphics 605 on Proxmox Privileged LXC - Fate - 2024-08-25

Awesome! Glad I could help!