Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VA-API not available for AMD Strix Point GFX1150/GFX1151 #523

Open
5 tasks done
rcbevans opened this issue Dec 20, 2024 · 7 comments
Open
5 tasks done

VA-API not available for AMD Strix Point GFX1150/GFX1151 #523

rcbevans opened this issue Dec 20, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@rcbevans
Copy link

This issue respects the following points:

  • This is a bug, not a question or a configuration issue; Please visit our forum or chat rooms first to troubleshoot with volunteers, before creating a report. The links can be found here.
  • This issue is not already reported on GitHub (I've searched it).
  • I'm using an up to date version of Jellyfin Server stable, unstable or master; We generally do not support previous older versions. If possible, please update to the latest version before opening an issue.
  • I agree to follow Jellyfin's Code of Conduct.
  • This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one.

Description of the bug

I have a clean install of the latest jellyfin/jellyfin docker image.

I tried to enable VA-API hardware acceleration on my system with an AMD HX 370 (GFX1150).

All hardware accelerated streaming fails with an ffmpeg error

'gfx1150' is not a recognized processor for this target (ignoring processor)
'gfx1150' is not a recognized processor for this target (ignoring processor)
amd: LLVM doesn't support gfx1150, bailing out...
[AVHWDeviceContext @ 0x5fdca9b14580] libva: /usr/lib/jellyfin-ffmpeg/lib/dri/radeonsi_drv_video.so init failed
[AVHWDeviceContext @ 0x5fdca9b14580] Failed to initialise VAAPI connection: 2 (resource allocation failed).
[AVFilterGraph @ 0x5fdca9af0f00] Error initializing filters
[vost#0:0/h264_vaapi @ 0x5fdca9b5b500] Error initializing a simple filtergraph
Error opening output file /cache/transcodes/aad6d091b66a84ff6c205cb9f499f583.m3u8.
Error opening output files: Input/output error

Phoronix added GFX1150/1151 support last year and is available in LLVM 17.0.

I assume this issue here is the docker image being behind on the LLVM release?

Reproduction steps

Set up the docker image on a Strix Point AMD system.
Enable VA-API hardware acceleration.

What is the current bug behavior?

Hardware acceleration fails on HX 370 systems.

What is the expected correct behavior?

Hardware acceleration should be supported.

Jellyfin Server version

10.10.0+

Specify commit id

No response

Specify unstable release number

No response

Specify version number

No response

Specify the build version

10.10.3

Environment

- OS: Docker
- Linux Kernel:
- Virtualization:
- Clients:
- Browser:
- FFmpeg Version:
- Playback Method:
- Hardware Acceleration:
- GPU Model:
- Plugins:
- Reverse Proxy:
- Base URL:
- Networking:
- Storage:

Jellyfin logs

'gfx1150' is not a recognized processor for this target (ignoring processor)
'gfx1150' is not a recognized processor for this target (ignoring processor)
amd: LLVM doesn't support gfx1150, bailing out...
[AVHWDeviceContext @ 0x5fdca9b14580] libva: /usr/lib/jellyfin-ffmpeg/lib/dri/radeonsi_drv_video.so init failed
[AVHWDeviceContext @ 0x5fdca9b14580] Failed to initialise VAAPI connection: 2 (resource allocation failed).
[AVFilterGraph @ 0x5fdca9af0f00] Error initializing filters
[vost#0:0/h264_vaapi @ 0x5fdca9b5b500] Error initializing a simple filtergraph
Error opening output file /cache/transcodes/aad6d091b66a84ff6c205cb9f499f583.m3u8.
Error opening output files: Input/output error

FFmpeg logs

'gfx1150' is not a recognized processor for this target (ignoring processor)
'gfx1150' is not a recognized processor for this target (ignoring processor)
amd: LLVM doesn't support gfx1150, bailing out...
[AVHWDeviceContext @ 0x5fdca9b14580] libva: /usr/lib/jellyfin-ffmpeg/lib/dri/radeonsi_drv_video.so init failed
[AVHWDeviceContext @ 0x5fdca9b14580] Failed to initialise VAAPI connection: 2 (resource allocation failed).
[AVFilterGraph @ 0x5fdca9af0f00] Error initializing filters
[vost#0:0/h264_vaapi @ 0x5fdca9b5b500] Error initializing a simple filtergraph
Error opening output file /cache/transcodes/aad6d091b66a84ff6c205cb9f499f583.m3u8.
Error opening output files: Input/output error

Client / Browser logs

No response

Relevant screenshots or videos

No response

Additional information

No response

@rcbevans rcbevans added the bug Something isn't working label Dec 20, 2024
@rcbevans
Copy link
Author

I took a look into jellyfin-ffmpeg in the image and sure enough I see radeonsi_drv_video.so is linked against libLLVM-16.so.1

@rcbevans
Copy link
Author

rcbevans commented Dec 20, 2024

In jellyfin-ffmpeg I see that if the cli-release is noble, it does use LLVM 17.

llvm_version="16"

    'noble')
        release="ubuntu:noble"
        gcc_version="13"
        llvm_version="17"
    ;;

Is there a docker image with noble as a base, or is it possible to do an in-place upgrade of the jellyfin-ffmpeg dependency to add the necessary hardware support?

@nyanmisaka
Copy link
Member

I will prepare a Mesa/LLVM upgrade to support this new hardware. Our current linux package only supports AMD GPUs released before 2024, and we cannot upgrade it frequently to ensure stability.

@rcbevans
Copy link
Author

rcbevans commented Dec 20, 2024

Totally get that.

Is there any reason cloning jellyfin-ffmpeg, patching the bookworm gcc/llvm versions and producing a deb that I manually install into the container wouldn't work as a stopgap solution?

@nyanmisaka
Copy link
Member

Nope, you can also do it now if you think you can handle the version upgrade and maintain the corresponding Mesa build options.

@rcbevans
Copy link
Author

rcbevans commented Dec 21, 2024

For anyone interested, I was able to get jellyfin-ffmpeg updated within the container and verify VA-API hardware acceleration is working.

  • cloned jellyfin-ffmpeg,
  • patched build
    • so that the bookworm debian packages use gcc 13 and llvm 17
    • patched the docker build to use host networking as the debian repo wasn't resolving to update packages
  • Patched the Dockerfile to
    • Install lsb-release wget software-properties-common gnupg
    • Extend the initial "Prepare debian build environment" command to install llvm 17 per the following
&& wget https://apt.llvm.org/llvm.sh \
&& chmod +x llvm.sh \
&& ./llvm.sh 17 all \
  • Ran configure
  • Ran build bookworm amd64 to produce a custom deb
  • Opened a shell into the running jellyfin/jellyfin container
    • Install llvm 17 using same wget, chmod, llvm.sh as above
    • Install custom jellyfin-ffmpeg7.deb
  • Enable VA-API hw acceleration and verify that streams to client work as expected.

@nyanmisaka
Copy link
Member

Debian/bookworm has backported LLVM19, so the steps of manually building LLVM can be skipped.

And Mesa needs to be updated to 24.3+.

@nyanmisaka nyanmisaka transferred this issue from jellyfin/jellyfin Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants