How a New MacBook Pro borked an older iMac’s Bluetooth

I collected my new MacBook Pro yesterday, and within a few hours of starting to use it, my iMac looked to be dying: its Bluetooth had fallen apart, and the only way that I could use its Apple wireless keyboard and Magic Trackpad 2 was to hook them up via USB.

My shiny new MacBook Pro had completely shredded Bluetooth on my iMac. All I could do was turn Bluetooth off on the MacBook Pro and restart the iMac.

Beware: if you’re using a Mac running Sierra 10.12.6 and another running High Sierra 10.13.4 in the same room, they could suffer the same fate.

Let me explain the setup, as this bug may be quite hardware- and macOS-specific.

The iMac:

  • iMac17,1 (Retina 5K, 27-inch, Late 2015) running macOS 10.12.6;
  • Apple Magic Keyboard, Magic Trackpad 2;
  • wired ethernet, AirPort turned off, Bluetooth turned on.

The MacBook Pro:

  • MacBookPro14,1 (13-inch, 2017, Two Thunderbolt 3 Ports) running macOS 10.13.4;
  • no attached peripherals;
  • AirPort turned on and sole network connection, Bluetooth turned on.

No such problems had occurred with a MacBook Air 2011 running 10.13.4 in a similar configuration, and the MacBook Pro apparently connected normally with an iPhone (iOS 11.3).

The MacBook Pro had been collected just a few hours earlier, and had initially been supplied with 10.13.3 installed. At 18:13, it was updated to 10.13.4. Following that upgrade, increasingly frequent problems occurred with the iMac’s Bluetooth: the trackpad and keyboard (which infrequently disconnect and reconnect spontaneously) started to disconnect more frequently, and reconnect more slowly.

After 20:00, the iMac emitted a continuous low tone resembling a static vehicle engine for a period of a minute or two. After that, Bluetooth problems worsened markedly, to the point where both trackpad and keyboard disconnected and couldn’t reconnect. I connected them using their charging leads and regained control of the iMac, and at 20:46 restarted the iMac and turned Bluetooth off on the MacBook Pro. Following that, no further problems were experienced with the iMac.

Logs

In the 18 minutes prior to restarting the iMac, it made 3820 log entries from the com.apple.bluetooth and related subsystems. Over the same period an hour later (when Bluetooth had returned to normal), there were only 476.

Much of the later period of the iMac’s log, before restarting, consisted of the MacBook Pro connecting via Continuity, then disconnecting. Log highlights include the following entries:
20:30:44.924571 WirelessProximity Continuity start advertising with data: Advertising request of type 12, priority 5, UseFG 48 (30.00 ms), data …, connectable 1
20:30:45.024858 IOBluetooth Adding UUID FC049FA3-…-ED2F5ACFD6D2 with services in cache
20:30:45.025521 IOBluetooth Found cache for connected device Howard’s MacBook Pro, uuid FC049FA3-…-ED2F5ACFD6D2
20:30:45.220858 IOBluetooth Primary Service Discovery completed with status: 0x0
20:30:45.532130 WirelessProximity Continuity connect to peer: FC049FA3-…-ED2F5ACFD6D2
20:30:45.532253 wirelessproxd We're already connected to this device FC049FA3-…-ED2F5ACFD6D2. Sending back didConnect again...
20:30:46.930376 WirelessProximity Continuity update advertising with data: Advertising request of type 12, priority 5, UseFG 290 (181.25 ms), data …, connectable 1
20:30:56.570834 WirelessProximity Continuity disconnect from peer: FC049FA3-…-ED2F5ACFD6D2
20:30:56.570990 wirelessproxd Disconnect from FC049FA3-…-ED2F5ACFD6D2 called by client F06AECD1-…-DBBC24A68A89 - process identityservicesd (385) - subscribed characteristics: (null)
20:30:56.570994 wirelessproxd Disconnecting from central FC049FA3-…-ED2F5ACFD6D2 for client F06AECD1-…-DBBC24A68A89
20:30:56.571218 wirelessproxd WPDConnection deallocating
20:30:56.604085 IOBluetooth EVENT: Disconnection Complete: Reason = 22

