Skip to content

fix: add Apple BCM43602 resume kernel - #422

Closed
avillagran wants to merge 3 commits into
omacom:masterfrom
avillagran:fix/apple-bcm43602-resume
Closed

avillagran wants to merge 3 commits into
omacom:masterfrom
avillagran:fix/apple-bcm43602-resume

Conversation

@avillagran

Copy link
Copy Markdown

Summary

  • add a distinct linux-bcm43602 kernel and matching headers package
  • route the live-tested Apple BCM43602 (106b:0133) through brcmfmac's existing cold reprobe path after S3
  • keep the stock linux package installed and bootable as a rollback
  • leave every other BCM43602 device on the existing hot-resume path

Root cause

On the affected Mac, the BCM43602 retains a non-zero PCIe interrupt mask after S3 even though its firmware message rings are dead. The existing register heuristic therefore selects hot resume and subsequent firmware commands time out. The patch bypasses that unreliable heuristic only for BCM43602 with Apple PCI subsystem 106b:0133 and uses the driver's existing serialized remove/reprobe recovery path.

Live validation

Hardware:

  • Apple MacBookPro12,1, x86_64
  • Broadcom BCM43602 14e4:43ba
  • Apple subsystem 106b:0133
  • deep S3 suspend

A/B results:

  • stock 7.2.3-arch1-3: reproduced the failure after S3 with 11 brcmf_msgbuf_query_dcmd: Timeout messages and unusable Wi-Fi
  • patched kernel: four initial S3 cycles completed with one firmware reprobe per resume and no original failure signature
  • final narrowed 106b:0133 module: rebuilt as an in-tree signed module, installed from the final package, booted with kernel taint 0, and completed another real lid-close S3 cycle
  • final cycle: success=1, fail=0, failed_suspend=0, failed_resume=0; firmware loaded again after resume; zero message timeouts, D3 failures, Oopses, or general protection faults
  • post-resume: associated on 5 GHz and completed 5/5 Internet pings with 0% loss

No sleep hook, post-resume service, module unload/reload, or external reset script was present during validation.

Package validation

  • upstream kernel and Arch patch signatures verified with the listed official PGP keys
  • source hashes and the packaged patch hash verified
  • patch applies cleanly to Arch Linux v7.2.3-arch1
  • scripts/checkpatch.pl --strict --no-tree: 0 errors, 0 warnings
  • makepkg --printsrcinfo produces linux-bcm43602 and linux-bcm43602-headers
  • full package built natively on the affected Mac; the final narrowed brcmfmac module was rebuilt in-tree from the retained build tree and verified inside the installed package
  • final installed module reports the expected kernel release, an in-tree marker, and the build-time kernel signature

Maintenance note

This package follows the existing linux-ptl local-kernel pattern and therefore uses skip_build: true. Kernel version bumps require an explicit package rebuild plus renewed suspend/resume validation on the affected hardware.

@ryanrhughes

Copy link
Copy Markdown
Collaborator

Held for review: this adds a full kernel package (linux-bcm43602, 13k lines) with SKIP on four source checksums. Kernel sources are signed, so validpgpkeys covers the tarball, but the patch and config should carry real sha256 sums. kwilczynski is requested since this is a kernel.

The patch, config and downloaded payloads (kernel tarball and Arch patch)
carry real sha256 and b2 sums. The only SKIP entries are the detached
.sign/.sig signatures, which makepkg verifies against validpgpkeys.
@avillagran

Copy link
Copy Markdown
Author

Fixed in 91333c0: the patch and config already carried real sums; the four SKIP entries are only the detached signatures, so this commit documents that in the PKGBUILD and merges current master.

Real sums (both sha256sums and b2sums):

  • 0001-brcmfmac-force-cold-resume-apple-bcm43602.patch: sha256 909f0727…43041
  • config.x86_64 (sha256sums_x86_64 / b2sums_x86_64): sha256 09bf2e22…9e25c
  • linux-7.2.3.tar.xz: sha256 8ba259e8…cd03, matching kernel.org sha256sums.asc
  • linux-v7.2.3-arch1.patch.zst: sha256 8c917e7b…a4f6

Still SKIP (2 per array × 2 arrays = 4):

  • linux-7.2.3.tar.sign
  • linux-v7.2.3-arch1.patch.zst.sig

These are detached OpenPGP signatures. makepkg checks them against validpgpkeys (Torvalds/Greg KH for the tarball, heftig for the Arch patch), and the files they sign also have pinned sums. That follows the Arch convention and matches linux-omarchy.

Verification: makepkg --verifysource with a fresh SRCDEST. Every sha256 and b2 sum passed, both signatures passed (linux-7.2.3.tar, linux-v7.2.3-arch1.patch.zst), and the repo self-tests pass. I did not run a full kernel build.

@greptile-apps

greptile-apps Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with no actionable issues found.

Summary

Adds linux-bcm43602 and matching headers for Apple BCM43602 suspend recovery.

  • Apple BCM43602 resume uses the driver's cold-recovery route.
  • The Apple resume fix ships as a separate kernel with matching headers.

avillagran explicitly chose skip_build: true and manual kernel rebuilds with renewed hardware testing. This is intentional, not an outstanding finding.

No actionable issues were found. Kernel compilation and hardware suspend testing were not repeated during this review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Wi-Fi resumes] --> B{BCM43602 with Apple subsystem 106b:0133?}
  B -->|Yes| C[Skip hot resume]
  C --> D[Existing cold recovery path]
  B -->|No| E[Existing interrupt-mask check]
Loading

Reviews (1) · Last reviewed commit: "linux-bcm43602: document checksum policy..." · Reviewed by Greptile

@maralcbr

Copy link
Copy Markdown
Member

Thanks for this, Andrés. The quirk is careful work. Closing the package, though not the idea:

  • The brcmfmac change is narrow and sound. It applies only to BCM43602 with Apple subsystem 106b:0133 and reuses the driver's existing cold-reprobe path (patch:41-66). 7.3.6 still relies on the heuristic it bypasses, so please send it upstream to linux-wireless. Once it lands there, every kernel gets it.
  • A whole per-device kernel pinned to 7.2.3 is the costly part. Every bump needs a rebuild and a hardware retest. We already retired linux-ptl in favour of carrying patches in linux-omarchy (8b74113).
  • As it stands, it would also need a release/owners.json entry and vendored keys under keys/pgp/. replaces=(virtualbox-guest-modules-arch wireguard-arch) (PKGBUILD:118-127) duplicates linux-t2's.
  • On the earlier checksum concern: only the detached signatures use SKIP; the payload, patch and config are all hashed.

Reviewed at 91333c0.

@maralcbr maralcbr closed this Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants