Skip to content

apple: reload brcmfmac after resume, some Broadcom Wi-Fi parts don't survive S3 - #11434

Closed
TheoAndersen wants to merge 1 commit into
omacom:quattrofrom
TheoAndersen:apple-brcmfmac-resume-fix
Closed

TheoAndersen wants to merge 1 commit into
omacom:quattrofrom
TheoAndersen:apple-brcmfmac-resume-fix

Conversation

@TheoAndersen

@TheoAndersen TheoAndersen commented Sep 12, 2026 •

Copy link
Copy Markdown

Affects any Mac whose Wi-Fi brcmfmac drives over PCIe, but in practice mostly hits older MacBook Pros: BCM43602 (2015-2017 models) is the part most commonly affected. Reproduced on a MacBookPro11,5 (15-inch MacBook Pro, Mid 2015, BCM43602) simply by closing and reopening the lid, which is this machine's default S3 suspend/resume trigger.

The PCIe/msgbuf brcmfmac parts (BCM43602, BCM4350/4355/4364, BCM4377/4378/4387) can leave the firmware unresponsive after S3: every command times out (brcmf_msgbuf_query_dcmd: Timeout on response for query command) until the driver is unbound and rebound. Same signature and chipset family as Debian #849381, open since kernel 4.8, no real upstream fix.

Detection reuses the exact chip allowlist from fix-brcmfmac-supplicant.sh (sourced from brcmfmac's own brcm_hw_ids.h), which deliberately excludes the BCM4360 in 2013-2015 Macs: it runs the out-of-tree wl driver instead of brcmfmac, so it never hits this bug. Scoping is three layers deep: the installer only runs on a T2 Mac or an Apple machine with one of these specific Broadcom IDs; the runtime helper re-scans for the same allowlist; and even then it only acts if the matched device is currently bound to brcmfmac — never touching anything else.

Unbind/bind is used rather than modprobe -r/modprobe: something (an open NetworkManager netdev, a cfg80211 wdev reference) reliably keeps the module in use across resume, so modprobe -r never actually removes it, and modprobe afterward is then a no-op that never re-probes a device manually detached via sysfs — confirmed on hardware, the device stayed unbound and Wi-Fi never came back.

A systemd unit runs the reload after every sleep target (suspend/hibernate/hybrid-sleep/suspend-then-hibernate), installed both on fresh setup and via a migration for existing installs. Covered by a shell test that simulates the sysfs unbind/bind cycle and exercises the T2/non-T2 detection matrix.

…survive S3

The PCIe/msgbuf brcmfmac parts (BCM43602, BCM4350/4355/4364,
BCM4377/4378/4387) can leave the firmware unresponsive after S3: every
command times out (brcmf_msgbuf_query_dcmd: Timeout on response for
query command) until the driver is unbound and rebound. Same signature
and chipset family as Debian #849381, open since kernel 4.8, no real
upstream fix.

Affects any Mac whose Wi-Fi brcmfmac drives over PCIe, but in practice
mostly hits older MacBook Pros: BCM43602 (2015-2017 models) is the part
most commonly affected. The BCM4360 in 2013-2015 Macs is unaffected --
it runs the out-of-tree wl driver instead of brcmfmac, so it never hits
this bug and is deliberately excluded from the detection below.
Reproduced on a MacBookPro11,5 (15-inch MacBook Pro, Mid 2015, BCM43602)
simply by closing and reopening the lid, which is this machine's
default S3 suspend/resume trigger.

Same detection as fix-brcmfmac-supplicant.sh, since it's exactly the
PCIe/msgbuf population that hits this. Unbind/bind is used rather than
modprobe -r/modprobe: something (an open NetworkManager netdev, a
cfg80211 wdev reference) reliably keeps the module in use across
resume, so modprobe -r never actually removes it, and modprobe
afterward is then a no-op that never re-probes a device manually
detached via sysfs -- confirmed on hardware, the device stayed
unbound and Wi-Fi never came back.
@bjarneo

bjarneo commented Sep 21, 2026

Copy link
Copy Markdown
Member

Automated duplication check: this pull request looks similar to #10332, which covers the same brcmfmac resume reload. I keep that one open and close this one to consolidate review.

If you feel this is the wrong decision, please open the PR again with a note on the difference.

@bjarneo bjarneo closed this Sep 21, 2026
@TheoAndersen
TheoAndersen deleted the apple-brcmfmac-resume-fix branch October 12, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants