fix(render): recover lock surface after resume - #3941
Conversation
|
Hey @meleeislandbot , thanks for the detailed investigation and testing. The targeted resume recovery looks useful, but I do not think the generic one-second timeout should be merged as written. Wayland does not guarantee that a frame callback will arrive within one second. Hidden, occluded, or throttled surfaces may legitimately wait longer. The timestamp also starts when
I would keep this scoped to the reproduced resume path:
The diagnosis and hardware verification are excellent. I think the targeted portion of the fix is the right direction, but the global stale-callback policy is broader than this bug requires. |
1002b2e to
7cf1f8d
Compare
|
Thanks — I reworked the PR to follow that exact scope.
I tested this targeted variant on the affected RTX 5070 Ti / Hyprland host. It passed 3/3 suspend/resume cycles: one targeted discard per cycle, replacement callbacks completed in 582/616/574 ms, prompt updates continued (16/16/17), mask glyphs stayed visible, and unlock succeeded. There were no errors and no global stale-callback resets. The clean candidate was rebased onto current Could you take another look when convenient? |
After suspend/resume, a lock surface can keep waiting for a Wayland frame callback registered before the stall. The password field then stops repainting even though input and authentication still work. Add an explicit callback discard that transfers the in-flight tick intent and leaves queued work and dirty state intact. Invoke it only for active lock surfaces after resume, then request a redraw. The normal frame loop remains unchanged; there is no generic timeout. Verified on the affected RTX 5070 Ti / Hyprland host: the targeted instrumented variant passed 3/3 suspend/resume cycles, and the clean current-main build passed 85/85 tests plus 1/1 physical cycle.
7cf1f8d to
e2c659e
Compare
Summary
After suspend/resume, the compositor can stop presenting the lock surface: the
wl_surface.framecallback registered before the stall never fires, andSurface::kickFrameLoop()keeps waiting for it. The lock screen then stops repainting, so password mask glyphs remain invisible even though input and authentication continue to work.This PR keeps recovery scoped to the reproduced path:
Surface::discardPendingFrameCallback()destroys only the in-flight callback and transfers its tick intent to the replacement callback, without clearing queued frame work or update/layout/redraw state.Motivation
Closes #3916. On the affected host (RTX 5070 Ti / CachyOS / Hyprland), the previous fix
4dd6f29dre-rasterized glyph textures but remained blocked because no frame was rendered after resume.Type of Change
Related Issue
Closes #3916
Testing
Targeted instrumented build on the affected host, with the generic timeout removed:
Each cycle recorded exactly one callback discard, followed by a replacement callback and continued prompt updates. There were zero errors and zero global stale-callback resets.
Clean candidate rebased onto
d911d37e(mainat test time):-Dtests=enabled: 85/85 PASS;just formatwith clang-format 22.1.8: no changes;Manual Coverage
Screenshots / Videos
N/A (fix restores expected rendering; no UI change).
Checklist
CONTRIBUTING.md.just formatwith clang-format v22+ installed, or this PR has no code changes.assets/translations/en.json, or this PR adds no new user-facing strings.Additional Notes