[Wayland] After wl_output destroy/recreate (monitor power-cycle), HW compositing is permanently disabled and Display0 reports 0x0 @ 0.000 scale — new tabs render blank until restart
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox150 | --- | fixed |
People
(Reporter: hello, Assigned: stransky)
References
(Blocks 1 open bug)
Details
Attachments
(15 files)
|
1.76 MB,
image/png
|
Details | |
|
2.06 MB,
image/png
|
Details | |
|
1.72 MB,
image/png
|
Details | |
|
957.82 KB,
image/png
|
Details | |
|
991.91 KB,
image/png
|
Details | |
|
1009.39 KB,
image/png
|
Details | |
|
552.19 KB,
text/plain
|
Details | |
|
36.87 KB,
text/plain
|
Details | |
|
2.03 MB,
text/plain
|
Details | |
|
40.83 KB,
text/plain
|
Details | |
|
155.83 KB,
application/gzip
|
Details | |
|
221.51 KB,
application/gzip
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
Background
On COSMIC desktop, monitor power-cycle events (DPMS off/on or physical power button) cause the compositor to destroy the wl_output global and create a new one. This is valid Wayland protocol behavior — clients are expected to handle output removal and re-addition. See https://github.com/pop-os/cosmic-comp/pull/2116 for compositor-side context.
When this sequence occurs, Firefox permanently disables hardware compositing for the session. New tabs opened after reconnect render blank (white/empty). Existing tabs continue to function. Only a full Firefox restart recovers rendering.
Environment
- Machine: Minisforum MS-01 mini workstation
- CPU: Intel Core i9-13900H (Raptor Lake-P, Iris Xe Graphics)
- GPU driving display: Intel i915 / Iris Xe — sole display GPU
- Display: Single HDMI-A-1 monitor connected to i915 (NVIDIA RTX 4000 SFF Ada also present but compute-only, no displays)
- Compositor: COSMIC (cosmic-comp 0.1
177134409824.04~ef14b7e) - Mesa: 25.1.5 (mesa/iris driver)
- Kernel: 6.18.7-76061807-generic
- Firefox: 147.0.4 (native, /usr/bin/firefox)
- OS: Pop!_OS 24.04
Reproduction Steps
Trigger A — COSMIC power saving (most reliable):
- Open Firefox, load at least one tab
- Go to COSMIC Settings → Power & Battery → Power Saving Options
- Set "Turn off the screen after" to 1 minute
- Wait for screen to power off
- Move mouse or press key to wake display
- Open a new tab and navigate to any URL
Trigger B — Physical monitor power button:
- Open Firefox, load at least one tab
- Press the physical power button on the monitor (off)
- Wait ~30 seconds
- Power monitor back on
- Open a new tab and navigate to any URL
Observed result: New tab content area remains blank/white. The tab title, URL bar, and browser chrome render correctly. No crash occurs. Existing tabs continue to render correctly.
Expected result: New tabs render normally after monitor reconnect.
Diagnostic Evidence
about:support → Graphics section after trigger (captured live with blank tab open):
Compositing: WebRender (Software) ← was hardware before trigger
Display0: 0x0@60Hz scales:0.000000|0.000000 ← ZERO dimensions/scale
Decision Log after trigger:
HW_COMPOSITING default=available
user=disabled "Disabled by layers.acceleration.disabled=true"
failure: FEATURE_FAILURE_COMP_PREF
WEBRENDER default=available
runtime=unavailable-no-hw-compositing
"Hardware compositing is disabled"
failure: FEATURE_FAILURE_WEBRENDER_NEED_HWCOMP
WEBRENDER_COMPOSITOR env=blocklisted "Blocklisted by gfxInfo"
failure: FEATURE_FAILURE_WEBRENDER_COMPOSITOR_DISABLED
Before the trigger, hardware compositing is active and Display0 shows correct dimensions.
Analysis
The failure has two components:
-
Display dimensions not re-read on
wl_outputrecreate: After the newwl_outputglobal is announced by the compositor, Firefox recordsDisplay0as0x0@60Hz scales:0.000000|0.000000. It appears the output geometry/scale events from the newwl_outputobject are not being applied, or the stale zero-values from the destroyed output are persisting. -
Hardware compositing permanently disabled for session: After the
wl_outputremoval,layers.acceleration.disabled=trueis set (possibly as a consequence of a GPU process crash during the removal sequence). This is not reset when the output reappears. With HW compositing disabled, WebRender falls back to software mode, and new surfaces cannot be properly composited.
MOZ_LOG Evidence
Captured with MOZ_LOG="Widget:5,GPUProcessManager:5,GPUProcessHost:5,CanvasTranslator:5,GLContext:3".
Supplementary observation from LibreWolf (different product, same Gecko engine — additional signal only): In LibreWolf 146.0.1-1, CanvasTranslator failed creating WebGL shared context appears in the parent process crash annotation at the moment of monitor reconnect, followed by libva re-initialization — suggesting the GPU process crashes and restarts. The Firefox-native MOZ_LOG capture is attached, but the GPU process sandbox prevents capturing GPU-process stderr via tee; this specific annotation was only visible in LibreWolf's output.
Additional Notes
- The bug does NOT cause a visible Firefox crash
- about:crashes shows no relevant entries
- No crash minidumps generated
- GPU #2 (NVIDIA 0x10de:0x27b0) present but inactive/compute-only; DMABUF_SURFACE_EXPORT blocklisted (FEATURE_FAILURE_BROKEN_DRIVER) — both pre-existing, unrelated to this bug
- Reproduced identically across Firefox 147.0.4 (native) and LibreWolf 146.0.1-1 (Flatpak, based on Firefox 146)
- Workaround: restart Firefox after monitor reconnect
Related
- https://github.com/pop-os/cosmic-comp/pull/2116 (open) — compositor-side workaround; maintainer indicated clients should handle
wl_outputlifecycle per Wayland protocol - https://github.com/pop-os/cosmic-comp/issues/1463 , https://github.com/pop-os/cosmic-comp/issues/906 — prior related crashes on output removal
- Not a duplicate of: bug 1992198 (stale scaled coordinates, FIXED) or bug 2011099 (blank UI at startup on KDE/NVIDIA, different root cause)
| Reporter | ||
Comment 1•7 months ago
|
||
| Reporter | ||
Comment 2•7 months ago
|
||
| Reporter | ||
Comment 3•7 months ago
|
||
| Reporter | ||
Comment 4•7 months ago
|
||
| Reporter | ||
Comment 5•7 months ago
|
||
| Reporter | ||
Comment 6•7 months ago
|
||
| Reporter | ||
Comment 7•7 months ago
|
||
| Assignee | ||
Comment 8•7 months ago
|
||
Can you run on terminal with MOZ_LOG="WidgetScreen:5" log, reproduce the issue and attach the log here?
Thanks.
| Reporter | ||
Comment 9•7 months ago
|
||
| Reporter | ||
Comment 10•7 months ago
|
||
| Assignee | ||
Comment 11•7 months ago
|
||
Can you run on terminal with WAYLAND_DEBUG=1 MOZ_LOG="WidgetScreen:5" log, reproduce the issue and attach the log here? It adds Wayland protocol logging there.
Thanks.
| Assignee | ||
Updated•7 months ago
|
| Reporter | ||
Comment 12•7 months ago
|
||
| Assignee | ||
Updated•7 months ago
|
| Reporter | ||
Updated•7 months ago
|
| Assignee | ||
Comment 13•7 months ago
|
||
We'd need more logs here how the monitor area is obtained.
| Reporter | ||
Comment 14•7 months ago
|
||
| Assignee | ||
Comment 15•7 months ago
|
||
Yes, please do the WAYLAND_DEBUG=1 MOZ_LOG="WidgetScreen:5" log again with latest nightly.
Thanks.
| Reporter | ||
Comment 16•7 months ago
|
||
| Reporter | ||
Comment 17•7 months ago
|
||
| Reporter | ||
Comment 18•7 months ago
|
||
| Reporter | ||
Comment 19•7 months ago
|
||
| Assignee | ||
Comment 20•7 months ago
|
||
Cool. Looks like we have an issue with Wayland display monitor setup. Please run with:
WAYLAND_DEBUG=1 MOZ_LOG="WidgetScreen:5,WidgetWayland:5" env variables
to get info about monitor changes (there will be 'nsWaylandDisplay ID ...' lines related to monitor changes there).
Thanks.
| Assignee | ||
Comment 21•7 months ago
|
||
It should be something like:
[(null) 709496: Main Thread]: D/WidgetWayland nsWaylandDisplay ID 3 geometry position 0 0 physical size 640 360 subpixel 0 transform 0
[(null) 709496: Main Thread]: D/WidgetWayland nsWaylandDisplay ID 3 mode output size 3840 x 2160
[Parent 709496: Main Thread]: D/WidgetWayland nsWaylandDisplay::GetMonitorConfig() 0, 0 matches
in the widget wayland log.
| Assignee | ||
Updated•7 months ago
|
| Reporter | ||
Comment 22•7 months ago
|
||
| Reporter | ||
Comment 23•7 months ago
|
||
| Assignee | ||
Comment 24•7 months ago
|
||
Yes, so the bug is caused by unfortunate event order as the wl_output owned by Firefox is filed after gtk3 ones. So we get monitor-changed event but we don't have monitor info available yet.
| Assignee | ||
Comment 25•7 months ago
|
||
Looking at the difference between cosmic and mutter. Mutter doesn't remove/add wl_output when resolution/monitor changes. Only issues new wl_output.mode() / zxdg_output_v1.logical_size events.
A solution may be to listen on wl_output changes only and use Gtk3 signals for X11.
| Assignee | ||
Updated•7 months ago
|
| Assignee | ||
Comment 26•7 months ago
|
||
Updated•7 months ago
|
| Assignee | ||
Comment 27•7 months ago
|
||
| Reporter | ||
Comment 28•7 months ago
|
||
Comment 29•7 months ago
|
||
Comment 30•7 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/24ef0c9fcc0a
https://hg.mozilla.org/mozilla-central/rev/b1809ccf8612
Comment 31•4 months ago
|
||
Comment 32•4 months ago
|
||
A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)
Comment 33•4 months ago
|
||
Comment 34•4 months ago
|
||
| bugherder | ||
Description
•