Closed fengapappit closed 2 years ago
No vaapi support on arm64. It's for Intel gpus
No vaapi support on arm64. It's for Intel gpus
My bad, I read amd64. It is indeed an intel CPU with integrated graphics. I'll correct the post.
So 10.5.X0 has some issues that we're working out. It requires non-free drivers to work right now. Try this
sudo docker exec -it -u 0 jellyfin echo "deb http://http.us.debian.org/debian stable main contrib non-free" | sudo tee -a /etc/apt/sources.list
sudo docker exec -it -u 0 jellyfin apt update
sudo docker exec -it -u 0 jellyfin apt install i965-va-driver-shaders
That's what I ended up doing on the official docker, but how come that it works using the root account but not the normal one on your docker build ?
That broke my mind for days before having to cut my losses and let Jellyfin win the battle for a while.
Le mar. 7 avr. 2020 à 13:14, artiume notifications@github.com a écrit :
So 10.5.X0 has some issues that we're working out. It requires non-free drivers to work right now. Try this
sudo docker exec -it -u 0 jellyfin echo "deb http://http.us.debian.org/debian stable main contrib non-free" | sudo tee -a /etc/apt/sources.list sudo docker exec -it -u 0 jellyfin apt update sudo docker exec -it -u 0 jellyfin apt install i945-va-driver-shaders
https://packages.debian.org/sid/i965-va-driver-shaders
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/linuxserver/docker-jellyfin/issues/26#issuecomment-610326751, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUWTQ5BRHVNRJHMYPMEKEDRLMDIBANCNFSM4LW2SRNA .
So if root works but the user doesn't, that breaks down to a simple permissions issue. Did you add the user to the video group?
For jellyfin/jellyfin it becomes more complicated by requiring stuff like group_add
Yes, I've tried it. Didn't change anything unfortunately.
Le mar. 7 avr. 2020 à 14:32, artiume notifications@github.com a écrit :
So if root works but the user doesn't, that breaks down to a simple permissions issue. Did you add the user to the video group?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/linuxserver/docker-jellyfin/issues/26#issuecomment-610359238, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUWTQ3M5DJ7E5QCJLLKUQDRLMMO7ANCNFSM4LW2SRNA .
It's likely not working because you're not following our samples in the readme. You need to pass the device "--device /dev/dri", instead of passing render and card0 separately
Try chmod 777 the devices and see what happens. Maybe the libraries have perm issues as well.
I'm not familiar with DSM so it might be something else I'm not aware of
Edit: try @aptalca's solution
@aptalca There was a 10.5.4 release today that fixes a regression issue with VAAPI for MPEG 4: https://github.com/jellyfin/jellyfin/pull/2821
That doesn't seem to be the issue for you though @fengapappit. To extend on what was commented above: Check on your host where your devices are mounted. For me (on an Intel with i915):
$ ls -l /dev/dri
total 0
drwxr-xr-x 2 root root 80 Apr 7 02:41 by-path
crw-rw---- 1 root video 226, 0 Apr 7 02:41 card0
crw-rw---- 1 root render 226, 128 Apr 7 02:41 renderD128
So in my case, first as suggested configure the container top mount device /dev/dri
on host to /dev/dri
in container, then configure VA API device to /dev/dri/renderD128
in jellyfin.
I think it is because the set PUID does not have permission.
Synology's /dev/dri/renderD128
permissions are crw------- 1 root root
,and PGID specified user group does not have permission to RW
I try to use chmod 666 /dev/dri/renderD128
solved this problem,But every time Synology restarts, the permissions will be restored.
This is not a problem with jellyfin, because I use Emby-docker will also have this problem, but Emby SPK does not have this problem, it will set the permissions.
The permissions are automatically fixed as long as the mount points are as suggested in our readmes
The permissions are automatically fixed as long as the mount points are as suggested in our readmes
I've ran into this exact same issue today unfortunately this is not true. I've created the container as per the readme, like this:
sudo docker create \
--name=jellyfin \
-e PUID=1002 \
-e PGID=100 \
-e TZ=Europe/London \
-p 8096:8096 \
-v /share/appdata/jellyfin:/config \
-v /share/Media:/data \
--device /dev/dri:/dev/dri \
--restart unless-stopped \
linuxserver/jellyfin
and I've also tried:
sudo docker create \
--name=jellyfin \
-e PUID=1002 \
-e PGID=100 \
-e TZ=Europe/London \
-p 8096:8096 \
-v /share/appdata/jellyfin:/config \
-v /share/Media:/data \
--device /dev/dri/renderD128:/dev/dri/renderD128 \
--device /dev/dri/card0:/dev/dri/card0 \
--restart unless-stopped \
linuxserver/jellyfin
and permissions of the devices, in both cases, are:
# ls -al /dev/dri
total 0
drwxr-xr-x 2 root root 80 Apr 22 23:13 .
drwxr-xr-x 6 root root 360 Apr 22 23:13 ..
crw------- 1 root root 226, 0 Apr 22 23:13 card0
crw------- 1 root root 226, 128 Apr 22 23:13 renderD128
After running:
# chmod 777 /dev/dri/*
Transcoding works as expected. Perhaps this is the same problem as this plex issue #207
Are these all synology's? What kind of Mickey Mouse stuff is this with the video devices root owned and no group rw?
There is nothing we can do for that scenario, you gotta fix the perms on host and report it to synology
EDIT: I missed the missing group rw in the prior post. To clarify, as long as the devices have group access, our container works. All other OSes I have seen have the group permissions on devices. The owners differ, but the group perms are there.
In my case it's a Qnap TS-251+ NAS, I understand your point @aptalca, it's impossible to cater for all corner cases. I really appreciate all the work you guys do so we can use these apps.
Do you think perhaps this is worth a mention in the readme though?
For anybody else looking for a workaround, the containers are setup to run custom scripts at init (also not in the readme, maybe it could be included?) so I just created a script in: /config/custom-cont-init.d/fix-dri-permissions (this is the container path)
#!/usr/bin/with-contenv bash
# check for the existence of a video device
if [ -e /dev/dri ]; then
echo "Running: chmod 755 /dev/dri/*"
chmod 755 /dev/dri/*
else
exit 1
fi
And it now works and should be persistent if I ever update the container as long as I map the same host folder to the container /config folder.
Yeah, we'll update the info. Thanks for letting us know
Food for though for those who are having problems with permissions: Does running via podman (still using this image) instead of via docker make it easier to secure things?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Just upgraded ubuntu to 20.04.1 LTS from 18.04 LTS and hardware acceleration stopped working. sudo chmod 666 /dev/dri/renderD128 fixed the issue.
@Artiume I believe the cmds you copied would fix my problem, but when I try to add the repo, I get:
W: GPG error: http://http.us.debian.org/debian stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY DCC9EFBF77E11517
we updated the key so make sure you have the right key now.
wget -O - https://repo.jellyfin.org/debian/jellyfin_team.gpg.key | sudo apt-key add -
echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/debian $( lsb_release -c -s ) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list
@Artiume it did not change the issue I had above, which I believe is related to http://http.us.debian.org/debian
repo, not the Jellyfin repo. Couldn't find the new public key for that one ...
So is this being done on the host or within the container? afaik the lsio container should be updated to the new key.
Ok, I managed to fix the key problem by running:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC
Executing: /tmp/apt-key-gpghome.8XdSbMqvNU/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC
gpg: key E0B11894F66AEC98: 14 signatures not checked due to missing keys
gpg: key E0B11894F66AEC98: public key "Debian Archive Automatic Signing Key (9/stretch) <ftpmaster@debian.org>" imported
gpg: Total number processed: 1
gpg: imported:
apt update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Hit:4 http://http.us.debian.org/debian stable InRelease
Hit:5 https://repo.jellyfin.org/ubuntu bionic InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
191 packages can be upgraded. Run 'apt list --upgradable' to see them.
but I still cannot install i945-va-driver-shaders
....
# apt install i945-va-driver-shaders
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package i945-va-driver-shaders
PS: This is done within the container, I'm using linuxserver/jellyfin:bionic-version-10.6.4-1
image.
You can't install a non existing package...
Try i965-va-driver-shaders
Whoops ! @Artiume you might want to correct your existing comment to i965-va-driver-shaders
.
Ok, so I managed to install it and transcoding seems to work but hardware acceleration is still not active:
Stream mapping: Stream #0:2 -> #0:0 (hevc (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (eac3 (native) -> mp3 (libmp3lame))
VAInfo output:
# vainfo
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Gemini Lake - 2.3.0
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileH264MultiviewHigh : VAEntrypointVLD
VAProfileH264MultiviewHigh : VAEntrypointEncSlice
VAProfileH264StereoHigh : VAEntrypointVLD
VAProfileH264StereoHigh : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointEncSlice
VAProfileVP9Profile2 : VAEntrypointVLD
Package install:
# apt install i965-va-driver-shaders
Reading package lists... Done
Building dependency tree
Reading state information... Done
i965-va-driver-shaders is already the newest version (2.3.0-1).
The following packages were automatically installed and are no longer required:
libpython3.6 libpython3.6-minimal libpython3.6-stdlib
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 186 not upgraded.
NB: I'm running the container with high privilege enabled.
Edit: it's working ! Had to enable hardware transcoding for h264 as well as HEVC in Jellyfin settings ...
Running on the same issue and yup, I "solved" it by running chmod 777 /dev/dri/*
as suggested by @fmanno
Is there any way to make this fix somehow permanent? I am also on a Syno.
Running on the same issue and yup, I "solved" it by running
chmod 777 /dev/dri/*
as suggested by @fmannoIs there any way to make this fix somehow permanent? I am also on a Syno.
Have you tried using Task Scheduler?
Trying it out myself now
Running on the same issue and yup, I "solved" it by running
chmod 777 /dev/dri/*
as suggested by @fmannoIs there any way to make this fix somehow permanent? I am also on a Syno.
Help a noob out, where do I enter this command in? The Terminal in the Docker Container in Synology?
You can either do it from terminal establishing an SSH connection (you will find plenty tutorials for Syno), or just creating a scheduled task (like shown above ) and putting just that code in
Thanks, I did that and it works now.
Although Intel Quick Sync seems to be very slow for me. The videos, especially 4k are transcoding, but on a DS918+, it stutters every 5 seconds and is pretty much unwatchable.
20 June 2021, 16:23 by @.***:
You can either do it from terminal establishing an SSH connection (you will find plenty tutorials for Syno), or just creating a scheduled task (like shown above ) and putting just that code in
— You are receiving this because you commented. Reply to this email directly, > view it on GitHub https://github.com/linuxserver/docker-jellyfin/issues/26#issuecomment-864506360> , or > unsubscribe https://github.com/notifications/unsubscribe-auth/AR2VQF5BL4KBQY3C5C5PHADTTWCPBANCNFSM4LW2SRNA> .
Running on the same issue and yup, I "solved" it by running
chmod 777 /dev/dri/*
as suggested by @fmanno Is there any way to make this fix somehow permanent? I am also on a Syno.Have you tried using Task Scheduler?
Trying it out myself now
That worked great over a reboot. @ondrejmo perhaps you have a better suggestion?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
+1 on @rightsaidfred99 comment, hardware acceleration works but for 4k HEVC files I get stutter every 5 seconds if quality is set to any higher preset than 1080 - 20Mbps... My network bandwith is 1Gb and have a decent Synology DS920+ NAS.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Closing this as lots has changed since this was originally opened in terms of the drivers and hardware acceleration.
Please re-open a fresh ticket if this is still an issue.
Expected Behavior
Enabling VAAPI hardware acceleration in Jellyfin should work in its default configuration.
Current Behavior
First issue is with the default transcode directory. As it does not exist and Jellyfin doesn't create it, it's impossible to use the default configuration.
Secondly, once the devices are setup according to my host, the default user is not able to access them. Any transcode attempt leads to the following error message:
When running the same exact command through a root shell to the docker, it works as expected and transcoding works.
I've tried adding the abc user to the video group, doesn't change anything.
Same thing for running the docker container as high privilege.
I wanted to try running the service as root but I can't find what is starting the service nor where I can configure this. I got lost in /etc/s6 as I'm completely unfamiliar with it.
Steps to Reproduce
Environment
OS:
Synology DSM 6.2.2-24922 Update 4
CPU architecture:
INTEL Celeron J3455
How docker service was installed:
Docker was installed through Synology store. Same for the image. Since it does not support custom configuration, especially the devices, I had to import the following configuration file to make it work:
Command used to create docker container (run/create/compose/screenshot)
The previously mentioned configuration pretty much maps to a docker compose command.
I'd be glad if you could provide a tip in changing the user running the Jellyfin service from abc to root as a quick fix, as everything I've tried didn't work.