Awesome
###Process of Modifying DSDT (Based On Tables from Bios 2.30)
- 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.
-
Error Fix: Now we are using
./iasl51 -da -dl -fe refs.txt *.aml
command with help ofrefs.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 thedeprecated
branch. -
At the very beginning, we patch Common Fixes: (Referenced Topic)
- Apply
Rename _DSM methods to XDSM
patch to all DSDT/SSDTs! - Apply following patched to DSDT
- Fix _WAK Arg0 v2
- HPET Fix
- SMBUS Fix
- IRQ Fix
- RTC Fix
- OS Check Fix (Windows 8)
- Fix Mutex with non-zero SyncLevel
- Add IMEI
- Disable Nvdia:
- At the top of DSDT, add
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)
- Add
\_SB.PCI0.RP05.PEGP._ON()
at the beginning of_PTS
method - Add
\_SB.PCI0.RP05.PEGP._OFF()
at the end of_WAK
method, but beforeReturn
statement - Add
\_SB.PCI0.RP05.PEGP._OFF()
at the end ofSB.PCI0._INI
method
- Graphic Fix:
-
DSDT: Apply Patch
Rename GFX0 to IGPU
-
SSDT-0 (Nvidia Graphic fix): Apply Patch
Rename GFX0 to IGPU
-
SSDT-1: Apply Patch
Rename GFX0 to IGPU
-
SSDT-2(Internal Graphic): Apply Patch
Rename GFX0 to IGPU
->Haswell HD4400
(However replace 0x06, 0x00, 0x26, 0x0a to 0x0C, 0x00, 0x16, 0x0A in the patch, which more compatible with HD4400 ) ->Brightness fix Haswell
- USB Fix in
DSDT
for El Capitan:
-
Apply Patch
7-Series/8-Series USB
-
Apply Patch
USB3 _PRW 0x6D
: Check the description in patch if you're interested. It will fix almost all the USB related stuffs. -
As Rehabman mentioned, rename EHC* and XHC are not the long term solution. So a patch in Clover 45484331 -> 45483031 is then the tempory solution. It works only with two Kexts provided by Rehabman:
FakePCIID_XHCIMux.kext
+USBInjectAll.kext
- Audio Fix
- Apply Patch
Audio Layout 03
inDSDT
, works together with AppleHDA/DummyHDA with 03 Layout.
- Shutdown Fix in
DSDT
:
- Apply the Patch 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;
- 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)
- Apply patch below: (Notice: _Q8E and _Q8F are what i captured with ACPIDebug.kext)
# 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;
- 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!