Contribute
Register

Bluetooth broken after wake from sleep

Status
Not open for further replies.
Unfortunately, it didn't. Then I injected USB Power properties to the USB ssdt, and now I'm testing it.
 
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 ?
 
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)
 
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:
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.
 
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.
 
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.
 
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
 
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
 
Status
Not open for further replies.
Back
Top