InfiniteMac OSx86  


Reply
 
Thread tools Display modes
  #1  
Old 09-11-2009, 12:32 AM
chris7519 chris7519 is offline
Cheetah
 
Join Date: May 2009
Posts: 10
Clamshell Sleep via DSDT?

I'm attempting to get SL running on 64bit by removing the needed kexts that only support 32bit and get the needed support by patching my DSDT. I only have 2 issues left which include AppleHDA (no sound after sleep, but enabled via DSDT thanks to mormegil!) and clamshell sleep.

Taken from a post by pentiumpc:
Code:
Device (LID0)
{
Name (_HID, EisaId ("PNP0C0D")) //LID detection
Method (_PRW, 0, NotSerialized)
{
Return (Package (0x02)
{
0x0B,
0x04
})
}
Name (LIDS, One)
Method (_LID, 0, NotSerialized)
{
Store (^^PCI0.SBRG.EC0.SF13, LIDS) //LID register
XOr (LIDS, One, Local0)
IF (Local0) //if LID is closed 
{ 
Notify (SLPB, 0x80) //Set system to sleep
} 
Return (LIDS)
}
It looks like he's adding the Method or just those two lines of code, but I can't seem to get it to work with my set up. Advice from any1?

My dsdt:
Code:
Device (LID0)
        {
            Name (_HID, EisaId ("PNP0C0D"))
            Name (LSTS, Zero)
            Method (_LID, 0, NotSerialized)
            {
                If (ECOK)
                {
                    If (LEqual (^^PCI0.LPC.EC0.ECLS, One))
                    {
                        Store (Zero, LSTS)
                    }
                    Else
                    {
                        Store (One, LSTS)
                    }

                    If (IGDS)
                    {
                        Store (LSTS, LIDS)
                        Store (LSTS, ^^PCI0.OVGA.CLID)
                    }

                    Return (LSTS)
                }
                Else
                {
                    If (IGDS)
                    {
                        Store (LIDS, ^^PCI0.OVGA.CLID)
                    }

                    Return (LIDS)
                }
            }
        }
Reply With Quote
  #2  
Old 09-11-2009, 03:32 PM
mormegil mormegil is offline
Panther
 
Join Date: Aug 2009
Posts: 148
Code:
Device (LID0)
        {
            Name (_HID, EisaId ("PNP0C0D"))
            Name (LSTS, Zero)
            Method (_LID, 0, NotSerialized)
            {
                If (ECOK)
                {
                    If (LEqual (^^PCI0.LPC.EC0.ECLS, One))
                    {
                        Store (Zero, LSTS)
                    }
                    Else
                    {
                        Store (One, LSTS)
                    }

                    If (IGDS)
                    {
                        Store (LSTS, LIDS)
                        Store (LSTS, ^^PCI0.OVGA.CLID)
                    }

                    If (LSTS)
                    { 
                        Notify (SLPB, 0x80)
                    }
                    Return (LSTS)
                }
                Else
                {
                    If (IGDS)
                    {
                        Store (LIDS, ^^PCI0.OVGA.CLID)
                    }

                    Return (LIDS)
                }
            }
        }
What the hell.. just give it a try

Core2Quad / MSI P45 Neo2-FR / HD4870 / Snow Leopard
Reply With Quote
  #3  
Old 09-11-2009, 07:23 PM
chris7519 chris7519 is offline
Cheetah
 
Join Date: May 2009
Posts: 10
Close!!! It sleeps when the Lid is open instead of closed. Right now I can put it to sleep manually but once awake and the lid is open it keeps going back to sleep...

Update:


I tried:
Code:
Device (LID0)
        {
            Name (_HID, EisaId ("PNP0C0D"))
            Name (LSTS, Zero)
            Method (_LID, 0, NotSerialized)
            {
                If (ECOK)
                {
                    If (LEqual (^^PCI0.LPC.EC0.ECLS, One))
                    {
                        Store (Zero, LSTS)
                    }
                    Else
                    {
                        Store (One, LSTS)
                    }

                    If (IGDS)
                    {
                        Store (LSTS, LIDS)
                        Store (LSTS, ^^PCI0.OVGA.CLID)
                    }

                    If (LIDS)
                    { 
                        Notify (SLPB, 0x80)
                    }
                    Return (LSTS)
                }
                Else
                {
                    If (IGDS)
                    {
                        Store (LIDS, ^^PCI0.OVGA.CLID)
                    }

                    Return (LIDS)
                }
            }
        }
Now it sleeps when the lid is closed, but I still get the loop where after wake it keeps going back to sleep... Do I need a Return???

Last edited by chris7519; 09-11-2009 at 07:43 PM.
Reply With Quote
  #4  
Old 09-11-2009, 09:57 PM
mormegil mormegil is offline
Panther
 
Join Date: Aug 2009
Posts: 148
Code:
Device (LID0)
        {
            Name (_HID, EisaId ("PNP0C0D"))
            Name (LSTS, Zero)
            Method (_LID, 0, NotSerialized)
            {
                If (ECOK)
                {
                    If (LEqual (^^PCI0.LPC.EC0.ECLS, One))
                    {
                        Store (Zero, LSTS)
                    }
                    Else
                    {
                        Store (One, LSTS)
                        Notify (SLPB, 0x80)
                    }

                    If (IGDS)
                    {
                        Store (LSTS, LIDS)
                        Store (LSTS, ^^PCI0.OVGA.CLID)
                    }

                    Return (LSTS)
                }
                Else
                {
                    If (IGDS)
                    {
                        Store (LIDS, ^^PCI0.OVGA.CLID)
                    }

                    Return (LIDS)
                }
            }
        }
try it

Core2Quad / MSI P45 Neo2-FR / HD4870 / Snow Leopard
Reply With Quote
  #5  
Old 09-11-2009, 10:49 PM
chris7519 chris7519 is offline
Cheetah
 
Join Date: May 2009
Posts: 10
Alright!!! One more kext scratched off the list! It needed to be inserted here:

Code:
If (ECOK)
                {
                    If (LEqual (^^PCI0.LPC.EC0.ECLS, One))
                    {
                        Store (Zero, LSTS)
                        Notify (SLPB, 0x80)
                    }
                    Else
                    {
                        Store (One, LSTS)
                    }
Thanks once again for the help mormegil... someone buy that man a beer! Now just have to fix issues with battery meter (VoodooBattery is only 32bit) and No sound after sleep issue with patched AppleHDA via DSDT (VoodooHDA v2.2 doesn't let me adjust volume).
Reply With Quote
  #6  
Old 09-11-2009, 11:00 PM
mormegil mormegil is offline
Panther
 
Join Date: Aug 2009
Posts: 148
Glad to help.. Nice one!

Core2Quad / MSI P45 Neo2-FR / HD4870 / Snow Leopard
Reply With Quote
  #7  
Old 09-12-2009, 05:23 PM
uman uman is offline
Panther
 
Join Date: May 2009
Location: USA
Posts: 103
Re: VoodooBattery is only 32bit. Superhai's published the source. Can't it be "ported" and compiled for 64-bit?

--
MacBook Pro - have allergy to nickel in the aluminum casing. So my kid gets an expensive toy!

Gateway MX 8738 - Retail, vanilla Snow Leopard 10.6.2 (thanks kizwan!) with Chameleon RC4, modified DSDT. Upgraded to Core 2 CPU (easy to do). Upgraded to 640GB drive. Everything but SD card working. Minor niggles. GMA950 with QE/CI and *no* artifacts.

iMac (luxo/lamp) G4 with Tiger.
Reply With Quote
  #8  
Old 02-11-2010, 08:22 AM
00oo00 00oo00 is offline
Cheetah
 
Join Date: Feb 2010
Posts: 3
Hi, mormegil.
I HAVE THE SAME PROBLEM CAN U HAVE A CHECK OF MY DSDT AND GIVE ME SOME ADVICE?
THANKS IN ADVANCE.

REGARS
MIKE

HERE IS MY DSDT. I ALSO HAVE SOME GFX0 FAMILY MATCH ERRORS.
Attached Files
File Type: zip DSDT.aml.zip (9.5 KB, 1 views)
Reply With Quote
  #9  
Old 02-11-2010, 01:32 PM
Nameci's Avatar
Nameci Nameci is offline
Jaguar
 
Join Date: Jan 2010
Posts: 30
and here is mine as well, i already have sleep on lid close but cannot wake on lid open, and if i sleep, i cannot restart well as well as shutdown, there is no video but there is still activity on the wifi, fans and power monitor.
Attached Files
File Type: zip dsdt.dsl.zip (17.0 KB, 4 views)

Hasee W230N  iAtkos S3 v2 10.6.3 updated to 10.6.4 via Apple Software Update . Intel T8300 2.4 GHz Core 2 Duo
Intel Mobile GM965 ICH8 . Intel X3100 . Atheros Ar9280 WiFi . Realtek RTL8101E . ALC 883 . Optiarc DVD+RW . KingSpec MLC SSD 32Gb SATA

"Do I want a real Mac? Yes of course!!!"
Reply With Quote
  #10  
Old 05-26-2010, 07:09 PM
Goten Goten is offline
Cheetah
 
Join Date: Dec 2009
Posts: 2
thanks to mormegil. my laptop now goes to sleep when i close lid. just an issue: now the restart and shutdown processes have become slow (the system remains blocked on the desktop for 10 seconds doing nothing, and then it restart). i don't know why. has anyone the same problem?



💡 Deploy cloud instances seamlessly on DigitalOcean. Free credits ($100) for InfMac readers.


Last edited by Goten; 05-27-2010 at 03:51 PM.
Reply With Quote
Reply
Thread Tools
Display Modes