Repository navigation
Stop the Broadcom Wi-Fi quirk breaking Apple Silicon Macs - #7577
thejamescollins wants to merge 7 commits into
Conversation
Two of the brcmfmac PCI IDs this gates on are Apple Silicon parts: BCM4378 (4425) and BCM4387 (4433). There the firmware offload is the half that works. Disable FWSUP and FWAUTH on a BCM4387 and it never gets past authentication. wpa_supplicant reports "FT: Invalid key management type (2)", the firmware wedges in brcmf_msgbuf_query_dcmd timeouts, and the machine has no Wi-Fi at all. Reproduced on a MacBookPro18,2 running Asahi. It reports Apple Inc. through DMI like any other Mac, so both halves of the gate matched it. The gate tests the architecture now. Pruning those two IDs was the other way, but the list is brcmfmac's own, copied out of brcm_hw_ids.h, and a pruned list stops matching its source. BRCM_PCIE_4388_DEVICE_ID is already sitting in that header.
The migration repeats the install leaf's gate, so on a BCM4387 it writes the option that leaves the machine with no Wi-Fi (omacom#7439). Its marker is per-user, so it is still pending for anyone who has not run it. Letting it write the option and having a later migration take it back off would mean shipping a known-broken write first.
Neither guard helps a machine that already has the option on disk, and that machine has no Wi-Fi to pull the fix over. Ownership is the whole comment-plus-option block the leaf wrote and the earlier migration appended, matched byte for byte. A line the user merged other options onto, a commented-out copy, or any hand-written variant no longer matches, and those stay: deleting by pattern would have taken a user's roamoff=1 with it, or retired a file Omarchy never wrote. The rewrite goes through tee, which writes through a symlinked config where sed -i would have replaced the link with a regular file and left the target still broken. The reboot request lands before the edit, so an interruption costs a spare reboot prompt rather than an edited config nothing asks to apply. Reading the file through sudo makes a root-only config fail the migration loudly and retry, rather than reading as empty and burning the once-per-user marker.
There was a problem hiding this comment.
Pull request overview
Restricts the Broadcom Wi-Fi workaround to Intel Macs and repairs affected Apple Silicon installations.
Changes:
- Adds
x86_64guards to installation and migration paths. - Adds a cleanup migration for existing Apple Silicon systems.
- Expands shell coverage for architecture gating and cleanup behavior.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
install/hardware/apple/fix-brcmfmac-supplicant.sh |
Limits the workaround to Intel Macs. |
migrations/1786391100.sh |
Prevents applying the workaround on Apple Silicon. |
migrations/1787163407.sh |
Removes Omarchy-owned workaround configuration from affected systems. |
test/shell.d/brcmfmac-supplicant-test.sh |
Tests architecture guards and cleanup scenarios. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Skipping x86_64 left the cleanup in scope on every other architecture, where the leaf and migrations/1786391100.sh both name x86_64 to opt in. Nothing could come of it, since reaching the removal also takes an Apple Wi-Fi part and a config only Omarchy writes, but the three gates should read the same way and each say which machines it is for.
|
This fix has been merged into the Omarchy-Mac project: |
|
Reviewed, nothing found that would bite a user. This is waiting on the maintainer — nothing here needs anything from you. Most of the attention went to The destructive path was walked against every shape those two writers can produce: block alone, blank line plus block, user lines plus blank plus block, and only-blank-lines plus block. The Two things ran on a disposable VM rather than being read. Two shapes the suite does not cover were exercised directly against the real migrations. Chaining Also checked: Codex reviewed it independently at xhigh, pinned to
One note for the record rather than for you: |
The cleanup only recognised Omarchy's block as the whole file or its tail, so an Apple Silicon Mac where anything had been added below the block since kept feature_disable=0x82000 and its broken Wi-Fi, while the migration exited cleanly and was marked done. The block is still the ownership test; it is now matched on whole lines wherever it appears, and what surrounds it is kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
With 4488 the cleanup exited at the PCI ID gate and never reached the architecture check the assertion is named for, so deleting that check left it passing. BCM4378 spans the T2 era too, so 4425 on x86_64 is a real machine and exercises the check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
migrations/1786391100.sh checks for the option with an unprivileged grep, so on a root-only config it appends the block again for each user who runs it. The cleanup removed only the first copy and the one left behind kept the Wi-Fi broken. The merged-options test now starts from Omarchy's own comments, so it reaches the whole-line check it is there to guard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
Reviewed again, and three commits are pushed to your branch; the head is now What changed on your branch. Two gaps in
The tests cover both cases. The Intel assertion now uses What ran, on a disposable Omarchy VM. A reproduction of my own, independent of your suite, stubs an aarch64 Apple machine with What that does not prove. The worker is x86_64 with no Broadcom part, so none of this shows that dropping the option restores association on a BCM4387. That rests on your report and on @bodhiblues' in #7439, on another BCM4387 running the same Second opinion. Codex at medium effort reviewed the change twice. It is not guaranteed to be independent, because it can read this machine. In the first round it found both the duplicate-block gap and the merged-options test gap, which is where the last commit came from. In the second round, pinned to Competing fix. #13024 fixes #7439 as well, by removing |
|
Closing as out of scope: Omarchy now supports only installs made from the official Omarchy ISO, and this change exists for Apple Silicon, which the ISO doesn't produce. We aren't taking on code paths for setups outside that, because nobody here can test or maintain them. The community-maintained omarchy-mac project is the place for Apple Silicon work. Thanks for the work that went into this. (Checked by Claude Opus 5.5; no second review.) |
install/hardware/apple/fix-brcmfmac-supplicant.shwritesoptions brcmfmac feature_disable=0x82000for any Apple machine whose Wi-Fi PCI ID appears in the list taken frombrcm_hw_ids.h. Two of those nine IDs are Apple Silicon parts:4425(BCM4378) and4433(BCM4387).On a BCM4387 the option does the reverse of its job. The machine cannot associate with a WPA2/WPA3 transition-mode AP at all. wpa_supplicant reports
FT: Invalid key management type (2), authentication times out, and the firmware then wedges inbrcmf_msgbuf_query_dcmdtimeouts until the driver is reloaded. Without the option the same machine joins the same AP normally.#6652 named this risk when it derived the list: "The chip-ID list is derived, not tested." Asahi reports
Apple Inc.through DMI like any other Mac, so both halves of the gate matched.What changes
The leaf names
x86_64rather than pruning the two IDs. That keeps the list brcmfmac's own, so the next ID copied out ofbrcm_hw_ids.hcannot bring this back.BRCM_PCIE_4388_DEVICE_IDis already sitting in that header.migrations/1786391100.shrepeats the same gate, so it gets the same guard.migrations/1787163407.shtakes the option off machines that already have it, which neither guard can help. Ownership is the comment-plus-option block both writers produce, matched byte for byte, so a merged options line or a hand-edited config is left alone. The rewrite goes throughtee, which writes through a symlinked config wheresed -iwould replace the link. The reboot request lands before the edit. It namesaarch64, so no other architecture is in scope.Verification
test/shell.d/brcmfmac-supplicant-test.shgrew to 26 assertions, withunamestubbed per case alongside the existinglspciandsudostubs. Reverting either guard fails the suite../test/shellshows no new failures.Reproduced on a MacBookPro18,2 (M1 Max,
14e4:4433, Asahi,linux-asahi 7.1.6) against a UniFi mesh in WPA2/WPA3 transition mode, under NetworkManager, iwd and a standalone wpa_supplicant.BCM4378 is untested: I have no M1 to check it on. It sits behind the guard because shipping an untested flag on untested hardware is the thing worth avoiding. Say the word and I will narrow it to
4433alone.Fixes #7439