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)

uman 03-13-2010 01:33 PM

Are you planning to use VoodooHDA, or AppleHDA? If Voodoo, first rename all references to HDEF to ALC6 (or whatever turns you on :)) Doing so will prevent AppleHDA from loading and matching your HDA device. If AppleHDA is loaded, then VoodooHDA doesn't load.

Next, and this is common for both Apple and Voodoo. Add this to your HDEF or ALC6 device:
Quote:

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

"PinConfigurations",
Buffer (Zero) {}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
You can then add your pin configs in there or in the plist depending on how you want to get sound going. See the great guide on infinitemac, or the one on projectosx.

Search my posts and look for my question on pinconfigs to find the links. I'm still trying to find out how to get my pinconfigs without Windows, since I don't run that anymore!

barnum 03-13-2010 02:14 PM

Hi kizman,

Quote:

Originally Posted by kizwan (Post 46132)
By looking at USB4 device in DSDT, there is _PSW entry that can be manipulate. This is the entry for USB4 device in DSDT after modifying the argument (set to 0):-
Code:

            Device (USB4)
            {
                Name (_ADR, 0x001D0003)
                OperationRegion (U4CS, PCI_Config, 0xC4, 0x04)
                Field (U4CS, DWordAcc, NoLock, Preserve)
                {
                    U4EN,  2
                }

                Name (_PRW, Package (0x02)
                {
                    0x0E,
                    0x03
                })
                Method (_PSW, 1, NotSerialized)
                {
                    If (Arg0)
                    {
                        // Store (0x03, U4EN)
                        // Disable USB4 capability to wake a sleeping system
                        Store (0x00, U4EN)
                    }
                    Else
                    {
                        Store (0x00, U4EN)
                    }
                }

                Method (_S3D, 0, NotSerialized)
                {
                    Return (0x02)
                }

                Method (_S4D, 0, NotSerialized)
                {
                    Return (0x02)
                }
            }

The last FIX enable the computer to sleep again.

kizwan

can you tell me what modification should I apply to this code to disable sleep for a device in usb2 ?

regards,
Vincent

kizwan 03-13-2010 02:24 PM

Quote:

Originally Posted by uman (Post 46202)
So does Asus use AMW0, or do you need to add that code from AMW0. A WMID kext would be useful as many PC vendors use that interface. uninc's DSDT was hideously intertwined with WMID.

Looks like I still need to go through WMI and ACPI documentation to have better understanding. ;) Then I can make this successful.
Quote:

Originally Posted by uman (Post 46202)
I'm not sure, but given that the ACPI 4.0 spec devotes pages and pages to battery and power issues, I think it is at least possible. I also intend to try to solve this (but it's a lower priority for me because my laptop battery is toast anyway). I tried VoodooBattery, which worked great (it told me my battery was toast, lol), but then it kernel panic'ed HARD and I had to repair my disk, so I won't be using that again.

Yeah, it's a low priority for me too. Just playing around.

I guess to make it working, maybe need to determine which query method it use. I said that because I found that there are query method that called ADP1 & BAT0 device. Just don't know what it do & what it contribute to battery detection.
Quote:

Originally Posted by uman (Post 46202)
I still don't understand how query methods are executed, nor how they are bound to some device. ACPI says: And then they discuss it more with a completely unhelpful example. Oh wait, the acpi implementers guide is more helpful:

I'm going to grab the acpi implementers guide.
Quote:

Originally Posted by uman (Post 46202)
DSDT is fun ;) but time consuming!

I agree. :)

kizwan 03-13-2010 02:32 PM

Quote:

Originally Posted by barnum (Post 46209)
Hi kizman,
.....................
can you tell me what modification should I apply to this code to disable sleep for a device in usb2 ?
..................

Do you mean you want to disable USB2 capability to wake a sleeping system, don't you? If in "Device (USB2)" entry it have _PSW (Power State Wake) method, you will need to change it according to my modification.
Code:

                Method (_PSW, 1, NotSerialized)
                {
                    If (Arg0)
                    {
                        // Store (0x03, U4EN)
                        // Disable USB4 capability to wake a sleeping system
                        Store (0x00, U4EN)
                    }
                    Else
                    {
                        Store (0x00, U4EN)
                    }
                }

Refer to arguments for _PSW:
Quote:

Arguments: (1)
Arg0 – An Integer containing a wake capability control
0 – Disable the device’s wake capabilities
1 – Enable the device’s wake capabilities
That is why I change both condition to execute the same thing. So that it always execute the same "Store" operation as if it is Arg0=0.



