Firefox requires the wayland useflag to get functioning hardware video decoding, even under X. Tested on AMD hardware with amdgpu/radeonsi, VA-API and www-client/firefox-116.0:rapid (but older versions affected aswell) If the wayland useflag is missing, it will report `Blocklisted by gfxInfo` and `FEATURE_FAILURE_VIDEO_DECODING_TEST_FAILED` in about:support (HARDWARE_VIDEO_DECODING section) and starting it with the `MOZ_LOG="PlatformDecoderModule:5"` env confirms during video playback that the string "VA-API" is nowhere to be found. Also see https://forums.gentoo.org/viewtopic-p-8755739.html This situation is confusing. It leads to a long evening of debugging only to hopefully find the forum thread above :) And of course the wayland useflag comes with more dependencies, (some of which) which are likely unnecessary under X. Something in the build process seems to change when wayland is enabled. We should get to the bottom of this and fix hardware decoding without requiring the wayland useflag. Thanks! :)
Hmm 116 should have landed patches that makes it possible for hwaccel to work without wayland flag. It was indeed necessary before that. We also add a custom patch to enable vaapi on more AMD cards.
I definitely had this issue with 116.0:rapid.
Make sure your vaapi is working with "vainfo" in terminal. If yes, could you open an upstream bug about it? Let them know you've built Firefox with --enable-default-toolkit=cairo-gtk3-x11-only.
Done: https://bugzilla.mozilla.org/show_bug.cgi?id=1848631
That is claimed to be a duplicate of their bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1843425 And that reads as: Status: RESOLVED FIXED Milestone: 117 Branch ... with a patch. We're on: www-client/firefox-116.0 Hopefully fixed for the next release? Thanks, Martin
Yes, it seems we made a mistake. The patches only landed in 117, not 116. Gonna wait and see.
(In reply to haarp from comment #4) > Done: https://bugzilla.mozilla.org/show_bug.cgi?id=1848631 Thanks! (In reply to haarp from comment #6) > Yes, it seems we made a mistake. The patches only landed in 117, not 116. > Gonna wait and see. It was _supposed_ to work in 116 but obviosly it's a bug it didn't. A follow-up fix landed in 117. I also couldn't find the upstream bug because it was RESOLVED already. Anyone can toss the upstream patch into /etc/portage/patches to get it working right now (if it applies). If there's a reason to touch firefox-116, I'll include the patch, but if not I'll wait for 117 where it's natively included.
116.0.3 is out with linux-related fixes so I'll be looking to package that today with upstream fixes for vaapi. But I also found an about:config option to try and force-enable vaapi even with this 116.0 release, media.hardware-video-decoding.force-enabled -> true could you try setting that, restart your browser and see if vaapi works before updating to 116.0.3?
I had already tried that, it didn't make a difference. I'm going to try a non-wayland 116.0.3 build later
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8282ad68d79e95724306dfd4cd597c5bab7b71d3 commit 8282ad68d79e95724306dfd4cd597c5bab7b71d3 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2023-08-17 09:16:34 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2023-08-17 09:16:34 +0000 www-client/firefox: add 116.0.3 - include latest upstream vaapi/hwdec patches from upcoming 117 and 118 releases. Closes: https://bugs.gentoo.org/911941 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/Manifest | 101 ++ www-client/firefox/firefox-116.0.3.ebuild | 1466 +++++++++++++++++++++++++++++ 2 files changed, 1567 insertions(+)
116.0.3 looking good without wayland useflag :) Thanks!