ProjectOSX

Welcome Guest!

Returning User? Login here.

Want membership privileges? Register here.

> DSDT

Differentiated System Description Table (DSDT) - DSDT is a part of the ACPI specification and it supplies configuration information about a base system. ACPI capable computers come with a preinstalled DSDT from the manufacturer. A common Linux/OS X problem is missing ACPI functionality (fans not running, laptop screens not shutting off, etc.)

This subforum is dedicated to patches/fixes able to be inserted/modified from an extracted dsdt.dsl, which is then compiled into a DSDT.aml for OS X to pick up and use (with a proper bootloader).

These fixes are not permanent, and do not damage your BIOS.

 
Start a new topic Add Reply
> Some useful DSDT patches
Slice
post Aug 14 2009, 06:24 PM
Post #1
First of all thanks Fassl for DSDT patcher.
Now I have dsdt.dsl and can edit it to change functionality of my hackintosh.
1. Patch by vaag to exclude sleep trick for IntelX3100. I confirm, it works. We need to delete CRT device here
CODE
            Device (GFX0)
            {
                Name (_ADR, 0x00020000)
                Method (_DOS, 1, NotSerialized)
                {
                    Store (Arg0, MIS4)
                    SMI (0x9E, MIS4)
                }

                Method (_DOD, 0, NotSerialized)
                {
                    Return (Package (0x04)
                    {
                        0x00010100,
                        0x00010200,
                        0x00010400,
                        0x00010300
                    })
                }
/*Device (CRT)*/
                Device (LCD)
                {

2. Make display dim when working from battery:
Delete IRQ from TMR device
CODE
                Device (TIMR)
                {
                    Name (_HID, EisaId ("PNP0100"))
      /*                  IRQNoFlags ()
                            {2}    */

and add it to IPIC
CODE
                Device (IPIC)
                {
                    Name (_HID, EisaId ("PNP0000"))
                    Name (CRS, ResourceTemplate ()
                    {
                        IO (Decode16,
                            0x0020,             // Range Minimum
                            0x0020,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IO (Decode16,
                            0x04D0,             // Range Minimum
                            0x04D0,             // Range Maximum
                            0x01,               // Alignment
                            0x02,               // Length
                            )
                        IRQNoFlags ()
                            {2}


3. WiFi waking from sleep
CODE
       Method (_L09, 0, NotSerialized)
        {
            Store (SMI (0xC6, Zero), Local0)
            If (And (Local0, One))
            {
                Store (One, \_SB.PCI0.RP01.PSP1)
                Notify (\_SB.PCI0.RP01.PXS1, 0x02)  // this is my LAN
            }

            If (And (Local0, 0x04))
            {
                Notify (\_SB.PCI0.RP05.PXS5, 0x02) // change to RP02.PXS2 which is my WiFi.
            }
        }

4. Switch on support for AC adapter
CODE
       Device (ADP1)
        {
            Name (_HID, "ACPI0003")
            Name (_PRW, Package (0x02)  // add this
            {
                0x18,
                0x03
            })

and now I see
QUOTE
| | |
| | +-o AppleACPIACAdapter <class AppleACPIACAdapter, !registered, !matched, active, busy 0, retain 4>
in my ioreg.
5. PCI card information
CODE
            Device (RP02)
            {
                Name (_ADR, 0x001C0001)  // last two digits is a number of the bridge
                Device (ARPT)
                {
                    Name (_ADR, Zero)
                    Name (_SUN, 0x01)    // add this object with the same value as PCI bridge
                      Method (_DSM, 4, NotSerialized)   // add this method
                    {
                        Store (Package (0x04)
                        {
                            "model",
                            Buffer ()
                            {
                                "Dell Wireless 1395"
                            },

                            "built-in",
                            Buffer ()
                            {
                                0x00
                            }

                        }, Local0)
                        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))   // define the method at the top
                        Return (Local0)
                    }

Now I see
Attached File  Picture_1.png ( 116.83K ) Number of downloads: 2148

6. DSDT patch for USB to use native driver.
CODE
                Method (_DSM, 4, NotSerialized)
                {
                    Store (Package (0x0f)
                        {
                            "device-id",
                            Buffer (0x04)
                            {
                                0x34, 0x3A, 0x00, 0x00  //the values below
                            },
                            "AAPL,clock-id",   // property needed for sleep support
                            Buffer (One)
                            {
                                0x0a  
                            },

                                "built-in",
                                Buffer ()
                                {
                                        0x00
                                },

                              "device_type",   //not sure it is useful
                              Buffer (0x05)
                              {
                                  "EHCI"
                              },

                            
                            "AAPL,current-available",
                            0x04B0,
                            "AAPL,current-extra",
                            0x02BC,
                            "AAPL,current-in-sleep",  // to solve a problem with sleep when stick is inserted
                            0x03E8,

                            Buffer (0x01)
                            {
                                0x00
                            }
                        }, Local0)
                    DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                    Return (Local0)
                }

DeviceIDs
Intel
USB1 - 0x2830
USB2 - 0x2831
USB3 - 0x2832
USB4 - 0x2834
USB5 - 0x2835
EHC1 - 0x2836
EHC2 - 0x283a
nForce
USB1 - 0x0aa5
USB2 - 0x0aa7
EHC1 - 0x0aa6
EHC2 - 0x0aa9
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
Slice
post Aug 17 2009, 10:32 AM
Post #2
What Operating System emulates by your DSDT?
CODE
    Name (W98S, "Microsoft Windows")
    Name (NT5S, "Microsoft Windows NT")
    Name (WINM, "Microsoft WindowsME: Millennium Edition")
    Name (WXP, "Windows 2001")
    Name (WLG, "Windows 2006")
    Name (LNX, "Linux")

We can change it here ( changes from 23.01.2012 - we must emulate WindowsXP!)
CODE
    Method (OSID, 0, NotSerialized)
    {
        Store (0x10, MIS3)
/*        If (LEqual (MIS3, Zero))
        {
            Store (0x10, MIS3)
            If (CondRefOf (\_OSI, Local0))
            {
                If (_OSI (WXP))
                {
                    Store (0x10, MIS3)
                }

                If (_OSI (WLG))
                {
                    Store (0x20, MIS3)
                }

                If (_OSI (LNX))
                {
                    Store (0x40, MIS3)
                }
            }
            Else
            {
                If (STRE (_OS, W98S))
                {
                    Store (0x02, MIS3)
                }

                If (STRE (_OS, NT5S))
                {
                    Store (0x08, MIS3)
                }

                If (STRE (_OS, WINM))
                {
                    Store (0x04, MIS3)
                }
            }
        }  */

        Return (MIS3)
    }

But I don't know what is better.
For example
CODE
        If (LGreaterEqual (OSID (), 0x20))
        {
            If (And (Local0, 0x04))
            {
                Notify (\_SB.PCI0.GFX0.LCD, 0x86)
            }

            If (And (Local0, 0x02))
            {
                Notify (\_SB.PCI0.GFX0.LCD, 0x87)
            }
        }
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
Slice
post Aug 18 2009, 10:10 AM
Post #3
In the example above we see that waking method depends on Operating System
If (LGreaterEqual (OSID (), 0x20)) - this is for Windows Vista and Linux only
{
If (And (Local0, 0x04))
{
Notify (\_SB.PCI0.GFX0.LCD, 0x86) - wake up set LCD with code 86
}

If (And (Local0, 0x02))
{
Notify (\_SB.PCI0.GFX0.LCD, 0x87) - wake up set LCD with code 87
}
}
0x80 is a sleep. 0x06 or 0x07 is a brightness I think.
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
18seven
post Aug 19 2009, 09:20 AM
Post #4
QUOTE (Slice)
0x80 is a wake up. 0x06 or 0x07 is a brightness I think.

Value Description

0x85 Cycle Brightness. Used to notify OSPM that the output device brightness should be increased by
one level. Used to notify OSPM that the user pressed a button or key that is associated with cycling
brightness. A useful response by OSPM would be to increase output device brightness by one or
more levels. (Levels are defined in _BCL.) If the brightness level is currently at the maximum
value, it should be set to the minimum level.

0x86 Increase Brightness. Used to notify OSPM that the output device brightness should be increased
by one or more levels as defined by the _BCL object. Used to notify OSPM that the user pressed a
button or key that is associated with increasing brightness. If the brightness level is currently at the
maximum value, OSPM may should ignore the notification.

0x87 Decrease Brightness. Used to notify OSPM that the output device brightness should be decreased
by one or more levels as defined by the _BCL object. Used to notify OSPM that the user pressed a
button or key that is associated with decreasing device brightness. If the brightness level is
currently at the minimum value, OSPM may should ignore the notification.

0x88 Zero Brightness. Used to notify OSPM that the output device brightness should be zeroed,
effectively turning off any lighting that is associated with the device. Used to notify OSPM that the
user pressed a button or key associated with zeroing device brightness. This is not to be confused
with putting the device in a D3 state. While the brightness may be decreased to zero, the device
may still be displaying, using only ambient light.

0x89 Display Device Off. Used to notify OSPM that the device should be put in an off state, one that is
not active or visible to the user, usually D3, but possibly D1 or D2. Used to notify OSPM that the
user pressed a low power button or key associated with putting the device in an off state. There is
no need for a corresponding “device on” notification, for two reasons. First, OSPM may choose to
toggle device state when this event is pressed multiple times. Second, OSPM may (and probably
will) choose to turn the monitor on whenever the user types on the keyboard, moves the mouse, or
otherwise indicates that he or she is attempting to interact with the machine.
Slice
post Aug 19 2009, 10:03 AM
Post #5
Thank you 18seven!
Where did you find these description?

I am wrong 0x80 is Put To Sleep, 0x02 is Wake
Edited posts...
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
18seven
post Aug 19 2009, 11:41 AM
Post #6
QUOTE (Slice)
Where did you find these description?

NP, ACPI specs appendix B.
Slice
post Aug 20 2009, 02:50 PM
Post #7
QUOTE (18seven @ Aug 19 2009, 11:41 AM) *
NP, ACPI specs appendix B.

Thanks! I have this manual, but 631 pages...

i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
18seven
post Aug 20 2009, 08:32 PM
Post #8
lol, yes its epic. However, I find it pleasant to read... I think that means I should go get a drink.
drmash
post Sep 2 2009, 03:53 PM
Post #9
thanks Slice, great stuff! Please post your orig/mod sections(dell laptop) DSDT patch for USB to use native driver.
Slice
post Sep 12 2009, 08:46 AM
Post #10
My latest working DSDT.dsl (12.09.2009) for Dell Inspiron 1525
Attached File  dsdt.dsl.zip ( 20.24K ) Number of downloads: 766

i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
drmash
post Sep 12 2009, 12:22 PM
Post #11
clock-id maybe different for two ehci & ehc2 divece's?
CODE
                            "AAPL,clock-id",
                             Buffer (One)
                             {
                                 0x0a  
                             },


This post has been edited by drmash: Sep 12 2009, 12:23 PM
Slice
post Sep 12 2009, 02:43 PM
Post #12
QUOTE (drmash @ Sep 12 2009, 03:22 PM) *
clock-id maybe different for two ehci & ehc2 divece's?
CODE
                            "AAPL,clock-id",
                             Buffer (One)
                             {
                                 0x0a  
                             },

Yes. Sorry it's my mistake.
The dsdt is not ultimate I hope to make sleep/wake working with AC adapter attached.
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2
fingerr
post Feb 17 2011, 04:08 PM
Post #13
Hi all,

I'm trying to enable sleep on my system (Asus U30JC) and I've tried a lot of solutions provided on forums, but I can't get it working.

Attached is my DSDT.aml. Can someone have a look and help me with it?

Thanks in advance and best regards,
fingerr
ytrox
post Jun 2 2011, 09:46 PM
Post #14
PCI card information mod works for ethernet controllers but with this method I can't connect to internet (I use a pci ethernet card RTL8139)

EDIT: OK, evrything works fine

This post has been edited by ytrox: Jun 3 2011, 11:36 PM
Slice
post Jan 23 2012, 06:44 AM
Post #15
One news here.
I had a problem with Lion that can't sleep while in Snow all is OK.
I found that Lion is more critical to DSDT mistakes.
TRICK #4 from topic appears to be a final solution to have good working sleep/wake.
i3-2120 GA-H61M-S1 UEFI, Radeon HD6670-UEFI, ALC887(VoodooHDA 2.8.6), OS⌘10.9.5, OS⌘ 10.7.5 Clover FakeSMC_plugins_3.3.1 Realtek LAN v3.1.2

Add Reply Start a new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: