osy / HaC-Mini

Intel NUC Hades Canyon Hackintosh support
MIT License
1.22k stars 160 forks source link

DW1820A Bluetooth does not work properly in some circumstances #125

Closed ivmm closed 4 years ago

ivmm commented 4 years ago

Describe the bug The NUC8i7HVK has a network card for the 1820A (CN-08PKF4). EFI uses the 2.4.0 version and opens the 1820A support option. BIOS already disable ASPM.

Wifi can be driven directly, but there is a problem with Bluetooth, you can display Bluetooth, but you can't connect any devices.

image

image

Expected behavior Successfully running Bluetooth.

Configuration

Modifications

None

Panic log

None

goodbest commented 4 years ago

I'm not sure if extension acfs is related to bluetooth.

May you can check this page (mine is working fine):

Screen Shot 2019-11-17 at 12 35 25
ivmm commented 4 years ago

image There is a Bluetooth information page, but you cannot connect to a Bluetooth device, you can view the device, but you cannot connect.

image

PCI information page is empty

lmshsqlc commented 4 years ago

I used to have this problem before I switched over to apples airport card From DW1830A. No matter I was on cold boot or warm boot, sometimes I will see devices in the Bluetooth panel but neither of them I can connect to. for example I have a Magic Trackpad. Normally the system will connect every time does it start up and I connected pop-up will show on screen. But sometimes even if I manually connect from Bluetooth panel it won’t connect but it tries to. There’s a thread from daliansky which I think is relevant to this problem. He implemented a delay for the Bluetooth firmware patch on wake. https://blog.daliansky.net/DW1820A_BCM94350ZAE-driver-inserts-the-correct-posture.html And by the way I think this might need to file an issue on BrcmPatch repo.

dickding commented 4 years ago

Yes, I have the same problem with my dw-1820a(CN-08PKF4)...sometimes it works, but sometimes, you can see the device but can not connect.

osx-10.15.1, hacmini 2.4

jackson325 commented 4 years ago

I used to have this problem before I switched over to apples airport card From DW1830A. No matter I was on cold boot or warm boot, sometimes I will see devices in the Bluetooth panel but neither of them I can’t connect to. for example I have a Magic Trackpad. Normally the system will connect every time does it start up and I connected pop-up will show on screen. But sometimes even if I manually connect from Bluetooth panel it won’t connect but it tries to. There’s a thread from daliansky which I think is relevant to this problem. He implemented a delay for the Bluetooth firmware patch on wake. https://blog.daliansky.net/DW1820A_BCM94350ZAE-driver-inserts-the-correct-posture.html And by the way I think this might need to file an issue on BrcmPatch repo.

I have tried as you told, and it works! I had the some problem as yours. I add the boot args to implement a delay for the Bluetooth firmware patch, which is just follow what the daliansky said in his blog. I add "bpr_probedelay=100 bpr_initialdelay=300 bpr_postresetdelay=300" to the boot args. After that, I can use the DW1820A's bluetooth to connect my devices. It seems that the problem solved. My device information is: NUC version: NUC8i7HVK macOS version: 10.15.1 HaC-Mini version: 2.4 DW1820A version: CN-08PKF4

goodbest commented 4 years ago

@catalina86 Actually, these settings bpr_probedelay=100 bpr_initialdelay=300 bpr_postresetdelay=300 is also listed in acidanthera/BrcmPatchRAM readme. So I think it's quite reasonable.

jackson325 commented 4 years ago

@goodbest Yep, I think this is a way to solve the problem. I've worked on it for a day. The result is fantastic for me. I think you @ivmm can try this solution.

ivmm commented 4 years ago

I added the relevant statement, but it didn't work. Bluetooth is still unable to connect to the device.

image

jackson325 commented 4 years ago

@ivmm Have you forgotten all the bluetooth devices after reboot into the OS? Forget the bluetooth devices and connect them again. I had the similar problem and solved in this way.

ivmm commented 4 years ago

I grew up removing all Bluetooth devices and restarting the system after turning off Bluetooth. I still can't connect to the device.

jackson325 commented 4 years ago

@ivmm Maybe there are some differences between different cards. You can follow the README of the acidanthera/BrcmPatchRAM repo. It said:

