Skip to content

Skip broadcom-wl on MacBookAir4,1 with BCM4331 - #13532

Open
z23 wants to merge 2 commits into
omacom:quattrofrom
z23:fix/bcm4331-use-b43
Open

z23 wants to merge 2 commits into
omacom:quattrofrom
z23:fix/bcm4331-use-b43

Conversation

@z23

@z23 z23 commented Sep 28, 2026 •

Copy link
Copy Markdown

The installer skipped broadcom-wl-dkms for every BCM4331, leaving fresh installs on other models without a usable Wi-Fi driver. The skip now requires both BCM4331 (14e4:4331) and the exact DMI model MacBookAir4,1, where #7593 reports wl freezing the machine. Other BCM4331 models, unknown or unreadable DMI, and BCM4360-only systems retain the existing wl install path.

The installer and Mac support manual explain that the exception requires separately supplied b43 firmware. This change prevents wl installation on the reported freezing model; fresh Wi-Fi on that model still requires manual firmware preparation. Existing wl installations and their blacklist need separate remediation.

Validation: the stubbed hardware test covers the reported model, other and unknown models, unreadable DMI, BCM4360, mixed-chip systems, and unrelated devices. It passes with the model-specific exception and fails against the previous chip-wide exception. Bash syntax and diff checks pass. No physical BCM4331 hardware was tested.

Fixes #7593.

broadcom-wl hard-freezes a 2011 MacBook Air with this chip and blacklists b43. BCM4360 still gets broadcom-wl-dkms. linux-firmware-broadcom does not ship the b43 ucode, so the installer does not add it.
@llstrk

llstrk commented Sep 29, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Outcome: Fresh BCM4331 installs now end with no working Wi-Fi driver.

BCM4331 gets neither wl nor b43 firmware

Nothing is installed for 14e4:4331, but b43 needs b43/ucode29_mimo.fw here and registers no wireless device without it. No Omarchy install path provides it: linux-firmware-broadcom has none, b43-firmware is AUR-only and omarchy-pkgs lacks it. Impact: #1816 reported the same no-Wi-Fi state on a MacBook Pro 9,2 before BCM4331 got wl; #1816 and #2227 report wl working, so "broadcom-wl hard-freezes these machines" generalizes from the 2011 MacBook Air in #7593.

