Jump to content

Anybody get SLEEP to work?


Godolete
 Share

43 posts in this topic

Recommended Posts

I have sleep working fully on my Lion install. I use DSDT (and no kext) for sleep which was patched after lot of hard work and help from other Hackintosh users online and of course Google!

So umm... thats nice. Any advice to help us. System description...? how u patched ur dsdt? Etc.

Link to comment
Share on other sites

I had a similar problem with sleep in the past. I couldn’t make it run properly for months, but now everything works flawlessly well and of course w/o sleepenabler… So I can tell you how I was manage to fix that little issue, but also I believe that this is probably one of the easiest way to make proper DSDT.

 

1. I was extracted basic DSDT from Windows but not from OS X, because I want to be sure that I was get clean and unspoiled DSDT. And of course for that I was use simple DSDT editor (EvoDSDTSe) for windows. I didn’t do anything further with that DSDT, just extract and save it, in shape as it is…

 

2. For basic set of patches I was using Koalala’s ACPI patcher. I was just apply all set of patches and fixes from the first page:

- HPET patch

- RTC patch

- Aliases patch

 

And all fixed from the list:

- Local0 fix

- WAK fix

- DGPT fix

- MUTE fix

But of course you can optionally patch NVidia or Ati graphics and ALC888 for sound if you like…

 

