Tested and its working in Gnome Wayland with AMD GPU.
What is this fix about? Is it valid for X11 too?
I believe so although I didn’t test in X11.
I’m using this option to enable vaapi:
user_pref("media.ffmpeg.vaapi.enabled",true);
Also changed the Firefox to Wayland:
$ MOZ_ENABLE_WAYLAND=1 firefox
It has been broken since v97.
https://bugzilla.mozilla.org/show_bug.cgi?id=1751363
How did you test that it is working now?
Launch Firefox in Wayland like this and check if vaapi is working:
MOZ_LOG="PlatformDecoderModule:5 Dmabuf:5" MOZ_ENABLE_WAYLAND=1 firefox
In X11, I suppose the command will be:
MOZ_LOG="PlatformDecoderModule:5 Dmabuf:5" firefox
You can also check with htop
and confirm if the CPU usage is way lower than it used to be during video playback, something like Youtube 4k 60fps video is easier to detect.
Just curios if
MOZ_ENABLE_WAYLAND=1
could be added to /etc/environment as well for enabling it systemwide?
That’s what I’ve done in Wayland on KDE:
GTK_USE_PORTAL=1
MOZ_ENABLE_WAYLAND=1 firefox
MOZ_ENABLE_WAYLAND=1 thunderbird
Nice! Thanks!
You can also accomplish it like this:
- To set environment variables, copy the .desktop file from /usr/share/applications/ to $XDG_DATA_HOME/ (~/.local/share/applications/) and edit the Exec= command line by prepending env.
- cp /usr/share/applications/firefox.desktop ~/.local/share/applications/firefox.desktop
- nano ~/.local/share/applications/firefox.desktop
- change Exec line from default to:
Exec=env MOZ_ENABLE_WAYLAND=1 /usr/lib/firefox/firefox %u
Thanks so much for the detailed description! Looks good! I’ll give it a try.
I would definitely do what @anon49550872 recommended instead of setting it in /etc/environment
. No need for something like that to be global.
Wouldn’t you also have to add “env MOZ_ENABLE_WAYLAND=1” to the Desktop Actions “new-window” and “new-private-window” as well?
Open a private window, go to about:support and check, it is already set here, so its not necessary
I’ve set it in /etc/environment, so I wouldn’t know. If it works without adding it three times in the .desktop file then