Suggested change: keep broadcom-wl-dkms for BCM4331 except on models known to freeze (e.g. by DMI, as #7593 suggests), or ship b43 firmware in the Omarchy repo and omarchy-other.packages first; then update the BCM4331 test, which rejects any package, and qualify manual/44-mac-support.md line 38.

Reproducer (fails at 19b823f)

Reproducer: BCM4331 install path ends with no Wi-Fi driver path

What was run: the script's behaviour, not real hardware. The consequence (no Wi-Fi device) comes from kernel and packaging source, cited below. No BCM4331 machine was available.

Test in the PR's own style. Save as test/shell.d/bcm4331-wifi-path-test.sh and run bash test/shell.d/bcm4331-wifi-path-test.sh:

#!/bin/bash

set -euo pipefail

source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh"

test_tmp=$(mktemp -d)
trap 'rm -rf "$test_tmp"' EXIT

stub_bin="$test_tmp/bin"
pkg_log="$test_tmp/packages"
mkdir -p "$stub_bin"

cat >"$stub_bin/lspci" <<'STUB'
#!/bin/bash
printf '%s\n' "$OMARCHY_TEST_LSPCI"
STUB

cat >"$stub_bin/omarchy-pkg-add" <<'STUB'
#!/bin/bash
printf '%s\n' "$@" >>"$OMARCHY_TEST_PKG_LOG"
STUB

chmod +x "$stub_bin/lspci" "$stub_bin/omarchy-pkg-add"

: >"$pkg_log"
PATH="$stub_bin:$PATH" \
  OMARCHY_TEST_LSPCI='02:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM4331 802.11a/b/g/n [14e4:4331] (rev 02)' \
  OMARCHY_TEST_PKG_LOG="$pkg_log" \
  bash -eE -c 'source "$1"' bash "$ROOT/install/hardware/fix-bcm43xx.sh" >/dev/null

# b43 needs b43/ucode29_mimo.fw on BCM4331 and registers no Wi-Fi device without
# it. linux-firmware ships no b43/ files, so a fresh install needs either wl or a
# package that provides that firmware.
grep -qx -e 'broadcom-wl-dkms' -e 'b43-firmware' -e 'b43-firmware-classic' "$pkg_log" ||
  fail "a BCM4331 install gets a working Wi-Fi driver path (wl or b43 firmware)" "installed: $(paste -sd' ' "$pkg_log")"
pass "a BCM4331 install gets a working Wi-Fi driver path (wl or b43 firmware)"

Actual output at the PR head (19b823f), exit 1:

installed: 
not ok - a BCM4331 install gets a working Wi-Fi driver path (wl or b43 firmware)

Actual output with the merge-base script (de63134), exit 0:

ok - a BCM4331 install gets a working Wi-Fi driver path (wl or b43 firmware)

Actual output with a variant of the head script whose BCM4331 branch runs omarchy-pkg-add b43-firmware, exit 0:

ok - a BCM4331 install gets a working Wi-Fi driver path (wl or b43 firmware)

That same variant fails the PR's own test, because its BCM4331 case rejects any installed package. Actual stderr of bash test/shell.d/bcm43xx-driver-test.sh, exit 1:

b43-firmware
not ok - BCM4331 must not install broadcom-wl or a firmware package that does not ship b43 ucode

Why an empty install list means no Wi-Fi device (source, not run):

  • Linux v7.2 drivers/net/wireless/broadcom/b43/main.c: lines 2325-2327 pick ucode29_mimo for core rev 29 with an HT-PHY (BCM4331). When no firmware is found, lines 2588-2595 print the "download the correct firmware" help and jump to out, skipping ieee80211_register_hw() at line 2603. No wireless device is registered.
  • Arch linux-firmware PKGBUILD (tag 20260916), line 147: _pick broadcom "${fwdir}"/{bnx2*,brcm,cypress,tigon}. Upstream linux-firmware at that tag has no b43/ directory.
  • b43-firmware is AUR-only (no match in the Arch package search), and omacom/omarchy-pkgs has no b43 package, so neither the online repos nor the offline ISO mirror can provide it.
  • WiFi Non-Functional on MacBook Pro 9,2 - Missing BCM4331 Drivers #1816 (MacBook Pro 9,2, BCM4331) reported this state on a fresh install before wl was added: no wlan0, iwctl device list empty, fixed by installing broadcom-wl-dkms.
Details

Verified (script run through the installer's run_logged with stubbed lspci and omarchy-pkg-add):

  • BCM4331 installs nothing; BCM4360 installs broadcom-wl-dkms; both chips install nothing; an unrelated device installs nothing. Every case exits 0.
  • The PR's test passes at head under test/shell and fails against the base script at its first assertion.
  • The broadcom-wl-dkms blacklist claim is accurate: its modprobe file blacklists b43, bcma, ssb and others.

Existing installs: machines that already have broadcom-wl-dkms keep it, and its b43 blacklist stays in place. Since no b43 firmware path exists, leaving them untouched keeps wl, their only driver path.

Related open PRs: #9692, #10910, #10936, #11259, #11311, #11655, #12076, #12090 and #12681 each conflict with this PR in one hunk of fix-bcm43xx.sh (file-level 3-way merge). All keep BCM4331 on wl. The tests in #10936 and #11655 assert wl for BCM4331, #12076 and #12681 add a helper that classifies 4331 as needing wl, and #10910 writes its own b43/bcma blacklist. Except for #11311, whose conflict is only in the header comment, taking the other side of these conflicts restores wl for BCM4331.


Review information

Test scope: Source code and sandbox tests with stubbed commands at 19b823fd; not tested on BCM4331 hardware.

AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

@greptile-apps

greptile-apps Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Changes Wi-Fi driver selection logic for one MacBook model.

The PR should not merge until its BCM4331 behavior and stated scope agree.

Findings

  1. P1 BCM4331 still receives wl ▶

Summary

The PR adds a DMI-based exception to Broadcom driver installation, documents its firmware limitation, and tests the resulting device/model combinations.

  • MacBookAir4,1 with BCM4331 skips broadcom-wl-dkms; other BCM4331 models and BCM4360 continue to receive it.
  • The model-specific behavior conflicts with the PR description’s broader BCM4331 and mixed-chip claims.

Reviews (1) · Last reviewed commit: "Limit the BCM4331 wl exception to MacBoo..."

Comment thread install/hardware/fix-bcm43xx.sh
@z23 z23 changed the title Leave BCM4331 on in-kernel b43 Skip broadcom-wl on MacBookAir4,1 with BCM4331 Oct 1, 2026
@z23

z23 commented Oct 1, 2026

Copy link
Copy Markdown
Author

@llstrk Thanks for checking the firmware path and the other BCM4331 reports. The chip-wide exception was too broad, and the original description overstated the freeze report.

Taken in eb7eba8: the skip now requires the exact MacBookAir4,1 DMI model together with BCM4331. Other BCM4331 machines keep broadcom-wl-dkms; missing DMI also keeps that existing path. BCM4360 alone still receives wl. The mixed-chip case avoids installing its b43 blacklist only on the reported freezing model.

I also updated the tests, title, and Mac support manual. The manual makes the remaining firmware requirement explicit: the installer does not supply b43 firmware, so a fresh MacBookAir4,1 needs manual preparation over another connection. Existing wl installations also require separate remediation.

The hardware tests pass, and the same tests fail against the previous chip-wide skip. Syntax and diff checks pass. This was checked with stubbed PCI/DMI/package commands; no BCM4331 hardware was available.

@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at eb7eba8 against quattro. Nothing found to fix.

What ran, on a disposable Omarchy ISO worker: test/shell.d/bcm43xx-driver-test.sh passes 7/7 at this head and fails on the base script at the MacBookAir4,1 case, where base installs broadcom-wl-dkms. A separate stubbed check, sourcing the script under bash -eE with an ERR trap, gives the same picture: MacBookAir4,1 with BCM4331 now installs nothing, while MacBookPro9,2, MacBookAir4,2 and a machine with no readable DMI still get broadcom-wl-dkms, and nothing trips the trap. ./test/cli has one failure (vscode generated theme references current theme file), and it fails the same way on base, so it is not from this change. The ISO's linux-firmware-broadcom ships no b43/ firmware, which is what the manual section says.

Second opinion: Codex Medium reviewed the same diff and found no defects. It agreed that the change is proportionate and that the manual's firmware claims are correct (independence is not guaranteed). It also confirmed from outside sources that MacBookAir4,1 is the exact DMI product name. It pointed out one deliberate boundary: a MacBookAir4,1 that also had a BCM4360 would skip wl for both. The test covers that case.

This is the remaining step. The freeze only happens on the hardware, and the stubbed tests only show that the script makes the choice it intends. So this waits on @willhemming, who reported #7593, to confirm it on the MacBookAir4,1. This check installs nothing:

curl -fsSLo /tmp/fix-bcm43xx.sh https://raw.githubusercontent.com/z23/omarchy-mac/eb7eba892b7c7314beb01a265573c2f07e94e619/install/hardware/fix-bcm43xx.sh
bash -c 'omarchy-pkg-add() { echo "would install: $*"; }; source /tmp/fix-bcm43xx.sh'
pacman -Qo /usr/lib/firmware/b43/ucode29_mimo.fw

The second line should print the two "skipping broadcom-wl" lines and no "would install". The third line shows which package your working b43 firmware came from. The issue credits linux-firmware-broadcom, but that package has no b43 files, and the manual's advice depends on the real source. Please confirm against this exact commit. A new push to this branch would need a new confirmation.

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.

fix-bcm43xx.sh installs broadcom-wl for BCM4331, which hard-freezes a 2011 MacBook Air where in-kernel b43 works

3 participants