Skip to content

Wake the display and lock screen when opening the laptop lid - #21163

Merged
dhh merged 1 commit into
quattrofrom
fix-lid-open-wake
Dec 1, 2026
Merged

dhh merged 1 commit into
quattrofrom
fix-lid-open-wake

Conversation

@dhh

@dhh dhh commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

With HandleLidSwitchExternalPower=ignore (etc/systemd/logind.conf.d/30-lid-external-power.conf), closing the lid while plugged in locks and blanks the panel without suspending. On lid open, Hyprland only ran omarchy-hyprland-monitor-clamshell, which skips DPMS enable outside docked clamshell mode and never wakes the lock service — leaving the screen dark and fingerprint auth paused until a key is pressed.

Changes

  • Add bin/omarchy-system-lid-open and bind the three switch:off lid events in default/hypr/bindings/utilities.lua to it.
  • Add lock wake IPC in shell/plugins/lock/Service.qml (and add it to the session-path redirect list in bin/omarchy-shell) calling runWake() so opening the lid while locked lights the panel, resumes fingerprint auth, and re-arms the blank timer.
  • Fold the frozen-timer/active-window guards into armBlankTimer() and the pending-resume check into runWake() so a lid-open wake right after suspend preserves the 15s resume blank window and fingerprint resume grace.
  • Re-check omarchy-hw-laptop-closed once after 100ms before treating switch:off as a replayed closed switch (for non-ACPI laptops where systemd-logind can briefly lag Hyprland).
  • Extend test/shell.d/lid-close-test.sh and test/shell.d/fixtures/lock-fingerprint-service/shell.qml.

Testing

  • bash test/shell.d/lid-close-test.sh
  • bash test/shell.d/lock-fingerprint-service-test.sh
  • bash test/shell.d/lock-state-test.sh
  • bash test/shell.d/shell-ipc-test.sh
  • bash test/shell.d/hyprland-default-config-test.sh
  • ./test/cli

With HandleLidSwitchExternalPower=ignore, closing the lid while plugged in locks and blanks the panel without suspending. On lid open, Hyprland only ran omarchy-hyprland-monitor-clamshell, which skips DPMS enable outside docked clamshell mode and never wakes the lock service, leaving the display dark and fingerprint authentication paused until a key is pressed.

Add omarchy-system-lid-open and bind switch:off lid events to it. When open, wake through a new omarchy-shell lock wake IPC method when locked (or fall back to omarchy-system-wake when unlocked or if the shell is unreachable), both of which reconcile clamshell state. Re-check omarchy-hw-laptop-closed once after 100ms before treating a lid-open event as a replayed closed switch (for non-ACPI laptops where logind lags Hyprland), and preserve the longer resume blank window and fingerprint resume grace when waking right after suspend.
@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Medium impact] The PR appears safe to merge; no actionable defects were found.

Summary

Opening the laptop lid now wakes the display through the lock service, bringing fingerprint authentication back without requiring a keypress.

  • Opening the laptop lid wakes the display and fingerprint reader.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Lid opens] --> B{Lid still reads closed after retry?}
  B -->|Yes| C[Reconcile clamshell displays]
  B -->|No| D[Call lock wake]
  D --> E{Locked service answers ok?}
  E -->|Yes| F[Wake displays, resume fingerprint, arm blank timer]
  E -->|No| G[Wake displays directly]
Loading

Reviews (2) · Last reviewed commit: "Wake the display and lock screen when op..." · Reviewed by Greptile

@dhh
dhh merged commit 8337222 into quattro Dec 1, 2026
6 checks passed
@dhh
dhh deleted the fix-lid-open-wake branch December 1, 2026 23:35
lbssousa added a commit to lbssousa/omarchy-multiuser that referenced this pull request Dec 2, 2026
The lock fork takes rc3's lid-open handling (omacom/omarchy#21163): the
`lock wake` call, answered only by the session on screen, and a blank
countdown that input can't shorten. Update > Secure Bootloader and removing
the Epic Games Launcher become administrators' entries, and the Antigravity
CLI defaults migration is mixed, not system.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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