Skip to content

wayland/lock: abort locks on initial graphics failure - #1175

Open
acrogenesis wants to merge 1 commit into
quickshell-mirror:masterfrom
acrogenesis:fix/session-lock-initialization-failure
Open

acrogenesis wants to merge 1 commit into
quickshell-mirror:masterfrom
acrogenesis:fix/session-lock-initialization-failure

Conversation

@acrogenesis

@acrogenesis acrogenesis commented Sep 21, 2026 •

Copy link
Copy Markdown

Initial lock-surface graphics failures currently abort Quickshell and leave the session locked without an authentication UI. Cancel the lock attempt instead, following the suggestion on #1106.

Wait for the compositor's locked event before sending unlock_and_destroy, then notify QML that locked is false. Handle errors only during initial surface creation; disconnect the handler after initialization and ignore failures after manager ownership transfers during reload. This deliberately unlocks a failed initial attempt without authentication and does not add retries or recovery for later rendering failures.

Validation with Qt 6.11.2 and Clang 22:

  • All-features Debug build and eight focused cases pass, including real Wayland runs with both basic and threaded render loops. Both manager-transfer regressions fail before the fix and pass afterward.
  • Before the ownership checks: single/two-output EGL_BAD_ALLOC injection and the full installed Omarchy shell via omarchy-system-lock, under both render loops. Failed initialization clears the lock request; wrong passwords are rejected, correct passwords authenticate through PAM, and subsequent locking succeeds in the same process.
  • Prior full offscreen suite: 9/10 pass; the existing popupwindow::moveWithParent failure remains. Formatting and lint checks for the changed test pass locally; full lint uses CI's pinned toolchain.

This is a separate alternative to #1106.

@acrogenesis
acrogenesis force-pushed the fix/session-lock-initialization-failure branch from 223f054 to 4f95e6a Compare September 22, 2026 01:20
Cancel the lock attempt when an initial surface cannot initialize graphics.
Wait for the compositor's locked event before unlocking, and notify QML
when the lock state changes. Stop handling errors after initialization so
later failures do not unlock an established session. Ignore failures from
an old owner after the lock manager is transferred during reload.
@acrogenesis
acrogenesis force-pushed the fix/session-lock-initialization-failure branch from 4f95e6a to 3ec9256 Compare September 22, 2026 02:12
@acrogenesis
acrogenesis marked this pull request as ready for review September 22, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant