View Single Post
 
Old 05-13-2009, 01:04 PM
candykane candykane is offline
Jaguar
 
Join Date: May 2009
Location: schiedam
Posts: 36
Fixing sleep and usb after wake up

I finally fixed sleep on my lappie!

The problem was on USB....
The fix is simple, same as for WAK method:

If u look on DSDT under all USB entry u will see:
QUOTE
Method (_PRW, 0, NotSerialized)
{
Return (GPRW (0xYZ, 0xYZ))
}
Now search for Method (GPRW.... and change on the end that: Return (PRWP or whatever u have) to:
CODE
Return (Package (0x02)
{
Zero,
Zero
})

Still i have to use modded kexts for ehci/uhci w/o them my lappie still sleep fine but on wake I lose UHCI devices(BT and fingerprint sensor)

About EHCI kext fixed, I really hate those ownership debug message, dunno why most of the dev's like to add that crap debug on kexts, imo is easy to do 2 ver. normal/debug or to add a bolean in plist to enable/disable that feature...

L.E. Thanks a lot Slice for the edited versions of the kexts me and my system log are very happy
BTW I'm still waiting for some answers about those USB fixes, since your sources are not available dunno what really does your kexts, maybe we can add those fixes on DSDT, or at least we can try...

L.L.E Last night I forgot(tired) to tell about: Device (PWRB)...e.g PoWeRButton I noticed that is missing on my DSDT so I add it b/c on MB DSDT there are also other entry on USB devices that point to it.
So if you don't have it search for : Device (SLPB) and add it over/under it, should look like this:
CODE
Scope (_SB)
{
Device (PWRB)
{
Name (_HID, EisaId ("PNP0C0C"))
}

Device (SLPB)
{
Name (_HID, EisaId ("PNP0C0E"))
Method (_PRW, 0, NotSerialized)
{
Return (Package (0x02)
{
0x0B,
0x04
})
}
}
}
Now search for Method (_Lxy....) you will see all USB devices there, then under each UHCI one add Notify (\_SB.PWRB, 0x02), as for EHCI entry I prted entire entry from MB, should look like this:
CODE
Scope (_GPE)
{
Method (_L03, 0, Serialized)
{
Notify (\_SB.PCI0.UHC1, 0x02)
Notify (\_SB.PWRB, 0x02)
}

Method (_L04, 0, Serialized)
{
Notify (\_SB.PCI0.UHC2, 0x02)
Notify (\_SB.PWRB, 0x02)
}

Method (_L0C, 0, Serialized)
{
Notify (\_SB.PCI0.UHC3, 0x02)
Notify (\_SB.PWRB, 0x02)
}

Method (_L0E, 0, Serialized)
{
Notify (\_SB.PCI0.UHC4, 0x02)
Notify (\_SB.PWRB, 0x02)
}

Method (_L05, 0, Serialized)
{
Notify (\_SB.PCI0.UHC5, 0x02)
Notify (\_SB.PWRB, 0x02)
}

Method (_L0D, 0, Serialized)
{
If (\_SB.PCI0.EHC1.PMES)
{
Store (0x01, \_SB.PCI0.EHC1.PMES)
Notify (\_SB.PCI0.EHC1, 0x02)
Notify (\_SB.PWRB, 0x02)
}

If (\_SB.PCI0.EHC2.PMES)
{
Store (0x01, \_SB.PCI0.EHC2.PMES)
Notify (\_SB.PCI0.EHC2, 0x02)
Notify (\_SB.PWRB, 0x02)
}
}
The entry on EHCI one seems to fix sleep on it so no more need for ehcisleepenabler, at least for me.
BTW if you have HDEF on those methods remove it, or it could broke your sleep!
Another tip, if you like as example to wake your notebook/desktop using mouse or keyboard, identify what USB port it use(from ioreg) and on DSDT change on that USB entry PWRB to SLPB

Enjoy!
Reply With Quote