OpenIntelWireless / IntelBluetoothFirmware

Intel Bluetooth Kernel Extensions for macOS
https://OpenIntelWireless.github.io/IntelBluetoothFirmware
GNU General Public License v3.0
2.47k stars 262 forks source link

Bluetooth get stuck after some time #430

Closed alexander-potemkin closed 1 year ago

alexander-potemkin commented 1 year ago

Have you read the docs?

Yes

macOS Version

MacOS 12.6.3 - Monterey

Kext Version

v2.2.0

Wireless Adapter Model and USB Product ID

Bluetooth USB Host Controller@14700000

Description

First of all - thank you very much!

I've got an issue and I hope you could probably assist: after some time after fresh reboot Bluetooth just stick.

The fastest way to reproduce: it's to let my laptop sleep with bluetooth headphones, in around 2-3 sleeps the bluetooth will get stuck - no way to connect, not disconnect, bluetoothd goes for 100% of CPU and MacOS (12.6.3 - Monterey) can't reboot by itself (only hard reboot helps).

Attached are all of the logs at the moment of the issue:

dmesg:

[74869.002442]: IOHIDInterface:0x1000003a4 Creating temporary buffer for report data
[74869.002451]: IOHIDInterface:0x1000003a4 Large amount of outstanding buffers: 3935 3934
[74869.057014]: IOHIDInterface:0x1000003a4 Creating temporary buffer for report data
[74869.057023]: IOHIDInterface:0x1000003a4 Large amount of outstanding buffers: 3937 3936
[74886.531825]: IOHIDInterface:0x1000003a4 Creating temporary buffer for report data
[74886.531832]: IOHIDInterface:0x1000003a4 Large amount of outstanding buffers: 3953 3952
[74886.689658]: IOHIDInterface:0x1000003a4 Creating temporary buffer for report data
[74886.689684]: IOHIDInterface:0x1000003a4 Large amount of outstanding buffers: 3955 3954
[74903.499312]: IOHIDInterface:0x1000003a4 Creating temporary buffer for report data
[74903.499319]: IOHIDInterface:0x1000003a4 Large amount of outstanding buffers: 3963 3962
[74903.641172]: IOHIDInterface:0x1000003a4 Creating temporary buffer for report data
[74903.641179]: IOHIDInterface:0x1000003a4 Large amount of outstanding buffers: 3965 3964
[74909.671365]: IOHIDInterface:0x1000003a4 Creating temporary buffer for report data
[74909.671378]: IOHIDInterface:0x1000003a4 Large amount of outstanding buffers: 4009 4008
[74913.195119]: IOHIDInterface:0x1000003a4 Creating temporary buffer for report data
[74913.195126]: IOHIDInterface:0x1000003a4 Large amount of outstanding buffers: 4023 4022
[74913.297304]: IOHIDInterface:0x1000003a4 Creating temporary buffer for report data
[74913.297313]: IOHIDInterface:0x1000003a4 Large amount of outstanding buffers: 4025 4024
[74916.616440]: IOHIDInterface:0x1000003a4 Creating temporary buffer for report data
[74916.616452]: IOHIDInterface:0x1000003a4 Large amount of outstanding buffers: 4044 4044

kextstat for the kext's:

<...>
  105    0 0                  0x6d6000   0x6d6000   com.zxystd.IntelBluetoothFirmware (2.2.0) 43887626-85E4-3BE5-B383-5D25CA48815C <24 7 6 3>
<...>
   59    0 0                  0xa000     0xa000     as.acidanthera.BlueToolFixup (2.6.4) 2588663C-8CC3-3D94-9555-23402237E8E1 <51 9 7 6 3 2 1>
<...>

ps aux | grep bluetoothd:

root             40514  98.5  0.1 33626820   4848   ??  REs  12:41PM   4:48.27 /usr/sbin/bluetoothd

And here is how bluetooth in GUI looks like:

Screenshot 2023-02-23 at 12 42 43 Screenshot 2023-02-23 at 12 41 46