Note: Some with the typical "wake from sleep" problems are reporting success with: bpr_probedelay=100 bpr_initialdelay=300 bpr_postresetdelay=300. Or slightly longer delays: bpr_probedelay=200 bpr_initialdelay=400 bpr_postresetdelay=400.

You can change the delay time as the instruction said and try again. Wish you good luck.

ivmm commented 4 years ago

@dickding You are right, you can connect to Wi-Fi normally using native thunderbolt, thank you!

goodbest commented 4 years ago

Maybe there is some bug in BrcmPatch v2.5 itself? We'd better wait and see.

Some none-nuc D1820A users are reporting [mixed results].(https://www.insanelymac.com/forum/topic/339175-brcmpatchram2-for-1015-catalina-broadcom-bluetooth-firmware-upload/?page=11)

For me, I have some issue with the patch v2.5 on a dell hackintosh laptop under 10.14.6, but it works flawlessly with RehabMan's original patch (which is not working for 10.15)

wittyofficer commented 4 years ago

@ivmm I also had the same issue but adding brcmfx-driver=2 argument to boot-args seems to solve it.

brcmfx-driver=2 enables the AirPortBrcmNIC kext in AirportBrcmFixup. You can refer to it in acidanthera/AirportBrcmFixup readme.

chrisallen commented 4 years ago

I am also seeing the same issue with my DW1820A (part# CN-096JNT) where devices show up but will not connect.

My issue appears to be the same as what this user mentions (https://www.tonymacx86.com/threads/the-solution-dell-dw1820a-broadcom-bcm94350zae-macos-15.288026/post-2042843) but I don't have Linux or Windows installed to dual boot into)

My boot-args are alcid=11 shikigva=32 shiki-id=Mac -disablegfxfirmware brcmfx-country=NZ bpr_probedelay=100 bpr_initialdelay=300 bpr_postresetdelay=300 (I have even tried brcmfx-driver=2 which made no difference)

Here is the log from last boot.

log show --last boot | grep -i brcmp

2019-12-10 11:21:34.156660+1300 0x1be      Default     0x0                  0      0    kernel: (BrcmFirmwareData) BrcmPatchRAM: Loaded compressed embedded firmware for key "BCM4350C5_003.006.007.0222.4689_v8785".
2019-12-10 11:21:34.156882+1300 0x1be      Default     0x0                  0      0    kernel: (BrcmFirmwareData) BrcmPatchRAM: Decompressed firmware (12582 bytes --> 31740 bytes).
2019-12-10 11:21:34.157095+1300 0x1be      Default     0x0                  0      0    kernel: (BrcmFirmwareData) BrcmPatchRAM: Firmware is valid IntelHex firmware.
2019-12-10 11:21:34.257416+1300 0x1be      Default     0x0                  0      0    kernel: (BrcmPatchRAM3) BrcmPatchRAM: [0a5c:6412]: USB [C8FF2878CA0C v274] "BCM2045A0" by "Broadcom Corp"
2019-12-10 11:21:34.262492+1300 0x1be      Default     0x0                  0      0    kernel: (BrcmPatchRAM3) BrcmPatchRAM: [0a5c:6412]: Firmware upgrade not needed.
2019-12-10 11:21:34.262555+1300 0x1be      Default     0x0                  0      0    kernel: (BrcmPatchRAM3) BrcmPatchRAM: Processing time 0.105 seconds.

Right now I see the Bluetooth menu and sometimes things show up, but I cannot connect to anything.

Screen Shot 2019-12-10 at 10 46 36 AM

Here is what it looks like in System Profiler

 Apple Bluetooth Software Version:  7.0.1f1
  Hardware, Features and Settings:
  Name: Mac mini
  Address:  C8-FF-28-78-CA-0C
  Bluetooth Low Energy Supported:   Yes
  Handoff Supported:    Yes
  Instant Hot Spot Supported:   Yes
  Manufacturer: Broadcom
  Transport:    USB
  Chipset:  Unknown (6e)
  Firmware Version: v7 c4689
  Bluetooth Power:  On
  Discoverable: On
  Connectable:  Yes
  Auto Seek Pointing:   On
  Remote wake:  On
  Vendor ID:    0x0A5C
  Product ID:   0x6412
  Bluetooth Core Spec:  4.1 (0x7)
  HCI Revision: 0x1251
  LMP Version:  4.1 (0x7)
  LMP Subversion:   0x6607
  Device Type (Major):  Computer
  Device Type (Complete):   Mac Portable
  Composite Class Of Device:    0x38010C
  Device Class (Major): 0x01
  Device Class (Minor): 0x03
  Service Class:    0x1C0
  Auto Seek Keyboard:   On

image image

chrisallen commented 4 years ago

Does anyone know how to fix the issue of not being able to connect to detected devices?

lmshsqlc commented 4 years ago

Does anyone know how to fix the issue of not being able to connect to detected devices?

It happens sometimes. Usually what I’m doing is perform a cold restart. Maybe you can check this out as well. https://github.com/osy86/HaC-Mini/issues/125#issuecomment-554716058

chrisallen commented 4 years ago

I've reported this over at InsanelyMac (https://www.insanelymac.com/forum/topic/339175-brcmpatchram2-for-1015-catalina-broadcom-bluetooth-firmware-upload/?do=findComment&comment=2700139)

goodbest commented 4 years ago

@chrisallen The most reliable temp fix for the issue is to boot into windows first (which has the proper bluetooth driver installed), and then you can have your bluetooth everywhere in macos.

The reason may be related to firmware upload in those kexts (although hackintools says fw loaded)

iiicwx commented 4 years ago

I had the same issue before, but a cache rebuild fixed it.

zhxiyao commented 4 years ago

I had the same issue before, but a cache rebuild fixed it.

May you tell more specifically about how to rebuild the cache?

iiicwx commented 4 years ago

it was to rebuild the system and kext caches, I used KCPM Utility Pro to do that.

crhendo commented 4 years ago

While WiFi has been working perfectly, Bluetooth is sporadic and very frustrating. I have tried all the suggestions (that I could apply) both here and on other threads but I always end up in the same predicament ie I can see the keyboard and mouse, I can click connect on both of them but they simply will not connect. I remove power for 24 hours and sometimes I can reconnect but eventually they simply disconnect again.

My solution was to deselect the DW1820A in HaC Mini Installer, reboot and in insert my old original IOGear Bluetooth USB dongle. All my Bluetooth devices now behave as they should and surprisingly the DW1820A WiFi works OK without being selected in the installer.

crhendo commented 4 years ago

Warning! While Handoff and other features are working as they should, unlocking using my Apple Watch does not work and further investigation tells me that Bluetooth 4.2 is required for this feature. (IOGear is only 4.0)

lmshsqlc commented 4 years ago

Warning! While Handoff and other features are working as they should, unlocking using my Apple Watch does not work and further investigation tells me that Bluetooth 4.2 is required for this feature. (IOGear is only 4.0)

You won’t get a flawless unlocking experience until you use an Apple airport card. Apple Airport card is the only that automatically keeps connections to accessories. Using a third party Bluetooth will give you unlock only once you’ve got it setup.

JeffreyVIP commented 4 years ago

@osy86 I met same issue, and I observed one interesting thing.

Every time bluetooth works if the firmware upgrade is not needed.

working case:

2020-01-29 21:16:15.850285+0800 0x1be      Default     0x0                  0      0    kernel: (BrcmFirmwareData) BrcmPatchRAM: Loaded compressed embedded firmware for key "BCM4350C5_003.006.007.0222.4689_v8785".
2020-01-29 21:16:15.850573+0800 0x1be      Default     0x0                  0      0    kernel: (BrcmFirmwareData) BrcmPatchRAM: Decompressed firmware (12582 bytes --> 31740 bytes).
2020-01-29 21:16:15.850806+0800 0x1be      Default     0x0                  0      0    kernel: (BrcmFirmwareData) BrcmPatchRAM: Firmware is valid IntelHex firmware.
2020-01-29 21:16:15.952112+0800 0x1be      Default     0x0                  0      0    kernel: (BrcmPatchRAM3) BrcmPatchRAM: [0a5c:6412]: USB [3052CB851AC2 v274] "BCM2045A0" by "Broadcom Corp"
2020-01-29 21:16:15.956899+0800 0x1be      Default     0x0                  0      0    kernel: (BrcmPatchRAM3) BrcmPatchRAM: [0a5c:6412]: Firmware upgrade not needed.
2020-01-29 21:16:15.956921+0800 0x1be      Default     0x0                  0      0    kernel: (BrcmPatchRAM3) BrcmPatchRAM: Processing time 0.105 seconds.

not working case:

2020-01-29 23:06:15.176768+0800 0x1bd      Default     0x0                  0      0    kernel: (BrcmFirmwareData) BrcmPatchRAM: Loaded compressed embedded firmware for key "BCM4350C5_003.006.007.0222.4689_v8785".
2020-01-29 23:06:15.176941+0800 0x1bd      Default     0x0                  0      0    kernel: (BrcmFirmwareData) BrcmPatchRAM: Decompressed firmware (12582 bytes --> 31740 bytes).
2020-01-29 23:06:15.177118+0800 0x1bd      Default     0x0                  0      0    kernel: (BrcmFirmwareData) BrcmPatchRAM: Firmware is valid IntelHex firmware.
2020-01-29 23:06:15.277478+0800 0x1bd      Default     0x0                  0      0    kernel: (BrcmPatchRAM3) BrcmPatchRAM: [0a5c:6412]: USB [3052CB851AC2 v274] "BCM2045A0" by "Broadcom Corp"
2020-01-29 23:06:15.653321+0800 0x1bd      Default     0x0                  0      0    kernel: (BrcmPatchRAM3) BrcmPatchRAM: [0a5c:6412]: Firmware upgrade completed successfully.
2020-01-29 23:06:15.653367+0800 0x1bd      Default     0x0                  0      0    kernel: (BrcmPatchRAM3) BrcmPatchRAM: Processing time 0.476 seconds.

sudo kextcache -i / shutdown and boot fix the issue(tested several times)

BTW, is there a way to bypass firmware loading?

lmshsqlc commented 4 years ago

BTW, is there a way to bypass firmware loading?

Firmware must be loaded for 3rd party Bluetooth card, as windows driver also loads a firmware. Sometimes a reboot from windows can make bluetooth work because the firmware has already updated by windows driver. Checkout Brcmpatch manual for further information. An Apple airport card can guarantee your experience as they always works out of the box.

JeffreyVIP commented 4 years ago

Firmware must be loaded for 3rd party Bluetooth card, as windows driver also loads a firmware. Sometimes a reboot from windows can make bluetooth work because the firmware has already updated by windows driver. Checkout Brcmpatch manual for further information. An Apple airport card can guarantee your experience as they always works out of the box.

I have only Hackintosh in the box, no windows or other system at all, single SSD with only MacOS v10.15.2 on it. No USB stick plugged in.

I guess the default firmware in the chipset is the same as what the patch are trying to load.

lmshsqlc commented 4 years ago

I guess the default firmware in the chipset is the same as what the patch are trying to load.

The firmware is not in the chipset but in the Wi-Fi card itself. it has a Bluetooth firmware that needs to be updated every time it cold boots or it won’t work. Maybe it’s a bug related to brcmpatch. but when I was using a 3rd party card, a reboot might fix the problem.

JeffreyVIP commented 4 years ago

@osy86 Just tried release version 2.6, cache rebuild can't make bluetooth connection working, so I can do nothing but re-install v2.5 to restore bluetooth back.

osy commented 4 years ago

The brcm kexts were updated. If there’s an issue there I can’t do much to help.

JeffreyVIP commented 4 years ago

The brcm kexts were updated. If there’s an issue there I can’t do much to help.

Understand, can you provide source of the brcm kexts so that I can report the issue I met?

osy commented 4 years ago

https://github.com/acidanthera/bugtracker

kinaschen commented 4 years ago

I have the same problem with you when I install the DW1820A Card into the slot after my installation,that's why the problem accourd, tried several ways to solve that as using all the mothod above. Till I realized I may try rest NVRAM as did on a commin Mac, So I reset NVRAM and it worked,both my MagicKeyborad2 and bt headphones .T_T