Inconsistent hardware video decoding support on F39 silverblue

Hello.

I have an issue regarding video decoding on two AMD GPUs. One being AMD Radeon Graphics (RADV RAPHAEL_MENDOCINO) and the other, AMD Radeon RX 6600 XT (RADV NAVI23).

On Firefox 123.0.1 flatpak version I have H264 hardware decode acceleration but don’t have VP9 and AV1.

On Firefox 123.0.1 RPM version I have VP9 and AV1 hardware decode acceleration but don’t have H264.

This also happens in other flatpaks: mpv, celuloid, OBS…

Is anyone having the same issues?

AFAIK due to patent issues some hardware decoding/encoding is disabled for AMD cards.

Afaik for Flatpak this means having “Mesa-extra” installed, while for non-Flatpak this would require installing some specific packages from RPMFusion.

For the Flathub Firefox I would bet you are missing the Mesa runtimes, I’m pretty sure that is what you need for AMD.

matthew@fedora:~$ flatpak list --runtime 
Name                                      Application ID                                      Version       Branch      Origin  Installation
<snip>
Freedesktop Platform                      org.freedesktop.Platform                            23.08.13      23.08       flathub system
i386                                      org.freedesktop.Platform.Compat.i386                              23.08       flathub system
Mesa                                      org.freedesktop.Platform.GL.default                 23.3.5        22.08       flathub system
Mesa (Extra)                              org.freedesktop.Platform.GL.default                 23.3.5        22.08-extra flathub system
Mesa                                      org.freedesktop.Platform.GL.default                 24.0.2        23.08       flathub system
Mesa (Extra)                              org.freedesktop.Platform.GL.default                 24.0.2        23.08-extra flathub system
Mesa                                      org.freedesktop.Platform.GL32.default               24.0.2        23.08       flathub system
Mesa (Extra)                              org.freedesktop.Platform.GL32.default               24.0.2        23.08-extra flathub system
Intel                                     org.freedesktop.Platform.VAAPI.Intel                              23.08       flathub system
i386                                      org.freedesktop.Platform.VAAPI.Intel.i386                         23.08       flathub system
ffmpeg-full                               org.freedesktop.Platform.ffmpeg-full                              22.08       flathub system
ffmpeg-full                               org.freedesktop.Platform.ffmpeg-full                              23.08       flathub system
openh264                                  org.freedesktop.Platform.openh264                   2.1.0         2.2.0       flathub system
openh264                                  org.freedesktop.Platform.openh264                   2.1.0         2.3.1       flathub system
<snip>

Hello again, thank you both for the answers. I forgot about the patent issues that involves AMD and the H264 codec. However, I do have installed the Mesa-extra runtimes on flatpak. Here’s what I have:

Fedora Platform                          org.fedoraproject.Platform                         39       f39          fedora        system
Freedesktop Platform                     org.freedesktop.Platform                           22.08.21 22.08        flathub       system
Freedesktop Platform                     org.freedesktop.Platform                           23.08.13 23.08        flathub       system
i386                                     org.freedesktop.Platform.Compat.i386                        23.08        flathub       system
Mesa                                     org.freedesktop.Platform.GL.default                23.3.5   22.08        flathub       system
Mesa (Extra)                             org.freedesktop.Platform.GL.default                23.3.5   22.08-extra  flathub       system
Mesa                                     org.freedesktop.Platform.GL.default                24.0.2   23.08        flathub       system
Mesa                                     org.freedesktop.Platform.GL.default                24.0.1   23.08        gnome-nightly user
Mesa (Extra)                             org.freedesktop.Platform.GL.default                24.0.2   23.08-extra  flathub       system
Mesa (Extra)                             org.freedesktop.Platform.GL.default                24.0.1   23.08-extra  gnome-nightly user
Mesa                                     org.freedesktop.Platform.GL32.default              24.0.2   23.08        flathub       system
Mesa (Extra)                             org.freedesktop.Platform.GL32.default              24.0.2   23.08-extra  flathub       system
ffmpeg-full                              org.freedesktop.Platform.ffmpeg-full                        22.08        flathub       system
ffmpeg-full                              org.freedesktop.Platform.ffmpeg-full                        23.08        flathub       system
i386                                     org.freedesktop.Platform.ffmpeg_full.i386                   23.08        flathub       system
openh264                                 org.freedesktop.Platform.openh264                  2.1.0    2.2.0        flathub       system
openh264                                 org.freedesktop.Platform.openh264                           2.4.1beta    gnome-nightly user
Freedesktop SDK                          org.freedesktop.Sdk                                23.08.13 23.08        flathub       system
GNOME Application Platform version 45    org.gnome.Platform                                          45           flathub       system
GNOME Application Platform version Nigh… org.gnome.Platform                                          master       gnome-nightly user
i386                                     org.gnome.Platform.Compat.i386                              45           flathub       system
Adwaita theme                            org.kde.KStyle.Adwaita                                      5.15-23.08   flathub       system
Adwaita theme                            org.kde.KStyle.Adwaita                                      6.5          flathub       system
KDE Application Platform                 org.kde.Platform                                            5.15-23.08   flathub       system
KDE Application Platform                 org.kde.Platform                                            6.5          flathub       system
KDE Application Platform                 org.kde.Platform                                            6.6          flathub       system
QGnomePlatform                           org.kde.PlatformTheme.QGnomePlatform                        5.15-23.08   flathub       system
QGnomePlatform                           org.kde.PlatformTheme.QGnomePlatform                        6.5          flathub       system
QGnomePlatform                           org.kde.PlatformTheme.QGnomePlatform                        6.6          flathub       system
QAdwaitaDecorations                      org.kde.WaylandDecoration.QAdwaitaDecorations               5.15-23.08   flathub       system
QAdwaitaDecorations                      org.kde.WaylandDecoration.QAdwaitaDecorations               6.5          flathub       system
QAdwaitaDecorations                      org.kde.WaylandDecoration.QAdwaitaDecorations               6.6          flathub       system
QGnomePlatform-decoration                …g.kde.WaylandDecoration.QGnomePlatform-decoration          5.15-23.08   flathub       system
QGnomePlatform-decoration                …g.kde.WaylandDecoration.QGnomePlatform-decoration          6.5          flathub       system
Telegram Desktop Webview Add-on          org.telegram.desktop.webview                       2.42.5   stable       flathub       system
DXVK                                     org.winehq.Wine.DLLs.dxvk                          2.3      stable-23.08 flathub       system
Gecko                                    org.winehq.Wine.gecko                                       stable-23.08 flathub       system
Mono                                     org.winehq.Wine.mono                                        stable-23.08 flathub       system

I found this warnings in the Firefox “about:support”

HARDWARE_VIDEO_DECODING	
default	available		
user	force_enabled	Force enabled by pref	
env	blocklisted	Blocklisted by gfxInfo	Bloqueado; código de falla FEATURE_HARDWARE_VIDEO_DECODING_DISABLE
HW_DECODED_VIDEO_ZERO_COPY	
default	available		
VP8_HW_DECODE	
default	available		
env	blocklisted	#BLOCKLIST_FEATURE_FAILURE_VIDEO_DECODING_MISSING	Bloqueado; código de falla FEATURE_FAILURE_VIDEO_DECODING_MISSING
VP9_HW_DECODE	
default	available		
env	blocklisted	#BLOCKLIST_FEATURE_FAILURE_VIDEO_DECODING_MISSING	Bloqueado; código de falla FEATURE_FAILURE_VIDEO_DECODING_MISSING
DMABUF_SURFACE_EXPORT	
default	blocked	Blocklisted by gfxInfo	Bloqueado; código de falla FEATURE_FAILURE_BROKEN_DRIVER
BACKDROP_FILTER	
default	available		
CANVAS_RENDERER_THREAD	
default	available		
ACCELERATED_CANVAS2D	
default	available		
H264_HW_DECODE	
default	available		
AV1_HW_DECODE	
default	available		
env	blocklisted	#BLOCKLIST_FEATURE_FAILURE_VIDEO_DECODING_MISSING	Bloqueado; código de falla FEATURE_FAILURE_VIDEO_DECODING_MISSING

Is this relevant to my issue?

Does it help if you remove the mesa extensions from the gnome-nightly remote?

flatpak uninstall --user org.freedesktop.Platform.GL.default

(Have it remove both 23.08 and 23.08-extra)

Hardware video acceleration was broken recently due to an overlooked change in mesa’s build flags. Despite being updated nightly, the extension in gnome-nightly seems to still be the old version, and flatpak will preferentially select an extension in the user installation.

I have a similar setup with flathub in the system installation and gnome-nightly in the user installation. I masked mesa in the latter:

flatpak mask --user runtime/org.freedesktop.Platform.GL.default//23.08*

I’m only masking the current branch of mesa in case org.gnome.Platform//master starts requiring 24.08 before it’s available on Flathub.

1 Like

Oh wow!!! That was it. I just remove the nightly builds and voila, hardware acceleration…

Thank you so much. I’ll keep track to the changes made by the app that requires that runtime. :smiley:

1 Like