[Wayland] Run Firefox without X11
Categories
(Core :: Widget: Gtk, enhancement, P3)
Tracking
()
People
(Reporter: hugo, Assigned: rmader)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Steps to reproduce:
DISPLAY
is unset and WAYLAND_DISPLAY
is unset (and the system is running a Wayland compositor, e.g.: sway).
Run firefox https://ddg.gg
.
Actual results:
Firefox crashes trying to connect to Xorg.
Additionally, if an instance of Firefox is already running (with MOZ_ENABLE_WAYLAND=1
), the new instance does not communicate with the existing one, but crashes trying to connect to Xorg.
Expected results:
Firefox should use its Wayland backend if Wayland is the only thing available on the system.
This is somewhat related to 1543600, however, that issue is about using Wayland BY DEFAULT, whereas this issue is about using Wayland as a fallback when it's the only thing available in the system.
Reporter | ||
Comment 1•3 years ago
|
||
Side note: This issue came up when clicking links on Flatpak, since the xdg-desktop-portal spawns a copy of Firefox without MOZ_ENABLE_WAYLAND=1
, which is only set to my regular desktop environment and not for services.
Reporter | ||
Updated•3 years ago
|
Comment 2•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Graphics' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
@Hugo: why would a compositor ever not set WAYLAND_DISPLAY
?
Reporter | ||
Comment 5•3 years ago
|
||
Sorry, that was a dumb typo on my part, that should read:
DISPLAY is unset and WAYLAND_DISPLAY is set (and the system is running a Wayland compositor, e.g.: sway).
Assignee | ||
Comment 6•3 years ago
|
||
Ah right, makes sense :) We just had another bug where someone writing their own compositor really did not set it.
I think this should be trivial to fix by checking for DISPLAY
not being set at https://searchfox.org/mozilla-central/source/toolkit/xre/nsAppRunner.cpp#4091-4093 - will create a patch.
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 7•3 years ago
|
||
If WAYLAND_DISPLAY
is set but DISPLAY
is not, we have every reason
to assume that we are in a Wayland-only session. Enable the Wayland
backend unconditionally in this case.
Note: We do not bother to further sanity check the content of the env
variables as these can be considered client setup bugs.
Pushed by robert.mader@posteo.de: https://hg.mozilla.org/integration/autoland/rev/442fae932235 Do not require MOZ_ENABLE_WAYLAND if Xwayland is not available, r=stransky
Comment 9•3 years ago
|
||
bugherder |
Assignee | ||
Comment 10•3 years ago
|
||
Comment on attachment 9231894 [details]
Bug 1720497 - Do not require MOZ_ENABLE_WAYLAND if Xwayland is not available, r=stransky
Beta/Release Uplift Approval Request
- User impact if declined: FF will not start on Wayland-only systems without setting the
MOZ_ENABLE_WAYLAND
env var. While such setups are not yet very common, it is likely that we will see a strong increase of them over the lifetime of the ESR release as several distributions will switch to Wayland by default. - Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): - the patch is trivial
- it only toggles between Wayland and X11 backend
- should not affect any already common setups
- String changes made/needed:
Updated•3 years ago
|
Comment 11•3 years ago
|
||
Comment on attachment 9231894 [details]
Bug 1720497 - Do not require MOZ_ENABLE_WAYLAND if Xwayland is not available, r=stransky
Fallback to Wayland is better than crashing, approved for 91 beta 6, thanks.
Comment 12•3 years ago
|
||
bugherder uplift |
Description
•