Contribute
Register

Slow/Dropped Wifi after Sleep with BCM943602BAED (DW1830)

Status
Not open for further replies.
Hi all,

This is not a request for help as such, more an investigation and my current work-around to the issue in the title. This post is predomaaintly aimed at BCM943602BAED/DW1830 users, if you have a different WiFI/BT combo card then some of the general info and fixes might help you but the root issue discussed in this post is I believe specific to the BCM943602BAED.

......

Cheers
Jay

thank you for your shared info on dw1830.

I have a dw1830 too. but now it is not working very well on my hackintosh Thinkpad T470p.
I use RahabMan's driver such as FakePCIID.kext, FakePCIID_Broadcom_WiFi.kext, BrcmFirmwareData.kext, BrcmPatchRAM2.kext, but I am not sure what patches should I use in KextsToPatch in config.plist file.

could you guide me something or show us what patches you used?
 
Hi all,

This is not a request for help as such, more an investigation and my current work-around to the issue in the title. This post is predomaaintly aimed at BCM943602BAED/DW1830 users, if you have a different WiFI/BT combo card then some of the general info and fixes might help you but the root issue discussed in this post is I believe specific to the BCM943602BAED.

Background

As i posted here, to resolve on going (and unsolvable) issues with Windows 10 lockups and Bluetooth, i recently swapped out my BCM94352Z WiFi/BT card for a DW1830.

