Fix Bluetooth on T2 Macs by loading hci_bcm4377 module#5145
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes Bluetooth on Apple T2 Macs by ensuring the hci_bcm4377 kernel module is loaded automatically at boot, both for new installs and for existing systems via a migration.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Changes:
- Append
hci_bcm4377to/etc/modules-load.d/t2.confduring T2 hardware setup for new installs. - Add a migration that detects T2 hardware and appends
hci_bcm4377to/etc/modules-load.d/t2.confwith an idempotency guard.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| migrations/1774642699.sh | Adds a T2-gated migration to persist module auto-loading for existing installs. |
| install/config/hardware/apple/fix-t2.sh | Ensures new T2 installs include hci_bcm4377 in the modules-load configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| echo "Load Bluetooth driver module on T2 Macs" | ||
|
|
||
| if lspci -nn | grep -q "106b:180[12]"; then | ||
| if ! grep -q "hci_bcm4377" /etc/modules-load.d/t2.conf 2>/dev/null; then |
There was a problem hiding this comment.
The idempotency guard uses grep -q "hci_bcm4377" which will also match commented/disabled lines (e.g., # hci_bcm4377) or other text containing the substring, causing the migration to skip adding the actual module line. Consider making the check match an actual modules-load entry (e.g., exact line match after trimming whitespace, and ignoring comments) so the migration reliably fixes broken setups while still remaining idempotent.
| if ! grep -q "hci_bcm4377" /etc/modules-load.d/t2.conf 2>/dev/null; then | |
| if ! grep -qE '^[[:space:]]*hci_bcm4377[[:space:]]*$' /etc/modules-load.d/t2.conf 2>/dev/null; then |
Summary
hci_bcm4377kernel module isn't auto-loadedapple-bcm-firmwarepackage is already installed but the driver module was missing from/etc/modules-load.d/t2.confhci_bcm4377to the T2 install script for new installsFixes #4402
Test plan