Contribute
Register

Bluetooth broken after wake from sleep

Joined
Jul 19, 2016
Messages
33
Motherboard
HP 240 G5
CPU
Intel Core i5-6200U
Graphics
Intel HD 530
Unfortunately, it didn't. Then I injected USB Power properties to the USB ssdt, and now I'm testing it.
 
Joined
Feb 23, 2013
Messages
98
Motherboard
Gigabyte Z97X-Gaming 3 (F5)
CPU
Intel Core i7 4790
Graphics
Intel HD 4600/NVIDIA GeForce GTX 1080Ti
Unfortunately, it didn't. Then I injected USB Power properties to the USB ssdt, and now I'm testing it.
Any solutions to this problem yet ?
 
Joined
Jul 19, 2016
Messages
33
Motherboard
HP 240 G5
CPU
Intel Core i5-6200U
Graphics
Intel HD 530
I think now, after three months I finally fixed it. I don't think this is hardware independent, but after experimenting with my DSDT code I got the fix.
upload_2018-4-18_21-29-19.png
. This is the original code I modified. This is a conditional code that restores the power to the BT (and I guess it also acts on WiFi). This code is on the _WAK method of the original DSDT. Notice it toggles wifi/bt state after each wake. I cannot explain how exactly this works, but replacing it with this
upload_2018-4-18_21-34-20.png
solved the problem. I'm still testing the fix, but it seems to work just fine. I also need to add that my laptop has a airplane mode key (it isn't a hardware switch, but a ACPI EC call.). I guess the next step is to patch the _Qxx method to stop the key from working (or make it actually soft-disable wifi and/or bt)
 
Joined
Feb 23, 2013
Messages
98
Motherboard
Gigabyte Z97X-Gaming 3 (F5)
CPU
Intel Core i7 4790
Graphics
Intel HD 4600/NVIDIA GeForce GTX 1080Ti
I think now, after three months I finally fixed it. I don't think this is hardware independent, but after experimenting with my DSDT code I got the fix. View attachment 326508. This is the original code I modified. This is a conditional code that restores the power to the BT (and I guess it also acts on WiFi). This code is on the _WAK method of the original DSDT. Notice it toggles wifi/bt state after each wake. I cannot explain how exactly this works, but replacing it with this View attachment 326509 solved the problem. I'm still testing the fix, but it seems to work just fine. I also need to add that my laptop has a airplane mode key (it isn't a hardware switch, but a ACPI EC call.). I guess the next step is to patch the _Qxx method to stop the key from working (or make it actually soft-disable wifi and/or bt)
Interesting… I'll test this as well and report here if I have any issues. Thanks for that!
EDIT: Too bad I have a really different DSDT, I won't be able to apply the same thing
 
Last edited:
Joined
Jul 19, 2016
Messages
33
Motherboard
HP 240 G5
CPU
Intel Core i5-6200U
Graphics
Intel HD 530
So hey, good news, after analyzing my DSDT code, I checked that my DSDT turns off and on BT, and it works just fine, it toggles power after wakeup (since it turned it off after sleep). But after many tries, I compiled tlurk's fork and it seems to work just fine. Now, as a final explanation, the tlurk's fork of BrcmPatchRAM changes some timings to avoid deadlock (I haven't investigated this thoroughly but since brcmPatchRAM uploads firmware and then restarts the device, it has to wait until it's re-enumerated before uploading and/or giving back control to the Apple drivers) and it seems to workaround this hardware issue. But now that brcmPatchRAM has been updated with kernel-args to change timings I should give it a try and check with some custom timings.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
190,989
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
But now that brcmPatchRAM has been updated with kernel-args to change timings I should give it a try and check with some custom timings.
Yes.
 
Joined
Nov 26, 2017
Messages
1
Motherboard
Thinkpad X1 Carbon 2018
CPU
i5-8350U
Graphics
Intel HD620
So hey, good news, after analyzing my DSDT code, I checked that my DSDT turns off and on BT, and it works just fine, it toggles power after wakeup (since it turned it off after sleep). But after many tries, I compiled tlurk's fork and it seems to work just fine. Now, as a final explanation, the tlurk's fork of BrcmPatchRAM changes some timings to avoid deadlock (I haven't investigated this thoroughly but since brcmPatchRAM uploads firmware and then restarts the device, it has to wait until it's re-enumerated before uploading and/or giving back control to the Apple drivers) and it seems to workaround this hardware issue. But now that brcmPatchRAM has been updated with kernel-args to change timings I should give it a try and check with some custom timings.
May I know what is the tlurk's fork? My laptop is having situation similar to yours. I would like to have a try on what you have said.
 
Joined
Feb 23, 2013
Messages
98
Motherboard
Gigabyte Z97X-Gaming 3 (F5)
CPU
Intel Core i7 4790
Graphics
Intel HD 4600/NVIDIA GeForce GTX 1080Ti
May I know what is the tlurk's fork? My laptop is having situation similar to yours. I would like to have a try on what you have said.
Now that there is flag support, it's no use getting Tluck's fork. If you have the last version of the brcmPatchRAM, you just have to add the following flags (those are from Tluck's fork):
Code:
bpr_initialdelay=400 bpr_postresetdelay=400
I'm currently using the following values after tweaking a bit those from Tluck:
Code:
bpr_probedelay=100 bpr_initialdelay=300 bpr_postresetdelay=300
 
Joined
Aug 25, 2015
Messages
225
Motherboard
DELL Inspiron 7370
CPU
i7-8550U
Graphics
UHD620
Mac
iMac, MacBook Air
Mobile Phone
Android, iOS
I think now, after three months I finally fixed it. I don't think this is hardware independent, but after experimenting with my DSDT code I got the fix. View attachment 326508. This is the original code I modified. This is a conditional code that restores the power to the BT (and I guess it also acts on WiFi). This code is on the _WAK method of the original DSDT. Notice it toggles wifi/bt state after each wake. I cannot explain how exactly this works, but replacing it with this View attachment 326509 solved the problem. I'm still testing the fix, but it seems to work just fine. I also need to add that my laptop has a airplane mode key (it isn't a hardware switch, but a ACPI EC call.). I guess the next step is to patch the _Qxx method to stop the key from working (or make it actually soft-disable wifi and/or bt)
Can you describe which code needs to be replaced to what clearer? Since the values that we have are different.

Thanks,
twsps
 
Top