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

Fix LE devices not working on Ventura #446

Open qhuyduong opened 1 year ago

qhuyduong commented 1 year ago

Look like starting from Ventura, the bluetooth daemon expects an LE PHY Update Complete event to be triggered from the controller before starting the connection to LE devices (e.g: Logitech MX Master 3S mouse). For Broadcom cards, that event is triggered automatically on new connection (attached the screenshot of PacketLogger on Macbook Air M1).

image

However for Intel ones, that event is not sent by the firmware, so pairing these devices will stuck.

One of the solution is to fake the LE PHY Update Complete event by issuing an extra LE command and modify its response.

Tested on macOS Ventura 13.4 with Intel® Wi-Fi 6 AX200 and Logitech MX Master 3S.

Fixes #51 #418 #419 #421 #444

P/S: I'm quite new for Lilu and macOS SDK, so I belive there should be a cleaner way to do this, such faking the event without the need to sending another command. Recommendations are welcome.

Lorys89 commented 1 year ago

@zxystd work with this pr Screenshot 2023-06-18 alle 18 53 50

Lorys89 commented 1 year ago

and work for sonoma Screenshot 2023-06-18 alle 19 18 04

lsvih commented 1 year ago

I finally get my NIZ keyboard BLE working! Thank you so much!

image

williambj1 commented 1 year ago

Hi, sorry for the late reply. Code for patching asyncIORequest and initPipeRequest were deleted recently since they caused panic when waking up from sleep for some systems. This PR seemed to add them back, is it possible to achieve the same goal without patching those two functions?

mackonsti commented 1 year ago

Hi @williambj1 until we wait for the feedback from @qhuyduong can we not restrict this commit to Ventura? So far, myself included, there haven't been reports of kernel panics. Perhaps the re-write of the BT stack in macOS allow this hack to be implemented safely? What do you think?

mackonsti commented 1 year ago

Hi @williambj1 it doesn't seem that @qhuyduong saw your previous message, is it still safe to use such code patching in the kext? I am on Ventura and thankfully I have had no kernel panics (but with low BTLE use, admittedly). Thanks!

Lorys89 commented 1 year ago

I use it on ventura and sonoma and I have not found kp, and I always have keyboard and mouse Logitech connected in bt

mackonsti commented 1 year ago

Hi @williambj1 it seems I had an OS crash or kernel panic out of nowhere, without changing/adding anything all this time -- when the Intel NUC that I use woke from sleep (or something). There are 2 panic files that I detected in /Library/Logs/DiagnosticReports/ but these seem to be in JSON format and not visible anywhere in Console.app. Do you have the means to read them and see if our Intel BT kext here, is causing this? I am using the fork by @qhuyduong:

Kernel-2023-07-04-014613.panic.txt

contents.panic.txt

(please remove the txt extension)

Unfortunately, I am not using this parameter in OpenCore in a permanent way 😞 So not sure if these panic files can offer much information.

<key>boot-args</key>
<string>keepsyms=1</string>

What tool or Terminal command do you use to check this type of files? I cannot find any reference anywhere. Thank you.

dungnguyen2703 commented 1 year ago

I have mini pc with Intel AX200. I try to use kext from release v2.2.0 and my bluetooth doesn't work. I try kext from this commit. It doesn't work too. Could you please help me to identify the problem

Screenshot 2023-07-13 at 10 08 22 Screenshot 2023-07-13 at 10 09 25 Screenshot 2023-07-13 at 10 11 08

Zyvoxi commented 1 year ago

I have mini pc with Intel AX200. I try to use kext from release v2.2.0 and my bluetooth doesn't work. I try kext from this commit. It doesn't work too. Could you please help me to identify the problem

Screenshot 2023-07-13 at 10 08 22 Screenshot 2023-07-13 at 10 09 25 Screenshot 2023-07-13 at 10 11 08

I have the same problem.

Kaisar870 commented 1 year ago

and work for sonoma Screenshot 2023-06-18 alle 19 18 04

hi there, i have asus z390e which is with bluetooth 5. my Bluetooth working properly except mx master3, is there any solution? this showing on the list but not connected. thank you! Screenshot 2023-07-23 at 3 57 08 PM

