Skip to content

[Intel Mac P04] Consolidate lid handling and display classification - #12682

Draft
andrew-boyd wants to merge 2 commits into
omacom:quattrofrom
andrew-boyd:intel-mac/p04-lid-handling
Draft

andrew-boyd wants to merge 2 commits into
omacom:quattrofrom
andrew-boyd:intel-mac/p04-lid-handling

Conversation

@andrew-boyd

@andrew-boyd andrew-boyd commented Sep 20, 2026 •

Copy link
Copy Markdown

[Intel Mac P04] Consolidate lid handling and display classification

Use #10713's verified active-external-display lid-lock component as an accepted provisional consolidation draft. Retain existing logind sleep ownership. Connector identity, real USB displays and debounce remain documented future work; all competing sources are preserved.

Draft consolidation for source review and hardware-owner follow-up. Known defects remain; no hardware or merge-readiness certification is claimed. Part of the 14-feature Intel Mac series with three package companions.

Contribute: open follow-up PRs in andrew-boyd/omarchy with base intel-mac/p04-lid-handling. Use [Intel Mac P04] in the title and a contributor branch such as intel-mac/p04/describe-change. Link this feature in the series index. Merging a follow-up into this branch updates its roll-up.

This existing draft: #12682.

Full Intel Mac scope and current revision

The project covers all 64-bit Intel Macs: pre-T1, T1 and T2. MacBookPro13,3 is only the first available physical test machine. Each feature has its own hardware boundary; one model's success does not validate the rest.

Candidate head: a21829e80e6ecc3ef751a98863030a0314e98a2f; reconciled upstream: 8f324c90b82790d31ab33565441e07cbdb8d2308. Published contribution commits and author/co-author metadata remain in the history.

Ready for attended physical testing; Mac hardware remains untested by this effort. The reconciled combined ISO passed fresh unencrypted/encrypted VM installations, desktop/password-lock checks, strict Neovim startup/theme checks, synthetic Apple EFI preservation through a disk wipe, and affected package/DKMS/migration checks. ISO SHA-256: 9e6288ef5cc1eadce519cdd7384c8030286eb938a6288eb218f025a61b433252.

Exact sources, results, retained failures and reproduction. These results cover the pinned combined image; standalone-versus-combined differences remain explicit. Full inventory and retained work tracks.

Scope and dependencies

The accepted code remains the lid-lock component. Lid-open brightness, lock-resume focus, debounce and controller recovery remain explicitly distinct follow-ups; sources reported on MacBook10,1, T1 and T2 systems all remain visible.

The inventory now records 188 source/context PRs: 101 have dispositions in feature tables and 87 remain only in separate work tracks. This is not 188 implemented PRs or 188-to-14 compression. The 14 feature PRs and three package companions remain the published coordination targets; retained backlog is not claimed complete.

Every affected source PR and recommended action

Current open/closed/merged state is administrative history, not proof that two patches preserve identical behavior. Included/partial identifies selected contributions; alternatives, deferred work and context are not automatically ISO content.

Source and author State Treatment and rationale Recommended action
omacom/omarchy#10462 — @codemonkey76 closed alternative: Existing lid-open display wake differs from the reported local lock-IPC variant; complete source preserved, not stacked with #12210. Already closed; retain evidence and credit. No action requested.
omacom/omarchy#10713 — @yashranaway open included: Complete existing lid-lock decision using active external displays; logind ownership unchanged. Accepted as a provisional consolidation target; connector identity and debounce remain future work. Consider closure only after maintainers accept preserved behavior and hardware coverage.
omacom/omarchy#11516 — @hanscnelson open alternative: Blanket USB connector exclusion also excludes real USB displays; preserve reproduction and full source for identity work. Retain for comparison; do not stack competing implementations automatically.
omacom/omarchy#11570 — @bjhinkle open alternative: MacBookPro14,2 bundle combines Wi-Fi module reload with Thunderbolt removal/rescan, backed by model-specific cycle reports. Keep both ownership boundaries visible; do not stack its Wi-Fi hook with P10 or imply P04 fixes Thunderbolt recovery. Retain for comparison; do not stack competing implementations automatically.
omacom/omarchy#12210 — @ijt open alternative: Broader debounce/logind policy remains separate: stale-PID termination, 20-second model delay and missing installed wake hook are documented. Retain for comparison; do not stack competing implementations automatically.
omacom/omarchy#12435 — @jonathan-downs open alternative: Existing logind-resume IPC/focus implementation; lacks the suggested lid-to-IPC call and overlaps P12's lock service. Retain for comparison; do not stack competing implementations automatically.
omacom/omarchy#12502 — @mohan314e open context: Keyboard-state restoration and lock resume-gap work; does not implement Touch Bar identity or debounce. Keep the original as its review/test target; no closure recommendation here.
omacom/omarchy#12614 — @dexteresc closed superseded: Closed in favor of #12652 to correct commit attribution; preserve the original source and exact production comparison. Already closed; retain evidence and credit. No action requested.
omacom/omarchy#12616 — @HritwikSinghal open alternative: Virtual-output filtering preserves physical outputs but does not identify Touch Bar hardware; source tests retained. Retain for comparison; do not stack competing implementations automatically.
omacom/omarchy#12634 — @RenanBezerraGuima open context: Foreground display wake with asynchronous keyboard/clamshell restoration; different trigger and scope from lid policy. Keep the original as its review/test target; no closure recommendation here.
omacom/omarchy#12652 — @dexteresc closed alternative: Window-event focus recovery for an already active lock surface; separate from #12435's logind monitor and #9181's resume/PAM retry ownership. Preserve as a follow-up; not stacked into accepted fingerprint work. Already closed; retain evidence and credit. No action requested.
omacom/omarchy#7146 — @mkelk open alternative: Complete clamshell-overlay proposal replaces its former parser, changes external-active truth/unknown handling and modifies the watcher shared with P05. Retain separately; it is not the accepted P04 lid-lock component or P05 filtering patch. Retain for comparison; do not stack competing implementations automatically.
omacom/omarchy#8560 — @robouk open alternative: Upstream-selected successor when #9181 was closed. Its active-focus callback is a smaller implementation than explicit resume signaling, output recreation and bounded retries. Keep the difference visible; closure does not establish complete behavioral equivalence. Retain for comparison; do not stack competing implementations automatically.
omacom/omarchy#9181 — @ClGratton closed alternative: Broader FocusScope/focus-generation recovery changes the sleep monitor, explicit resume IPC and post-PAM retry policy. Preserve separately from #12652 and #12435; no mixed focus ownership is invented. Already closed; retain evidence and credit. No action requested.
omacom/omarchy#9211 — @phedoreanu open alternative: Shared lock wake and wake-key consumption proposal, reported on MacBookPro16,1. It uses wall-clock polling and changes password-key handling; retain alongside the explicit resume/focus alternatives instead of stacking competing wake owners into the accepted lid-lock/fingerprint components. Retain for comparison; do not stack competing implementations automatically.
omacom/omarchy#9637 — @fresh3nough open deferred: Existing MacBook10,1 lid-open brightness restoration, now the upstream-selected successor to closed #10462. The current lid-lock component does not implement it. Keep its complete patch as the lid-open follow-up; reconcile lock timer ownership described on #10462 before combining it with the resume-IPC alternatives. Keep the original as its review/test target; no closure recommendation here.

Validation and attribution

Required fresh-image checks are satisfied, with qualified reruns. The full source suite passed 273 files with two disclosed skips, but repeated NetworkManager Polkit failures during that suite temporarily locked its test account. The following password/desktop/recovery checks failed there and passed separately in a clean overlay of the same ISO; the original aggregate remains failed. The first build attempt also failed one libfprint USB-emulation test; unchanged-source isolated repeats, two complete suites and normal package checks passed afterward. That intermittent build-test failure remains documented, and its cause is not established. VM fixtures and DKMS builds do not establish physical device behavior. Physical Wi-Fi, audio, camera, Touch Bar, fingerprint, graphics and suspend behavior remain unverified by this effort.

Original source histories remain linked above. Source-authored commits already included in the roll-ups remain ancestors of this revision; additional copied contributions receive native attribution. Original attribution mapping. No original PR is edited or closed by this effort.

Consolidate existing source contributions for draft review.
Original implementation authors are retained as author/co-authors; the committer assembled and reconciled the candidate. No contributor approval or sign-off is implied.
Known defects and excluded alternatives remain documented in the PR body.

Source-PR: omacom#10713
Source-Commit: omacom#10713a833373
@hanscnelson

Copy link
Copy Markdown

Hardware-owner note from MacBookPro14,2 (T1 iBridge, not T2), Omarchy 4.0.4, T1Bridge 0.1.12. This is the machine behind omacom/omarchy#11516.

Device: Touch Bar DRM is card0-USB-1, always connected/enabled, ID_SEAT=seat-touchbar, driver appletbdrm. Hyprland never lists USB-1 as a monitor. Stock omarchy-hw-external-monitors still returns true with no HDMI/DP, so undocked lid-close skipped the lock.

Live, this laptop (local helper + current lid-close, not this branch):

  • Undocked lid-close: lock starts immediately. Stock helper would have skipped it.
  • Docked (LG ultrawide on DP-1): no lock, real clamshell, workspaces moved to the LG; lid-open restored eDP-1 and workspace 1 instantly.

On this roll-up’s lid-close change: asking Hyprland (omarchy-hyprland-monitor-external-active) instead of raw DRM matches those two cases. Right now, undocked, that helper is non-zero (only eDP-1); stock DRM helper is still “external present.”

Agreed that a blanket USB-* skip in omarchy-hw-external-monitors is too wide for a real USB display that Hyprland does use. 11516 was a helper-level workaround. Identity for a later filter: ID_SEAT=seat-touchbar / appletbdrm / DRM connector type USB on T1. We have not booted the intel-mac/p04-lid-handling tree.

Keep 11516 open for comparison as you already have it. No extra lid-sleep test from here (T1 bar stays dark after S3 until reboot; that is T1Bridge #18, not this helper).

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.

3 participants