Skip to content

Install Apple Broadcom Wi-Fi firmware on every Mac brcmfmac drives, not just T2 - #10306

Closed
danm07 wants to merge 1 commit into
omacom:quattrofrom
danm07:fix-imac-broadcom-wifi-firmware
Closed

danm07 wants to merge 1 commit into
omacom:quattrofrom
danm07:fix-imac-broadcom-wifi-firmware

Conversation

@danm07

@danm07 danm07 commented Sep 5, 2026

Copy link
Copy Markdown

Summary

apple-bcm-firmware currently only gets installed on T2 Macs, via fix-t2.sh. Every other Mac whose Wi-Fi brcmfmac drives — including the T2-less iMac19,1 and iMac19,2 that install/hardware/apple/fix-brcmfmac-supplicant.sh already calls out by name in its own comments — gets no NVRAM/CLM/TxCap calibration data at all. Without it the radio never comes up: dmesg shows brcmf_pcie_download_fw_nvram: FW failed to initialize and Firmware has halted or crashed, and no wlan/wlp* interface ever appears.

I hit this on a real 2019 27" iMac (iMac19,1, BCM4364, board-id Mac-AA95B1DDAB278B95) running Omarchy: Wi-Fi was completely dead out of the box. Root-caused it down to the missing firmware package, confirmed the fix manually (installed apple-bcm-firmware's files under the plain brcmfmac4364b2-pcie.* names this kernel's driver actually requests, reloaded brcmfmac, and the card came up and connected), then generalized it into this patch so it's not a manual fix every T2-less Mac owner has to rediscover.

  • install/hardware/pacman.sh now adds the arch-mact2 repo (which carries apple-bcm-firmware) for any Mac with brcmfmac-driven Broadcom Wi-Fi, not only T2 PCI IDs — reusing the exact detection condition already in fix-brcmfmac-supplicant.sh.
  • install/hardware/apple/fix-brcmfmac-supplicant.sh now also installs apple-bcm-firmware for every Mac it detects, alongside the existing WPA handshake quirk it already applies to the same population.
  • migrations/1787847645.sh repairs existing installs the same way, idempotently, following the existing migration conventions (per-user completion tracking, omarchy-state set reboot-required since brcmfmac only reads firmware at module load). It refreshes pacman's sync database (pacman -Sy) whenever apple-bcm-firmware is still missing — not just on a freshly-appended repo block — so an interrupted migration (e.g. a transient network failure during the sync) retries correctly instead of getting permanently stuck.
  • install/hardware/pacman.sh does not refresh the sync database itself: it runs after the hardware leaves that already call omarchy-pkg-add, under set -euo pipefail, so a failing refresh here would abort an otherwise offline-capable install for no benefit.
  • Extended test/shell.d/brcmfmac-supplicant-test.sh and added test/shell.d/brcmfmac-firmware-migration-test.sh, including regression coverage for the interrupted-retry and offline-install-time-sync scenarios above.

Test plan

  • bash test/shell.d/brcmfmac-supplicant-test.sh passes
  • bash test/shell.d/brcmfmac-firmware-migration-test.sh passes
  • Full bash test/shell suite passes (no regressions)
  • Verified manually on the affected hardware (iMac19,1, BCM4364) that installing apple-bcm-firmware and reloading brcmfmac brings the Wi-Fi interface up

Replaces #8632, reopened from the same branch after the automated review/CI process on that one got stuck (no checks were ever reported). No code changes from the last revision on #8632 — this already includes the fixes from the Copilot review discussion there (pacman sync-database timing in the migration).

…ot just T2

apple-bcm-firmware currently only installs on T2 Macs, via fix-t2.sh. Every
other Mac whose Wi-Fi brcmfmac drives -- including the T2-less iMac19,1 and
iMac19,2 that install/hardware/apple/fix-brcmfmac-supplicant.sh already calls
out by name -- gets no NVRAM/CLM/TxCap calibration data at all. Without it the
radio never comes up: dmesg shows "brcmf_pcie_download_fw_nvram: FW failed to
initialize" and "Firmware has halted or crashed", and no wlan/wlp* interface
appears.

- install/hardware/pacman.sh now adds the arch-mact2 repo (which carries
  apple-bcm-firmware) for any Mac with brcmfmac-driven Broadcom Wi-Fi, not
  only T2 PCI IDs.
- install/hardware/apple/fix-brcmfmac-supplicant.sh now also installs
  apple-bcm-firmware for every Mac it detects, alongside the existing WPA
  handshake quirk.
- migrations/1787847645.sh repairs existing installs the same way.
- Tests extended/added for both.
@Q00

Q00 commented Sep 27, 2026

Copy link
Copy Markdown

Thanks for working on this! I have the same iMac (iMac19,1, BCM4364) and tried the fix on Omarchy 4.0.4.

I think installing apple-bcm-firmware alone won't bring Wi-Fi up on this iMac. The package names its files like brcmfmac4364b2-pcie.apple,ekans-..., but the kernel on this iMac only looks for the plain names (brcmfmac4364b2-pcie.bin, .txt, and so on). So it never finds the files. Your own manual test used the plain names too, and that step isn't in the PR yet.

What worked for me: I copied the matching Apple files and saved them under the plain names. After reloading brcmfmac, Wi-Fi came up and could scan networks.

