MacOS – Bluetooth Issues after Sleep in OS X Yosemite (10.10)

bluetoothmacbook promacossleep-wake

I seem to be having persistent issues with Bluetooth connectivity, especially after waking up my Macbook Pro from a long sleep.

I have a speaker that automatically turns off after a certain period of inactivity, and my use case typically is open the laptop, turn the speaker on, and when the Bluetooth driver is acting normal, they will automatically reconnect.

However, the problem seem to be that the my Bluetooth peripherals do not reconnect if my Macbook has just been woken up from a long sleep.

After searching around, I found this script to relaunch the bluetooth kernel extensions, but it didn't seem to work on Yosemite.

Here's what sudo tail -f /var/log/system.log gave me after doing a kextload and kextunload (hostname and username redacted):

Nov 17 07:50:11 {redacted} sudo[8118]: username: TTY=ttys000 ; PWD=/Users/username; USER=root ; COMMAND=/sbin/kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
Nov 17 07:50:11 {redacted} kernel[0]: IOBluetoothUSBDFU::probe
Nov 17 07:50:11 {redacted} kernel[0]: IOBluetoothUSBDFU::probe ProductID - 0x821D FirmwareVersion - 0x0147
Nov 17 07:50:11 {redacted} kernel[0]: **** [IOBluetoothHostControllerUSBTransport][start] -- completed -- result = TRUE -- 0x0800 ****
Nov 17 07:50:11 {redacted} kernel[0]: **** [BroadcomBluetoothHostControllerUSBTransport][start] -- Completed -- 0x0800 ****
Nov 17 07:50:11 {redacted} kernel[0]: [IOBluetoothHCIController][staticBluetoothTransportShowsUp] -- Received Bluetooth Controller register service notification -- 0x0800 
Nov 17 07:50:12 {redacted} kernel[0]: **** [IOBluetoothHostControllerUSBTransport][initHardwareWL] -- failed -- calling DoDeviceReset (kBluetoothControllerResetHub) -- 0x0800 ****
Nov 17 07:50:12 {redacted} kernel[0]: **** [IOBluetoothHostControllerUSBTransport][DoDeviceReset] -- thread_call_enter1 (mReEnumerateOrResetThread) -- reEnumerateOrReset (0xffffff8213ac3ae0) = 2 --  returned FALSE -- 0x0800 ****
Nov 17 07:50:12 {redacted} kernel[0]: **** [IOBluetoothHCIController][ProcessBluetoothTransportShowsUpActionWL] -- Error!! -- Something went wrong in the setup process. Could not communicate with Bluetooth Transport successfully -- 0x0800 -- 0x0800 ****
Nov 17 07:50:12 {redacted} kernel[0]: **** [IOBluetoothHostControllerUSBTransport][ReEnumerateOrResetThreadEntry] -- entering -- param0 = 0xffffff806a870800, param1 = 0x2 -- 0x0800
Nov 17 07:50:12 {redacted} kernel[0]: **** [IOBluetoothHostControllerUSBTransport][ReEnumerateOrReset] -- entering -- reEnumerateOrResetIn = 2 -- this = 0x0800 ****
Nov 17 07:50:12 {redacted} kernel[0]: **** [IOBluetoothHostControllerUSBTransport][ReEnumerateOrReset] -- in our workloop -- 0x0800 ****
Nov 17 07:50:12 {redacted} kernel[0]: **** [IOBluetoothHostControllerUSBTransport][ReEnumerateOrReset] -- parameter is valid -- 0x0800 ****
Nov 17 07:50:12 {redacted} kernel[0]: **** [IOBluetoothHostControllerUSBTransport][ReEnumerateOrReset] -- reEnumerateOrReset = 2 -- 0x0800 ****
Nov 17 07:50:12 {redacted} kernel[0]: [IOBluetoothHostControllerUSBTransport][ReEnumerateOrReset] -- calling myHub->ReEnumerateDevice() -- gEnumerateCounter = 1 
Nov 17 07:50:12 {redacted} kernel[0]: [IOBluetoothHostControllerUSBTransport][ReEnumerateOrReset] -- exit; error = 0x0000 (kIOReturnSuccess)
Nov 17 07:50:12 {redacted} kernel[0]: **** [IOBluetoothHostControllerUSBTransport][ReEnumerateOrResetThreadEntry] -- exiting -- 0x0800
Nov 17 07:50:12 {redacted} kernel[0]: IOBluetoothUSBDFU::probe
Nov 17 07:50:12 {redacted} kernel[0]: IOBluetoothUSBDFU::probe ProductID - 0x821D FirmwareVersion - 0x0147
Nov 17 07:50:12 {redacted} kernel[0]: **** [IOBluetoothHostControllerUSBTransport][start] -- completed -- result = TRUE -- 0x0800 ****
Nov 17 07:50:12 {redacted} kernel[0]: **** [BroadcomBluetoothHostControllerUSBTransport][start] -- Completed -- 0x0800 ****
Nov 17 07:50:12 {redacted} kernel[0]: [IOBluetoothHCIController][staticBluetoothTransportShowsUp] -- Received Bluetooth Controller register service notification -- 0x0800 
Nov 17 07:50:12 {redacted} kernel[0]: [IOBluetoothHCIController::setConfigState] calling registerService
Nov 17 07:50:12 {redacted} kernel[0]: **** [IOBluetoothHCIController][ProcessBluetoothTransportShowsUpActionWL] -- Connected to the transport successfully -- 0xe300 -- 0x0800 -- 0x0800 ****
Nov 17 07:50:12 {redacted} sharingd[367]: 07:50:12.595 : SDStatusMonitor::kStatusBluetoothPowerChanged
Nov 17 07:50:12 {redacted} sharingd[367]: 07:50:12.617 : SDStatusMonitor::kStatusBluetoothPowerChanged
Nov 17 07:50:12 {redacted} sharingd[367]: 07:50:12.637 : SDStatusMonitor::kStatusBluetoothPowerChanged
Nov 17 07:50:12 {redacted} sharingd[367]: 07:50:12.657 : SDStatusMonitor::kStatusBluetoothPowerChanged
Nov 17 07:50:12 {redacted} sharingd[367]: 07:50:12.659 : BTLE scanner Powered Off
Nov 17 07:50:12 --- last message repeated 2 times ---
Nov 17 07:50:12 {redacted} coreaudiod[360]: 2014-11-17 07:50:12.663673 AM [AirPlay] BTLE client stopping to browse for AirPlay Solo Target Presence.
Nov 17 07:50:12 {redacted} blued[62]: hciControllerOnline; HID devices? 0
Nov 17 07:50:12 {redacted} coreaudiod[360]: 2014-11-17 07:50:12.663868 AM [AirPlay] BTLE client starting to browse for AirPlay Solo Target Presence.
Nov 17 07:50:12 {redacted} sharingd[367]: 07:50:12.664 : Starting Handoff scanning
Nov 17 07:50:12 {redacted} coreaudiod[360]: 2014-11-17 07:50:12.664336 AM [AirPlay] BTLE client stopped to browse for AirPlay Solo Target Presence.
Nov 17 07:50:12 {redacted} coreaudiod[360]: 2014-11-17 07:50:12.664753 AM [AirPlay] BTLE client started to browse for AirPlay Solo Target Presence.
Nov 17 07:50:12 {redacted} sharingd[367]: 07:50:12.664 : Stopping Handoff advertising
Nov 17 07:50:12 {redacted} sharingd[367]: 07:50:12.665 : BTLE scanner Powered On
Nov 17 07:50:12 {redacted} blued[62]: hostControllerOnline - Number of Paired devices = 2, List of Paired devices = (
      "00-0c-8a-dd-fd-88",
      "84-38-35-ec-1c-ea"
  )