Kaisar870 commented 1 year ago

and work for sonoma Screenshot 2023-06-18 alle 19 18 04

hi there, i have asus z390e which is with bluetooth 5. my Bluetooth working properly except mx master3, is there any solution? this showing on the list but not connected. thank you! Screenshot 2023-07-23 at 3 57 08 PM

finally it worked! thanks for the good work! Screenshot 2023-07-23 at 4 12 16 PM

mackonsti commented 1 year ago

finally it worked! thanks for the good work!

Please @Kaisar870 tell us exactly what you did, what you used, your macOS, setup, OpenCore and specific config settings, please. Your comment will be more helpful for others, like that. Thank you.

Kaisar870 commented 1 year ago

finally it worked! thanks for the good work!

Please @Kaisar870 tell us exactly what you did, what you used, your macOS, setup, OpenCore and specific config settings, please. Your comment will be more helpful for others, like that. Thank you.

hi there, my setup is Asus Z390E, i9900k, 32GB RAM, Redeon Pro W6600, SN850X 1TB SSD (OS Installed-macOS Sonomo), Samsung 980 Pro 2 TB ( Use Only as a storage, since this ssd have issues with boot, die under heavy load etc.) Opencore version 0.9.4. this thread specific for LE devices like Logitech MX Master 3 or MX Keys. If you you want to make [hackintosh] please follow this instructions, (https://dortania.github.io/OpenCore-Install-Guide/) or if you have connectivity issues like intel wifi or bluetooth just follow this (https://dortania.github.io/OpenCore-Install-Guide/ktext.html#wifi-and-bluetooth). Please do lem me know specific issues you're experiencing.

simanho88 commented 1 year ago
image

I have dell xps9570 with Intel AX210 and dell mouse MS7421W. mouse not work with kext 2.3.0 from public release. I tried to use kext from this commit and my bluetooth mouse work fine. thank for this great work.

lsvih commented 1 year ago

Feedback: After prolonged use, from the release of this patch up until now, my hackintosh has not experienced any crashes due to this kext.

Lelik1x commented 1 year ago
image

I have dell xps9570 with Intel AX210 and dell mouse MS7421W. mouse not work with kext 2.3.0 from public release. I tried to use kext from this commit and my bluetooth mouse work fine. thank for this great work.

Please tell me where to download the kext from this commit? mx keys and mx master 3s don't work for me either on ax210 please send me a working kext

Lorys89 commented 1 year ago
image

I have dell xps9570 with Intel AX210 and dell mouse MS7421W. mouse not work with kext 2.3.0 from public release. I tried to use kext from this commit and my bluetooth mouse work fine. thank for this great work.

Please tell me where to download the kext from this commit? mx keys and mx master 3s don't work for me either on ax210 please send me a working kext

Get bluetooth kext from my repo https://github.com/Lorys89/Intel-NUC8-Hackintosh

ctopher7 commented 1 year ago
image

I have dell xps9570 with Intel AX210 and dell mouse MS7421W. mouse not work with kext 2.3.0 from public release. I tried to use kext from this commit and my bluetooth mouse work fine. thank for this great work.

Please tell me where to download the kext from this commit? mx keys and mx master 3s don't work for me either on ax210 please send me a working kext

Get bluetooth kext from my repo https://github.com/Lorys89/Intel-NUC8-Hackintosh

still not working for me Screenshot 2023-09-20 at 08 29 44

intel ac9260 laptop, ventura 13.5.2, openCore 0.9.5 my config.plist already updated and I have reorder the kexts based on your config.plist (BluetoolFixup,IntelBTPatcher,IntelBluetoothFirmware)

it is connected, but the indicator on the mouse still on pairing mode (blipping fast)

Lelik1x commented 1 year ago
image

I have dell xps9570 with Intel AX210 and dell mouse MS7421W. mouse not work with kext 2.3.0 from public release. I tried to use kext from this commit and my bluetooth mouse work fine. thank for this great work.

Please tell me where to download the kext from this commit? mx keys and mx master 3s don't work for me either on ax210 please send me a working kext

Get bluetooth kext from my repo https://github.com/Lorys89/Intel-NUC8-Hackintosh

Not working for me

intel ax210, ventura 13.5.2, OpenCore 0.9.3 I updated my config.plist based on yours and changed the order of the files (BluetoolFixup, IntelBTPatcher,IntelBluetoothFirmware) My mx keys and mx master 3s still do not work as before. 20230920_090719.jpg

ctopher7 commented 1 year ago
image

I have dell xps9570 with Intel AX210 and dell mouse MS7421W. mouse not work with kext 2.3.0 from public release. I tried to use kext from this commit and my bluetooth mouse work fine. thank for this great work.

Please tell me where to download the kext from this commit? mx keys and mx master 3s don't work for me either on ax210 please send me a working kext

Get bluetooth kext from my repo https://github.com/Lorys89/Intel-NUC8-Hackintosh

Not working for me

intel ax210, ventura 13.5.2, OpenCore 0.9.3 I updated my config.plist based on yours and changed the order of the files (BluetoolFixup, IntelBTPatcher,IntelBluetoothFirmware) My mx keys and mx master 3s still do not work as before. 20230920_090719.jpg

weirdly my logitech mouses (pebble, vertical) could not connect with my hackintosh. 2 of them do not have any problems when connecting to windows PC.

but now my logitech keyboard connected via bluetooth to my hackintosh

Lorys89 commented 1 year ago

Here are the kext just compiled https://github.com/Lorys89/IntelBluetoothFirmware/suites/16367616296/artifacts/934935709

Lelik1x commented 1 year ago

Here are the kext just compiled https://github.com/Lorys89/IntelBluetoothFirmware/suites/16367616296/artifacts/934935709

image thank you very much! everything worked

ctopher7 commented 1 year ago

Here are the kext just compiled https://github.com/Lorys89/IntelBluetoothFirmware/suites/16367616296/artifacts/934935709

this works man!! for me, I am excluding the intelBluetoothInjector, I used bluetoolfixup v2.6.8 instead thanks a lot

Lelik1x commented 1 year ago

Here are the kext just compiled https://github.com/Lorys89/IntelBluetoothFirmware/suites/16367616296/artifacts/934935709

when I type quickly on the keyboard, it turns out that letters are skipped and in general the keyboard works as if it slows down, please tell me how to fix it? there was no such suspension on the native module from broadcom, where the keyboard prints quickly and does not skip letters.

Lorys89 commented 1 year ago

Here are the kext just compiled https://github.com/Lorys89/IntelBluetoothFirmware/suites/16367616296/artifacts/934935709

when I type quickly on the keyboard, it turns out that letters are skipped and in general the keyboard works as if it slows down, please tell me how to fix it? there was no such suspension on the native module from broadcom, where the keyboard prints quickly and does not skip letters.

Solution 1: Write slowly 🙈 Solution 2: Wait for the dev to read your comment and consider if it is possible to fix it

hugonascimento commented 1 year ago

MX Keys keyboard does not connect to Sonoma :( WiFi/Bluetooth Intel 9560 USB configured as internal Other devices work correctly. :) Any solution available?

Lorys89 commented 1 year ago

MX Keys keyboard does not connect to Sonoma :( WiFi/Bluetooth Intel 9560 USB configured as internal Other devices work correctly. :) Any solution available?

My keyboard mx keys connects great to sonoma with bt. I use the kext I posted above.

mackonsti commented 1 year ago

Code for patching asyncIORequest and initPipeRequest were deleted recently since they caused panic when waking up from sleep for some systems. This PR seemed to add them back, is it possible to achieve the same goal without patching those two functions?

@williambj1 would you consider this fix only for Ventura?

For some reason @qhuyduong never came back to us with a reply 😞 and closing this ticket would be great progress, after so many weeks.

Thank you 🙏

EDIT: @Lorys89 would this kext be needed only on NUC8 BTLE chipsets? What about newer BTLE controllers like e.g. AX201, would your kext work there, respectively?

koechian commented 1 year ago

@Lorys89, @qhuyduong Got this working today on Ventura on an Intel AX200 card. Both the Microsoft Designer Keyboard and Microsoft Ergonomic Mouse are working fine. Thanks for your work.

image

Lorys89 commented 1 year ago

I'm just a tester, but the dev was good at fixing it.

mackonsti commented 1 year ago

Hi @Lorys89 why don't you suggest your fix to @williambj1 so that this can be integrated officially in the kext, even if it is only for Ventura?

Did you recompile your kext with latest codebase @Lorys89 ? Thanks

koechian commented 1 year ago

@Lorys89 @qhuyduong While the issue with pairing was fixed after using the compiled Kext from this PR, I am unable to automatically pair the devices after they sleep or on boot. I have to 'Forget' the device, then pair it again in order to use them.

image

503580622 commented 1 year ago

我的蓝牙正常了,感谢大佬

image
Harry2336 commented 1 year ago

我的蓝牙正常了,感谢大佬 image

怎么解决的啊兄弟

marcsvg commented 1 year ago

Here are the kext just compiled https://github.com/Lorys89/IntelBluetoothFirmware/suites/16367616296/artifacts/934935709

image thank you very much! everything worked

I have an MX Keys Mini, and I'm using the most current version of Kext, but I can't connect in any way, could anyone help me? could you help @Lorys89 ?

yflwz commented 12 months ago
image image image

Download and update the new driver above, but Bluetooth still doesn’t work properly.

Zephon-H commented 10 months ago

It can't be used for my redmibook pro 15 s(AX210). It shows connected to my bluetooth mouse but doesn't actually work.

image image
phucho2306 commented 10 months ago

don't work in z690i ultra plus ddr4 (AX411). Loading icon that disappears after clicking the button connect.

prcmelo commented 10 months ago

@Lorys89 Thank you so much! Your kext version made my MX Keys and MX Anywhere 3 to work again!

MVRL70 commented 10 months ago

Hello, everyone. I can’t get my HP240 mouse to function on Ventura or Sonoma. Have tried different kexts versions. Is there a workaround ? Thanks !

tuancuong92 commented 10 months ago

@qhuyduong bạn tuyệt vời bạn 10 điểm!!! Mình fix dc lỗi bluetooth trên bản hackintosh của mình rồi \:D/

prcmelo commented 9 months ago

For me, Version 2.4.0, (as the official 2.3.0 Release), is a no go to my Logitech MX Series, (keyboard and mouse). I had to revert to the @Lorys89 version, (2.3.0), to make them work again.

Edit: Using macOS Sonoma 14.3.1

laris commented 8 months ago

For me, Version 2.4.0, (as the official 2.3.0 Release), is a no go to my Logitech MX Series, (keyboard and mouse). I had to revert to the @Lorys89 version, (2.3.0), to make them work again.

Edit: Using macOS Sonoma 14.3.1

+1 Sonoma v14.4.1 + Lorys89's version https://github.com/OpenIntelWireless/IntelBluetoothFirmware/issues/51#issuecomment-2022620392

HenriqueBarroso commented 7 months ago

Same here. Ventura + @Lorys89 version works for my MX Master 3S.

MVRL70 commented 7 months ago

Hello, everyone. I'd like to test this IntelBTPatcher/IntelBTPatcher.cpp in my setup. What should I do ? My problem is getting the HP240 mouse to connect. Thanks.

koechian commented 7 months ago

@MVRL70 Get the compiled files from here. Then follow the instructions from OpenIntelWireless but using the files you got from this PR.

MVRL70 commented 7 months ago

@MVRL70 Get the compiled files from here. Then follow the instructions from OpenIntelWireless but using the files you got from this PR.

Thanks, koetchian, but no success. Tried release and debug.

kidxiang commented 5 months ago

@MVRL70 Get the compiled files from here. Then follow the instructions from OpenIntelWireless but using the files you got from this PR.

It works, thanks so much!

captain-spaghetti commented 5 months ago

Here are the kext just compiled https://github.com/Lorys89/IntelBluetoothFirmware/suites/16367616296/artifacts/934935709

Link seems to have expired, can you re-upload?