Contribute
Register

Slow/Dropped Wifi after Sleep with BCM943602BAED (DW1830)

Status
Not open for further replies.
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.

Your RMDT calls only show that _PTS and _WAK were entered.
You need to add an RMDT call prior to return in each such that you know they were executed beginning to end.
 
Your RMDT calls only show that _PTS and _WAK were entered.
You need to add an RMDT call prior to return in each such that you know they were executed beginning to end.
I add RMDT to _PTS and _WAK like this:
Code:
Method (_PTS, 1, NotSerialized)  // _PTS: Prepare To Sleep
    {
        \RMDT.PUSH ("Enter _PTS")
        Store (One, Local0)
        If (LEqual (Arg0, SPS))
        {
            Store (Zero, Local0)
        }

        If (LOr (LEqual (Arg0, Zero), LGreaterEqual (Arg0, 0x06)))
        {
            Store (Zero, Local0)
        }

        If (Local0)
        {
            Store (Arg0, SPS)
            \_SB.PCI0.LPC.EC.HKEY.MHKE (Zero)
            If (\_SB.PCI0.LPC.EC.KBLT)
            {
                UCMS (0x0D)
            }

            If (LEqual (Arg0, One))
            {
                Store (\_SB.PCI0.LPC.EC.HFNI, FNID)
                Store (Zero, \_SB.PCI0.LPC.EC.HFNI)
                Store (Zero, \_SB.PCI0.LPC.EC.HFSP)
            }

            If (LEqual (Arg0, 0x03))
            {
                VVPD (0x03)
                TRAP ()
                Store (\_SB.PCI0.LPC.EC.AC._PSR (), ACST)
                If (LEqual (FNWK, One))
                {
                    If (H8DR)
                    {
                        Store (Zero, \_SB.PCI0.LPC.EC.HWFN)
                    }
                    Else
                    {
                        MBEC (0x32, 0xEF, Zero)
                    }
                }
            }

            If (LEqual (Arg0, 0x04))
            {
                If (VDSP)
                {
                    Store (Zero, SHA1)
                }

                \_SB.SLPB._PSW (Zero)
                TRAP ()
                AWON (0x04)
            }

            If (LEqual (Arg0, 0x05))
            {
                Store (Zero, \_SB.PCI0.XHCI.PMEE)
                TRAP ()
                AWON (0x05)
            }

            If (LGreaterEqual (Arg0, 0x04))
            {
                Store (Zero, \_SB.PCI0.LPC.EC.HWLB)
            }
            Else
            {
                Store (One, \_SB.PCI0.LPC.EC.HWLB)
            }

            If (LGreaterEqual (Arg0, 0x03))
            {
                Store (One, \_SB.PCI0.LPC.EC.HCMU)
            }

            If (LNotEqual (Arg0, 0x05)) {}
            \_SB.PCI0.LPC.EC.HKEY.WGPS (Arg0)
            If (CondRefOf (\_SB.TPM.PTS))
            {
                \_SB.TPM.PTS (Arg0)
            }
        }

        \RMDT.PUSH ("Leave _PTS")
    }