Nov 17 07:50:13 {redacted} kernel[0]: AppleUSBMultitouchDriver::message - kIOUSBMessagePortHasBeenReset.
Nov 17 07:50:13 {redacted} kernel[0]: AppleUSBMultitouchDriver::checkStatus - received Status Packet, Payload 2: device was reinitialized
Nov 17 07:50:13 {redacted} hidd[74]: MultitouchHID: device bootloaded
Nov 17 07:50:13 {redacted} kernel[0]: AppleUSBMultitouchDriver::_deviceGetReport - DeviceRequest for reportID 0xc8 returned with result 0xe000404f - retrying

uname -a output (hostname redacted):

$ uname -a
Darwin {redacted} 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64

Has any of you seen this problem before? Any help would be appreciated.

Best Answer

I've had issues reconnecting my bluetooth keyboard & trackpad since upgrading to Yosimite.

First try this: Open Terminal & run 2 commands:

sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport

sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport

I only had to run above once. If later bluetooth breaks again 2 options, simply run above again or you can create a 1-click solution with a simple app using Automator:

  1. Search for (Spotlight search) and run Automator
  2. Click "New Document" at bottom
  3. Choose "Application" for new file type
  4. Click on "Utilities" from list
  5. Double-Click "Run AppleScript"
  6. Replace (* Your script goes here *) with:

    do shell script "kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport; 
    kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport" with administrator privileges
    
  7. Press play to test (will prompt for password)
  8. File->Save to desktop or wherever

Run the automator app whenever bluetooth devices won't connect