zearp / Nucintosh

Intel NUC Hackintosh Stuff
721 stars 85 forks source link

Apple Airport cards stuck in HID mode on wake with Monterey and newer #90

Closed zearp closed 1 year ago

zearp commented 2 years ago

Anyone else have HID proxy mode getting stuck on wake when using Apple Airport cards on Monterey and Ventura?

I have no issues on Big Sur and earlier using the same EFI and macOS power management settings in combination with a BCM94360CS2.

With Monterey and newer when the machine wakes up the keyboard and mouse are stuck in HID proxy mode. This means both mouse and keyboard are sluggish and the scroll wheel isn't functioning.

On Big Sur and earlier this was not an issue, there were no usb composite devices visible after waking up. On Monterey and newer the composite devices are not removed. Bluetooth settings show both devices not being connected. Power cycling the mouse/keyboard does not help. The only thing that fixes it is to restart the bluetooth daemon with sudo pkill bluetoothd.

This isn't a super big issue but it sure is annoying having to restart the bluetooth daemon each time I wake up my machine from sleep just to get the keyboard and mouse working properly and at the right speed.

For some reason Monterey/Ventura are not removing the composite devices and re-connect the devices over bluetooth on wake.

The HID proxy is a great feature that allows us to use any paired mouse and keyboard outside of macOS, for example to enter the BIOS. It is one of the reason I bought Apple Airport cards and of course getting full iServices.

I can't seem to fix this issue as I have no idea why this is happening. I know Monterey/ broke bluetooth things in many ways but it surprising this happens with Apple hardware too.

I have tried adding BlueToolFixup.kext but it doesn't fix this and also it should not be needed to add additional kexts for natively supported Airport cards.

Anyone else running into this or know a fix for it? I can't find much info on HID proxy mode issues and Monterey.

zearp commented 2 years ago

When opening System Information after wake you will these 2 devices under the Airportcard's usb devices: Screenshot 2022-07-23 at 14 29 33

When opening System Preferences's bluetooth settings I can see some quick messages "connection rejected" when it tries to connect to the mouse or keyboard. After some time (seconds to minutes) it sorts it self out but it can take a long time to fix itself so I end up restarting the bluetooth daemon a lot.

No matter how fast I check on Big Sur and earlier I can never spot the two composite devices, they are removed and bluetooth is reconnected very quickly and without any issues.

I don't know if this is a macOS issue we can't fix or if there's something we can do to fix this. Maybe some ACPI patch or something? This is above my pay grade so I hope someone with more knowledge about ACPI and sleep can provide some more information and hopefully a solution.

SeaDaddytheRed commented 2 years ago

I cannot reproduce this issue. I have a BCM94360CS2 card using an adapter. (You helped me get it working after a couple DOA adapters.) I am using a cheap JellyComb bluetooth mouse and keyboard and they work fine after waking from sleep. I don't leave it in sleep very long if that matters. As you know I can't leave it in sleep very long or it gets stuck in darkwake.

zearp commented 2 years ago

Disabling ASPM might work but I have yet to test it. I totally forgot about it being a factor in sleep related issues.

It may also help with your sleep issue but I would try sleep without the Broadcom card first to see if its actually the cause or not. I do recall having weird sleep related issues caused by devices having ASPM enabled.

To disable add a new pci device in the config's DeviceProeprties section with the path to the card (easy to find in Hackintool) then create and set pci-aspm-default to 00 (data type).

SeaDaddytheRed commented 2 years ago

Just thought I would update that since Beta 8 my sleep issues have disappeared.

zearp commented 2 years ago

Nice! Good to know. Thank you for the update.

I have not tested the beta on my Broadcom NUCs yet. I test the beta on one stock NUC only. I keep the rest on earlier macOS versions until Ventura is out of beta and the teething problems have been solved.

zearp commented 2 years ago

Just did some testing on Monterey 12.6 and my bluetooth mouse/keyboard re-connect faster. There's still some time it's stuck in slow motion/HID mode but it did improve.

richarddcrossley commented 1 year ago

I have the Akasa case for the NUCi58th gen. On removing the parts annoyingly the Wifi solder on the MB came off. I have ordered the BCM94360CS2 and have some Mac SSD to NVMe adapters. I am guessing I will lose the NVMe slot but if I use this combo will that mean I can now have functioning internal wifi and bluetooth and hackintosh the NUC using your guide and an internal SATA SSD? Seems a win as eternal USB wifi cards are rubbish and I am a Mac OS user normally anyway.

zearp commented 1 year ago

Using a Broadcom card in the m.2. slot is a good way to get the full Apple experience as this will give you al the hand off, continuity features.

If you need faster storage you can always consider running macOS on an external disk using one of the 10gbit usb ports. All the usb ports on the NUC8 are 10gbit which is faster than the internal data interface.

richarddcrossley commented 1 year ago

Using a Broadcom card in the m.2. slot is a good way to get the full Apple experience as this will give you al the hand off, continuity features.

If you need faster storage you can always consider running macOS on an external disk using one of the 10gbit usb ports. All the usb ports on the NUC8 are 10gbit which is faster than the internal data interface.

I have full working Ventura 13.3.1 system now bar bluetooth thanks to you. I am using an adapter with a USB header connected to a BCM94360CS2. The wifi is working perfectly and I think the device is showing for bluetooth but will a NULL value.

Address: NULL State: Off Chipset: BCM_4350C2 Discoverable: Off Firmware Version: v0 c0 Supported Devices: 0x382039 < HFP AVRCP A2DP HID Braille AACP GATT SerialPort > Transport: USB Vendor ID: 0x004C (Apple)

Any idea how to enable this please as I have tried to follow your instructions but I am a bit lost now!

zearp commented 1 year ago

I've made a new issue for you as it's not relevant to this post and also this can be closed as I've not had this issue in a long time so it seems to have fixed itself.

Please comment in the new issue with some details about how you set up your bluetooth. Sharing your config and/or full EFI attached would be helpful for me to quickly see what's going on.

Usually all that's needed on anything Big Sur or newer is adding one kext (which is included by default. It is also needed to edit the usb map and als to disable both bluetooth and wifi in the bios. Please continue here: https://github.com/zearp/Nucintosh/issues/122