how to set up jellyfin with podman and selinux and an intel gpu (a380) for transcoding?

https://lemmy.world/post/15511371

how to set up jellyfin with podman and selinux and an intel gpu (a380) for transcoding? - Lemmy.World

I try to follow the docs but somehow it doesn’t work as expected. How does your cpose file look and what to choose in the settins?

I can speak at least for rootless podman, I spent some hours on it and different ways I tried all ended in permission issues.

I gave up on trying to do it properly and just set the permissions of the /dev/dri device to 666, so that my podman container can use the gpu for transcoding.

Part of the issue with the container images that I tried is that they create a new user with whatever uid:gid I pass to the container, and so even if my nonroot user is part of the render group, the new user inside the container is not and so it can’t write to the /dev/dri/renderD128 (gpu), and so transcode wouldn’t work.

That’s where I left the troubleshooting at cause it was being a headache

I recommend this: https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html#method-1-give-your-user-permissions-on-every-reboot with that and aösp read the tipp after that I was troubleshooting my permission issues.

This should apply to gpu too.

Zigbee2MQTT fails to start | Zigbee2MQTT

Zigbee to MQTT bridge, get rid of your proprietary Zigbee bridges

thx for sharing your experience with it
Just add your local user to the render group.

I believe you want to use QSV (VAAPI is there for older processors IIRC).

For running as rootless, you could try adding group-add keep-groups (an explanation from Redhat about keep-groups).

Using files and devices in Podman rootless containers

Learn how challenges with accessing files and devices from within containers can be overcome.

Enable Sysadmin

group-add keep-groups

thx, it does not change anything.,

VAAPI is the “standard” interface for hardware en-/decoding on Linux. It should work with any GPU using the open source drivers and mesa.

I don’t know how QSV can be installed; AMF, the AMD equivalent, is limited to their proprietary driver.

I think VAAPI is still how the gpu is accessed but you can use the intel libva driver (vaapi) or the intel media driver (QSV) (arch wiki page). If I’m interpreting this all correctly.
Hardware video acceleration - ArchWiki

I have found that VAAPI works better and doesn’t have issues.

Have you tried verifying it’s not the group permissions? You could preliminarily set permissions with chmod 666 /dev/dri/render128

My older Skylake processor has a bit worse video quality (occasional artifacts) with QuicSync.

chmod 666 /dev/dri/render128

thx, it does not change anything.

Hmm. I mean niw reading your first outpot in privileged mode, I don’t see any errors, or am I missing something… Seems it loaded vaapi sucessfully?!

I should not need to run a container in privileged mode. What’s the container good for then?

Yes, there is no error, yet I was not able to transcode. I had rranscode to x265 and av1 enabled. Ever since disabling av1 it works, yet I have to check again. Meaning, probably the problem was that it tried to encode to av1 and that failed. Yet I still need to run it in privileged mode.

Hmm. I wasn’t trying to recommend privileged or non-privileged mode, just trying to use that to single in on the actual issue.

Alright, if it’s just av1, maybe try to use a tool like vainfo to find the supported codecs. I think it fails if an unsupported codec is explicitly specified. But take care if Encoding is mentioned. Some hardware has decoding capabilities only.

It’s a complicated topic. And it also took me 2 whole evenings to get the permissions and everything right. I’m using systemd-nspawn, so my experience doesn’t directly translate. And it’s not any easier than docker.

For video acceleration I found the arch wiki somewhat helpful. But it’s lots of info and not specific to Docker. Maybe it helps for debugging: wiki.archlinux.org/…/Hardware_video_acceleration

Hardware video acceleration - ArchWiki

Do not use 666 as that is completely open permissions. The proper way is to add your user to the render group.

Are you absolutely sure that you have the firmware installed?

If you have gone through these steps of adding the modules: jellyfin.org/docs/general/…/intel/#low-power-enco…

and it doesn’t work, you may have to manually download the git linux firmware library, extract the i915 folder and place it in your firmware folder.

That is how I got jellyfin working on my A380 after pulling my hair out about it.

Please check and post your dmesg starting up.

You should see GUC and HUC enabling.

Intel GPU | Jellyfin

This tutorial guides you on setting up full video hardware acceleration on Intel integrated GPUs and ARC discrete GPUs via QSV and VA-API. If you are on macOS, please use VideoToolbox instead.

First add your user to the video and render groups. Additionally, set the pass through to /dev/dri/renderD128:/dev/DRI/renderD128

Another thing, I do not believe that podman compose is well maintained or stable. I would use podman from the command line.

In order for me to get transcoding working I had to have a window manager running. I also had to set Jellyfin to only try to transcode in supported formats.