Fix Bluetooth on a MacBook Pro 8,1/2/3 with B43

If you’ve been following the blog, you probably noticed that I recently had a lot of issues with Bluetooth on my MacBook Pro running Ubuntu, and then had them resolved by an awesome commenter. Apparently, if you disable Bluetooth coexistence protection in the B43 driver, then Bluetooth will be able to coexist with WiFi. I have no idea how this makes sense, so don’t ask :)

I demonstrated how to do this with modprobe:

# remove b43
sudo modprobe -r b43
# reinsert b43, with the right settings
sudo modprobe b43 btcoex=0

Unfortunately, this doesn’t work permanently, as whenever you reboot, the B43 driver is loaded with the evil Bluetooth coexistence setting enabled (again, this means that Bluetooth will not work). Thus, we need a permanent solution! Pop open your favorite text editor as root and edit /etc/modprobe.d/options and append the following line:

options b43 btcoex=0

Voila! Go ahead and reboot to test your settings. No more modprobing every time you boot!

MacBook Pro 8,1/8,2/8,3 Bluetooth Issues on Linux

Oh, by the way, I just got a shiny new MacBook Pro to run Linux on! Hooray! It’s an awesome machine, but I just wanted to post this bug to the general public to save people the 3 days I’ve spent trying to figure it out.

Essentially, what it boils down to is this: the b43 Linux driver that you’ve compiled and installed interferes hardcore with the adjacent Bluetooth chip on your MacBook.

Let’s do a little test to demonstrate. While connected to a WiFi network with b43, put a Bluetooth device into pairing mode near your machine. Make sure the bluez package is installed. Next, run the following:

$ hcitool scan

You’ll probably see it say Scanning... and then… nothing. It won’t see your device. Period.

Let’s continue with our experiment. Unload the b43 module with sudo rmmod b43. Your internet will go down if you’re on WiFi. Now, run hcitool scan again.

$ hcitool scan
    XX:XX:XX:XX:XX:XX    Nexus One

Aha! Found you! So, it seems that the problem is with the driver itself. This is kind of a bummer, to say the least, but hopefully they’ll have it patched soon. Until then, sudo modprobe b43 and continue on, weary warrior.

For the record and for Google, I’m running a 2011 MacBook Pro 8,3 with Ubuntu 11.10 Oneiric Ocelot 64bit/amd64.

Update: A Working Workaround!

As noted by Benoit in the comments below, you can actually get things working with a little workaround. First, unload the b43 driver from the kernel:

$ sudo rmmod b43

Next, reload the module, turning Bluetooth coexistence support off:

$ sudo modprobe b43 btcoex=0

As counterintuitive as it seems, it works! Hooray! I’m now able to listen to music with my Bluetooth headphones and use the built in B4331 wireless card in my MacBook at the same time!!! The only issue I’ve encountered is that when you’re spiking and getting really high upload/download rates, you’ll notice that Bluetooth audio skips a bit. Luckily, this is a pretty minimal problem and doesn’t prevent you from using your Bluetooth or your B4331 WiFi card in your MacBook Pro.