Skip to content

Add opt-in MacBookPro13,3 sleep and Touch Bar recovery suite - #14894

Draft
aldervale wants to merge 2 commits into
omacom:quattrofrom
aldervale:fix/macbookpro13-3-keyboard-integration
Draft

aldervale wants to merge 2 commits into
omacom:quattrofrom
aldervale:fix/macbookpro13-3-keyboard-integration

Conversation

@aldervale

@aldervale aldervale commented Oct 10, 2026 •

Copy link
Copy Markdown

October 20 status — this remains a draft of the earlier combined proposal.

Replacement code contributions are being split into atomic keyboard/source, companion packaging and opt-in sleep changes. They will wait for complete applicable tests and attended installer/removal validation. This PR's code has not been replaced by those branches.

Since the original proposal, a locally packaged T1Bridge #47 driver has restored Touch Bar/Fn in seven observed recoveries with the separate unpark hook disabled. A local kernel carrying ACPICA #1235 / omarchy-pkgs #544 reduced visible wake from 17–18 seconds to about one second / nearly immediate in two attended tests; a third recovery passed without a numerical timing. Severe battery depletion remains unresolved. These driver/kernel results do not validate this PR's combined installer or the exact downstream kernel package recipes.

Latest progress and test gates · Current roadmap and upstream reports · Battery investigation

Original combined proposal (historical scope and validation)

On MacBookPro13,3 (2016 15-inch T1), the Touch Bar worked at startup but remained dark after sleep while touch input still worked. Lid wake also needed EC wake handling and a guarded Thunderbolt lifecycle. This contribution brings that tested combination into an opt-in Omarchy setup, alongside the SPI keyboard classification fix and a guide covering the complete Wi-Fi/audio/NVMe/T1 setup.

What this includes

