Skip to content

Disable MacBook10,1 BCM4350 wakeup through S3 - #10314

Closed
Skeptomenos wants to merge 1 commit into
omacom:quattrofrom
Skeptomenos:feat/macbook10-wifi-wakeup
Closed

Skeptomenos wants to merge 1 commit into
omacom:quattrofrom
Skeptomenos:feat/macbook10-wifi-wakeup

Conversation

@Skeptomenos

@Skeptomenos Skeptomenos commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Guarded on DMI MacBook10,1 and PCI 14e4:43a3 (BCM4350). ACPI leaves Airport (ARPT) armed as a wake source, which keeps the radio powered for the whole S3 sleep.
  • Disable PCI power/wakeup on that device (udev + a boot/resume oneshot that also toggles ARPT if it is still enabled). Existing installs pick this up through a migration.
  • Does not change lid-close to hibernate. Hibernate on this chassis never reached S4: the lock screen came up and applespi stopped delivering keyboard and trackpad events. Lid stays suspend. The leaf removes a leftover hibernate-on-lid drop-in if one is present.

Test plan

  • bash test/shell.d/macbook10-sleep-drain-test.sh (pass)
  • Live on MacBook10,1: acpi_arpt=disabled, 0000:02:00.0 power/wakeup=disabled, ARPT *disabled after apply and after reboot
  • HandleLidSwitch remains suspend
  • Confirm the leaf is a no-op off MacBook10,1 (guard)
  • omarchy update on an existing MacBook10,1 runs the migration and enables the oneshot

Airport stays armed as ARPT, which holds the radio up for the whole suspend. Do not follow S3 with hibernate on this chassis: that path hung with a dead SPI keyboard.

Co-authored-by: Cursor <[email protected]>
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks @Skeptomenos. This was reviewed by Claude Opus 5.5 and, as a second opinion, Codex Medium, and two fixes were needed that omabot could not push to your branch (GitHub refused the push to Skeptomenos/omarchy), so your commit is carried forward unchanged with them on top.

  • install/hardware/apple/fix-macbook10-sleep-drain.sh wrote ExecStart=$drain_bin and exec "$drain_bin" through unquoted heredocs, baking ${OMARCHY_PATH}/bin/... into a unit and a sleep hook that root runs on every boot and suspend. On a dev-linked install that path is a checkout the user owns, so it becomes a way to run code as root, and it survives omarchy dev unlink. The repository's test/shell.d/privileged-heredoc-test.sh fails on it. Both now run /usr/bin/omarchy-hw-macbook10-sleep-drain, the copy the package installs.
  • The leaf deleted /etc/systemd/logind.conf.d/30-macbook10-suspend-then-hibernate.conf and /etc/systemd/sleep.conf.d/30-macbook10-hibernate-delay.conf and reloaded logind. Omarchy has never shipped either file, so on anyone else's machine the only match would be one an administrator wrote. That cleanup is gone, and the test now checks that setup removes nothing and does not reload logind.

Both fixes were tested by mutation on a disposable Omarchy worker: the new assertions fail against your version of the leaf and pass with the fixes. ./test/cli passed, and so did ./test/shell apart from ascii-test and branding-about-animation-test, which fail the same way on quattro. Codex re-reviewed the two fixes and found nothing further. Codex agreed with the first fix, and it raised the second as a defect too. Its reviews were not guaranteed to be independent of this one.

Still open for the maintainer: the stubbed tests cannot show the drain actually drops, so this waits on a MacBook10,1 owner other than the author confirming it at the new head. Two smaller points: omarchy-hw-* commands are hardware predicates that return exit codes, and this one changes system state instead, so its name doesn't fit that group. And the udev rule, boot unit and sleep hook overlap; the sleep hook alone, run before each suspend, may be enough.

Continued in #14020.

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

Labels

bug Something isn't working compatibility Make Omarchy work better on everything!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants