Firefox snap opens a black window on wayland
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mutter |
New
|
Unknown
|
|||
firefox (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
mutter (Ubuntu) |
In Progress
|
High
|
Gunnar Hjalmarsson | ||
xwayland (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
This may actually be a duplicate of bug #1987976, but I was advised to file a new bug to get attention to this issue for the 23.04 release and consider a possible workaround.
https:/
In short: On a fresh 23.04 install, the first time in each wayland session I try to launch Firefox via the icon in the dock, it just opens a black window. I can close Firefox, and try again, and then it opens as expected.
I'd better mention that I have a NVIDIA card, but the issue is present both with the NVIDIA and the Nouveau driver.
While it might be some kind of race condition (not everyone is affected), in my case it happens every time.
I have a proposed workaround: use the xrefresh command. That could for instance be done with this file:
$ cat /etc/xdg/
[Desktop Entry]
Name=Launch Xwayland on startup of wayland session
Comment=This allows to start the Firefox snap from the dock without a black window
Type=Application
Exec=sh -c 'if [ "$XDG_SESSION_TYPE" = "wayland" ]; then xrefresh; fi'
TryExec=xrefresh
OnlyShowIn=GNOME;
NoDisplay=true
That idea isn't new. We have shipped a similar file (for a similar reason) with ibus-mozc for a few cycles:
Changed in mutter: | |
status: | Unknown → New |
I applied a mutter patch written by Marco Trevisan and uploaded to a PPA:
https:/ /launchpad. net/~gunnarhj/ +archive/ ubuntu/ mutter
With the binaries from that PPA build I can no longer reproduce the black window issue described in this bug. Not even after having run:
killall Xwayland
So I pushed the patch to the repo.
https:/ /salsa. debian. org/gnome- team/mutter/ -/commit/ a400e60d