Whilst swapping the card for a DW1830 has resolved the Windows 10 Wifi and general Bluetooth issues, it has introduced a new issue with OSX (i'm running 10.12.6). Upon OSX startup (boot) the card works perfect with fast and stable WiFi and Bluetooth, however once OSX has been through at least one Sleep/Wake cycle the WiFi performance becomes very sporadic. It still remains connected to my WiFi but seems to drop packets then works for a bit then starts dropping packets again.

Once the card is in this state the only way to restore full WiFi performance is to reboot the laptop, i've been investigating the issue for a few weeks now trying to resolve it .... I believe the issue is caused by OSX not correctly returning the card into its normal full power on state after sleep, possibly down to hardware or firmware incompatibilities with OSX putting the WiFI into a low power state.

Symptom

Although the symptom is similar to issues reported with slow WiFi after sleep by other users on this site, the simple fix of un-checking the 'Wake for Wi-Fi Network Access' in System Preferences -> Energy Saver does not resolve this particular issue with the BCM943602BAED.View attachment 289164 Additionally the many fixes for Slow WiFi after sleep reported by genuine MBP owners also do not work, believe me I've tried everything several times including a full reinstall of OSX two or three times.

If you have slow WiFi after sleep and have not already tried the known fixes above then i strongly suggest you try those first before going any further with whats discussed in this post.

In the case the BCM943602BAED on my HP Spectre X360, after sleep the low level 802.11 link and security layers are still active and remain connected to my WiFi router (either 5Ghz or 2.4Ghz) however the network protocol layers (TCPIP/UDP/SMB/AFP..etc) seem to have real problems.

Its very easy to test for this by opening a terminal window and pinging the IP address of the WiFi router, when its working and everything is ok the ping time should always be less than 10ms ... on average a ping time of between 1.5ms - 5ms would be considered normal. However once the laptop has been through a sleep/wake cycle the ping times to the router can be anything between 100ms to 1000ms and sometimes the pings will completely fail, but given time they will restart with high ping times (see post #3 for detailed testing method)

Its not just pings which use UDP that are effected but all network protocols TCP/IP, Smaba, SMB, AFP .. etc show signs of extensive sporadic packet loss and truncated packets.

Cause

At this time I don't know if this issue is related to the DW1830 card version I bought on eBay (via China supplier) or my system (1017 15" HP Spectre X360), I don't know if all hacks with BCM943602BAED are effected .. i suspect not, maybe genuine Dell 1830 cards are slightly different and are not effected ?.

One possible cause could be that i had to tape the wifi and bluetooth disable pins on the card in order for it to be detected in my laptop .. its possible that OSX relies on this hardware feature with the BCM94360XX chipset rather than pure software control, i discussed the reason why some users have to tape the disable pins in this post. Since i don't have any issues with the card under Windows 10 or Linux i suspect that this may not be the case but i cant be 100% sure.

I have seen quite a few posts on this site from users who have installed a BCM943602BAED/DW1830 WiFi/BT card in their hack and reported slow WiFi after sleep, for some un-checking the 'Wake for Wi-Fi Network Access' in Energy Saver seems to work but not for others (myself included).

Manual Workaround

Having tried all (and i really do mean all) suggested fixes on this and other sites the only thing that worked for me is to power down the WiFi before entering a sleep cycle, and then tuning the WiFi back on after a wake. I tested this for a few days and it works every time, I believe that there are a few other BCM943602BAED users that have also found this to be the case.

Although this works its a highly inconvenient workaround, if you forget to switch the WiFi off before closing the lid, the issue will return and only a reboot will restore normal WiFi performance.

I suspect that it maybe possible to 'fix' the issue with some custom ACPI code such as a _WAK method for the BCM943602BAED or even patch OSX to handle the card correctly but until i can nail down exactly whats wrong and what needs to be done thats not possible right now.

So for now i've taken the approach of trying to automate the powering off and on of the WiFi during sleep and wake events.

Automated Workaround

Its relatively easy to write an Apple Script to control the power status of the WiFi but unfortunately there is no way to detect sleep/wake events using Apple Script. However there a few 3rd party event managers available that do detect the sleep/wake events and can trigger user defined actions.

I tried all of the following Mac/OSX event managers :-
Whilst all of the above event managers were able to detect OSX sleep/wake events and trigger actions, none of them were able to detect the sleep event early enough to power down the WiFi before OSX does what ever it does to put the WiFi into a low power state and so did not help in resolving the issue.

This approach is made more difficult as Apple states that all OSX applications/processes are meant to acknowledge a request for sleep and either enter a idle state or inform OSX not to sleep.

After (a lot) more searching i came across an event manager called Scenario, this event manager is able to detect the sleep event at a very early stage but more importantly it has a inbuilt mechanism to stop OSX processing the sleep event until it's finished processing the user defined actions or at least delay it until OSX over rides the app and continues with sleeping regardless (approx 15 seconds).

Scenario is a cheep ($5) paid app available form the App store, having exhausted all other avenues and buoyed by the fact that the devs have tried to work around the OSX app sleep idle request i decided to give it a punt and i'm happy to report that it is able to do exactly what is needed to automate the powering off/on of the WiFi for sleep and wake events.

I've been running it now for a few days and so far my WiFi performance has been rock steady after many sleep/wake cycles without needing any reboots so i now believe its a viable work around for BCM943602BAED/DW1830 users that are seeing the same issue.

Method

Before continuing i suggest that you confirm that this workaround is going to work by using the testing method outlined in post #3, no point purchasing an app thats not going to work for you.

1. Purchase and install Scenario from the App Store.
2. Download the attached zip file WiFi Control Scripts.zip and unzip to a temporary folder.
3. Run Scenario, click on the menu icon and select Settings
4. Configure Scenario to auto start and monitor for sleep/wake events :-View attachment 289024 5. Click on the 'Open Script Folder' button.
View attachment 2889806. Copy 'wifioff.scpt' from the extracted zip file to the 'Sleep Scripts folder'.
7. Copy 'wifion.scpt' from the extracted zip file to the 'Wake Scripts folder'.

That should do it, reboot the laptop/computer and make sure Scenario has started, you should see a red icon in the menu bar.

Now when you trigger a sleep event Scenario should power down the WiFi before OSX gets too deep into its sleep event and when you wake the system Scenario will turn on the WiFi automatically, in my testing so far it appears to work with any standard sleep trigger event such as lid close, timed sleep or manually selecting sleep from the Apple menu.

I've programmed my script to trigger a notification and a confirmation sound that WiFi power has been restored but if you don't like this you can modify the script to suit your personal preference, i tired to implement an audio confirmation of WiFi power off but my laptop automatically mutes the speakers on a lid close which i suspect many others also do.

Note: If your WiFi adapter has a BSD ID other than 'en0' then you will need to modify all occurrences of 'en0' to your systems WiFi BSD ID in both the script files using the OSX script editor, you can use DPCIManager or System Information to find out your WiFi adapters BSD ID:-View attachment 289025View attachment 289027
Additionally if you find that that WiFi does not power back after a wake event but you see/hear the notification from my script then try increasing the delay directly after the 'if' statement in wifion.script :-
View attachment 288996

Summary

Now i'm not saying that this is a perfect solution, its not ... it should be considered a temporary solution until a better one can be found but its a good start and so far its worked well for me.

Ideally we need to understand exactly whats going on with the BCM943602BAED and either patch OSX or create custom ACPI code to fix the issue or if thats not possible anther approach would be to write a custom kext or app that does what this method does but without the reliance of 3rd party paid software.

lets use this thread to explore this strange issue with the BCM943602BAED, please don't repost fixes like the Wake for WiFI Network Access fix or others like those i linked at the start of this thread .. if you found that one of those solutions worked for you then great ... but if none of those solutions resolved your issue feel free to discuss this or any other methods or investigations.

Cheers
Jay
I use DW1830 in my laptop, it has same problem:
1,wifi work not well when wake up, it possible drop some or all packets.
2,BT possible loss, only shutdown it to come back, if reboot only it cannot be fix.

About wifi, I use the following method to "fix", hoping it can fix by DSDT patch in future.
I have this same problem using BCM943602baed on Dell 5557. I found a "solution" to fix this problem after wake.
For me, when a click on option + wifi icon + Enable Wi-Fi Logging. And again option + wifi icon + Disable Wi-Fi Loging, my wifi card behaviour return to normal state.
 
I use DW1830 in my laptop, it has same problem:
1,wifi work not well when wake up, it possible drop some or all packets.

Make sure you disable "Wake for network access" in SysPrefs->Energy Saver.

2,BT possible loss, only shutdown it to come back, if reboot only it cannot be fix.

No "Problem Reporting" files attached.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
Use the tool mentioned in the FAQ, that way it is less likely you'll omit something.
 
Make sure you disable "Wake for network access" in SysPrefs->Energy Saver.
I use follow method:
1, disable 'Wake for network access'
2, add customization locales
3, use customization mtu
4, change bt UsbConnector to 3 or 255
but it not work for me

I attach debug files in this post, anymore problem except wifi and BT? how to identify problem in debug file?
 
I use follow method:
1, disable 'Wake for network access'
2, add customization locales
3, use customization mtu
4, change bt UsbConnector to 3 or 255
but it not work for me

I attach debug files in this post, anymore problem except wifi and BT? how to identify problem in debug file?

"Problem Reporting" files are incomplete (ACPI/origin files are old... you forgot to press F4, misc/preboot.log is missing... you forgot to press F2). Also, ioreg is corrupt. You're using the wrong version of IORegistryExplorer.app.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
Use the tool mentioned in the FAQ, that way it is less likely you'll omit something.
 
"Problem Reporting" files are incomplete (ACPI/origin files are old... you forgot to press F4, misc/preboot.log is missing... you forgot to press F2). Also, ioreg is corrupt. You're using the wrong version of IORegistryExplorer.app.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
Use the tool mentioned in the FAQ, that way it is less likely you'll omit something.
Sorrry, I attact newest debug files.
 
Sorrry, I attact newest debug files.

Your ACPI configuration is wrong.
You have an _OSI->XOSI patch but no SSDT-XOSI.aml.
I found that one thing and it is enough to cause significant problems, so I stopped looking for any further issues.
 
Your ACPI configuration is wrong.
You have an _OSI->XOSI patch but no SSDT-XOSI.aml.
I found that one thing and it is enough to cause significant problems, so I stopped looking for any further issues.
I install win10/macOS10.13.2/manjaro on my NVMe SSD, so I comment other windows version except win and win10.
The wifi/BT still has problem. I attach debug files again.
 
I install win10/macOS10.13.2/manjaro on my NVMe SSD, so I comment other windows version except win and win10.
The wifi/BT still has problem. I attach debug files again.

Your ACPI configuration is still wrong.
You need to remove ACPI/SSDT/Patched/SSDT.aml as it conflicts with config.plist/ACPI/SSDT/Generate/PluginType=true.

You should also use ACPIDebug.kext to verify your _PTS and _WAK are executing completely (beginning to end).

Why is HackrNVMeFamily installed? It is not needed with 10.13.x.

Note: SSDT-XOSI.aml content has nothing to do with the version of Windows you have installed.
 
Your ACPI configuration is still wrong.
You need to remove ACPI/SSDT/Patched/SSDT.aml as it conflicts with config.plist/ACPI/SSDT/Generate/PluginType=true.

You should also use ACPIDebug.kext to verify your _PTS and _WAK are executing completely (beginning to end).

Why is HackrNVMeFamily installed? It is not needed with 10.13.x.

Note: SSDT-XOSI.aml content has nothing to do with the version of Windows you have installed.
Thank for you help!
I did as you said.
acpi debug info as follow when laptop wake up:
Code:
➜  log show | grep "ACPI Debug"
2018-01-14 16:23:08.367687+0800 0x190c     Default     0x0                  0      0    kernel: (kernel) ACPIDebug: "ACPI Debug Info: _PTS"
2018-01-14 16:23:08.377125+0800 0x190c     Default     0x0                  0      0    kernel: (kernel) ACPIDebug: "ACPI Debug Info: _WAK"

and now, BT/WIFI problems still exists.
here is newest debug files and system log for laptop sleep/wakeup.
 

Attachments

  • debug_967.zip
    1.3 MB · Views: 99
  • syslog_sleep_wakeup.txt
    1.4 MB · Views: 2,259
Last edited:
Status
Not open for further replies.
Back
Top