InfiniteMac OSx86

InfiniteMac OSx86 (http://infinitemac.com/forum.php)
-   10.X (http://infinitemac.com/forumdisplay.php?f=36)
-   -   Various DSDT mods. (http://infinitemac.com/showthread.php?t=1960)

gnychis 09-25-2009 03:41 AM

1 Attachment(s)
hi all... I have a Thinkpad X300, that whenever I put to sleep, I see the wireless light blink, and the the laptop wakes up. It seems as though the wireless card is waking the system after a second or two every time I sleep it.

Does anyone have any recommendations for this in terms of the DSDT? I've attached mine if it helps.

msingh 10-05-2009 05:37 AM

DSDT advice needed
 
1 Attachment(s)
Hello,

My system is a Dell D830.

After a lot of tinkering around, I managed to install Snow Leopard on it. Please see my guide.

I did a few DSDT mods to get some basic fixes.

Now, the system sleeps (S3 suspend to ram) but does not deep sleep (S5 suspend to disk), shutdown or reboot. I am using OpenHaltRestart.kext and SleepEnabler.kext. The latter made it possible to even suspend.

I am including my dsdt.dsl (which includes my fixes, by the way).

I see tantalizing references to the sleep button, SBTN, etc., but I have not found any systematic documentation for the code (btw. I am comfortable with coding as I do plenty of numerical coding in my work).

Can anyone take a look and let me know what I need to do to fix my poweroff and hibernate problem ?

The DSDT repository does not contain a fixed DSDT for my laptop.

PS: Microsoft's ASL compiler should be outlawed.

2nerd4u 10-20-2009 04:07 PM

Quote:

Originally Posted by sk1nhd33t (Post 30675)
Quote:

Originally Posted by pentiumpc (Post 21188)
change _HID to _CID

Device (PWRB)
{
Name (_HID, EisaId ("PNP0C0C")) ---> Name (_CID, EisaId ("PNP0C0C"))
Name (_UID, 0xAA)
Name (_STA, 0x0B)
}


This one I got it off some site, cannot remember where. (credit goes to him/her)
This will activate your power button to bring up the shutdown menu.

http://www.infinitemac.com/attachmen...1&d=1232342192

hmm weird, tried doing this on my gigabyte board but the shutdown menu wont show, when i press the power button my hack will just sleep thats it :(

mine will shut down instantly :D
edit: well actually it just goes to sleep mode verry fast^^ too bad my system wont wake from sleep...

Sweaty 12-21-2009 01:26 PM

DSDT shutdown patch
 
1 Attachment(s)
With this and new restart patch chameleon booter from Duvel (strong beer that) I have only fakesmc as an added kext, although I'm about to reinstall voodoohda so I can hopefully have two soundcards working.. anyway this is mm67's work I just found it a pain to find the detail on insane so posting it here.. Thanks to all who put together these fixes. Need to add the two operation region bits and change your method PTS

Code:

    OperationRegion (DEBG, SystemIO, 0x80, One)
    Field (DEBG, ByteAcc, NoLock, Preserve)
    {
        DBG1,  8
    }

    OperationRegion (PMRS, SystemIO, 0x0430, 0x13)
    Field (PMRS, ByteAcc, NoLock, Preserve)
    {
            ,  4,
        SLPE,  1,
                Offset (0x08),
        GPSE,  16,
        GPSS,  16,
                Offset (0x12),
            ,  1,
        SWGC,  1
    }

    Method (_PTS, 1, NotSerialized)
    {
        Or (Arg0, 0xF0, Local0)
        Store (Local0, DBG1)
        Store (Zero, \_SB.PCI0.LPCB.AG3E)
        If (LEqual (Arg0, 0x05))
        {
            Store (Zero, SLPE)
            Sleep(0x10)
        }
    }

also your LPCB has to be like so

Code:

            Device (LPCB)
            {
                Name (_ADR, 0x001F0000)
                OperationRegion (LPC0, PCI_Config, 0xA4, 0x02)
                Field (LPC0, ByteAcc, NoLock, Preserve)
                {
                    AG3E,  1
                }

I suppose add device ID if you need it, I'm on ICH10 so don't.

Also attaching blackosx's duvel+rekursor version of RC4 here, replace your chameleon boot file with the one from here and add these to boot.plist to get unique UUID and restart fix:
Code:

    <key>DeviceID</key>
    <string>XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX</string>

    <key>RestartFix</key>
    <string>YES</string>


mm67 12-21-2009 02:24 PM

Quote:

Originally Posted by Sweaty (Post 41562)
With this and new restart patch chameleon booter from Duvel (strong beer that) I have only fakesmc as an added kext, although I'm about to reinstall voodoohda so I can hopefully have two soundcards working.. anyway this is mm67's work I just found it a pain to find the detail on insane so posting it here.. Thanks to all who put together these fixes. Need to add the two operation region bits and change your method PTS

Code:

    OperationRegion (DEBG, SystemIO, 0x80, One)
    Field (DEBG, ByteAcc, NoLock, Preserve)
    {
        DBG1,  8
    }

    OperationRegion (PMRS, SystemIO, 0x0430, 0x13)
    Field (PMRS, ByteAcc, NoLock, Preserve)
    {
            ,  4,
        SLPE,  1,
                Offset (0x08),
        GPSE,  16,
        GPSS,  16,
                Offset (0x12),
            ,  1,
        SWGC,  1
    }

    Method (_PTS, 1, NotSerialized)
    {
        Or (Arg0, 0xF0, Local0)
        Store (Local0, DBG1)
        Store (Zero, \_SB.PCI0.LPCB.AG3E)
        If (LEqual (Arg0, 0x05))
        {
            Store (Zero, SLPE)
            Sleep(0x10)
        }
    }


It's only this :
Code:

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

and this:
Code:

        If (LEqual (Arg0, 0x05))
        {
            Store (Zero, SLPE)
            Sleep(0x10)
        }

that make the shutdown work, rest of the code is Gigabyte specific. This address 0x0430 is also motherboard specific, it is PMBASE+30h. Address of PMBASE is defined in FACP, on most boards it can also be checked from processor definitions. For example I have this in my dsdt:

Processor (CPU0, 0x00, 0x00000410, 0x06)

Here 0x00000410 is referring to PMBASE+10h so I use 0x430 on my Gigabyte board. On my MSI board's dsdt I have this:
Processor (P001, 0x01, 0x00000810, 0x06) {}

So in MSI shutdown code I use this:
OperationRegion (PMRS, SystemIO, 0x0830, 0x13)

Sweaty 12-21-2009 03:43 PM

Ok cheers mate, had to add the other bits on my board (asus p5ql/epu) to get it to compile, I'll try the simpler way later.. At least it did work the way I bodged it :)

EDIT: OK fixed code as you suggested I needed to use 0x830, also got rid of unnecessary bits, sometimes I needed to turn PSU off with 0x430 (before I could restart, shutdown was complete), that seems fixed now. Thanks a lot.

adityaxavier 01-09-2010 08:36 AM

Hi Guys,

Im in a fix.. Everywhere there is a DSDT Fix for getting the USB port to be displayed as Built-in but i need the opposite..
USB - 3 shows as built-in, but it has bluetooth. hence on sleep i loose bluetooth.. if i remove the entry altogether, i have it as external but my sleep fails..

Any help would be greatly appreciated.
Am having Lenovo T60p. with ICH7-M chipset.

Thanks,
Xavier

ping99 01-18-2010 02:42 PM

Shutdown & Restart with sleep fix-Thanks to Sweaty & mm67
 
Many thanks to Sweaty and mm67. You are really nice. This resolve the problem I thought it would never be resloved.

I just made a small change to Method (_PTS, 1, NotSerialized) in order to resolve sleep issue on my notebook CQ60-202TX. Now let me put all together step by step as a guide. This might help newbie.

1 Add OperationRegion below before Method (_PTS, 1, NotSerialized)
OperationRegion (DEBG, SystemIO, 0x80, One)
Field (DEBG, ByteAcc, NoLock, Preserve)
{
DBG1, 8
}

OperationRegion (PMRS, SystemIO, 0x0430, 0x13)
Field (PMRS, ByteAcc, NoLock, Preserve)
{
, 4,
SLPE, 1,
Offset (0x08),
GPSE, 16,
GPSS, 16,
Offset (0x12),
, 1,
SWGC, 1
}

2 Check Device (LPC) if there is a similar Operation Region "LPC" like below. If you don't have LPC device, just search Name (_ADR, 0x001F0000), sometimes the device name is different.
Device (LPC)
{
Name (_ADR, 0x001F0000)
OperationRegion (LPC0, PCI_Config, 0xA4, 0x02)
Field (LPC0, ByteAcc, NoLock, Preserve)
{
AG3E, 1
}
If there is no OperationRegion LPC, please add code above. In my dsdt's OperationRegion LPC0, there is an EXPE instead of AG3E. So I did not modify it, but had to change a bit in Method (_PTS, 1, NotSerialized) . See mine below:
OperationRegion (LPC0, PCI_Config, 0x40, 0xC0)
Field (LPC0, AnyAcc, NoLock, Preserve)
{
Offset (0x60),
, 10,
EXPE, 1
}

3 Add code below in Method (_PTS, 1, NotSerialized) like this
Method (_PTS, 1, NotSerialized)
{
Or (Arg0, 0xF0, Local0)
Store (Local0, DBG1)
Store (Zero, \_SB.PCI0.LPC.EXPE) //Please change to \_SB.PCI0.LPC.AG3E if you don't have the EXPE, but add AG3E.
If (LEqual (Arg0, 0x05))
{
Store (Zero, SLPE)
Sleep(0x10)
}
Else
{
//**Original Code, this resolved my sleep issue.
}
}

//This is written by mm67. You are really nice.
This address 0x0430 is also motherboard specific, it is PMBASE+30h. Address of PMBASE is defined in FACP, on most boards it can also be checked from processor definitions. For example I have this in my dsdt:

Processor (CPU0, 0x00, 0x00000410, 0x06)

Here 0x00000410 is referring to PMBASE+10h so I use 0x430 on my Gigabyte board. On my MSI board's dsdt I have this:
Processor (P001, 0x01, 0x00000810, 0x06) {}

So in MSI shutdown code I use this:
OperationRegion (PMRS, SystemIO, 0x0830, 0x13)

4 Add these in your com.apple.Boot.plist and then put "boot_RC4_Duvelv2.1_Rekursor" under your boot partition.
<key>DeviceID</key>
<string>******XX-***X-***X-***X-************</string>
<key>RestartFix</key>
<string>YES</string>

Now you can remove OpenHaltRestart.kext and PlatformUUID.kext or other similar kexts.

pocenk 01-29-2010 10:05 AM

does anyone have dsdt for EP45-DS5? i'm trying to patch myself and always failed

please help

Nameci 01-31-2010 02:11 AM

1 Attachment(s)
Quote:

Originally Posted by pentiumpc (Post 21190)
Most portable system don't sleep on closing the LID, I tried to find a DSDT fix for it but cannot find it. (google is my best friend.) so I wrote 1 to fix my own.

If you have a better or alternative method, please let me know. Thanks.

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)
}


LID device should be easy to find, just need to add a line to notify the system to sleep.

On most system, (I think) depends on the OS to set the system to sleep bit OS X don't understand the notification sent by the LID device, so I did it in the hardware instead.

Noob here.

Never did work on my dsdt, I have errors after compiling on which it cannot find the registers. After much of googling, I have edited one value on my dsdt, on the LID0, instead of 0x03 I have made it to 0x04. I have sleep on lid close now, but I still don't have wake on lid open or wake on keyboard press after sleep via Fn+F1.

Here is my DSDT.dsl if somebody care to point me to the right direction.

Thanks in advance.