Jellyfin Forum
Can't get QSV or VAAPI to work - 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: Can't get QSV or VAAPI to work (/t-can-t-get-qsv-or-vaapi-to-work)



Can't get QSV or VAAPI to work - arctic - 2023-09-08

Hello everyone, I'm trying to set up Intel QSV for hardware acceleration on my Jellyfin setup and it's giving me a lot of grief.

My setup:
Intel Core i5-4570
Jellyfin running in Debian 12 Proxmox LXC

I've followed guides to pass through the gpu, added jellyfin to render and video groups, etc.

Here's the error log I get when using VAAPI:

Code:
[AVHWDeviceContext @ 0x55f68870fb00] No VA display found for device /dev/dri/renderD128.
Device creation failed: -22.
Failed to set value 'vaapi=va:/dev/dri/renderD128' for option 'init_hw_device': Invalid argument
Error parsing global options: Invalid argument

And the error I get using QSV:

Code:
[AVHWDeviceContext @ 0x55f68870fb00] No VA display found for device /dev/dri/renderD128.
Device creation failed: -22.
Failed to set value 'vaapi=va:/dev/dri/renderD128' for option 'init_hw_device': Invalid argument
Error parsing global options: Invalid argument

Here's the output of vainfo if it helps:

Code:
error: XDG_RUNTIME_DIR is invalid or not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
libva info: va_openDriver() returns 1
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.17 (libva 2.12.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Desktop - 2.4.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main              : VAEntrypointVLD
      VAProfileH264Main              : VAEntrypointEncSlice
      VAProfileH264High              : VAEntrypointVLD
      VAProfileH264High              : VAEntrypointEncSlice
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh        : VAEntrypointVLD
      VAProfileH264StereoHigh        : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                  : VAEntrypointVideoProc
      VAProfileJPEGBaseline          : VAEntrypointVLD

I have igpu drivers from vainfo, and I think I also installed them from elsewhere.

If anyone has any ideas please drop them below because I'm going crazy!!!!


RE: Can't get QSV or VAAPI to work - bitmap - 2023-09-08

Well, I'd give up on QSV. You need the intel-media-driver (or the non-free variant, which more people seem to have success with) and the Github says the earliest supported platform is Broadwell, which is 5th generation and a completely different generation of iGPUs. You can still get VA-API working, however.

Sources:

* https://jellyfin.org/docs/general/administration/hardware-acceleration/intel#acceleration-methods
* https://github.com/intel/media-driver#supported-platforms
* https://en.wikipedia.org/wiki/Haswell_(microarchitecture)
* https://en.wikipedia.org/wiki/Broadwell_(microarchitecture)

The Jellyfin HWA Proxmox guide says you have to run the container privileged: https://jellyfin.org/docs/general/administration/hardware-acceleration/intel#lxc-on-proxmox

Make sure that's checked off. On the host is everything functioning properly? Are you able to get vainfo to work fine and provide the info you're looking to see? Drivers are installed and all of that? Been a bit since I had my 4th gen i7 working with VA-API, I seem to remember struggling to get it functioning right. Make sure the host is functioning properly (check and see if by chance intel-media-driver will work, and you could also try for intel-media-driver-non-free if the former is installed and not working) and I'll see if I can find anything from when I was running that machine...


RE: Can't get QSV or VAAPI to work - arctic - 2023-09-08

(2023-09-08, 06:29 AM)bitmap Wrote: Well, I'd give up on QSV. You need the intel-media-driver (or the non-free variant, which more people seem to have success with) and the Github says the earliest supported platform is Broadwell, which is 5th generation and a completely different generation of iGPUs. You can still get VA-API working, however.

Sources:

* https://jellyfin.org/docs/general/administration/hardware-acceleration/intel#acceleration-methods
* https://github.com/intel/media-driver#supported-platforms
* https://en.wikipedia.org/wiki/Haswell_(microarchitecture)
* https://en.wikipedia.org/wiki/Broadwell_(microarchitecture)

The Jellyfin HWA Proxmox guide says you have to run the container privileged: https://jellyfin.org/docs/general/administration/hardware-acceleration/intel#lxc-on-proxmox

Make sure that's checked off. On the host is everything functioning properly? Are you able to get vainfo to work fine and provide the info you're looking to see? Drivers are installed and all of that? Been a bit since I had my 4th gen i7 working with VA-API, I seem to remember struggling to get it functioning right. Make sure the host is functioning properly (check for intel-media-driver, you could also try for intel-media-driver-non-free if the former is installed and not working) and I'll see if I can find anything from when I was running that machine...

Hey man thank you so much for your tips. I'm super tired & going to bed but I'll try some of those things tomorrow and let you know how it goes. Thanks so much!


RE: Can't get QSV or VAAPI to work - arctic - 2023-09-08

(2023-09-08, 06:29 AM)bitmap Wrote: Well, I'd give up on QSV. You need the intel-media-driver (or the non-free variant, which more people seem to have success with) and the Github says the earliest supported platform is Broadwell, which is 5th generation and a completely different generation of iGPUs. You can still get VA-API working, however.

Sources:

* https://jellyfin.org/docs/general/administration/hardware-acceleration/intel#acceleration-methods
* https://github.com/intel/media-driver#supported-platforms
* https://en.wikipedia.org/wiki/Haswell_(microarchitecture)
* https://en.wikipedia.org/wiki/Broadwell_(microarchitecture)

The Jellyfin HWA Proxmox guide says you have to run the container privileged: https://jellyfin.org/docs/general/administration/hardware-acceleration/intel#lxc-on-proxmox

Make sure that's checked off. On the host is everything functioning properly? Are you able to get vainfo to work fine and provide the info you're looking to see? Drivers are installed and all of that? Been a bit since I had my 4th gen i7 working with VA-API, I seem to remember struggling to get it functioning right. Make sure the host is functioning properly (check and see if by chance intel-media-driver will work, and you could also try for intel-media-driver-non-free if the former is installed and not working) and I'll see if I can find anything from when I was running that machine...

Got VAAPI working!! Jellyfin didn't have sufficient permissions to the /dev/dri directory. Super annoying now though because now when I chmod the folder, it changes back on restart and transcoding stops working again. I'm sure there's a way of solving that though. The quality is a little blocky at times. Would still like to get QSV working, and I'm fairly confident that it is supported since it says so on the Intel spec page, and there's compatibility listed on the wikipedia page. I could totally be wrong though, maybe there's not a way to do it on linux for 4th gen? Not sure, but I'll do some more research.


RE: Can't get QSV or VAAPI to work - TheDreadPirate - 2023-09-08

You need to add the jellyfin user to the render group. That should permanently give it sufficient permissions.


RE: Can't get QSV or VAAPI to work - arctic - 2023-09-08

(2023-09-08, 06:20 PM)TheDreadPirate Wrote: You need to add the jellyfin user to the render group.  That should permanently give it sufficient permissions.

Yep, did that a while ago. Jellyfin user is part of the render group and video group and I still have this issue.


RE: Can't get QSV or VAAPI to work - haldarritam - 2024-01-21

Hi, I am facing the same issue. Were you able to find a solution?
Also, how did you give Jellyfin permissions to /dev/dri directory?


RE: Can't get QSV or VAAPI to work - TheDreadPirate - 2024-01-21

(2024-01-21, 01:31 PM)haldarritam Wrote: Hi, I am facing the same issue. Were you able to find a solution?
Also, how did you give Jellyfin permissions to /dev/dri directory?

Step 4 in this doc.

https://jellyfin.org/docs/general/administration/hardware-acceleration/intel/#configure-on-linux-host