kizwan

breakky 03-13-2010 02:55 PM

Quote:

Originally Posted by uman (Post 46205)
Are you planning to use VoodooHDA, or AppleHDA? If Voodoo, first rename all references to HDEF to ALC6 (or whatever turns you on :)) Doing so will prevent AppleHDA from loading and matching your HDA device. If AppleHDA is loaded, then VoodooHDA doesn't load.

Next, and this is common for both Apple and Voodoo. Add this to your HDEF or ALC6 device:
You can then add your pin configs in there or in the plist depending on how you want to get sound going. See the great guide on infinitemac, or the one on projectosx.

Search my posts and look for my question on pinconfigs to find the links. I'm still trying to find out how to get my pinconfigs without Windows, since I don't run that anymore!


I planed to use AppleHDA with DSDT.aml fix.This is my original DSDT.aml

http://hotfile.com/dl/32576445/45eb3...T.dsl.zip.html


By the way I use AsereBLN booter 1.1.9.

kizwan 03-13-2010 07:56 PM

Quote:

Originally Posted by breakky (Post 46213)
I planed to use AppleHDA with DSDT.aml fix.This is my original DSDT.aml

Try this legacy kext for ALC662 (Snow Leopard):-
http://www.mediafire.com/?kmnykkqmy5m

Make sure AppleHDA.kext in /System/Library/Extensions/ folder is original kext. Remember to put _DSM method in Device (HDEF) (please refer to uman's post #81).

You also need to put DTGP code in DSDT. Put it afterMethod (_WAK) function.
Code:

    Method (DTGP, 5, NotSerialized)
    {
        If (LEqual (Arg0, Buffer (0x10)
                {
                    /* 0000 */    0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44,
                    /* 0008 */    0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B
                }))
        {
            If (LEqual (Arg1, One))
            {
                If (LEqual (Arg2, Zero))
                {
                    Store (Buffer (One)
                        {
                            0x03
                        }, Arg4)
                    Return (One)
                }

                If (LEqual (Arg2, One))
                {
                    Return (One)
                }
            }
        }

        Store (Buffer (One)
            {
                0x00
            }, Arg4)
        Return (Zero)
    }

kizwan

breakky 03-14-2010 03:59 AM

When I try to compile my dsdt.dsl I get one error:

Code:

4644: DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Error    4067 -    ^ Object is not accessible from this scope (DTGP)


Nevermind I found where is the error and fix it!

kizwan 03-14-2010 07:23 AM

Quote:

Originally Posted by breakky (Post 46239)
When I try to compile my dsdt.dsl I get one error:

Code:

4644: DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Error    4067 -    ^ Object is not accessible from this scope (DTGP)


Nevermind I found where is the error and fix it!

How about the sound? Is it working?

richarda 03-16-2010 04:39 PM

Hello all,

This thread has been very useful for me. I now just miss one last step to have the "perfect" install.
I'm running Snow Leopard on an ASUS eeePC 901 from the SD card. It's a bit slow but this is OK.

My problem: whenever I go to sleep and wake-up from sleep, I guess the SD card (my "boot drive") gets brutally ejected and.....well, it's bad.

My question: is there any DSDT mod that would allow my SD card to stay mounted (powered maybe) during all the cycle wake-sleep-wake ?

I found a lot of approaching stuff on the thread but nothing exactly like that. this would make may day.

Any idea anyone ?

Thanks, Richard.

uman 03-18-2010 04:58 AM

Quote:

Originally Posted by richarda (Post 46325)
Hello all,

This thread has been very useful for me. I now just miss one last step to have the "perfect" install.
I'm running Snow Leopard on an ASUS eeePC 901 from the SD card. It's a bit slow but this is OK.

My problem: whenever I go to sleep and wake-up from sleep, I guess the SD card (my "boot drive") gets brutally ejected and.....well, it's bad.

My question: is there any DSDT mod that would allow my SD card to stay mounted (powered maybe) during all the cycle wake-sleep-wake ?

I found a lot of approaching stuff on the thread but nothing exactly like that. this would make may day.

Any idea anyone ?

Thanks, Richard.

Yes, but it depends on the underlying hardware. I've found los of good info about my own laptop in my chipset doc (ICH7), and there is lots of good info on the SATA part of the device control. I assume the SSD is controled through SATA??