Component Contribution
Sleep and lid wake Model-restricted EC wake module, DKMS installation, s2idle policy, peripheral/controller checks, Thunderbolt unload/reload and saved pm_async restoration
Touch Bar resume Validated HID park/unpark sequence after successful suspend and controller cleanup; one write, identity/descriptor checks, readback and a bounded timeout
Setup and removal `omarchy setup macbookpro13-3 check
Keyboard/touchpad Vendor-zero Apple SPI keyboard quirk for internal-keyboard pairing, with model-scoped hardware setup and a migration
NVMe Included sysfs-based helper and explicit instructions to correct the previous GPU-targeting service; separate from automatic setup because the setting's necessity on this Samsung-equipped model is unproven
Wi-Fi, audio and T1 startup Integrated manual covering the original projects, tested revisions, device-specific configuration, root-owned audio DKMS source, signed T1Bridge packages and conditional attended firmware recovery

Only the keyboard classification is installed through the normal hardware/migration path. The suspend and Touch Bar workaround requires explicit opt-in. The guide retains third-party packages and firmware recovery as prerequisites; no third-party installer is downloaded/executed by the setup command and no firmware is redistributed. Personal follow_mouse policy and PAM remain user-controlled.

The combined installer replaces two separate installers (119 lines versus 159), includes the sleep policy in installation/removal, refuses existing community installations or competing hooks, and verifies effective recovery order and sleep settings. Existing working installations are not automatically converted. The recovery payload retains GPL-2.0-only in a separately licensed directory, including its LICENSE and provenance; maintainer review of that packaging boundary is needed.

Evidence and limits

  • On the owner's MacBookPro13,3, four automatic lid cycles restored visible Touch Bar output and Fn switching, including a cycle after a full reboot. Tested runtime: Omarchy 4.0.4-1, kernel 7.2.5-3-omarchy, T1Bridge 0.1.12-1 and t1bridge-omarchy 0.2.2-1.
  • Wake remains approximately 13 seconds. Two kernel traces recorded 12.684/12.690 seconds of noirq resume, dominated by two Alpine Ridge bridge callbacks. The Touch Bar hook took approximately 0.74 seconds using a different timing boundary. No wake-performance improvement is claimed.
  • Undocked only. External USB, Thunderbolt or display attachments cause suspend to be refused; a closed laptop can remain awake. Battery retention, long sleeps and external-port function after resume remain unvalidated.
  • Libinput 1.31.3's stock database missed this vendor-zero keyboard; an isolated candidate database returned AttrKeyboardIntegration=internal. Extended typing validation remains pending; physical clicks are a separate issue.
  • The underlying hardware sequence has these recorded results. The new combined installer has fixture coverage but has not been installed or physically tested on the owner's working machine. It remains a draft for attended validation and maintainer review.

Software validation

  • 34 isolated recovery, installer, command-dispatch and NVMe-targeting tests pass. Coverage includes wrong models, peripherals, missing controller bindings, failed preparation/cleanup, HID identity/report errors, no retry after a failed write, administrative edits, manifest substitution, partial installation rollback, failed systemd queries, policy conflicts and hook ordering.
  • Keyboard install/migration regression, libinput quirk parsing, Omarchy CLI suite, shell syntax, local documentation links and systemd directive verification pass.
  • EC module builds with W=1 against 7.2.5-3-omarchy. No module installation/loading or live suspend was performed for these checks.
  • The earlier aggregate ./test/all run at the keyboard-only commit 2f600b0 passed CLI but reported 19 failures among 370 shell files, plus headless skips. Missing companion package sources and sandbox/UI restrictions affected that run; one socket-related test passed outside the sandbox. The expanded revision has the focused/CLI checks above; a green full aggregate is not claimed.

The repair repository contains the evidence, limitations and original provenance. Related upstream work includes NVMe #11624, NVMe #12687, S3 Thunderbolt #11570, Wi-Fi #7671, T1Bridge integration #12690 and T1Bridge resume issue #18. These overlap in parts; this PR does not claim to supersede their different model/sleep-state coverage. The firmware recovery, runtime, audio and board-template authors are credited in the guide.

@aldervale aldervale changed the title Pair the MacBookPro13,3 SPI keyboard for typing suppression Add opt-in MacBookPro13,3 sleep and Touch Bar recovery suite Oct 10, 2026
@jandrusk

Copy link
Copy Markdown

Large opt-in MacBookPro13,3 sleep/Touch Bar suite (still draft). Related hardware PRs: #7196, #11570, #10758, #12211, #12119 (IOMMU).

Please keep draft until install/DKMS/Touch Bar recovery have been exercised on real 13,3 hardware, and until it is clear this shouldn’t conflict with the other T1 sleep PRs. Happy to do a deeper pass when it is unmarked draft.

@aldervale

Copy link
Copy Markdown
Author

Yup, got it - thanks for the review and pointers. I’ve been testing the current fixes on my own MacBookPro13,3. Touch Bar recovery and Fn switching have worked through four lid cycles, including after a full reboot. Wake still takes approximately 13 seconds, and battery drain during sleep remains unresolved.

I think that this needs to become smaller, atomic PRs. I’ve also reviewed #7196, #11570, #10758, #12211, and the IOMMU issue #12119. They cover different models, sleep modes, and policies, so I’ll check compatibility explicitly. I haven’t tested those combinations on this machine yet.

After reviewing #10825 and standardagents/t1bridge#47 and standardagents/t1bridge#49, my next step is an attended test of standardagents/t1bridge#47, with my userspace Touch Bar unpark hook disabled so it cannot mask the result. I’ll retain the existing sleep recovery sequence for that test.

If the driver fix handles Touch Bar recovery reliably, I’ll contribute the 13,3 results upstream and retire the separate userspace hook. I’ve already prepared smaller local changes for keyboard classification/packaging and sleep recovery. Separately, omacom/omarchy-pkgs#544 looks relevant to the slow wake and warrants investigation on this model.

I’ll keep this PR in draft while the packaged installer, DKMS, and recovery paths are validated on the hardware. Replacement PRs will wait until all applicable tests pass. I’ll report the hardware results and compatibility findings here before marking anything ready for review.

@aldervale

Copy link
Copy Markdown
Author

Progress update, October 20: the attended driver/kernel tests have moved this forward, while the replacement Omarchy code PRs remain gated.

  • Touch Bar: I built and locally packaged T1Bridge #47 at d43d2c5. Seven directly observed sleep/resume cycles restored visible icons and Fn with my separate userspace unpark hook disabled, including packaged reboot validation and two 15-minute battery sleeps. Earlier aborted live-swap attempts are documented separately, not counted as passes. I am holding the additional display-hook PR in favor of upstream driver recovery.
  • Wake latency: a separate 7.2.5-3-omarchy-acpi-trial kernel carrying the correction from ACPICA #1235 / omarchy-pkgs #544 passed three attended recoveries across two boots. The first two woke in about one second / nearly immediately, versus the previous 17–18 seconds; the third passed without a numerical timing. This is a build of the patch on my existing recipe, not validation of Remove default scaling as most people do not have high resolution screen. #544's exact newer package recipes or BORE variant.
  • Battery: this is still a material unresolved issue. History shows nearly full to 0% across about five hours of confirmed closed-lid suspend. Automatic short-test sampling exposed abrupt charge-estimate changes, so I cannot yet give a reliable sleep-power figure. The emergency suspend-then-hibernate path also needs separate validation.

The EC lid-wake and guarded Thunderbolt cleanup remain in use, undocked only. Returned controller bindings do not establish working external ports. These results do not validate the combined or split Omarchy installers.

The atomic plan remains: separate keyboard classification and companion package ownership, then opt-in sleep recovery after its own checks and attended installer/removal tests. Resume latency and Touch Bar evidence are going to their existing upstream PRs rather than duplicating those changes. Battery retention/critical-power handling now has its own investigation.

This PR stays a draft. The last complete baseline used Omarchy 77bfaca / packages 7aa7343: after environment-specific reruns, three baseline failures remained (Grok assertion, package removal lifecycle, polkit ownership). That is not a claim about today's upstream head. Each final atomic branch still needs a complete passing applicable suite, package checks and its required hardware validation before submission; skipped or absent checks do not count as passes.

I've published the current roadmap and detailed evidence. The earlier combined proposal is retained here for context, not presented as the tested new installation.

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.

2 participants