Skip to content

Lid close does not lock the session on Apple Silicon (lid-close bind skips omarchy-system-lid-close) #701

Description

@marceloid

System details

  • Apple MacBook Air (13-inch, M2, 2022) — Asahi Linux, aarch64
  • Omarchy 4.0.2-2 — fork omarchy-mac/omarchy-mac, branch quattro, commit e44b122f
  • Hyprland 0.56.2
  • Kernel 7.1.13-3-2-ARCH

What's wrong?

On Apple Silicon, closing the lid never locks the session.

default/hypr/bindings/utilities.lua handles the lid switch. Upstream binds the
lid-close event to omarchy-system-lid-close, which locks the session (unless an
external monitor is connected) and then applies the clamshell display state:

o.bind("switch:on:Lid Switch", nil, "omarchy-system-lid-close", { locked = true })
o.bind("switch:off:Lid Switch", nil, "omarchy-hyprland-monitor-clamshell", { locked = true })

The Mac fork adds the device name Apple Silicon actually uses, but points the
lid-close event straight at omarchy-hyprland-monitor-clamshell, skipping the lock:

-- Mac fork: Apple Silicon names the lid switch "Apple SMC power/lid events", not
-- the generic "Lid Switch", so quattro's binds above never fire on this hardware.
o.bind("switch:on:Apple SMC power/lid events", nil, "omarchy-hyprland-monitor-clamshell", { locked = true })
o.bind("switch:off:Apple SMC power/lid events", nil, "omarchy-hyprland-monitor-clamshell", { locked = true })

As that comment says, the generic switch:on:Lid Switch never fires on this hardware, so
the switch:on:Apple SMC power/lid events line above is the only lid-close handler
that runs — and it never calls omarchy-system-lid-close. Display reconciliation still
happens; the lock does not.

Expected: closing the lid locks the session when no external monitor is connected,
matching upstream.

Fix: point the Apple Silicon lid-close event at omarchy-system-lid-close, which
already falls through to the clamshell script:

o.bind("switch:on:Apple SMC power/lid events", nil, "omarchy-system-lid-close", { locked = true })
o.bind("switch:off:Apple SMC power/lid events", nil, "omarchy-hyprland-monitor-clamshell", { locked = true })

Steps to reproduce

  1. Confirm the lid switch device name on Apple Silicon:

    $ hyprctl devices | sed -n '/Switches:/,$p'
    Switches:
            Switch Device at 0x...:
                    Apple SMC power/lid events
    
  2. Confirm which handler the lid-close event is bound to. The generic key exists but
    never fires, and the Apple key resolves to the clamshell script (the description is
    empty because the fork passes nil):

    $ hyprctl binds | grep -A4 'switch:on:'
            key: switch:on:Lid Switch
            description:
            dispatcher: __lua
    ...
            key: switch:on:Apple SMC power/lid events
            description:
            dispatcher: __lua
    

    Add a temporary description to either line (or check
    default/hypr/bindings/utilities.lua) to see that the Apple key points at
    omarchy-hyprland-monitor-clamshell, while omarchy-system-lid-close is never
    invoked.

  3. Close the lid with no external monitor connected. The internal panel is reconciled as
    expected, but the session is not locked.

Verification of the fix

Re-binding just the lid-close event in the user config restores the lock:

-- ~/.config/hypr/bindings.lua
hl.unbind("switch:on:Apple SMC power/lid events")
o.bind("switch:on:Apple SMC power/lid events", nil, "omarchy-system-lid-close", { locked = true })

After hyprctl reload, hyprctl binds reports exactly one handler for that key, and
closing the lid now locks the session. Tested twice on the machine above.

Notes

omarchy debug --no-sudo --print is not available in 4.0.2-2 (Unknown Omarchy command),
so no debug log is attached; the system details above come from uname -r,
omarchy version and hyprctl version.

Activity

  1. cb2206 commented on Oct 8, 2026

    @cb2206

    This is fixed on quattro since 4.0.3rc1. #377 changed the Apple lid-close bind to omarchy-system-lid-close, and omarchy-hw-laptop-closed now reads logind's LidClosed. The report is from 4.0.2-2.

    Checked on a 14" MacBook Pro (M1 Pro, apple,j314s), omarchy-mac 4.0.3rc4, Hyprland 0.56.2:

    • With logind's lid handling inhibited, so only the bind can act, omarchy-system-lid-close ran 68 ms after the lid closed, and the session was locked and secure 1.2 s later.
    • A normal lid close was locked before the s2idle suspend, and the lock screen was showing on resume.
    • A lid close with an external display attached didn't lock or suspend, and eDP-1 was turned off (clamshell).

    Updating to 4.0.3rc1 or later should fix it. I think this can be closed.

  2. marceloid commented on Oct 8, 2026

    @marceloid
    Author

    Closing issue. I'll test again in 4.0.3 and report back if the problem happens again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions