Repository navigation
Apply the Broadcom Wi-Fi quirk to Macs without a T2 - #6652
Conversation
brcmfmac lets the Wi-Fi firmware run the WPA handshake itself, and on Apple hardware that offload fails against an access point in WPA2/WPA3 transition mode: the client associates, the four-way handshake never completes, and NetworkManager reports the password as wrong. feature_disable=0x82000 turns off the firmware supplicant and authenticator so wpa_supplicant does the handshake in software. That quirk already shipped, but only for Macs with a T2 chip. The bug is in the Broadcom firmware rather than in the T2 bridge, so it was never the right thing to gate on: a MacBookPro11,4 has BCM43602 with 2015 firmware, fails exactly this way, and got nothing. Gate on the hardware that actually has the firmware — an Apple machine with a Broadcom wireless part — which covers both. Moving it out of fix-t2.sh also leaves one owner for the file. Two leaves writing the same config would have meant the later one silently winning, decided by an ordering in all.sh nobody would think to check. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
Pull request overview
Extends the Broadcom Wi-Fi firmware workaround from T2 Macs to all applicable Apple hardware.
Changes:
- Detects Apple systems with Broadcom wireless controllers.
- Moves the
brcmfmacconfiguration into a dedicated hardware setup script. - Adds shell coverage for supported and excluded hardware.
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 no comments.
| File | Description |
|---|---|
install/hardware/all.sh |
Runs the new Broadcom workaround during hardware setup. |
install/hardware/apple/fix-brcmfmac-supplicant.sh |
Detects affected Macs and writes the module configuration. |
install/hardware/apple/fix-t2.sh |
Removes the T2-specific copy of the workaround. |
test/shell.d/brcmfmac-supplicant-test.sh |
Tests detection, exclusions, and configuration ownership. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (3)
install/hardware/apple/fix-brcmfmac-supplicant.sh:18
- The stated fix is to gate on an Apple machine with a Broadcom wireless part, but this condition still gates on T2 or one exact model. Consequently, every other pre-T2 Mac with the affected Broadcom hardware is skipped, while a MacBookPro11,4 with a replaced non-Broadcom card is still matched. Please detect both Apple hardware and the relevant Broadcom wireless device rather than hard-coding a single model, and apply the same predicate in the migration and tests.
if lspci -nn | grep "106b:180[12]" >/dev/null ||
[[ $product_name == "MacBookPro11,4" ]]; then
migrations/1786391100.sh:13
- This migration repeats the single-model predicate, so existing affected pre-T2 Macs other than MacBookPro11,4 will never receive the repair promised by the PR. Use the same Apple-plus-Broadcom hardware detection as the install-time leaf instead of limiting migration coverage to one DMI product.
if ! lspci -nn | grep "106b:180[12]" >/dev/null &&
[[ $product_name != "MacBookPro11,4" ]]; then
test/shell.d/brcmfmac-supplicant-test.sh:88
- This test encodes the opposite of the PR's Apple-plus-Broadcom requirement by asserting that every unlisted Mac is unaffected without checking its wireless device. Add Broadcom/non-Broadcom PCI fixtures and verify that any Apple machine with the affected Broadcom part is included while non-Broadcom Macs remain excluded.
# Every other Mac keeps the driver defaults until someone confirms the same
# failure on it.
run_leaf "MacBookPro9,2" 0 >/dev/null
[[ ! -f $test_tmp/etc/modprobe.d/brcmfmac.conf ]] ||
fail "an unlisted Mac is left alone"
ea06694 to
0232fba
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (3)
install/hardware/apple/fix-brcmfmac-supplicant.sh:18
- This gate does not match the PR’s stated Apple-plus-Broadcom detection: it still selects only T2 machines or the single
MacBookPro11,4model. Other pre-T2 Macs with the affected Broadcom/brcmfmac adapter remain skipped, so the advertised fix is incomplete. Detect both Apple hardware and the relevant Broadcom wireless device instead of hard-coding one product name, and update the migration and tests consistently.
if lspci -nn | grep "106b:180[12]" >/dev/null ||
[[ $product_name == "MacBookPro11,4" ]]; then
migrations/1786391100.sh:13
- The migration repeats the narrower model allowlist rather than the Apple-plus-Broadcom gate described by the PR. Consequently, existing installs on any affected pre-T2 model other than
MacBookPro11,4never receive the repair. Reuse the same Apple/vendor and Broadcom wireless detection as the install-time path.
if ! lspci -nn | grep "106b:180[12]" >/dev/null &&
[[ $product_name != "MacBookPro11,4" ]]; then
test/shell.d/brcmfmac-supplicant-test.sh:97
- This assertion codifies the opposite of the PR’s stated behavior by requiring every unlisted Mac to be skipped. The fixture does not model a Broadcom wireless device, so it cannot verify the intended Apple-plus-Broadcom gate. Add Broadcom-present/absent fixture state and cover an additional pre-T2 Apple model with Broadcom hardware rather than enforcing a one-model allowlist.
# Every other Mac keeps the driver defaults until someone confirms the same
# failure on it.
run_leaf "MacBookPro9,2" 0 >/dev/null
[[ ! -f $test_tmp/etc/modprobe.d/brcmfmac.conf ]] ||
fail "an unlisted Mac is left alone"
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Suppressed comments (2)
test/shell.d/brcmfmac-supplicant-test.sh:93
- The documented device list omits BCM4377, although the loop includes its
4488PCI ID and the production script identifies it as BCM4377. Include it so the test description matches the cases being exercised.
# Every Broadcom part brcmfmac drives, on a Mac with no T2 to detect: BCM43602
# and its single-band variants, BCM4350, BCM4355, BCM4364, BCM4378, BCM4387.
migrations/1786391100.sh:23
- This substring match treats a different value such as
feature_disable=0x820000as if the required0x82000bitmask were installed, so the migration exits and leaves the Wi-Fi failure unfixed. Match a complete, uncommented option token and value instead.
grep -Eq '^[[:space:]]*options[[:space:]]+brcmfmac[[:space:]].*feature_disable=0x82000' "$conf"; then
| mkdir -p /etc/modprobe.d | ||
| cat > /etc/modprobe.d/brcmfmac.conf <<'EOF' | ||
| # Broadcom's firmware supplicant and authenticator fail the WPA four-way | ||
| # handshake on Apple hardware, which surfaces as a rejected password. Disable | ||
| # both so wpa_supplicant performs the handshake instead. | ||
| options brcmfmac feature_disable=0x82000 | ||
| EOF |
Sniffing lspci for an Apple vendor with a Broadcom network controller made T2 Macs depend on a detection line they never needed: they carry a T2 PCI ID that is always there, and the class name half of `lspci -nn` comes from the pci.ids database. Keep their original gate untouched. Naming the rest by DMI model does not hold up either, because the model year does not predict the part. A MacBookPro11,4 from Mid 2015 carries a BCM43602 and needs this; a MacBookAir7,2 from Early 2015 carries a BCM4360 and does not. Covering the lineup by name takes around twenty identifiers across four product lines and grows every time Apple ships hardware. The set has an exact definition already: the PCI IDs brcmfmac binds, from the driver's own brcm_hw_ids.h. That reaches the 2016 and 2017 MacBook Pros and the T2-less iMac19,1 and iMac19,2 that a hand-written list missed, and it leaves out the BCM4360 Macs for free, since their out-of-tree wl driver would never read a brcmfmac option anyway. Matching an exact vendor:device ID also drops the piped `grep -q`, which returns 141 under pipefail once the producer is killed by SIGPIPE (omacom#6608). The test runs the leaf with pipefail so the chatty lspci stub proves it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The quirk is written at install time, so a machine set up before it shipped never gets it, and no pre-T2 Mac ever did. Those installs still fail the WPA four-way handshake against an access point in WPA2/WPA3 transition mode, which is the state the reporter had to repair by hand. Appending leaves anything else in the config alone: modprobe reads every options line for a module, and nothing else sets feature_disable. Only an active options line counts as already applied, and the driver keeps the old behaviour until it reloads, so this asks for a reboot rather than pulling brcmfmac out from under a connection that currently works. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
1eff356 to
0a8fc45
Compare
|
Thanks for tracking this down — the diagnosis is right, and splitting the quirk into its own leaf with a single owner is the correct shape. I've pushed two commits on top of yours rather than leave a pile of review notes. Here's what changed and why. The gate
The first is The second is that it made T2 Macs depend on a detection line they never needed. They carry a T2 PCI ID that is always present, whereas the class-name half of Naming the other machines by DMI model turned out not to work either, because the model year doesn't predict the part. So the gate is now the T2 PCI ID, or an Apple machine carrying one of the PCI IDs if lspci -nn | grep "106b:180[12]" >/dev/null ||
{ [[ $sys_vendor == Apple* ]] &&
lspci -nn | grep -E "14e4:(43ba|43bb|43bc|43a3|43dc|4464|4488|4425|4433)" >/dev/null; }; thenThat picks up two sets of machines the original missed: the 2016/2017 MacBook Pros ( Existing installsThe quirk only ran at install time, so it never reached a machine already running Omarchy — which is the situation you described repairing by hand. One thing worth confirmingThe chip-ID list is derived, not tested. Your reproduction is on a MacBookPro11,4; if you or anyone on the thread has an — 🤖 Claude, posting on behalf of @dhh |
linux-firmware ships brcmfmac43602-pcie.bin but not the board NVRAM, and without it the 43602 firmware's country detection breaks: only 2.4GHz networks appear, signal collapses, and the WPA 4-way handshake times out — which NetworkManager misreports as a wrong password (kernel bug 193121). Vendor the known-good NVRAM (Apple Boot Camp driver lineage, with ccode=0/regrev=1 to bypass the broken detection) and install it for Apple machines carrying a BCM43602 (14e4:43ba/43bb/43bc), at install time and via migration for existing installs. The live interface MAC is substituted in; the line is stripped when no MAC is discoverable. An existing NVRAM is never overwritten, and the migration marks reboot-required instead of reloading brcmfmac out from under the connection carrying the update. Verified on MacBookPro14,3: 5GHz networks appear, stronger signal and handshake completes instantly. Complements the firmware-supplicant quirk from omacom#6652, which was active on the affected machine but not sufficient on its own.
linux-firmware ships brcmfmac43602-pcie.bin but not the board NVRAM, and without it the 43602 firmware's country detection breaks: only 2.4GHz networks appear, signal collapses, and the WPA 4-way handshake times out — which NetworkManager misreports as a wrong password (kernel bug 193121). Vendor the known-good NVRAM (Apple Boot Camp driver lineage, with ccode=0/regrev=1 to bypass the broken detection) and install it for Apple machines carrying a BCM43602 (14e4:43ba/43bb/43bc), at install time and via migration for existing installs. The live interface MAC is substituted in; the line is stripped when no MAC is discoverable. An existing NVRAM is never overwritten, and the migration marks reboot-required instead of reloading brcmfmac out from under the connection carrying the update. Verified on MacBookPro14,3: 5GHz networks appear, stronger signal and handshake completes instantly. Complements the firmware-supplicant quirk from omacom#6652, which was active on the affected machine but not sufficient on its own.
* Apply the Broadcom Wi-Fi quirk to Macs without a T2 brcmfmac lets the Wi-Fi firmware run the WPA handshake itself, and on Apple hardware that offload fails against an access point in WPA2/WPA3 transition mode: the client associates, the four-way handshake never completes, and NetworkManager reports the password as wrong. feature_disable=0x82000 turns off the firmware supplicant and authenticator so wpa_supplicant does the handshake in software. That quirk already shipped, but only for Macs with a T2 chip. The bug is in the Broadcom firmware rather than in the T2 bridge, so it was never the right thing to gate on: a MacBookPro11,4 has BCM43602 with 2015 firmware, fails exactly this way, and got nothing. Gate on the hardware that actually has the firmware — an Apple machine with a Broadcom wireless part — which covers both. Moving it out of fix-t2.sh also leaves one owner for the file. Two leaves writing the same config would have meant the later one silently winning, decided by an ordering in all.sh nobody would think to check. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Gate the Broadcom Wi-Fi quirk on the T2 ID or a brcmfmac chip ID Sniffing lspci for an Apple vendor with a Broadcom network controller made T2 Macs depend on a detection line they never needed: they carry a T2 PCI ID that is always there, and the class name half of `lspci -nn` comes from the pci.ids database. Keep their original gate untouched. Naming the rest by DMI model does not hold up either, because the model year does not predict the part. A MacBookPro11,4 from Mid 2015 carries a BCM43602 and needs this; a MacBookAir7,2 from Early 2015 carries a BCM4360 and does not. Covering the lineup by name takes around twenty identifiers across four product lines and grows every time Apple ships hardware. The set has an exact definition already: the PCI IDs brcmfmac binds, from the driver's own brcm_hw_ids.h. That reaches the 2016 and 2017 MacBook Pros and the T2-less iMac19,1 and iMac19,2 that a hand-written list missed, and it leaves out the BCM4360 Macs for free, since their out-of-tree wl driver would never read a brcmfmac option anyway. Matching an exact vendor:device ID also drops the piped `grep -q`, which returns 141 under pipefail once the producer is killed by SIGPIPE (omacom#6608). The test runs the leaf with pipefail so the chatty lspci stub proves it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Fix Macs already installed without the Broadcom Wi-Fi quirk The quirk is written at install time, so a machine set up before it shipped never gets it, and no pre-T2 Mac ever did. Those installs still fail the WPA four-way handshake against an access point in WPA2/WPA3 transition mode, which is the state the reporter had to repair by hand. Appending leaves anything else in the config alone: modprobe reads every options line for a module, and nothing else sets feature_disable. Only an active options line counts as already applied, and the driver keeps the old behaviour until it reloads, so this asks for a reboot rather than pulling brcmfmac out from under a connection that currently works. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]> Co-authored-by: David Heinemeier Hansson <[email protected]>
omacom/omarchy#6652 (merged 2026-08-10) applies the Broadcom handshake quirk -- feature_disable=0x82000 in /etc/modprobe.d/brcmfmac.conf -- to every Mac brcmfmac drives, BCM43602 included, and a migration brings it to existing installs. The module wrote the same file with the same option, and its remove would now have deleted Omarchy's copy and brought the WPA2/WPA3 association failure back. The config stays; it is Omarchy's. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Issue:
detected as machines that need it. They have the same hardware issue as
T2 Macs, so it needs to be fixed at install time too.
Fix:
T2 chip. The bug is in the Broadcom firmware, not the T2 bridge.
Checked:
the issue