This cycle was repeated, more or less, every 80 seconds. There were also frequent burst of error messages for BluetoothAudio. At the time that the trackpad and keyboard disconnected, there were many more entries concerning Bluetooth, including the following.

20:45:39.804322 kernel IOBluetoothFamily [[0xC000] OpCode 0xFD4B (Broadcom VSC -- LE Set Extended Advertising Data) from: blued (130) Synchronous status: 0x00 (kIOReturnSuccess) state: 2 (BUSY) timeout: 6543] Bluetooth warning: An HCI Req timeout occurred.
20:45:39.896275 kernel IOBluetoothHostControllerUSBTransport [IOBluetoothHostControllerUSBTransport][ReEnumerateOrReset] -- mBluetoothUSBHostController->reset () error = 0x0000 (kIOReturnSuccess)
20:45:39.938786 wirelessproxd Scanner Central manager is unknown, powered off, unauthorized or not supported (0) - reset connection in progress {} and peripheral connections {()}
20:45:39.940717 Error wirelessproxd CoreBluetooth isn't advertising for this client type

Over the same periods on the MacBook Pro, there were 3511 log entries before turning Bluetooth off, and 1489 afterwards. Here, the cycles of attempts to connect via Continuity were different, and typically followed this sequence of highlights:

20:30:44.955997 WirelessProximity Continuity connect to peer: AFC18B6D-…-022DDC693138
20:30:44.956212 wirelessproxd Connect to AFC18B6D-…-022DDC693138 called by client CAEA0447-…-24A13DA6DD48 - process identityservicesd (275) - options (null)
20:30:44.995308 IOBluetooth This is an (Outgoing) Connection - We are Central/Master
20:30:45.126555 IOBluetooth ***** lePairingCompleted for deviceAddr = 28-f0-76-24-46-35 (name = Howard’s iMac) with status = 0
20:30:45.284304 wirelessproxd Connected to device (Howard’s iMac) with UUID AFC18B6D-…-022DDC693138 and role 0
20:30:45.284450 wirelessproxd Created a connection to peripheral AFC18B6D-…-022DDC693138 for client CAEA0447-…-24A13DA6DD48
20:30:56.657063 IOBluetooth ***** [BluetoothHCIEventNotificationMessage] kBluetoothHCIEventDisconnectionComplete
20:30:56.657081 IOBluetooth EVENT: DisconnectionComplete
20:30:56.657092 IOBluetooth EVENT: Disconnection Complete: Reason = 19
20:30:56.660603 IOBluetooth == IOBluetoothBroadcomSchedulerWorkaround start
20:30:56.661418 IOBluetooth == IOBluetoothBroadcomSchedulerWorkaround end
20:30:56.662743 wirelessproxd Disconnected from peripheral AFC18B6D-…-022DDC693138 with Error: The connection has timed out unexpectedly.
20:30:56.662810 WirelessProximity Continuity peer: AFC18B6D-…-022DDC693138 is disconnected with error: The connection has timed out unexpectedly. - send didDisconnect
20:31:11.665368 WirelessProximity Continuity disconnect from peer: AFC18B6D-…-022DDC693138

Interpretation

What appears to have been happening is that the MacBook Pro was trying to connect with the iMac using Bluetooth, which was succeeding initially. However, with AirPort turned off on the iMac, this connection could not be fully completed. This led to disconnection, and increasing instability in the iMac’s Bluetooth stack. There are longstanding bugs in Bluetooth which have plagued all versions of El Capitan and Sierra.

Eventually, that instability resulted in failure, which disconnected all Bluetooth devices from the iMac.

What are the key requirements for this to happen?

  • The combination of Sierra and High Sierra 10.13.4,
  • One system with AirPort turned off, falling short of the requirements for Continuity,
  • Bluetooth input devices on the system with AirPort turned off.

The two Macs may then enter this cycle of connection and disconnection, eventually leading to failure of control over Bluetooth on the Mac running Sierra with AirPort turned off.

The only solution seems to be to turn Bluetooth off on the other Mac, and restart the affected Mac. Turning AirPort on could also prevent the problem by stopping these connect-disconnect cycles. As far as I can tell, this is a problem introduced with High Sierra 10.13.4 on certain models, such as the MacBook Pro.

If you have suffered similar, I’d be delighted to hear of your experience, please.