Code:
Method (_WAK, 1, NotSerialized)  // _WAK: Wake
    {
        \RMDT.PUSH ("Enter _WAK")
        If (LOr (LLess (Arg0, One), LGreater (Arg0, 0x05)))
        {
            Store (0x03, Arg0)
        }

        ADBG ("_WAK")
        If (LOr (LEqual (Arg0, Zero), LGreaterEqual (Arg0, 0x05)))
        {
            Return (WAKI)
        }

        Store (Zero, SPS)
        Store (Zero, \_SB.PCI0.LPC.EC.HCMU)
        \_SB.PCI0.LPC.EC.EVNT (One)
        \_SB.PCI0.LPC.EC.HKEY.MHKE (One)
        \_SB.PCI0.LPC.EC.FNST ()
        UCMS (0x0D)
        Store (Zero, LIDB)
        Store (\_SB.PCI0.LPC.EC.CMMD, PMMD)
        If (LGreaterEqual (PMMD, 0x07))
        {
            Store (Zero, PMMD)
        }

        Store (\_SB.PCI0.LPC.EC.CMMD, LVMD)
        If (LOr (LEqual (LVMD, Zero), LGreaterEqual (LVMD, 0x07)))
        {
            Store (One, LVMD)
        }
        ElseIf (LOr (LEqual (LVMD, 0x02), LEqual (LVMD, 0x03)))
        {
            Store (0x02, LVMD)
        }
        Else
        {
            Store (0x03, LVMD)
        }

        If (LEqual (Arg0, One))
        {
            Store (\_SB.PCI0.LPC.EC.HFNI, FNID)
        }

        If (LEqual (Arg0, 0x03))
        {
            NVSS (Zero)
            \_SB.PCI0.LPC.EC.LED (Zero, 0x80)
            \_SB.PCI0.LPC.EC.LED (0x0A, 0x80)
            Store (\_SB.PCI0.LPC.EC.AC._PSR (), PWRS)
            If (OSC4)
            {
                PNTF (0x81)
            }

            If (LNotEqual (ACST, \_SB.PCI0.LPC.EC.AC._PSR ()))
            {
                \_SB.PCI0.LPC.EC.ATMC ()
            }

            If (SCRM)
            {
                Store (0x07, \_SB.PCI0.LPC.EC.HFSP)
            }

            Store (Zero, IOEN)
            Store (Zero, IOST)
            If (LEqual (ISWK, One))
            {
                If (\_SB.PCI0.LPC.EC.HKEY.DHKC)
                {
                    \_SB.PCI0.LPC.EC.HKEY.MHKQ (0x6070)
                }
            }

            If (VIGD)
            {
                Store (\_SB.LID._LID (), \_SB.PCI0.IGPU.CLID)
                If (WVIS)
                {
                    VBTD ()
                }
            }
            ElseIf (WVIS)
            {
                Store (\_SB.LID._LID (), \_SB.PCI0.IGPU.CLID)
                VBTD ()
            }

            VCMS (One, \_SB.LID._LID ())
            AWON (Zero)
            If (CMPR)
            {
                Notify (\_SB.SLPB, 0x02)
                Store (Zero, CMPR)
            }
        }

        If (LEqual (Arg0, 0x04))
        {
            NVSS (Zero)
            Store (Zero, \_SB.PCI0.LPC.EC.HSPA)
            Store (\_SB.PCI0.LPC.EC.AC._PSR (), PWRS)
            If (OSC4)
            {
                PNTF (0x81)
            }

            \_SB.PCI0.LPC.EC.ATMC ()
            If (SCRM)
            {
                Store (0x07, \_SB.PCI0.LPC.EC.HFSP)
            }

            If (LNot (NBCF))
            {
                If (VIGD)
                {
                    \_SB.PCI0.LPC.EC.BRNS ()
                }
                Else
                {
                    VBRC (BRLV)
                }
            }

            Store (Zero, IOEN)
            Store (Zero, IOST)
            If (LEqual (ISWK, 0x02))
            {
                If (\_SB.PCI0.LPC.EC.HKEY.DHKC)
                {
                    \_SB.PCI0.LPC.EC.HKEY.MHKQ (0x6080)
                }
            }
        }

        \_SB.PCI0.LPC.EC.BATW (Arg0)
        \_SB.PCI0.LPC.EC.HKEY.WGWK (Arg0)
        Notify (\_TZ.THM0, 0x80)
        VSLD (\_SB.LID._LID ())
        If (VIGD)
        {
            Store (\_SB.LID._LID (), \_SB.PCI0.IGPU.CLID)
        }
        ElseIf (WVIS)
        {
            Store (\_SB.LID._LID (), \_SB.PCI0.IGPU.CLID)
        }

        If (LLess (Arg0, 0x04))
        {
            If (LOr (And (RRBF, 0x02), And (B1B2 (\_SB.PCI0.LPC.EC.AC10, \_SB.PCI0.LPC.EC.AC11), 0x02)))
            {
                ShiftLeft (Arg0, 0x08, Local0)
                Store (Or (0x2013, Local0), Local0)
                \_SB.PCI0.LPC.EC.HKEY.MHKQ (Local0)
            }
        }

        If (LEqual (Arg0, 0x04))
        {
            Store (Zero, Local0)
            Store (CSUM (Zero), Local1)
            If (LNotEqual (Local1, CHKC))
            {
                Store (One, Local0)
                Store (Local1, CHKC)
            }

            Store (CSUM (One), Local1)
            If (LNotEqual (Local1, CHKE))
            {
                Store (One, Local0)
                Store (Local1, CHKE)
            }

            If (Local0)
            {
                Notify (_SB, Zero)
            }
        }

        If (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04)))
        {
            ADBG ("_WAK0")
            Store (Zero, \_SB.PCI0.LPC.EC.HKEY.ANGN)
            If (LOr (LEqual (\_SB.LID._LID (), One), LEqual (\_SB.PCI0.LPC.EC.AC._PSR (), One)))
            {
                \_SB.PCI0.LPC.EC.HKEY.DYTC (0x000F4001)
            }
            Else
            {
                \_SB.PCI0.LPC.EC.HKEY.DYTC (0x000F0001)
            }

            ADBG ("_WAK1")
        }

        \RMDT.PUSH ("Leave _WAK")
        Store (Zero, RRBF)
        Return (WAKI)
    }

when laptop sleep and wake up, the system log show this:
Code:
2018-01-14 20:53:56.867198+0800 0x11e5     Default     0x0                  0      0    kernel: (kernel) ACPIDebug: "Enter _PTS"
2018-01-14 20:53:56.870856+0800 0x11e5     Default     0x0                  0      0    kernel: (kernel) ACPIDebug: "Leave _PTS"
2018-01-14 20:53:56.875882+0800 0x74       Default     0x0                  0      0    kernel: (AppleACPIPlatform) ACPI S3 WAKE
2018-01-14 20:53:56.877004+0800 0x11e5     Default     0x0                  0      0    kernel: (kernel) ACPIDebug: "Enter _WAK"
2018-01-14 20:53:56.893836+0800 0x11e5     Default     0x0                  0      0    kernel: (kernel) ACPIDebug: "Leave _WAK"
 
I add RMDT to _PTS and _WAK like this:
Code:
Method (_PTS, 1, NotSerialized)  // _PTS: Prepare To Sleep
    {
        \RMDT.PUSH ("Enter _PTS")
        Store (One, Local0)
        If (LEqual (Arg0, SPS))
        {
            Store (Zero, Local0)
        }

        If (LOr (LEqual (Arg0, Zero), LGreaterEqual (Arg0, 0x06)))
        {
            Store (Zero, Local0)
        }

        If (Local0)
        {
            Store (Arg0, SPS)
            \_SB.PCI0.LPC.EC.HKEY.MHKE (Zero)
            If (\_SB.PCI0.LPC.EC.KBLT)
            {
                UCMS (0x0D)
            }

            If (LEqual (Arg0, One))
            {
                Store (\_SB.PCI0.LPC.EC.HFNI, FNID)
                Store (Zero, \_SB.PCI0.LPC.EC.HFNI)
                Store (Zero, \_SB.PCI0.LPC.EC.HFSP)
            }

            If (LEqual (Arg0, 0x03))
            {
                VVPD (0x03)
                TRAP ()
                Store (\_SB.PCI0.LPC.EC.AC._PSR (), ACST)
                If (LEqual (FNWK, One))
                {
                    If (H8DR)
                    {
                        Store (Zero, \_SB.PCI0.LPC.EC.HWFN)
                    }
                    Else
                    {
                        MBEC (0x32, 0xEF, Zero)
                    }
                }
            }

            If (LEqual (Arg0, 0x04))
            {
                If (VDSP)
                {
                    Store (Zero, SHA1)
                }

                \_SB.SLPB._PSW (Zero)
                TRAP ()
                AWON (0x04)
            }

            If (LEqual (Arg0, 0x05))
            {
                Store (Zero, \_SB.PCI0.XHCI.PMEE)
                TRAP ()
                AWON (0x05)
            }

            If (LGreaterEqual (Arg0, 0x04))
            {
                Store (Zero, \_SB.PCI0.LPC.EC.HWLB)
            }
            Else
            {
                Store (One, \_SB.PCI0.LPC.EC.HWLB)
            }

            If (LGreaterEqual (Arg0, 0x03))
            {
                Store (One, \_SB.PCI0.LPC.EC.HCMU)
            }

            If (LNotEqual (Arg0, 0x05)) {}
            \_SB.PCI0.LPC.EC.HKEY.WGPS (Arg0)
            If (CondRefOf (\_SB.TPM.PTS))
            {
                \_SB.TPM.PTS (Arg0)
            }
        }

        \RMDT.PUSH ("Leave _PTS")
    }