3. Then I was switch to OS X, and again from EvoDSDTSe patcher, did the rest of the job. For sleep essential is further more to make USB fix (for ICH9), then to remove all IRQNoFlags from RTC, TIMR and PIC device, also you can do patch for SBRG (LPCB) device, and in WAK method, I was added in front of this line (Return (Package (0x02, etc…) at the end, Notify for all USB devices like this:

Notify (\_SB.PWRB, 0x02)
       Notify (\_SB.PCI0.USB1, Zero)
       Notify (\_SB.PCI0.USB2, Zero)
       Notify (\_SB.PCI0.USB3, Zero)
       Notify (\_SB.PCI0.USB4, Zero)
       Notify (\_SB.PCI0.USB5, Zero)
       Notify (\_SB.PCI0.USB6, Zero)
       Notify (\_SB.PCI0.EHCI, Zero)
       Notify (\_SB.PCI0.EHC2, Zero)
       Return (Package (0x02)
       {
           Zero, 
           Zero
       })
   }

4. Further more you can do all other fixes if you need that, such as SATA patch, SBUS patch, Speedstep patch, Powerbutton fix, etc, but these, which I was mentioned previously, are crucial for sleep…

 

Oh btw, I'm not sure for those who have Device (HUB) in combination with Device (USB) but my guess is that for those is necessary to be applied different USB patch...

Link to comment
Share on other sites

So umm... thats nice. Any advice to help us. System description...? how u patched ur dsdt? Etc.

 

 

Kitmac,

 

I have patched my DSDT. That's how I got it to work in Snow Leopard and now in Lion. Restart works too. I followed some guide here on InsanelyMac but I don't remember the link to it and who to credit. Let me know if you want me to look for the guide I used.

 

Jay

Link to comment
Share on other sites

Instead I've this problem about sleep under Lion (and also under Snow Leopard)

Sleep function works good only if I set hibernation mode to 0 (Sleep only)

If I set the mode to 3 (Sleep and hibernation), after the wake from sleep the system hangs. Every leds on my notebook turns on but the monitor remains black and I've to force shutdown. Hibernation instead works perfectly.

I suppose that the problem is in my dsdt but i don't know where i can check in the table for this problem.

any ideas?

 

thanks

Link to comment
Share on other sites

Autopatcher with clean DSDT no go either. Guess I'll have to wait for a new SleepEnabler.kext to come out. :(

 

If you followed my instructions then I hope that you do everything I said, but not just autopatching, because that's not enough! I hope that you understand that! ;)

 

Oh, btw which motherboard do you have?

Link to comment
Share on other sites

I have an Asus P7H55-M Pro. I used Koala's ACPI patcher and it says only partial support for AMI bios. Would that have anything to do with it?

 

I don't know, but it could be?!?

Link to comment
Share on other sites

  • 2 weeks later...
I had a similar problem with sleep in the past. I couldn’t make it run properly for months, but now everything works flawlessly well and of course w/o sleepenabler… So I can tell you how I was manage to fix that little issue, but also I believe that this is probably one of the easiest way to make proper DSDT.

Vlada,

Could please share your DSDT.dsl ?

Link to comment
Share on other sites

If you followed my instructions then I hope that you do everything I said, but not just autopatching, because that's not enough!

 

NativePM + USB fix(if you need) = Native Sleep

 

Auto-Patcher apply all you need

http://www.insanelymac.com/forum/index.php?showtopic=235523

NativePM and restart in Chameleon

add in boot.plist

<key>GeneratePStates</key>
<string>Yes</string>
<key>GenerateCStates</key>
<string>Yes</string>

dont use [url=&quot;http://www.insanelymac.com/forum/topic/279450-why-insanelymac-does-not-support-tonymacx86/&quot;]#####[/url] etc

dont use SleepEnabler

many things can break your sleep

kexts(RTG for example), video card(many cases) etc.

 

dont use EvOReboot(breaks the sleep ;) )

apply shutdown in DSDT(_PTS)

Use it

dsdt.Vlada..zip

or Hybrid Shutdown

 

 

Method (_PTS, 1, NotSerialized)
   {
       Store (Arg0, DBG8)
       If (LAnd (LEqual (Arg0, 0x04), LEqual (OSFL (), 0x02)))
       {
           Sleep (0x0BB8)
       }

       PTS (Arg0)
       Store (Zero, Index (WAKP, Zero))
       Store (Zero, Index (WAKP, One))
       Store (ASSB, WSSB)
       Store (AOTB, WOTB)
       Store (AAXB, WAXB)
       Store (Arg0, ASSB)
       Store (OSFL (), AOTB)
       Store (Zero, AAXB)
       Store (One, \_SB.SLPS)
   }

 

 

after

Method (_PTS, 1, NotSerialized)
    {
        [color="#FF0000"][b]If (LEqual (Arg0, 0x05))
        {
            Store (Zero, SLPE)
            Sleep (0x10)
        }
        Else
        {[/b][/color]
            Store (Arg0, DBG8)
            If (LAnd (LEqual (Arg0, 0x04), LEqual (OSFL (), 0x02)))
            {
                Sleep (0x0BB8)
            }

            PTS (Arg0)
            Store (Zero, Index (WAKP, Zero))
            Store (Zero, Index (WAKP, One))
            Store (ASSB, WSSB)
            Store (AOTB, WOTB)
            Store (AAXB, WAXB)
            Store (Arg0, ASSB)
            Store (OSFL (), AOTB)
            Store (Zero, AAXB)
            Store (One, \_SB.SLPS)
        [color="#FF0000"][b]}[/b][/color]
    }

 

 

in definition block

OperationRegion (PMRS, SystemIO, 0x0430, One)
Field (PMRS, ByteAcc, NoLock, Preserve)
{
	,   4, 
SLPE,   1
}

 

I hope that you understand that! 01a.png

Link to comment
Share on other sites

NativePM + USB fix(if you need) = Native Sleep...

 

I hope that you understand that! ;)

Thanks for clearing what is necessary for proper sleep, but allow me to clear few things more…

 

I’m not sure why are you posted my DSDT here since native sleep already working properly in my case and also with or w/o that Method _PTS, 1 and piece of code that you attached here as a example.

 

I can tell you also that I’m not using C-States and P-States in boot.plist because of this patch at the beginning of my DSDT, which basically enables speedstep…

 


