Skip to content

Install b43-firmware for BCM4322 Wi-Fi (older MacBooks) - #11311

Open
Infringer13 wants to merge 4 commits into
omacom:quattrofrom
Infringer13:fix/b43-firmware-bcm4322
Open

Infringer13 wants to merge 4 commits into
omacom:quattrofrom
Infringer13:fix/b43-firmware-bcm4322

Conversation

@Infringer13

Copy link
Copy Markdown

Summary

Older MacBooks with Broadcom BCM4322 (PCI 14e4:432b, Apple AirPort Extreme) load the in-tree b43 driver but have no Wi-Fi interface until cut firmware is installed. linux-firmware-broadcom does not ship b43/ucode16_mimo.fw; the AUR package b43-firmware does.

Symptoms (Omarchy 4.0.3, real hardware)

  • dmesg: b43-phy0 ERROR: Firmware file "b43/ucode16_mimo.fw" not found
  • NetworkManager: WIFI-HW: missing, no wlan0
  • After b43-firmware + reload b43: wlan0 appears and associates normally

What this changes

  • Extends install/hardware/fix-bcm43xx.sh to detect 14e4:432b and install b43-firmware via omarchy-pkg-aur-add when the AUR is reachable
  • Leaves the existing BCM4360 / BCM4331 broadcom-wl-dkms path unchanged
  • Adds a migration so already-installed systems pick this up on update

Related but different: #1143 covered mid-2010s BCM4360-style chips, not BCM4322.

Test plan

  • BCM4322 machine: install/update yields b43-firmware installed and wlan0 usable
  • BCM4360/4331 machine: still gets broadcom-wl-dkms only (no regression)
  • Machine without those PCI IDs: no Broadcom Wi-Fi packages added
  • AUR unreachable: install continues with a clear message (no hard abort beyond existing helper behavior)

Older MacBooks with Broadcom BCM4322 (14e4:432b) load the in-tree b43
driver but never get a wlan interface until AUR b43-firmware provides
ucode16_mimo.fw. Extend the existing Broadcom hardware fix without
changing the BCM4360/BCM4331 broadcom-wl-dkms path.
@kvnloo

kvnloo commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Broadcom/wifi leftover cluster (same driver class; DMI-gated; do not retarget BCM4331).

Already in flight:

Related, not the same PR:

Prefer merge #11311 + #11434 as the firmware/resume pair rather than a third overlapping helper. No competing PR from me.

@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 31c64fb against quattro. The firmware diagnosis holds: b43-firmware 6.30.163.46 ships b43/ucode16_mimo.fw, which nothing in the official repos provides. But the install-time half of this change breaks installation on the machines it is for.

The install script fails as root and stops hardware setup. install/hardware/fix-bcm43xx.sh runs inside omarchy-apply-hardware, which requires root, and omarchy-pkg-aur-add builds through yay, so makepkg refuses: "Running makepkg as root is not allowed". I ran this on a disposable Omarchy worker with lspci stubbed to report a BCM4322 (14e4:432b):

  • On quattro, the script as root exits 0, since nothing matches.
  • At this head, the same run exits 1 after pulling in b43-fwcutter, with "Failed to install the following packages: b43-firmware".
  • omarchy-apply-hardware --install-user … at this head stops at fix-bcm43xx.sh (exit code: 1) and exits 1. Every hardware script after it never runs (fix-surface-keyboard.sh through pacman.sh), and omarchy-apply-system aborts with it under set -euo pipefail.

So a fresh install on a BCM4322 machine with the AUR reachable fails finalization. When the AUR is unreachable it skips the firmware and carries on. The migration can't make up for this on new installs: the finalizer marks every shipped migration complete on a fresh install (install/user/first-run/audio-tuning.sh documents that).

The migration works where it runs, but it can complete without doing its job. Run as the user, migrations/1789091260.sh installed b43-firmware on the worker. But || true on the add, and the silent skip when the AUR is down, both mark it complete without the firmware. agents/skills/migrations.md asks that a migration which cannot finish exit non-zero and stay pending.

Related: #10994 reports this same chip (14e4:432b, MacBook5,1) losing Wi-Fi after warm reboots under b43, and working reliably with wl loaded first. That bears on which driver BCM4322 should get. #12090 also edits fix-bcm43xx.sh.

What was checked: ./test/cli passed on the worker. The reproduction above ran on the same worker. The Wi-Fi fix itself needs a BCM4322, so it was not reproduced. No second opinion ran on this pull request: Codex Medium is reachable, but today's review budget was spent, so this is one model's review.

Next: this waits on the maintainer to decide how BCM4322 firmware should reach a fresh install. Options include a package in the Omarchy repository (which omarchy-pkg-add can install as root), wl as #10994 suggests, or leaving it to a user-run step. Until then, the install-time branch must not fail the install. Nothing was pushed to this branch.

@andyholst

Copy link
Copy Markdown

Not evidence for this chip. #10910 is BCM43224, PCI 14e4:4353, and the working change there is broadcom-wl-dkms instead of brcmsmac.

This pull request is BCM4322, PCI 14e4:432b, which needs b43-firmware because b43 has no ucode16_mimo.fw. The Air 5,2 retest did not load b43 and did not use 14e4:432b. It should not be a reason to put wl on the 4322, or to drop the firmware install.

Both diffs edit install/hardware/fix-bcm43xx.sh. Whichever lands second needs to keep the other's PCI ID and its own package.

#10910 (comment)

`|| true` and the silent skip when the AUR was unreachable both let the migration exit 0 without the firmware, so omarchy-migrate marked it complete and never retried it. agents/skills/migrations.md asks a migration that cannot finish to exit non-zero and stay pending. omarchy-pkg-aur-add already returns early when the package is installed, so a machine that has the firmware completes without reaching the AUR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed again, this time against current quattro (3b36b9e) with your head 31c64fb merged onto it, and with a second opinion, which could not run last time. I pushed one fix to the migration, 3e92852. The install-time half still breaks installation on the machines it is for. How the firmware should reach a fresh install is a decision for the maintainer.

Pushed: the migration now stays pending until the firmware installs. || true and the silent skip when the AUR was unreachable both let migrations/1789091260.sh exit 0 without b43-firmware. omarchy-migrate then marked it complete and never tried again. agents/skills/migrations.md asks a migration that cannot finish to exit non-zero and stay pending. The migration now just calls omarchy-pkg-aur-add b43-firmware, the way migrations/1784510887.sh does. That helper returns early when the package is already installed, so a machine that has the firmware finishes without reaching the AUR. test/shell.d/b43-firmware-migration-test.sh covers four cases: the build failing, the build succeeding, the firmware already installed, and other hardware. It passes with the change and fails with your original migration.

Still open: the install script fails as root. On a disposable Omarchy worker, with lspci stubbed to report a BCM4322 (14e4:432b):

  • On quattro, install/hardware/fix-bcm43xx.sh run as root exits 0.
  • With this branch, it exits 1 with "Running makepkg as root is not allowed". omarchy-apply-hardware runs hardware leaves as root, and omarchy-pkg-aur-add builds through yay.
  • omarchy-apply-hardware then stops at that leaf. 69 of the 74 leaves in install/hardware/all.sh ran, and the five after it never did (fix-surface-keyboard.sh through platform-setup.sh). Under set -euo pipefail, omarchy-apply-system aborts before install/login/all.sh and install/post-install/all.sh.

Image builds are worse off. agents/skills/install-scripts.md says every hardware leaf in an image build is deferred to first boot. There it runs as root, possibly offline, before any user exists, using only packages already in the image. bin/omarchy-provision-hardware keeps a failed step queued and stops at it. So with the AUR reachable, this step fails on every boot and blocks every step after it. With the AUR unreachable, it prints the warning, succeeds, and is never retried. A fresh install also marks every shipped migration complete (bin/omarchy-provision-user), so the migration can't make up for either case.

What the maintainer is deciding: how b43-firmware should reach a fresh install. The options are a package in the Omarchy repository (which omarchy-pkg-add installs as root, offline from an image), a per-user step after install, or broadcom-wl-dkms for this chip, as #10994 reports works on a MacBook5,1 where b43 drops Wi-Fi after warm reboots. Running yay as the install user would cover an ordinary ISO install but not an image's first boot, where no user exists yet.

