Skip to content

Fix Bluetooth on T2 Macs by loading hci_bcm4377 module#5145

Merged
dhh merged 1 commit into
basecamp:devfrom
fedesapuppo:fix-t2-bluetooth
Apr 1, 2026
Merged

Fix Bluetooth on T2 Macs by loading hci_bcm4377 module#5145
dhh merged 1 commit into
basecamp:devfrom
fedesapuppo:fix-t2-bluetooth

Conversation

@fedesapuppo
Copy link
Copy Markdown
Contributor

Summary

  • Bluetooth doesn't work on T2 Macs because the hci_bcm4377 kernel module isn't auto-loaded
  • The apple-bcm-firmware package is already installed but the driver module was missing from /etc/modules-load.d/t2.conf
  • Adds hci_bcm4377 to the T2 install script for new installs
  • Adds a migration to append the module for existing T2 installs (with detection + idempotency guard)

Fixes #4402

Test plan

  • Tested on MacBook Pro T2 — Bluetooth devices connect successfully after reboot
  • Migration is a no-op on non-T2 hardware (PCI ID check gates it)
  • Migration is idempotent (grep guard prevents duplicate entries)

Copilot AI review requested due to automatic review settings March 28, 2026 15:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_bcm4377 to /etc/modules-load.d/t2.conf during T2 hardware setup for new installs.
  • Add a migration that detects T2 hardware and appends hci_bcm4377 to /etc/modules-load.d/t2.conf with 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.

Comment thread migrations/1774642699.sh
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
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
@dhh dhh merged commit 7c13bd5 into basecamp:dev Apr 1, 2026
3 of 4 checks passed
EFrMG pushed a commit to EFrMG/omarchy that referenced this pull request Apr 4, 2026
marxin pushed a commit to marxin/omarchy that referenced this pull request Apr 4, 2026
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.

Mac T2 Bluetooth menu doesn't open

3 participants