Scope (\)
{
Name (SSDT, Package (0x18)
{
"CPU0IST ", 
0xCFFBE0B0, 
0x0235, 
"CPU1IST ", 
0xCFFBE540, 
0x0235, 
"CPU2IST ", 
0x80000000, 
0x80000000, 
"CPU3IST ", 
0x80000000, 
0x80000000, 
"CPU4IST ", 
0x80000000, 
0x80000000, 
"CPU5IST ", 
0x80000000, 
0x80000000, 
"CPU6IST ", 
0x80000000, 
0x80000000, 
"CPU7IST ", 
0x80000000, 
0x80000000
})
Name (CSDT, Package (0x18)
{
"CPU0CST ", 
0x80000000, 
0x80000000, 
"CPU1CST ", 
0x80000000, 
0x80000000, 
"CPU2CST ", 
0x80000000, 
0x80000000, 
"CPU3CST ", 
0x80000000, 
0x80000000, 
"CPU4CST ", 
0x80000000, 
0x80000000, 
"CPU5CST ", 
0x80000000, 
0x80000000, 
"CPU6CST ", 
0x80000000, 
0x80000000, 
"CPU7CST ", 
0x80000000, 
0x80000000
})
Name (CFGD, 0x02)
Name (NCPU, 0x02)
Name (NPCP, One)
Name (PDC0, 0x80000000)
Name (PDC1, 0x80000000)
Name (PDC2, 0x80000000)
Name (PDC3, 0x80000000)
Name (PDC4, 0x80000000)
Name (PDC5, 0x80000000)
Name (PDC6, 0x80000000)
Name (PDC7, 0x80000000)
Name (TBL0, Zero)
Name (TBL1, Zero)
Name (TBL2, Zero)
Name (TBL3, Zero)
Name (TBL4, Zero)
Name (TBL5, Zero)
Name (TBL6, Zero)
Name (TBL7, Zero)
Name (CTB0, Zero)
Name (CTB1, Zero)
Name (CTB2, Zero)
Name (CTB3, Zero)
OperationRegion (PMRG, SystemIO, 0x0800, 0x50)
Field (PMRG, ByteAcc, NoLock, Preserve)
{
Offset (0x41), 
DEV4, 1, 
DEV5, 1, 
DEV6, 1, 
DEV7, 1, 
STS4, 1, 
STS5, 1, 
STS6, 1, 
STS7, 1
}
}

Scope (_PR.CPU1)
{
Name (HI0, Zero)
Name (HC0, Zero)
Name (TLD0, Zero)
Method (_PDC, 1, NotSerialized)
{
If (LEqual (TLD0, Zero))
{
CreateDWordField (Arg0, 0x08, CAP0)
Store (CAP0, PDC0)
If (LEqual (And (PDC0, 0x09), 0x09))
{
If (And (CFGD, 0x02))
{
OperationRegion (IST0, SystemMemory, DerefOf (Index (SSDT, One)), DerefOf (Index (SSDT, 0x02
)))
Load (IST0, HI0)
}

Store (One, TLD0)
}
}
}

Name (_PSS, Package (0x04)
{
Package (0x06)
{
0x0D5C, 
0xFDE7, 
0x0A, 
0x0A, 
0x0926, 
Zero
}, 

Package (0x06)
{
0x0BE0, 
0xFDE8, 
0x0A, 
0x0A, 
0x0822, 
One
}, 

Package (0x06)
{
0x0A64, 
0xFDE7, 
0x0A, 
0x0A, 
0x071D, 
0x02
}, 

Package (0x06)
{
0x0A64, 
0xFDE7, 
0x0A, 
0x0A, 
0x071D, 
0x03
}
})
Method (_CST, 0, NotSerialized)
{
If (And (PDC0, 0x18))
{
Return (^^CPU2._CST ())
}
Else
{
Return (Package (0x02)
{
One, 
Package (0x04)
{
ResourceTemplate ()
{
Register (FFixedHW, 
0x00, // Bit Width
0x00, // Bit Offset
0x0000000000000000, // Address
,)
}, 

One, 
One, 
0x03E8
}
})
}
}
}

Scope (_PR.CPU2)
{
Name (HI1, Zero)
Name (HC1, Zero)
Name (TLD1, Zero)
Method (_PDC, 1, NotSerialized)
{
If (LEqual (TLD1, Zero))
{
CreateDWordField (Arg0, 0x08, CAP1)
Store (CAP1, PDC1)
If (LEqual (And (PDC1, 0x09), 0x09))
{
If (And (CFGD, 0x02))
{
OperationRegion (IST1, SystemMemory, DerefOf (Index (SSDT, 0x04)), DerefOf (Index (SSDT, 0x05
)))
Load (IST1, HI1)
}

Store (One, TLD1)
}
}
}

Method (_CST, 0, NotSerialized)
{
Return (Package (0x04)
{
0x03, 
Package (0x04)
{
ResourceTemplate ()
{
Register (FFixedHW, 
0x01, // Bit Width
0x02, // Bit Offset
0x0000000000000000, // Address
0x01, // Access Size
)
}, 

One, 
One, 
0x03E8
}, 

Package (0x04)
{
ResourceTemplate ()
{
Register (SystemIO, 
0x08, // Bit Width
0x00, // Bit Offset
0x0000000000000414, // Address
,)
}, 

0x02, 
One, 
0x01F4
}, 

Package (0x04)
{
ResourceTemplate ()
{
Register (SystemIO, 
0x08, // Bit Width
0x00, // Bit Offset
0x0000000000000415, // Address
,)
}, 

0x03, 
0x55, 
0xFA
}
})
}
}

Scope (_PR.CPU3)
{
Name (HI2, Zero)
Name (HC2, Zero)
Name (TLD2, Zero)
Method (_PDC, 1, NotSerialized)
{
If (LEqual (TLD2, Zero))
{
CreateDWordField (Arg0, 0x08, CAP2)
Store (CAP2, PDC2)
If (LEqual (And (PDC2, 0x09), 0x09))
{
If (And (CFGD, 0x02))
{
OperationRegion (IST2, SystemMemory, DerefOf (Index (SSDT, 0x0D)), DerefOf (Index (SSDT, 0x0E
)))
Load (IST2, HI2)
}

Store (One, TLD2)
}
}
}

Method (_CST, 0, NotSerialized)
{
Return (^^CPU2._CST ())
}
}

Scope (_PR.CPU4)
{
Name (HI3, Zero)
Name (HC3, Zero)
Name (TLD3, Zero)
Method (_PDC, 1, NotSerialized)
{
CreateDWordField (Arg0, 0x08, CAP3)
Store (CAP3, PDC3)
If (LEqual (TLD3, Zero))
{
If (LEqual (And (PDC3, 0x09), 0x09))
{
If (And (CFGD, 0x02))
{
OperationRegion (IST3, SystemMemory, DerefOf (Index (SSDT, 0x10)), DerefOf (Index (SSDT, 0x11
)))
Load (IST3, HI3)
}

Store (One, TLD3)
}
}
}

Method (_CST, 0, NotSerialized)
{
Return (^^CPU1._CST ())
}
}

And I’m not sure anymore, but I think that sleep was worked in my case earlier even before I was inserted that piece of code in my DSDT and also w/o C-States/P-States string in boot.plist.

 

So as Morpheus said in the Matrix: it seems that some rules could be bent… and others can be broken!

 

Best ;)

Link to comment
Share on other sites

...

01a.png

 

remove EVOreboot

I applied the shutdown

try it

 

Yep...your DSDT

http://www.kexts.com/view/1097-foxconn_p35..._tool_pack.html

 

SpeedStep no problem

I'm not using the Chameleon

I'm using SSDT

but really no difference

http://www.insanelymac.com/forum/index.php...st&id=92962

many ways come to the same result

 

for EHCI

use it

Method (_DSM, 4, NotSerialized)
			{
				Store (Package (0x04)
					{
						"device-id", 
						Buffer (0x04)
						{
							0x3A, 0x3A, 0x00, 0x00
						}, 

						"AAPL,clock-id", 
						Buffer (One)
						{
							0x01
						}
					}, Local0)
				DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				Return (Local0)
			}

 

anyway

great job 01c.png

Link to comment
Share on other sites

remove EVOreboot

I applied the shutdown

try it

 

Yep...your DSDT

http://www.kexts.com/view/1097-foxconn_p35..._tool_pack.html

 

anyway

great job

Ah, I understand now… I see that you are discovered my Foxconn P35A tool pack. Heh, well thanks… ;)

 

I really do my best to make OS X setup easy.

 

Anyway, I was made some changes in the pack as you suggested (did redesign too), which means that I was added that little fix for restart/shutdown in DSDT and also I was removed EVOreboot.kext from the pack. Beside that almost all elements inside the DSDT are now patched to ICH10, which leads us to the new 1.6 version of that pack.

 

So thanks again friend for everything.

 

Best ;)

Link to comment
Share on other sites

post-557433-1309408881.png

 

remove EVOreboot

I applied the shutdown

try it

 

Yep...your DSDT

http://www.kexts.com/view/1097-foxconn_p35..._tool_pack.html

 

SpeedStep no problem

I'm not using the Chameleon

I'm using SSDT

but really no difference

http://www.insanelymac.com/forum/index.php...st&id=92962

many ways come to the same result

 

for EHCI

use it

Method (_DSM, 4, NotSerialized)
			{
				Store (Package (0x04)
					{
						"device-id", 
						Buffer (0x04)
						{
							0x3A, 0x3A, 0x00, 0x00
						}, 

						"AAPL,clock-id", 
						Buffer (One)
						{
							0x01
						}
					}, Local0)
				DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				Return (Local0)
			}

 

anyway

great job post-557433-1309409120.png

 

I have also very strange phenomena:

With no edit of the .plist as you said:

Only wakeup from keyboard possible and after wakeup CMOS is cleared on the next startup...

With you entries in the plist:

Monitor gets dark, lion wakes up and sleeps again..

 

Very strange.

I'll send you my DSDT extracted from Windows in a few days, maybe there's some change...

Link to comment
Share on other sites

NativePM + USB fix(if you need) = Native Sleep
But NOT wake in case of a notebook.

 

I have tried your patched DSDT and added USB fix but does not wake up from sleep (Acer Aspite 3820T)

 

Most people get the Sleep AND Wake working on Desktops but much harder on Notebooks as I am finding.

Link to comment
Share on other sites

I am runnning 10.6.8 and 10.7 on the same hardware, using exactly the same optional kexts ( fakesmc & IOAHCIBlockStorageInjector ) and DSDT.

10.6.8 sleeps & wakes up, but 10.7 never wakes up - needs reset.

 

GA-P55-UD3R, core i750, GeForce 2400GT, Intel 82571 NIC.

Link to comment
Share on other sites

Sleep works... X58A-UD7 / ver 1.0 and BIOS IS F8 !, it is just updated from GB's site.... after that, of course, a remake for DSDT.aml and SleepEnabler.kext + AppleRTC.kext are modded for Lion (11A494a). Downloaded them from Kexts.com...

 

When sleeping a double click on my mouse wakes it up. Mouse is a Microsoft Wireless Mouse 5000; it's odd to me that somethings from MS really work.

 

Only thing "not working out of box"™ is that after sleep i need to manually make mkext for S/L/E to caches if i install something or upgrade so that kexts are changed. Otherwise it reads all kexts again when rebooting next time.

 

So i run first Kext Utility or something that fixes all permissions (S/L/E + /E/E) and makes mkext for Extra/Extensions. After that i use this in Terminal

 

sudo kextcache -v 1 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions

 

 

For sleep to work, it is not needed to remake mkexts. It is only for faster booting.....

 

Kari

Link to comment
Share on other sites

sudo kextcache -v 1 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions

 

Lion no longer use /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext

Link to comment
Share on other sites

 Share

×
×
  • Create New...