What was checked: ./test/cli passed on the worker, before and after the fix. The new migration test passed with the fix and failed with it reverted. Run as a normal user with the AUR reachable, the migration installed b43-firmware 6.30.163.46-1, which ships b43/ucode16_mimo.fw. Wi-Fi itself needs a real BCM4322, so it was not reproduced; once the delivery is settled, it needs confirming on one. Codex Medium and muse-wonder (via pi, thinking high) both reviewed it. Both reached the same install-time and migration findings (they could read this session, so their agreement isn't a guarantee of independence). muse-wonder also pointed out that the migration installs the firmware without reloading b43, so Wi-Fi only appears after a reboot.

Related: #10910 (BCM43224, 14e4:4353) and #15106 (BCM43228) also edit fix-bcm43xx.sh, for other chips. As andyholst says, #10910's testing is not evidence for or against this chip, and whichever lands second has to keep the other's PCI ID. No other open pull request handles 14e4:432b.

Next: this is waiting on the maintainer's decision on firmware delivery. Until then, the install-time branch must not fail the install.

@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The change affects Wi-Fi setup only on systems with BCM4322 hardware.

The PR still needs the previously reported fix for firmware builds running as root before merging.

Findings

  1. P1 Firmware build runs as root ▶

Summary

Adds b43-firmware installation for BCM4322 hardware.

  • New installs add the firmware BCM4322 Wi-Fi needs.
  • Existing BCM4322 systems get the Wi-Fi firmware on update.

Reviews (2) · Last reviewed commit: "Keep the BCM4322 migration check from ex..." · Reviewed by Greptile

if echo "$pci_info" | grep -q "14e4:432b"; then
echo "BCM4322 detected (b43 firmware required)"
if omarchy-pkg-aur-accessible; then
omarchy-pkg-aur-add b43-firmware

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Firmware build runs as root

omarchy-apply-hardware runs as root, and omarchy-pkg-aur-add calls yay without switching users. On a fresh BCM4322 install, this tries to build b43-firmware as root, which makepkg refuses. The firmware stays missing and Wi-Fi remains unavailable, even when the AUR is reachable.

Build the package as a non-root user, or install a prebuilt package. Also cover --defer-provisioning, where the target user does not exist yet.

omarchybot and others added 2 commits November 17, 2026 00:24
agents/skills/migrations.md asks for no test of a migration under test/: it runs once per machine and is frozen once it ships, so the test stops guarding anything.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
grep -q quits at the first match, so lspci can take SIGPIPE and the pipeline fails under the runner's pipefail, skipping the machines the migration targets and marking it done. migrations/1786137597.sh repairs the same mistake in the T2 check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: muse-wonder via pi, thinking high <noreply@pi.dev>
@omarchybot

Copy link
Copy Markdown
Collaborator

I pushed two more fixes to the migration, da56d43 and 17bcff8, after a second review of the commit I pushed yesterday. The install-time problem from my last comment hasn't changed and still waits on the maintainer.

Pushed: the BCM4322 check in the migration no longer skips the machine it targets. lspci -nn | grep -q "14e4:432b" lets grep quit at the first match. If lspci is still writing, it takes SIGPIPE, and under the migration runner's pipefail the whole check fails. The migration then exits 0 without installing anything and is marked done. migrations/1786137597.sh repairs the same mistake in the T2 check. Line 4 now reads grep "14e4:432b" >/dev/null, which reads to the end. On a worker, with lspci stubbed to print the BCM4322 line first and then a long listing, the old check skipped the machine in 200 of 200 runs and the new one in none.

Removed: the migration test I added yesterday. agents/skills/migrations.md on quattro says not to add a test for a migration under test/, because a migration runs once per machine and the test stops guarding anything once it ships. The PR no longer touches test/.

Still open: the install script runs yay as root. Greptile reports the same thing at install/hardware/fix-bcm43xx.sh:17. It also names --defer-provisioning, an ISO install with no user yet. That is the same case as an image's first boot: there's no user to build as, so switching to the install user can't cover it. How b43-firmware reaches a fresh install is still the maintainer's call, between the options in my last comment.

What was checked: on a disposable Omarchy worker, with this branch merged onto quattro (3b36b9e), the migration exits 1 when the build fails. With the firmware already installed, or on other hardware, it exits 0 and never calls yay. ./test/cli passed. Codex Medium and muse-wonder (via pi, thinking high) reviewed yesterday's commit and found the two problems fixed here. They both reviewed these two commits too and found nothing further. Wi-Fi itself still needs a real BCM4322 to confirm.

Next: waiting on the maintainer's decision on firmware delivery.

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.

4 participants