Jump to content

Creating my own DSDT


llamafilm
 Share

10 posts in this topic

Recommended Posts

I've got my first Hackintosh up and running Yosemite 10.10.5.  It's totally stable so far, but a few features are lacking:

Sleep doesn't work

Audio doesn't work

HWSensors are inaccurate

 

I don't find any shared DSDT specific to my motherboard, since it's still rather new. How does one go about creating a DSDT?  I'd like to understand what's going on, rather than just pasting code snippets.

 

I extracted the original DSDT using Clover, which I believe is step one...

Link to comment
Share on other sites

Thanks, that was some good context.  Now I know how to apply patches and compile.  But how do I tell which devices are not defined properly and thus need to be patched?  I have read somewhere saying that this motherboard doesn't require any patches, is that true?

Link to comment
Share on other sites

Hi,​

​Is it the system in your signature you are talking about? How do you tell, well, play a game, convert some video's.

​I have no idea tbh, on how to tell what needs patching. Sometimes it is not needed to patch anything. If patching is needed, you will mostly suffer from hardware not functioning or low performance.

​If gaming or video conversion, your webcam and mic work on skype, as an example, nothing to worry about.

Link to comment
Share on other sites

Yeah I'm talking about my signature system.  I thought there might be a way to see a list of hardware which exists, but does not have a valid definition in the OS.  Anyway, the only thing so far that seems definitely related to DSDT is sleep.  When I try to sleep the system, it powers off everything (monitor, power LED, ethernet LEDs, fans) for a second, then immediately powers on everything except the monitor, that just stays black.  Then I have to force a reboot.  Any idea where I should start looking for the solution?

Link to comment
Share on other sites

By the way, I noticed that when I installed Clover, its default config.plist included several DSDT fixes in the ACPI section.  Are these specific to my machine based on hardware detection, or is this a generic default?  I tried disabling all of them just to see what happens, and so far have not noticed any ill effects.

Link to comment
Share on other sites

Right now, I'm trying to get ACPISensors to work, and I understand I need a DSDT patch for that.  But since there are none available for my motherboard, I'll have to create it from scratch.  I have my original DSDT in MaciASL, but how do I know what to look for and what to edit to make it work?

Link to comment
Share on other sites

Here's a really basic question:

After applying an SSDT patch using Clover, how can I tell that it's been applied correctly?  For example, I put this patch in /CLOVER/ACPI/patched/SSDT-HDEF-ALZA-1.aml.  

In boot.log, I see the following message.

 

Inserting SSDT-HDEF-ALZA-1.aml from EFI\CLOVER\ACPI\patched ... Success

 
But when I open the System DSDT in MaciASL, I don't see the patch, I only see this:
           Device (HDEF)
            {
                Name (_ADR, 0x001B0000)
            }
/*
 * Intel ACPI Component Architecture
 * AML Disassembler version 20100331
 *
 * Disassembly of iASLEUvbfv.aml, Tue Jul 26 23:54:32 2016
 *
 *
 * Original Table Header:
 *     Signature        "SSDT"
 *     Length           0x000000F4 (244)
 *     Revision         0x01
 *     Checksum         0x9E
 *     OEM ID           "toleda"
 *     OEM Table ID     "amiazal1"
 *     OEM Revision     0x00003000 (12288)
 *     Compiler ID      "INTL"
 *     Compiler Version 0x20141107 (538185991)
 */
DefinitionBlock ("iASLEUvbfv.aml", "SSDT", 1, "toleda", "amiazal1", 0x00003000)
{
    External (\_SB_.PCI0, DeviceObj)
    External (\_SB_.PCI0.ALZA._ADR)
 
    Scope (\_SB.PCI0)
    {
        Device (HDEF)
        {
            Name (_ADR, 0x001B0000)
            Method (_INI, 0, NotSerialized)
            {
                Store (Zero, \_SB.PCI0.ALZA._ADR)
            }
 
            Method (_PRW, 0, NotSerialized)
            {
                Return (Package (0x02)
                {
                    0x0D, 
                    0x05
                })
            }
 
            Method (HDEF._DSM, 4, NotSerialized)
            {
                If (LEqual (Arg2, Zero))
                {
                    Return (Buffer (One)
                    {
                        0x03
                    })
                }
 
                Return (Package (0x04)
                {
                    "layout-id", 
                    Buffer (0x04)
                    {
                        0x01, 0x00, 0x00, 0x00
                    }, 
 
                    "PinConfigurations", 
                    Buffer (Zero) {}
                })
            }
        }
    }
 
    Store ("ssdt-ami_x99_hdef_audio-azal_to_hdef-1_v1.0 github.com/toleda", Debug)
}
Link to comment
Share on other sites

I figured it out, so I'll answer my own question, in case it helps anyone else here.  Applying an SSDT doesn't actually modify the system DSDT.  But MaciASL will show any applied SSDTs in the File > New from ACPI menu.

Link to comment
Share on other sites

 Share

×
×
  • Create New...