If it helps, I'm happy to open a follow-up PR that adds this renaming step. Just let me know.

@omarchybot omarchybot added bug Something isn't working compatibility Make Omarchy work better on everything! labels Sep 27, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 5a5d5b1 against quattro. This needs another pass from the author before it can go further.

What ran. On a disposable worker built from the Omarchy ISO, ./test/cli passed (116 checks) and both test/shell.d/brcmfmac-supplicant-test.sh (13) and test/shell.d/brcmfmac-firmware-migration-test.sh (7) passed. Those tests stub omarchy-pkg-add and pacman, so they show the calls are made, not that Wi-Fi comes up. The bug itself is in hardware a worker does not have, so it was not reproduced. The diff was read against the install order, omarchy-pkg-add, and the migration conventions.

Findings

  • The diff leaves out the step that fixed the iMac. The description says the manual fix was installing the package's files "under the plain brcmfmac4364b2-pcie.* names this kernel's driver actually requests". The PR only installs apple-bcm-firmware (install/hardware/apple/fix-brcmfmac-supplicant.sh:32, migrations/1787847645.sh:25), which ships them as brcmfmac4364b2-pcie.apple,<module>-…. @Q00 reports the same on a second iMac19,1: the package alone does not bring Wi-Fi up. brcmfmac builds the names it requests from what ACPI gives it and falls back to the plain name. It never scans the directory, so if it asks only for the plain names the new files are never loaded. As it stands this fix probably does nothing on the machine it was written for.
  • The scope goes beyond the evidence. The evidence is one iMac19,1. The change installs a package from arch-mact2, a repository with SigLevel = Never, on every Mac the existing handshake quirk matches, including the 2015–2017 BCM43602 machines that work today. When a board-specific file exists, brcmfmac loads it before the plain fallback. So adding files can change which firmware and NVRAM a working machine loads on its next boot. That is a mechanism, not a regression anyone has seen, but it is a risk taken without a known benefit. A proportionate fix would cover the models where the missing firmware has been confirmed, and would put the file mapping that actually makes them work into the PR. Widening the unsigned repository is the maintainer's call either way. omarchy-refresh-pacman drops hardware-specific repos (arch-mact2 on T2 Macs), silently orphaning linux-t2 #9853 (omarchy-refresh-pacman drops arch-mact2) would then reach these machines too.
  • The migration test does not use the target hardware. The fixture labelled "the machine this was written for" (test/shell.d/brcmfmac-firmware-migration-test.sh:127) uses 14e4:43ba (BCM43602), not the iMac's BCM4364 (4464).
  • Smaller points. sudo pacman -Sy followed by a single -S refreshes every repository's database without upgrading anything. The risk is small for a firmware package, but it is the partial-upgrade pattern Arch warns against. If the migration stops after the install but before omarchy-state set reboot-required, the retry sees the package installed and never sets the flag. On an existing non-T2 Mac without the repository, omarchy-apply-hardware would now fail at omarchy-pkg-add before writing the handshake quirk it writes today, because install/hardware/pacman.sh adds the repository later in all.sh.

Second opinion. Codex Medium reviewed the same head. It agreed on the first point, with high confidence in the reasoning but no hardware to check it on. When asked whether the broader scope could cause a regression, it worked out the firmware-precedence mechanism in the second point. It also found the reboot-flag gap, the omarchy-apply-hardware ordering and the BCM43602 fixture on its own. Its independence is not guaranteed.

Next. This waits on the author. Bringing in the plain-name step that worked by hand, with @Q00's help if they still want to offer it, and narrowing the change to the confirmed models would make it testable. A hardware fix like this then needs someone with the affected iMac to confirm it on the exact head commit before it can be marked verified.

@danm07

danm07 commented Oct 6, 2026 •

Copy link
Copy Markdown
Author

@Q00 Sure thing! Add it in! For now I no longer have access to that iMac machine so I am unable to further test

@omarchybot

Copy link
Copy Markdown
Collaborator

Re-checked after @danm07's reply, at the same head, 5a5d5b1. Nothing in the diff has changed, so the findings from the last review all still stand. Most importantly, the diff still makes nothing available under the plain brcmfmac4364b2-pcie.* names the driver requests. It only installs apple-bcm-firmware (install/hardware/apple/fix-brcmfmac-supplicant.sh:32, migrations/1787847645.sh:25). The worker results from the last review are unchanged, and no one has confirmed this head on an affected iMac.

With the author no longer able to test, the missing step has to come from someone who has the hardware. The bot has not written that step itself. Which of the package's apple,<module>-… files a given iMac19,1 needs depends on the unit, and choosing one without the machine would be a guess. @Q00, if you still want to add it, the useful contribution is the plain-name step that worked on your iMac, limited to the models where the firmware is confirmed missing, and confirmed on your machine at the commit that carries it. You can't push to this branch, so that would be a pull request of your own built on it, which keeps @danm07's commits and credit. Alternatively, @danm07 can give you push access to their fork.

Codex Medium was asked the same questions. It agreed that the diff has no plain-name step and that writing one without the hardware would be guesswork. It also named a third party with the hardware as the next step. Its independence is not guaranteed.

Next, this waits on the maintainer to decide how it goes forward, and on someone with an affected iMac for the missing step and a hardware 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.

3 participants