Any help would be much appreciated!!

Info in System Report - Bluetooth

Bluetooth Controller:
  Address:  00:21:6B:F0:DA:CE
  State:    On
  Chipset:  THIRD_PARTY_DONGLE
  Discoverable: Off
  Firmware Version: v256 c256
  Product ID:   0x0001
  Supported Devices:    0x382039 < HFP AVRCP A2DP HID Braille AACP GATT Serial >
  Transport:    USB
  Vendor ID:    0x004C (Apple)
  Not Connected:
  Alexander’s AirPods Pro:
  Address:  4C:20:B8:2E:00:05
  Vendor ID:    0x004C
  Product ID:   0x200E
  Firmware Version: 5B58
  Minor Type:   Headphones
  Serial Number:    GX5DMPRB0C6L
  Sony WI-XB400:
  Address:  74:45:CE:41:06:3F
  Vendor ID:    0x005D
  Product ID:   0x223B
  Firmware Version: 1.0.0
  Minor Type:   Headset

Relevant log output

[ 4357.475691]: IntelFirmware: Driver Stop()
[ 4357.476121]: IntelFirmware: Driver free()
[ 4357.479515]: IntelFirmware: Driver init()
[ 4357.479528]: IntelFirmware: Driver Probe()
[ 4357.479536]: IntelFirmware: name=IOUSBHostDevice, class=IOService, vendorID=0x8087, productID=0x0A2B
[ 4357.479550]: IntelFirmware: Driver Start()
[ 4357.479592]: IntelFirmware: virtual bool BtIntel::initWithDevice(IOService *, IOUSBHostDevice *)
[ 4357.479598]: IntelFirmware: virtual bool USBDeviceController::init(IOService *, IOUSBHostDevice *)
[ 4357.479614]: IntelFirmware: virtual bool USBDeviceController::initConfiguration()
[ 4357.480210]: IntelFirmware: set configuration to 1
[ 4357.480670]: IntelFirmware: virtual bool USBDeviceController::findInterface()
[ 4357.480682]: IntelFirmware: Found interface!!!
[ 4357.480703]: IntelFirmware: virtual bool USBDeviceController::findPipes()
[ 4357.480707]: IntelFirmware: Found Interrupt endpoint!
[ 4357.480964]: IntelFirmware: Found Bulk out endpoint!
[ 4357.481213]: IntelFirmware: Found Bulk in endpoint!
[ 4357.481469]: IntelFirmware: BT init succeed
[ 4357.483460]: IntelFirmware: Read the legacy Intel version information
[ 4357.483467]: IntelFirmware: Bootloader revision 0.0 build 26 week 38 2015
[ 4357.484470]: IntelFirmware: Device revision is 16
[ 4357.484479]: IntelFirmware: Secure boot is enabled
[ 4357.484483]: IntelFirmware: OTP lock is enabled
[ 4357.484486]: IntelFirmware: API lock is enabled
[ 4357.484489]: IntelFirmware: Debug lock is disabled
[ 4357.484492]: IntelFirmware: Minimum firmware build 1 week 10 2014
[ 4357.484642]: IntelFirmware: Found device firmware ibt-12-16.sfi
[ 4357.490776]: IntelFirmware: send firmware header
[ 4357.491209]: IntelFirmware: send firmware header done
[ 4357.491214]: IntelFirmware: send firmware pkey
[ 4357.491848]: IntelFirmware: send firmware pkey done
[ 4357.491852]: IntelFirmware: send firmware signature
[ 4357.492611]: IntelFirmware: send firmware signature done
[ 4357.492617]: IntelFirmware: send firmware payload
[ 4358.838612]: IntelFirmware: send firmware payload done
[ 4358.839519]: IntelFirmware: Notify: Firmware download done
[ 4358.852819]: IntelFirmware: Notify: Device reboot done
[ 4358.852849]: IntelFirmware: Found device firmware ibt-12-16.ddc
[ 4358.852871]: IntelFirmware: Load DDC config: ibt-12-16.ddc 14
[ 4358.863698]: IntelFirmware: Load DDC config done
[ 4358.864704]: IntelFirmware: Firmware revision 0.1 build 212 week 30 2021
[ 4358.865715]: IntelFirmware: Clean up...
[ 4358.865733]: IntelFirmware: virtual void BtIntel::free()
[ 4358.865740]: IntelFirmware: virtual void USBDeviceController::free()
[74476.814009]: IntelFirmware: Driver Stop()
[74476.814447]: IntelFirmware: Driver free()
[74476.817584]: IntelFirmware: Driver init()
[74476.817595]: IntelFirmware: Driver Probe()
[74476.817601]: IntelFirmware: name=IOUSBHostDevice, class=IOService, vendorID=0x8087, productID=0x0A2B
[74476.817614]: IntelFirmware: Driver Start()
[74476.817648]: IntelFirmware: virtual bool BtIntel::initWithDevice(IOService *, IOUSBHostDevice *)
[74476.817653]: IntelFirmware: virtual bool USBDeviceController::init(IOService *, IOUSBHostDevice *)
[74476.817668]: IntelFirmware: virtual bool USBDeviceController::initConfiguration()
[74476.818285]: IntelFirmware: set configuration to 1
[74476.818689]: IntelFirmware: virtual bool USBDeviceController::findInterface()
[74476.818696]: IntelFirmware: Found interface!!!
[74476.818715]: IntelFirmware: virtual bool USBDeviceController::findPipes()
[74476.818721]: IntelFirmware: Found Interrupt endpoint!
[74476.818992]: IntelFirmware: Found Bulk out endpoint!
[74476.819233]: IntelFirmware: Found Bulk in endpoint!
[74476.819505]: IntelFirmware: BT init succeed
[74476.821201]: IntelFirmware: Read the legacy Intel version information
[74476.821206]: IntelFirmware: Bootloader revision 0.0 build 26 week 38 2015
[74476.822211]: IntelFirmware: Device revision is 16
[74476.822217]: IntelFirmware: Secure boot is enabled
[74476.822220]: IntelFirmware: OTP lock is enabled
[74476.822223]: IntelFirmware: API lock is enabled
[74476.822225]: IntelFirmware: Debug lock is disabled
[74476.822228]: IntelFirmware: Minimum firmware build 1 week 10 2014
[74476.822411]: IntelFirmware: Found device firmware ibt-12-16.sfi
[74476.828457]: IntelFirmware: send firmware header
[74476.828863]: IntelFirmware: send firmware header done
[74476.828869]: IntelFirmware: send firmware pkey
[74476.829606]: IntelFirmware: send firmware pkey done
[74476.829611]: IntelFirmware: send firmware signature
[74476.830400]: IntelFirmware: send firmware signature done
[74476.830406]: IntelFirmware: send firmware payload
[74478.211735]: IntelFirmware: send firmware payload done
[74478.212187]: IntelFirmware: Notify: Firmware download done
[74478.225253]: IntelFirmware: Notify: Device reboot done
[74478.225261]: IntelFirmware: Found device firmware ibt-12-16.ddc
[74478.225269]: IntelFirmware: Load DDC config: ibt-12-16.ddc 14
[74478.236225]: IntelFirmware: Load DDC config done
[74478.237237]: IntelFirmware: Firmware revision 0.1 build 212 week 30 2021
[74478.238233]: IntelFirmware: Clean up...
[74478.238237]: IntelFirmware: virtual void BtIntel::free()
[74478.238239]: IntelFirmware: virtual void USBDeviceController::free()

Kernel Panic Logs

N/A
alexander-potemkin commented 1 year ago

The work-around I've found - it's to shutdown machine on sleep (hibernate to file):sudo pmset -a hibernatemode 25.

After the sleep Bluetooth is just shown as switched off, I switch it on and everything works. I suspect this entry in the logs IntelFirmware: Notify: Device reboot done helps.

Is there any way I can reboot the device without shutting down the whole machine?