Home

Awesome

###Process of Modifying DSDT (Based On Tables from Bios 2.30)

  1. Download iasl51 use iasl to extract clean DSDT/SSDTs from raw DSDT/SSDTs
./iasl51 -da -dl -fe refs.txt *.aml
// move clean dsl files to clean/ , you can also do it manually!
mkdir clean && mv raw/*.dsl clean/

As i know, different Models have different DSDT/SSDTs structures: For my own Model: i5 Version non-HD:

DSDT - we all have it!
SSDT0 - Nvidia Graphical Card parAt! Which contains lot of `\_SB.PCI0` scopes
SSDT1 - Unknown, but keep it! Contains only one scope `\_SB` and one device `IAOE`
SSDT2 - Internal Graphical Card part! Which contains one `\_SB.PCI0` scopes and `B0D3`(or different) and `GFX0` device
SSDT3,4 - CPU part. You will see lot of `CPU` scopes. Just **Remove** them! We don't need it! We generate SSDT for CPU later with tools.

Others like i7 Version HD, or maybe i5 Version HD:

DSDT - we all have it!
SSDT0-4 - CPU part. You will see lot of `CPU` scopes. Just **Remove** them! We don't need it! We generate SSDT for CPU later with tools.
SSDT5 - Internal Graphical Card part! Which contains one `\_SB.PCI0` scopes and `B0D3`(or different) and `GFX0` device
SSDT6 - Nvidia Graphical Card part! Which contains lot of `\_SB.PCI0` scopes
SSDT7 - Unknown, but keep it! Contains only one scope `\_SB` and one device `IAOE`

Notice! My tutorial is based on the structure of mine! Please notice your filenames and fit to your own related DSDT/SSDTs! 2. Download MaciASL and start editing clean dsl files. Add Laptop-DSDT-Patch repo into MaciASL.

  1. Error Fix: Now we are using ./iasl51 -da -dl -fe refs.txt *.aml command with help of refs.txt (Referenced Topic). So there should be No Errors in your DSDT/SSDTs. If you are interested in how to fix errors manually, please checkout the deprecated branch.

  2. At the very beginning, we patch Common Fixes: (Referenced Topic)

  1. Disable Nvdia:
External (_SB_.PCI0.RP05.PEGP._OFF, MethodObj) // Warning: Unresolved Method, guessing 0 arguments (may be incorrect, see warning above)
External (_SB_.PCI0.RP05.PEGP._ON, MethodObj) // Warning: Unresolved Method, guessing 0 arguments (may be incorrect, see warning above)
  1. Graphic Fix:
  1. USB Fix in DSDT for El Capitan:
  1. Audio Fix
  1. Shutdown Fix in DSDT:
#Shutdown Fix
into method label _PTS code_regex (If\s*\(LEqual\s*\(Arg0,\s*0x05\)\)\s*\n\s*\{\s*\n)(?:[^\n\}]+\n)+(\s*\}) replace_matched begin
%1
            Store (Zero, SLPE)\n
            Sleep (0x10)\n
%2
end;
into definitionblock code_regex . code_regex_not OperationRegion\s*\(PMRS insert begin
OperationRegion (PMRS, SystemIO, 0x1830, One)\n
Field (PMRS, ByteAcc, NoLock, Preserve)\n
{\n
        ,   4, \n
    SLPE,   1\n
}
end;
  1. Brightness Keys ( Only for Synaptics with VoodooPS2 ): I don't know if your keys' codes are same as mine, You may need to follow the tutorial and find out yours! (Tutorial)
# Make EC-based brightness up/down work with RehabMan VoodooPS2 ACPI keyboard mechanism
into method label _Q8F replace_content
begin
// Brightness Down\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0405)\n
end;
into method label _Q8E replace_content
begin
// Brightness Up\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0406)\n
end;
  1. Wait for your contribution!

###SSDT Generation ssdtPRGen.sh is the tool we are using.

curl -o ssdtPRGen.sh https://raw.githubusercontent.com/Piker-Alpha/ssdtPRGen.sh/Beta/ssdtPRGen.sh
chmod +x ssdtPRGen.sh
./ssdtPRGen.sh -x 1 -p 'i5-4200U'
ASL Input:     /Users/Kaijun/Library/ssdtPRGen/ssdt.dsl - 264 lines, 7903 bytes, 49 keywords
AML Output:    /Users/Kaijun/Library/ssdtPRGen/ssdt.aml - 1619 bytes, 16 named objects, 33 executable opcodes

Copy ssdt.aml to Clover! Notice: i5-4200U is my CPU model, replace with yours!