Unable to use hardware acceleration with Radeon Pro WX 5100

Hi,

I’m trying to leverage hardware acceleration for video decoding inside firefox (e.g. on youtube). I just bought a second hand Radeon Pro WX 5100.

I first tried to play a video and noticed that every codec showed “Unsupported” inside the ff about:support tab “Codec Support Information” table. Nothig inside firefox logs using MOZ_LOG="FFmpegVideo:5" related to VA-API

Also on this page, I see the following line:
HARDWARE_VIDEO_DECODING: runtime unavailable Force disabled by gfxInfo Blocklisted; failure code FEATURE_FAILURE_VIDEO_DECODING_TEST_FAILED

I followed the instructions given inside this wiki section, namely setting media.hardware-video-decoding.force-enabled and media.hardware-video-decoding.force-enabled to true.

I tried to run vainfo, and indeed all the codecs I expected to see there (according to this table) are missing:

Trying display: wayland
vainfo: VA-API version: 1.21 (libva 2.21.0)
vainfo: Driver version: Mesa Gallium driver 24.0.9-manjaro1.1 for AMD Radeon Pro WX 5100 Graphics (radeonsi, polaris10, LLVM 17.0.6, DRM 3.54, 6.6.32-1-MANJARO)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

Here are the installed VA-API-related packages

pacman -Qs va-api
local/lib32-libva-mesa-driver 1:24.0.9-1
    Open-source VA-API drivers - 32-bit
local/libva-mesa-driver 1:24.0.9-1
    Open-source VA-API drivers
local/libva-utils 2.21.0-1
    Intel VA-API Media Applications and Scripts for libva

It is my understanding following this arch wiki page that I might need to use the proprietary driver. Is that so ? I tried to install the mentioned packages from the AUR but this did not seem to change anything.

I also get this suggested thread as I write my question: Using Hardware Accelerated decode/encode for proprietary codecs with AMD open source drivers and mesa
Is this relevant for an AMD PRO GPU ?

Thanks for your help

1 Like

No, it’s nothing to do with the driver.

Yes. Note that you need to be on Unstable branch to use the packages from https://nonfree.eu

Thanks.

Is it possible (and not too risky) to switch to the unstable branch, install the needed packages from there, then switch back to stable and tell pacman to ignore the updates for those packages ? And then update them from time to time

1 Like

No. You can’t mix and match. If you need those codecs on Stable branch then you’ll have to build the packages yourself (and keep them updated going forward).

Your other option is to use a non-commercial distro which doesn’t need to remove those codecs for legal reasons. Plain Arch Linux or EndeavourOS are two suggestions.

1 Like

Thanks for clarifying this.

I have now built and installed the mesa package with supplementary drivers “by hand”, Here is the vainfo output:

Trying display: wayland
vainfo: VA-API version: 1.21 (libva 2.21.0)
vainfo: Driver version: Mesa Gallium driver 24.1.1-manjaro1.1 for AMD Radeon Pro WX 5100 Graphics (radeonsi, polaris10, LLVM 17.0.6, DRM 3.54, 6.6.32-1-MANJARO)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

But I get this table inside the firefox about:support tab:

Codec	Software Decoding	Hardware Decoding
H264	Supported	Supported
VP9	    Supported	Unsupported
VP8	    Supported	Unsupported
AV1	    Supported	Unsupported
HEVC	Unsupported	Unsupported
Theora	Supported	Unsupported
AAC	    Supported	Unsupported
MP3	    Supported	Unsupported
Opus	Supported	Unsupported
Vorbis	Supported	Unsupported
FLAC	Supported	Unsupported
Wave	Supported	Unsupported

Shouldn’t at least HEVC be available through hardware decoding ?

1 Like

Mozilla will not support HEVC while it is encumbered by patents.

I can’t see any reason why your Firefox shows VP9 as unsupported for HW decoding though - unless your card doesn’t support VP9. Otherwise, did you build mesa correctly? It might be easier for you to switch to Testing branch (which is quite stable) & build either the mesa-git or the various amdonly-gaming mesa packages via the AUR (you may also have to replace directx-headers with directx-headers-git). I installed the amdonly-gaming packages on my Ryzen 5800H mini-PC (integrated Radeon GPU) & this is the result:

vainfo:

Trying display: wayland
vainfo: VA-API version: 1.21 (libva 2.21.0)
vainfo: Driver version: Mesa Gallium driver 24.2.0-devel for AMD Radeon Graphics (radeonsi, renoir, LLVM 17.0.6, DRM 3.57, 6.9.3-3-MANJARO)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

Firefox:

Codec Name Software Decoding Hardware Decoding
H264 Supported Supported
VP9 Supported Supported
VP8 Supported Unsupported
AV1 Supported Unsupported
HEVC Unsupported Unsupported
Theora Supported Unsupported
AAC Supported Unsupported
MP3 Supported Unsupported
Opus Supported Unsupported
Vorbis Supported Unsupported
FLAC Supported Unsupported
Wave Supported Unsupported

It’s an old card (Radeon Pro WX 5100 is the pro version of RX 480) and doesn’t support VP9.

HEVC isn’t supported in Firefox as explained.

So looks like it’s working correctly to me.

1 Like

I built the mesa packages from Packages / Extra / mesa · GitLab , adding this line

-D video-codecs=h264dec,h264enc,h265dec,h265enc,vc1dec,av1dec,av1enc,vp9dec

to the meson build options.

Indeed, my card does not support VP9. I didnt know about firefox not supporting HEVC.

Thanks to both of you.

1 Like

…you can replace with:

-D video-codecs=all

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.