Skip to content

Cover BCM4388 in Wi-Fi resume and gate it on omarchy-hw-platform - #529

Merged
maralcbr merged 9 commits into
quattro-upstreamfrom
mac/38-wifi-resume
Sep 25, 2026
Merged

maralcbr merged 9 commits into
quattro-upstreamfrom
mac/38-wifi-resume

Conversation

@maralcbr

@maralcbr maralcbr commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Ticket 38 of the Apple Silicon convergence plan. Stacked on #514 (mac/13-hw-platform); retarget to quattro-upstream once that merges.

What changed

  • omarchy-mac already owns the iwd backend (/usr/lib/NetworkManager/conf.d/20-omarchy-mac-wifi.conf) and the resume recovery; mx-mac's inline wifi_backend.conf write stays only on the frozen fork. omarchy-mac-setup-system and the recovery gate (lib/wifi-supported, the unit's ExecCondition) now ask omarchy-hw-platform directly. Setup exits on other platforms and fails when the detector fails, rather than reading a contradiction as "not a Mac".
  • The legacy /etc/NetworkManager/conf.d/wifi_backend.conf still retires only as a regular file byte-identical to what mx-mac, Run Omarchy on Apple Silicon under Asahi Linux omarchy#9835 and omarchy-upgrade-to-quattro wrote. Edited copies and links stay and keep precedence. A changed .omarchy-mac-retired backup now stops setup with a message naming it instead of a bare exit 1.
  • Recovery covers BCM4388 (14e4:4434, M2 Pro/Max), following fix(wifi): cover BCM4388 in Wi-Fi resume recovery #465 as triaged in docs: triage Apple Silicon fixes open against quattro #521. The recovery command is unchanged and does nothing when Wi-Fi returns within 12 s.
  • Migration 1790327076 runs omarchy-setup-mac --system on Apple Silicon Macs with BCM4388, whose earlier setup skipped the chip. It stays pending if detection fails or the installed add-on predates this change, so the add-on pin carrying this commit has to publish with or before the runtime. packages/omarchy-mac/version is left at 0.1.0 for the release pin to decide.
  • test/manual/wifi-resume-check.sh is the before/after check for the hardware criterion.

Bluetooth #498 and #380 are not included. #380 changes the generic omarchy-bluetooth-power, which is identical upstream, so it belongs on omacom/omarchy (next to omacom#12753). #498 is a separate Apple recovery (hci_bcm4377 rebind, BCM4378/BCM4387, upstream bug still open) with its own gate and hardware check; the M2 Max's BCM4388 Bluetooth can't qualify it. It fits a separate Bluetooth resume ticket built the same way in packages/omarchy-mac.

Testing

  • packages/omarchy-mac/test/all passes as non-root in an aarch64 Arch container, with real systemctl --root for enablement. It covers the platform and chip matrix on fresh roots, detector failure, the exact legacy bytes retiring with a backup, four edited variants and a link surviving, the changed-backup stop, and BCM4378/4387/4388 recovery.
  • The new test/shell.d/apple-wifi-bcm4388-migration-test.sh drives the migration and the real omarchy-migrate runner: it stays pending on an old add-on and completes after the update. Negative controls: the old gate and setup fail the new package tests; dropping the pending check or widening the chip gate fails the migration test.
  • ./test/all as non-root in the same container with the CI package set shows the same failures as untouched mac/13-hw-platform (config, hermes-remove, snapper, system-sleep-ownership). snapshot-restore-test.sh also failed once; it fails 1 in 3 standalone runs there and is unrelated.
  • The manual check passes 13 stubbed scenarios (healthy, reload then reconnect, no resume and its report, failed or missing recovery run, Wi-Fi down, traffic over Ethernet, generated/edited/linked legacy file).
  • Not run on hardware. Read-only inspection of the M2 Max: BCM4388, iwd backend, and a wifi_backend.conf byte-identical to the retired file. Acceptance on the converged image (ticket 25): copy the script to /var/tmp, run before from a local session, close the lid for at least five minutes, wake, run after.

Second review: three rounds on the change fixed the migration's detection-failure path, a test gap and quoting. A separate pass on the reworked manual check fixed a silent failure path and two races after wake.

…tector

BCM4388 (M2 Pro/Max) wedges on lid-close resume like BCM4378/BCM4387, so the
recovery now covers it. Setup and the recovery gate ask omarchy-hw-platform
directly, and setup fails when the detector does instead of reading that as
another platform. A changed retired backup now stops setup with a message
rather than a bare exit status.
Setup skipped BCM4388 until now and marks nothing when it does, so existing
M2 Pro/Max installs need setup to run again. The migration runs system setup
only on Apple Silicon Macs with that chip, and stays pending while the
installed add-on still predates it.
A detector or lspci failure read as other hardware, so the runner marked the
migration done without enabling recovery. Each platform and chip case is now
checked on its own.
Run on the Mac around a lid-close suspend: it checks the iwd backend, the
retired legacy file and recovery enablement, then that recovery ran for the
resume and Wi-Fi came back.
…esume

A failed suspend, an unfinished recovery run, another connected adapter or an
administrator symlink could decide the result. The check now waits for the
recovery run after the latest real resume, routes through the brcmfmac
interface and establishes the same connectivity baseline before suspend.
…reconnect

Look up the Broadcom interface only after recovery finishes, retry routing,
connectivity and DNS after the reconnect, and report a missing resume instead
of stopping silently when journalctl finds no match.
@maralcbr
maralcbr changed the base branch from mac/13-hw-platform to quattro-upstream September 25, 2026 09:44
@maralcbr
maralcbr merged commit 88df1a0 into quattro-upstream Sep 25, 2026
5 checks passed
maralcbr added a commit that referenced this pull request Sep 25, 2026
Brings in the password sync (#532), audio (#535), display (#533), Wi-Fi
resume (#529) and battery charge limit (#525) work.

omarchy-drive-password takes #532's version. It already carries what #503
added (no tracing, the new password over stdin), and it has no Apple branch.
#503's drive-password-apple-test.sh asserted that the disk password never
changes the login or root password, which ticket 19 replaced with a
journaled LUKS-first sync for the system disk; drive-password-test.sh covers
the shared behaviour, so the Apple copy goes.
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