After these changes hit your nixpkgs:
- sway, firefox-wayland = Firefox (Wayland)
env MOZ_ENABLE_WAYLAND=1 firefox = Firefox (Wayland)
unset MOZ_ENABLE_WAYLAND; firefox = Firefox (X11,Xwayland)
The only difference in
firefox-wayland is that it sets
MOZ_ENABLE_WAYLAND=1 in the wrapper. (And I guess we put “(Wayland)” into the Application title in the Desktop unit.)
As for confirming, I just repeated these instructions with a fresh profile:
Hopefully this can give you an idea if it’s working or not. Change the
nix-build to account for your
Important note: I have
MOZ_ENABLE_WAYLAND set desktop-wide. You will need to set it as well, or modify the command below to use the
firefox-wayland attribute. In fact, to be safe, I’m going to do that here:
f="$(nix-build ~/code/nixpkgs/cmpkgs -A firefox)"
$f/bin/firefox --no-remote -P vaapi 'http://demo.nimius.net/video_test/' &> /tmp/firefox
Create a new profile
vaapi for testing, that command launches that profile.
The launch command should’ve had fIrefox load a page that has a test video at the top that should work. Play it for a few seconds. Close firefox.
Then I open
nvim /tmp/firefox/ and grep for:
VA-API FFmpeg init successful
D/PlatformDecoderModule Got one VAAPI frame output with
They are both present.
Note, Firefox Nightly users might not want to aggressively enable all dmabuf/drm options. My stable profile has all related options enabled, and it worked well, but Nightly has even more knobs available and some didn’t work out well with my system (though do note, we have libva, mesa and other related changes coming soon to
nixos-unstable that might help too).