- Joined
- Aug 10, 2012
- Messages
- 31
- Motherboard
- OSX Mountain Lion
- CPU
- i5 4430m
- Graphics
- HD3000
- Mac
- Classic Mac
- Mobile Phone
4x40s not sleeping on AC adapter power
discovered the problem. turned off wifi then laptop went into sleep on ac. makes sense because i used hp probook installed 6 which installs a new wifi kext mixed with bluetooth
edit: couldnt fix the problem though
Got programming experience?
One thing you might try doing is experiment with modifications to the _PTS method (ACPI Prepare To Sleep). If you search your DSDT for Method (_PTS), you'll see that it mostly calls HPTS. Searching for HPTS, you'll find it at the top of the DSDT.
I would try commenting out different portions of this. Keep in mind that Arg0==3 for sleep (S3). In particular, I think the calls to SSMI don't really do anything and are perhaps not necessary (you could prove me wrong... I'm just guessing).
The goal of commenting stuff out of the _PTS would be, through process of elimination, determine if there is code here that is causing the stall or, and what code it is... I did a similar thing with my desktop DSDT, eventually determining there was some code attempting to talk to a non-existent PS2 port, causing sleep to take 2-3mins to enter.
Here is the code:
Code:Method (HPTS, 1, NotSerialized) { Store (Arg0, SLPT) // this is probably 100% necessary \_SB.ODGW (Or (0x5400, Arg0)) // not sure... If (LEqual (Arg0, 0x05)) // this is special case for restart (will never be reached if shutdown fix is applied [see below]) { \_SB.SSMI (0xEA82, Arg0, Zero, Zero, Zero) // SSMI does nothing for us, I think... } If (LGreater (Arg0, Zero)) { \_SB.SSMI (0xEA83, Zero, Zero, Zero, Zero) // I don't think these calls do anything under OSX (I think some kind of callback into Windows WMI or something) Acquire (\_SB.PCI0.LPCB.EC0.ECMX, 0xFFFF) // this Acquire is new in 4x40 If (\_SB.PCI0.LPCB.EC0.ECRG) // not sure what ECRG is but it is generally tested before touching any EC register... { Store (Zero, \_SB.PCI0.LPCB.EC0.HSST) } Release (\_SB.PCI0.LPCB.EC0.ECMX) // paired Release/Acquire new in 4x40 PPTS (Arg0) // this results in another SSMI call If (LNotEqual (Arg0, 0x05)) // for all cases except restart { \_SB.PCI0.LPCB.EC0.BTDR (Zero) Store (0xFF, \_SB.PCI0.LPCB.EC0.NGBF) // these are just variables in memory (ACPI Name) Store (0xFF, \_SB.PCI0.LPCB.EC0.NGBT) // but related to battery... Store (0x07, \_SB.PCI0.LPCB.EC0.GACP) Store (One, \_SB.NFBS) If (LEqual (Arg0, 0x03))// this is specifically for sleep (s3) { Store (\_SB.LID._LID (), LSTA) If (LNotEqual (And (PNHM, 0x000F0FF0), 0x000106E0)) { Store (APMC, IDPM) } } } } }
And here is your _PTS:
Code:Method (_PTS, 1, NotSerialized) { HPTS (Arg0) If (LEqual (Arg0, 0x03)) { If (LAnd (DTSE, LGreater (TCNT, One))) { TRAP (0x02, 0x1E) } } If (LOr (LEqual (Arg0, 0x04), LEqual (Arg0, 0x05))) // sleep state 4 and restart(soft-off) { If (LEqual (XHCI, 0x02)) // must be doing some USB3 related stuff { Store (0xFFFFFFF0, Local0) And (Local0, \_SB.PCI0.XHC.PR3, \_SB.PCI0.XHC.PR3) } } }
Why don't you have the "shutdown fix" for _PTS method? Shutdown fix:
Code:# Shutdown fix into method label _PTS code_regex_not If\s\(LEqual\s\(Arg0,\s0x05\)\) code_regex ^((?:.|\n)*)$ replace_matched begin If (LEqual (Arg0, 0x05)) {}\n Else\n {\n %1 } end;
In addition there is still some "other than 8-bit EC register access" in the DSDT (I think the 4x30s still has these too). Just for grins, you could try patching. I really don't think this will help as I don't think that code is being reached. But see the attachment for an updated 06_Battery.txt...
discovered the problem. turned off wifi then laptop went into sleep on ac. makes sense because i used hp probook installed 6 which installs a new wifi kext mixed with bluetooth
edit: couldnt fix the problem though