I’m trying to run Firefox in kiosk mode (firefox --kiosk ) under Sway on NixOS 23.11 on bare-metal. Most of the time Firefox launches to a black screen. As a test I launched Firefox 25 times, and it only showed a non-black window 3 times.
Using Sway commands, such as toggle fullscreen (default super+f) or switching to a different workspace and back “fixes” the issue. Firefox commands such as Reload (ctrl+r) or New Tab (ctrl+t) do nothing.
Launching Firefox normally (aka, firefox ) works every time.
If I force Firefox to use X (MOZ_ENABLE_WAYLAND=0 firefox --kiosk ) it works.
On the same hardware if I boot into an Arch Linux 2024.01 ISO and install sway+firefox+polkit+foot and re-run the same test, kiosk mode seems to work every time.
In both cases I checked about:support and Window Protocol is Wayland on both NixOS and Arch.
My hardware is a Dell Optiplex 7060, which has Intel UHD 630 graphics.
I’ve spent the last few hours trying to narrow this down because there is so many moving pieces. A mis-config? Is it a Firefox bug? A Sway bug? Something in Nix’s wrapper around Firefox that changes things? …