Code:
Method (_WAK, 1, NotSerialized)  // _WAK: Wake
    {
        \RMDT.PUSH ("Enter _WAK")
        If (LOr (LLess (Arg0, One), LGreater (Arg0, 0x05)))
        {
            Store (0x03, Arg0)
        }

        ADBG ("_WAK")
        If (LOr (LEqual (Arg0, Zero), LGreaterEqual (Arg0, 0x05)))
        {
            Return (WAKI)
        }

        Store (Zero, SPS)
        Store (Zero, \_SB.PCI0.LPC.EC.HCMU)
        \_SB.PCI0.LPC.EC.EVNT (One)
        \_SB.PCI0.LPC.EC.HKEY.MHKE (One)
        \_SB.PCI0.LPC.EC.FNST ()
        UCMS (0x0D)
        Store (Zero, LIDB)
        Store (\_SB.PCI0.LPC.EC.CMMD, PMMD)
        If (LGreaterEqual (PMMD, 0x07))
        {
            Store (Zero, PMMD)
        }

        Store (\_SB.PCI0.LPC.EC.CMMD, LVMD)
        If (LOr (LEqual (LVMD, Zero), LGreaterEqual (LVMD, 0x07)))
        {
            Store (One, LVMD)
        }
        ElseIf (LOr (LEqual (LVMD, 0x02), LEqual (LVMD, 0x03)))
        {
            Store (0x02, LVMD)
        }
        Else
        {
            Store (0x03, LVMD)
        }

        If (LEqual (Arg0, One))
        {
            Store (\_SB.PCI0.LPC.EC.HFNI, FNID)
        }

        If (LEqual (Arg0, 0x03))
        {
            NVSS (Zero)
            \_SB.PCI0.LPC.EC.LED (Zero, 0x80)
            \_SB.PCI0.LPC.EC.LED (0x0A, 0x80)
            Store (\_SB.PCI0.LPC.EC.AC._PSR (), PWRS)
            If (OSC4)
            {
                PNTF (0x81)
            }

            If (LNotEqual (ACST, \_SB.PCI0.LPC.EC.AC._PSR ()))
            {
                \_SB.PCI0.LPC.EC.ATMC ()
            }

            If (SCRM)
            {
                Store (0x07, \_SB.PCI0.LPC.EC.HFSP)
            }

            Store (Zero, IOEN)
            Store (Zero, IOST)
            If (LEqual (ISWK, One))
            {
                If (\_SB.PCI0.LPC.EC.HKEY.DHKC)
                {
                    \_SB.PCI0.LPC.EC.HKEY.MHKQ (0x6070)
                }
            }

            If (VIGD)
            {
                Store (\_SB.LID._LID (), \_SB.PCI0.IGPU.CLID)
                If (WVIS)
                {
                    VBTD ()
                }
            }
            ElseIf (WVIS)
            {
                Store (\_SB.LID._LID (), \_SB.PCI0.IGPU.CLID)
                VBTD ()
            }

            VCMS (One, \_SB.LID._LID ())
            AWON (Zero)
            If (CMPR)
            {
                Notify (\_SB.SLPB, 0x02)
                Store (Zero, CMPR)
            }
        }

        If (LEqual (Arg0, 0x04))
        {
            NVSS (Zero)
            Store (Zero, \_SB.PCI0.LPC.EC.HSPA)
            Store (\_SB.PCI0.LPC.EC.AC._PSR (), PWRS)
            If (OSC4)
            {
                PNTF (0x81)
            }

            \_SB.PCI0.LPC.EC.ATMC ()
            If (SCRM)
            {
                Store (0x07, \_SB.PCI0.LPC.EC.HFSP)
            }

            If (LNot (NBCF))
            {
                If (VIGD)
                {
                    \_SB.PCI0.LPC.EC.BRNS ()
                }
                Else
                {
                    VBRC (BRLV)
                }
            }

            Store (Zero, IOEN)
            Store (Zero, IOST)
            If (LEqual (ISWK, 0x02))
            {
                If (\_SB.PCI0.LPC.EC.HKEY.DHKC)
                {
                    \_SB.PCI0.LPC.EC.HKEY.MHKQ (0x6080)
                }
            }
        }

        \_SB.PCI0.LPC.EC.BATW (Arg0)
        \_SB.PCI0.LPC.EC.HKEY.WGWK (Arg0)
        Notify (\_TZ.THM0, 0x80)
        VSLD (\_SB.LID._LID ())
        If (VIGD)
        {
            Store (\_SB.LID._LID (), \_SB.PCI0.IGPU.CLID)
        }
        ElseIf (WVIS)
        {
            Store (\_SB.LID._LID (), \_SB.PCI0.IGPU.CLID)
        }

        If (LLess (Arg0, 0x04))
        {
            If (LOr (And (RRBF, 0x02), And (B1B2 (\_SB.PCI0.LPC.EC.AC10, \_SB.PCI0.LPC.EC.AC11), 0x02)))
            {
                ShiftLeft (Arg0, 0x08, Local0)
                Store (Or (0x2013, Local0), Local0)
                \_SB.PCI0.LPC.EC.HKEY.MHKQ (Local0)
            }
        }

        If (LEqual (Arg0, 0x04))
        {
            Store (Zero, Local0)
            Store (CSUM (Zero), Local1)
            If (LNotEqual (Local1, CHKC))
            {
                Store (One, Local0)
                Store (Local1, CHKC)
            }

            Store (CSUM (One), Local1)
            If (LNotEqual (Local1, CHKE))
            {
                Store (One, Local0)
                Store (Local1, CHKE)
            }

            If (Local0)
            {
                Notify (_SB, Zero)
            }
        }

        If (LOr (LEqual (Arg0, 0x03), LEqual (Arg0, 0x04)))
        {
            ADBG ("_WAK0")
            Store (Zero, \_SB.PCI0.LPC.EC.HKEY.ANGN)
            If (LOr (LEqual (\_SB.LID._LID (), One), LEqual (\_SB.PCI0.LPC.EC.AC._PSR (), One)))
            {
                \_SB.PCI0.LPC.EC.HKEY.DYTC (0x000F4001)
            }
            Else
            {
                \_SB.PCI0.LPC.EC.HKEY.DYTC (0x000F0001)
            }

            ADBG ("_WAK1")
        }

        \RMDT.PUSH ("Leave _WAK")
        Store (Zero, RRBF)
        Return (WAKI)
    }

when laptop sleep and wake up, the system log show this:
Code:
2018-01-14 20:53:56.867198+0800 0x11e5     Default     0x0                  0      0    kernel: (kernel) ACPIDebug: "Enter _PTS"
2018-01-14 20:53:56.870856+0800 0x11e5     Default     0x0                  0      0    kernel: (kernel) ACPIDebug: "Leave _PTS"
2018-01-14 20:53:56.875882+0800 0x74       Default     0x0                  0      0    kernel: (AppleACPIPlatform) ACPI S3 WAKE
2018-01-14 20:53:56.877004+0800 0x11e5     Default     0x0                  0      0    kernel: (kernel) ACPIDebug: "Enter _WAK"
2018-01-14 20:53:56.893836+0800 0x11e5     Default     0x0                  0      0    kernel: (kernel) ACPIDebug: "Leave _WAK"

The results look good (_PTS and _WAK are executing beginning to end).
 
The results look good (_PTS and _WAK are executing beginning to end).
The BT/WIFI is still a problem. From the full system log, it seems that with the PM of BT/WIFI.
Any ideas to solve it?
 
The BT/WIFI is still a problem. From the full system log, it seems that with the PM of BT/WIFI.
Any ideas to solve it?

Country code mismatch?
 
Country code mismatch?
The country code is correct, I inject country code in config.plist/KernelAndKextPatches/KextsToPatch like this:
Code:
            <dict>
                <key>Comment</key>
                <string>Country Code Patch (#a)</string>
                <key>Disabled</key>
                <false/>
                <key>Find</key>
                <data>QYP8/3Q1SI1V0A==</data>
                <key>Name</key>
                <string>com.apple.driver.AirPort.BrcmNIC</string>
                <key>Replace</key>
                <data>ZscGI2HrNI1V0A==</data>
            </dict>
 
Last edited:
I have solved BT/WIFI problems after wake up.
The solution is:
1, Confirm FakePCIID.kext/FakePCIID_Broadcom_WiFi.kext is added
2, Remove country code in config.plist/KernelAndKextPatches/KextsToPatch
3, Add "-lilubeta -brcmfxbeta brcmfx-country=#a" to config.plist/boot/arguments
4, Add AirportBrcmFixup.kext.

When I do this, BT/WIFI problem after wake up has sovled.
There is a small problem is: the country code and location is not show in System Report/Network/Wi-Fi
 
@jaymonkey could you please share the link or image of the third antenna you used for your spectre. I need to get an antenna wire but confused between universal and MHG-4 antennas.
 
@johnyg07,

There are many different types available for cheep prices on eBay, some flat, some rod like .. etc, the type i used was IPEX MHF4 NGFF 7260 7265 which look like this :-
Screen Shot 2018-02-05 at 13.55.55.png
Link to Seller & Item on eBay :-

https://www.ebay.co.uk/itm/2pc-IPEX...142533105956?_trksid=p2385738.m4383.l4275.c10

On My HP Spectre X360 i mounted the third aerial underneath the triangular hatched grills next to the keyboard and side air vent which gives the aerial some free air to work...

Screen Shot 2018-02-05 at 14.04.03.png Screen Shot 2018-02-05 at 14.11.19.png

loads of free space under those grills to mount a flat style aerial .... the grills are for air flow to the heatsink/fan and not speakers so the aerial also gets a bit of free air from the side vent as well (2nd picture above).

Mounting them in the display would require un-bonding the screen which is a good way to damage it .. so i choose anther way ... i did have to fine tune my routers aerials to get the faster wifi speed (>1000mbs).

Its not a perfect solution by any means as sometimes it does not connect at a speed > 878mbs like if i'm in the next room laptop but since making all of these changes i've not had any bluetooth or wifi issues .... for my HP X360 this has been the best wifi/BT combo so far.

Cheers
Jay
 
Last edited:
Status
Not open for further replies.
Back
Top