Beginner’s guide to patch DSDT in Hackintosh

After installing macOS the first thing you need to do is patching dsdt because patching dsdt eliminates so many errors. But patching dsdt is not an easy task and the guides available on the internet are so difficult to understand even I was unable to understand after 4-5 times. So I decided to write a noob friendly guide which will help the beginners which are unable to understand the tutorials and confused about what to do. This guide is not for specific problem solving but after reading this you will have a clear idea about dsdt patching and will be able to patch them according to your needs. So let gets started!

1. Extracting the ACPI files.

There are 3 methods of extracting ACPI files of your pc but here I have only used 1 method because it is very easy and has less chance of corruption

Extracting ACPI files through this method is very simple, all you have to do is press F4 while in clover after startup. The ACPI files will be available in EFI/clover/ origin/.

“Diskutil list” in terminal to see the EFI drive

After you log in to your Hackintosh open the terminal and type ‘diskutil mount diskXsXX’ then head over to the EFI partition you just mounted. (Note: replace all the X in diskXsXX with your EFI disk number, as you can see in the above image mine is disk0s4).

Or you can mount the EFI partition in just one click using clover configurator.

2. Preparing tools.

The ACPI files that you have extracted through clover cannot be patched directly so we have to first disassemble it and then patch it. So to patch them you will IASL which can be downloaded from here.

After downloading IASL, copy and paste these command in terminal:-

cd ~/Downloads unzip iasl.zip 
sudo cp iasl /usr/bin

3. Disassembling the ACPI files.

Now the time has come to disassemble the files. We will disassemble the ACPI using refs.txt, it can be also done without using refs.txt but it removes some error from the disassembled ACPI files. Now open TextEdit and copy paste the following:-

External(MDBG, MethodObj, 1)
External(_GPE.MMTB, MethodObj,0)
External(_SB.PCI0.LPCB.H_EC.ECWT, MethodObj, 2)
External(_SB.PCI0.LPCB.H_EC.ECRD, MethodObj, 1)
External(_SB.PCI0.LPCB.H_EC.ECMD, MethodObj, 1)
External(_SB.PCI0.PEG0.PEGP.SGPO, MethodObj, 2)
External(_SB.PCI0.GFX0.DD02._BCM, MethodObj, 1)
External(_SB.PCI0.SAT0.SDSM, MethodObj, 4)
External(_GPE.VHOV, MethodObj, 3)
External(_SB.PCI0.XHC.RHUB.TPLD, MethodObj, 2)

And save it as refs.txt then move the file to origins folder Or just copy the above code and execute the following code in terminal:-

Cd desktop
pbpaste>refs.txt

a refs.txt file will be created on your desktop.

Now run the command in terminal:-

iasl -da -dl -fe refs.txt DSDT.aml SSDT*.aml
Disassembled ACPI files

The DSDT and all the SSDT files will be disassembled

Also read: How to upgrade Hackintosh to macOS Mojave

Head over to the folder containing ACPI files and delete those SSDT files in which there is x in the end, example- SSDT-5x.dsl. These are dynamic files and we don’t need them.

4. Error fixing.

After the extracted ACPI files have been dissembled the files are not error-free. DSDT and some SSDTs contain some error which will cause instability and even may prevent the OS from loading, So fixing those errors is very important and very easy.

Download patchmatic from here and open downloads folder then launch terminal and type:

cp patchmatic /usr/local/bin/patchmatic

After done download the latest version of maciASL from here and open it then head over to preferences of maciASL and add this :

http://raw.github.com/RehabMan/Laptop-DSDT-Patch/master

adding patches to maciASL

to sources and name it patches. Then open your DSDT.dsl and press compile, it will give you some error see the line of error and click patch then find the suitable patch for the error. If you are unable to identify the error then comment below here.

5. Applying some common patch.

There are some patch that you should apply to your DSDT, these patches are not compulsory to apply but can be applied for better stability. However, if any unusual patches are applied without needing, it may cause problems or kernel panic. The patches are:

"Fix _WAK Arg0 v2"
"HPET Fix"
"SMBUS Fix"
"IRQ Fix"
"RTC Fix"
"OS Check Fix"
"Fix Mutex with non-zero SyncLevel".

(Note: The above patches will not resolve any specific problem of your Hackintosh)

After the patching is done don’t forget to place the patched dsdt into EFI/clover/patched/ otherwise it will not load.

Your basic DSDT patching is now done if you face any problem comment down below.

This guide is just a simplified version of this guide for better understanding.
Credits: Rehabman@Tonymacx86.com

Manash

Manash is a blogger and web developer. He founded hackintoshpro.com in 2018 to help people getting started with Hackintosh. Before launching hackintoshpro.com he was working with various web projects.

20 thoughts on “Beginner’s guide to patch DSDT in Hackintosh”

  1. Easy to read and excellent guide for us noobs. Questions

    Can we extract the files after we have already installed osx?

    Irq is for audio, right?

    Thanks!

  2. Hi there, thank for this post! I am half way through this. First, I think there is a mistake in the address for the patches. Should be :
    http://raw.github.com/RehabMan/Laptop-DSDT-Patch/master

    Then I got 7 error, and none of them are recognize (after press ion patch the before and after are empty). Any advice? This is the report:

    iASLRtXxxg.dsl(48) : error 6126 – syntax error, unexpected PARSEOP_EXP_MULTIPLY
    iASLRtXxxg.dsl(66) : error 6126 – Invalid character (.), expecting ASL keyword or name
    iASLRtXxxg.dsl(66) : error 6126 – syntax error, unexpected PARSEOP_EXP_MULTIPLY, expecting PARSEOP_CLOSE_PAREN
    iASLRtXxxg.dsl(6948) : error 6126 – syntax error, unexpected PARSEOP_SCOPE
    iASLRtXxxg.dsl(6953) : error 6126 – syntax error, unexpected PARSEOP_CLOSE_PAREN
    iASLRtXxxg.dsl(6956) : error 6126 – syntax error, unexpected PARSEOP_CLOSE_PAREN
    iASLRtXxxg.dsl(6967) : error 6126 – syntax error, unexpected PARSEOP_OPERATIONREGION, expecting $end and premature End-Of-File

  3. i get this messege

    Could not open input file: DSDT.aml
    Could not get ACPI tables from DSDT.aml, AE_NOT_EXIST

  4. Parsing is completed

    But there are so many errors that said

    Warning – Emitting ASL code “External (_SB_.PCI0.PEG0.PEGP.SGPO)*another code also*”
    This is a conflicting declaration with some other declaration within the ASL code.
    This external declaration may need to be deleted in order to recompile the dsl file.

    This is my full command

    Intel ACPI Component Architecture
    ASL+ Optimizing Compiler/Disassembler version 20180427(RM)
    Copyright (c) 2000 – 2018 Intel Corporation

    Input file DSDT.aml, Length 0x420F2 (270578) bytes
    ACPI: DSDT 0x0000000000000000 0420F2 (v02 _ASUS_ Notebook 01072009 INTL 20160527)
    refs.txt: Importing method external (1 arguments) MDBG
    refs.txt: Importing method external (0 arguments) _GPE.MMTB
    refs.txt: Importing method external (2 arguments) _SB.PCI0.LPCB.H_EC.ECWT
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECRD
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECMD
    refs.txt: Importing method external (2 arguments) _SB.PCI0.PEG0.PEGP.SGPO
    refs.txt: Importing method external (1 arguments) _SB.PCI0.GFX0.DD02._BCM
    refs.txt: Importing method external (4 arguments) _SB.PCI0.SAT0.SDSM
    refs.txt: Importing method external (3 arguments) _GPE.VHOV
    refs.txt: Importing method external (2 arguments) _SB.PCI0.XHC.RHUB.TPLD
    refs.txt: Imported 10 external method definitions
    Pass 1 parse of [DSDT]
    Pass 2 parse of [DSDT]
    ACPI Warning: Truncated 64-bit constant found in 32-bit table: 000010025D070100 => 5D070100 (20180427/dsobject-602)
    ACPI Warning: Truncated 64-bit constant found in 32-bit table: 000110025D070100 => 5D070100 (20180427/dsobject-602)
    ACPI Warning: Truncated 64-bit constant found in 32-bit table: 000210025D070100 => 5D070100 (20180427/dsobject-602)
    ACPI Warning: Truncated 64-bit constant found in 32-bit table: 000310025D070100 => 5D070100 (20180427/dsobject-602)
    ACPI Warning: Truncated 64-bit constant found in 32-bit table: 000010025D070000 => 5D070000 (20180427/dsobject-602)
    ACPI Warning: Truncated 64-bit constant found in 32-bit table: 000110025D070000 => 5D070000 (20180427/dsobject-602)
    ACPI Warning: Truncated 64-bit constant found in 32-bit table: 000210025D070000 => 5D070000 (20180427/dsobject-602)
    ACPI Warning: Truncated 64-bit constant found in 32-bit table: 000310025D070000 => 5D070000 (20180427/dsobject-602)
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed

    Found 9 external control methods, reparsing with new information
    Pass 1 parse of [DSDT]
    Pass 2 parse of [DSDT]
    ACPI Warning: Truncated 64-bit constant found in 32-bit table: 000010025D070100 => 5D070100 (20180427/dsobject-602)
    ACPI Warning: Truncated 64-bit constant found in 32-bit table: 000110025D070100 => 5D070100 (20180427/dsobject-602)
    ACPI Warning: Truncated 64-bit constant found in 32-bit table: 000210025D070100 => 5D070100 (20180427/dsobject-602)
    ACPI Warning: Truncated 64-bit constant found in 32-bit table: 000310025D070100 => 5D070100 (20180427/dsobject-602)
    ACPI Warning: Truncated 64-bit constant found in 32-bit table: 000010025D070000 => 5D070000 (20180427/dsobject-602)
    ACPI Warning: Truncated 64-bit constant found in 32-bit table: 000110025D070000 => 5D070000 (20180427/dsobject-602)
    ACPI Warning: Truncated 64-bit constant found in 32-bit table: 000210025D070000 => 5D070000 (20180427/dsobject-602)
    ACPI Warning: Truncated 64-bit constant found in 32-bit table: 000310025D070000 => 5D070000 (20180427/dsobject-602)
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed
    Warning – Emitting ASL code “External (_SB_.PCI0.LPCB.H_EC.ECMD)”
    This is a conflicting declaration with some other declaration within the ASL code.
    This external declaration may need to be deleted in order to recompile the dsl file.

    Warning – Emitting ASL code “External (_SB_.PCI0.LPCB.H_EC.ECRD)”
    This is a conflicting declaration with some other declaration within the ASL code.
    This external declaration may need to be deleted in order to recompile the dsl file.

    Warning – Emitting ASL code “External (_SB_.PCI0.LPCB.H_EC.ECWT)”
    This is a conflicting declaration with some other declaration within the ASL code.
    This external declaration may need to be deleted in order to recompile the dsl file.

    Warning – Emitting ASL code “External (_SB_.PCI0.XHC_.RHUB.TPLD)”
    This is a conflicting declaration with some other declaration within the ASL code.
    This external declaration may need to be deleted in order to recompile the dsl file.

    Disassembly completed
    ASL Output: DSDT.dsl – 1991148 bytes
    Input file SSDT-0-SataTabl.aml, Length 0x334 (820) bytes
    ACPI: SSDT 0x0000000000000000 000334 (v01 SataRe SataTabl 00001000 INTL 20160527)
    refs.txt: Importing method external (1 arguments) MDBG
    refs.txt: Importing method external (0 arguments) _GPE.MMTB
    refs.txt: Importing method external (2 arguments) _SB.PCI0.LPCB.H_EC.ECWT
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECRD
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECMD
    refs.txt: Importing method external (2 arguments) _SB.PCI0.PEG0.PEGP.SGPO
    refs.txt: Importing method external (1 arguments) _SB.PCI0.GFX0.DD02._BCM
    refs.txt: Importing method external (4 arguments) _SB.PCI0.SAT0.SDSM
    refs.txt: Importing method external (3 arguments) _GPE.VHOV
    refs.txt: Importing method external (2 arguments) _SB.PCI0.XHC.RHUB.TPLD
    refs.txt: Imported 10 external method definitions
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed

    Found 10 external control methods, reparsing with new information
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed
    Disassembly completed
    ASL Output: SSDT-0-SataTabl.dsl – 5875 bytes
    Input file SSDT-1-DptfTabl.aml, Length 0x7117 (28951) bytes
    ACPI: SSDT 0x0000000000000000 007117 (v02 DptfTa DptfTabl 00001000 INTL 20160527)
    refs.txt: Importing method external (1 arguments) MDBG
    refs.txt: Importing method external (0 arguments) _GPE.MMTB
    refs.txt: Importing method external (2 arguments) _SB.PCI0.LPCB.H_EC.ECWT
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECRD
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECMD
    refs.txt: Importing method external (2 arguments) _SB.PCI0.PEG0.PEGP.SGPO
    refs.txt: Importing method external (1 arguments) _SB.PCI0.GFX0.DD02._BCM
    refs.txt: Importing method external (4 arguments) _SB.PCI0.SAT0.SDSM
    refs.txt: Importing method external (3 arguments) _GPE.VHOV
    refs.txt: Importing method external (2 arguments) _SB.PCI0.XHC.RHUB.TPLD
    refs.txt: Imported 10 external method definitions
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed

    Found 7 external control methods, reparsing with new information
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed
    Disassembly completed
    ASL Output: SSDT-1-DptfTabl.dsl – 165986 bytes
    Input file SSDT-10-OptTabl.aml, Length 0x1F8B (8075) bytes
    ACPI: SSDT 0x0000000000000000 001F8B (v01 OptRef OptTabl 00001000 INTL 20160527)
    refs.txt: Importing method external (1 arguments) MDBG
    refs.txt: Importing method external (0 arguments) _GPE.MMTB
    refs.txt: Importing method external (2 arguments) _SB.PCI0.LPCB.H_EC.ECWT
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECRD
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECMD
    refs.txt: Importing method external (2 arguments) _SB.PCI0.PEG0.PEGP.SGPO
    refs.txt: Importing method external (1 arguments) _SB.PCI0.GFX0.DD02._BCM
    refs.txt: Importing method external (4 arguments) _SB.PCI0.SAT0.SDSM
    refs.txt: Importing method external (3 arguments) _GPE.VHOV
    refs.txt: Importing method external (2 arguments) _SB.PCI0.XHC.RHUB.TPLD
    refs.txt: Imported 10 external method definitions
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed

    Found 10 external control methods, reparsing with new information
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed
    Disassembly completed
    ASL Output: SSDT-10-OptTabl.dsl – 50301 bytes
    Input file SSDT-2-CpuSsdt.aml, Length 0x17D5 (6101) bytes
    ACPI: SSDT 0x0000000000000000 0017D5 (v02 CpuRef CpuSsdt 00003000 INTL 20160527)
    refs.txt: Importing method external (1 arguments) MDBG
    refs.txt: Importing method external (0 arguments) _GPE.MMTB
    refs.txt: Importing method external (2 arguments) _SB.PCI0.LPCB.H_EC.ECWT
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECRD
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECMD
    refs.txt: Importing method external (2 arguments) _SB.PCI0.PEG0.PEGP.SGPO
    refs.txt: Importing method external (1 arguments) _SB.PCI0.GFX0.DD02._BCM
    refs.txt: Importing method external (4 arguments) _SB.PCI0.SAT0.SDSM
    refs.txt: Importing method external (3 arguments) _GPE.VHOV
    refs.txt: Importing method external (2 arguments) _SB.PCI0.XHC.RHUB.TPLD
    refs.txt: Imported 10 external method definitions
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed

    Found 10 external control methods, reparsing with new information
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed
    Disassembly completed
    ASL Output: SSDT-2-CpuSsdt.dsl – 30984 bytes
    Input file SSDT-3-SaSsdt.aml, Length 0x31D7 (12759) bytes
    ACPI: SSDT 0x0000000000000000 0031D7 (v02 SaSsdt SaSsdt 00003000 INTL 20160527)
    refs.txt: Importing method external (1 arguments) MDBG
    refs.txt: Importing method external (0 arguments) _GPE.MMTB
    refs.txt: Importing method external (2 arguments) _SB.PCI0.LPCB.H_EC.ECWT
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECRD
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECMD
    refs.txt: Importing method external (2 arguments) _SB.PCI0.PEG0.PEGP.SGPO
    refs.txt: Importing method external (1 arguments) _SB.PCI0.GFX0.DD02._BCM
    refs.txt: Importing method external (4 arguments) _SB.PCI0.SAT0.SDSM
    refs.txt: Importing method external (3 arguments) _GPE.VHOV
    refs.txt: Importing method external (2 arguments) _SB.PCI0.XHC.RHUB.TPLD
    refs.txt: Imported 10 external method definitions
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed

    Found 10 external control methods, reparsing with new information
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed
    Disassembly completed
    ASL Output: SSDT-3-SaSsdt.dsl – 82778 bytes
    Input file SSDT-4-PegSsdt.aml, Length 0x26BC (9916) bytes
    ACPI: SSDT 0x0000000000000000 0026BC (v02 PegSsd PegSsdt 00001000 INTL 20160527)
    refs.txt: Importing method external (1 arguments) MDBG
    refs.txt: Importing method external (0 arguments) _GPE.MMTB
    refs.txt: Importing method external (2 arguments) _SB.PCI0.LPCB.H_EC.ECWT
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECRD
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECMD
    refs.txt: Importing method external (2 arguments) _SB.PCI0.PEG0.PEGP.SGPO
    refs.txt: Importing method external (1 arguments) _SB.PCI0.GFX0.DD02._BCM
    refs.txt: Importing method external (4 arguments) _SB.PCI0.SAT0.SDSM
    refs.txt: Importing method external (3 arguments) _GPE.VHOV
    refs.txt: Importing method external (2 arguments) _SB.PCI0.XHC.RHUB.TPLD
    refs.txt: Imported 10 external method definitions
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed

    Found 10 external control methods, reparsing with new information
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed
    Disassembly completed
    ASL Output: SSDT-4-PegSsdt.dsl – 68141 bytes
    Input file SSDT-5-Ther_Rvp.aml, Length 0xF9E (3998) bytes
    ACPI: SSDT 0x0000000000000000 000F9E (v02 INTEL Ther_Rvp 00001000 INTL 20160527)
    refs.txt: Importing method external (1 arguments) MDBG
    refs.txt: Importing method external (0 arguments) _GPE.MMTB
    refs.txt: Importing method external (2 arguments) _SB.PCI0.LPCB.H_EC.ECWT
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECRD
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECMD
    refs.txt: Importing method external (2 arguments) _SB.PCI0.PEG0.PEGP.SGPO
    refs.txt: Importing method external (1 arguments) _SB.PCI0.GFX0.DD02._BCM
    refs.txt: Importing method external (4 arguments) _SB.PCI0.SAT0.SDSM
    refs.txt: Importing method external (3 arguments) _GPE.VHOV
    refs.txt: Importing method external (2 arguments) _SB.PCI0.XHC.RHUB.TPLD
    refs.txt: Imported 10 external method definitions
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed

    Found 7 external control methods, reparsing with new information
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed
    Disassembly completed
    ASL Output: SSDT-5-Ther_Rvp.dsl – 24521 bytes
    Input file SSDT-6-xh_cfhd4.aml, Length 0x2951 (10577) bytes
    ACPI: SSDT 0x0000000000000000 002951 (v02 INTEL xh_cfhd4 00000000 INTL 20160527)
    refs.txt: Importing method external (1 arguments) MDBG
    refs.txt: Importing method external (0 arguments) _GPE.MMTB
    refs.txt: Importing method external (2 arguments) _SB.PCI0.LPCB.H_EC.ECWT
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECRD
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECMD
    refs.txt: Importing method external (2 arguments) _SB.PCI0.PEG0.PEGP.SGPO
    refs.txt: Importing method external (1 arguments) _SB.PCI0.GFX0.DD02._BCM
    refs.txt: Importing method external (4 arguments) _SB.PCI0.SAT0.SDSM
    refs.txt: Importing method external (3 arguments) _GPE.VHOV
    refs.txt: Importing method external (2 arguments) _SB.PCI0.XHC.RHUB.TPLD
    refs.txt: Imported 10 external method definitions
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed

    Found 10 external control methods, reparsing with new information
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed
    Warning – Emitting ASL code “External (_SB_.PCI0.XHC_.RHUB.TPLD)”
    This is a conflicting declaration with some other declaration within the ASL code.
    This external declaration may need to be deleted in order to recompile the dsl file.

    Disassembly completed
    ASL Output: SSDT-6-xh_cfhd4.dsl – 74321 bytes
    Input file SSDT-7-PtidDevc.aml, Length 0x27DE (10206) bytes
    ACPI: SSDT 0x0000000000000000 0027DE (v02 INTEL PtidDevc 00001000 INTL 20160527)
    refs.txt: Importing method external (1 arguments) MDBG
    refs.txt: Importing method external (0 arguments) _GPE.MMTB
    refs.txt: Importing method external (2 arguments) _SB.PCI0.LPCB.H_EC.ECWT
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECRD
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECMD
    refs.txt: Importing method external (2 arguments) _SB.PCI0.PEG0.PEGP.SGPO
    refs.txt: Importing method external (1 arguments) _SB.PCI0.GFX0.DD02._BCM
    refs.txt: Importing method external (4 arguments) _SB.PCI0.SAT0.SDSM
    refs.txt: Importing method external (3 arguments) _GPE.VHOV
    refs.txt: Importing method external (2 arguments) _SB.PCI0.XHC.RHUB.TPLD
    refs.txt: Imported 10 external method definitions
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed

    Found 7 external control methods, reparsing with new information
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed
    Disassembly completed
    ASL Output: SSDT-7-PtidDevc.dsl – 30787 bytes
    Input file SSDT-8-TbtTypeC.aml, Length 0xFFE (4094) bytes
    ACPI: SSDT 0x0000000000000000 000FFE (v02 INTEL TbtTypeC 00000000 INTL 20160527)
    refs.txt: Importing method external (1 arguments) MDBG
    refs.txt: Importing method external (0 arguments) _GPE.MMTB
    refs.txt: Importing method external (2 arguments) _SB.PCI0.LPCB.H_EC.ECWT
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECRD
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECMD
    refs.txt: Importing method external (2 arguments) _SB.PCI0.PEG0.PEGP.SGPO
    refs.txt: Importing method external (1 arguments) _SB.PCI0.GFX0.DD02._BCM
    refs.txt: Importing method external (4 arguments) _SB.PCI0.SAT0.SDSM
    refs.txt: Importing method external (3 arguments) _GPE.VHOV
    refs.txt: Importing method external (2 arguments) _SB.PCI0.XHC.RHUB.TPLD
    refs.txt: Imported 10 external method definitions
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed

    Found 10 external control methods, reparsing with new information
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed
    Disassembly completed
    ASL Output: SSDT-8-TbtTypeC.dsl – 41287 bytes
    Input file SSDT-9-SgPeg.aml, Length 0xAE (174) bytes
    ACPI: SSDT 0x0000000000000000 0000AE (v02 SgRef SgPeg 00001000 INTL 20160527)
    refs.txt: Importing method external (1 arguments) MDBG
    refs.txt: Importing method external (0 arguments) _GPE.MMTB
    refs.txt: Importing method external (2 arguments) _SB.PCI0.LPCB.H_EC.ECWT
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECRD
    refs.txt: Importing method external (1 arguments) _SB.PCI0.LPCB.H_EC.ECMD
    refs.txt: Importing method external (2 arguments) _SB.PCI0.PEG0.PEGP.SGPO
    refs.txt: Importing method external (1 arguments) _SB.PCI0.GFX0.DD02._BCM
    refs.txt: Importing method external (4 arguments) _SB.PCI0.SAT0.SDSM
    refs.txt: Importing method external (3 arguments) _GPE.VHOV
    refs.txt: Importing method external (2 arguments) _SB.PCI0.XHC.RHUB.TPLD
    refs.txt: Imported 10 external method definitions
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed

    Found 10 external control methods, reparsing with new information
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

    Parsing completed
    Warning – Emitting ASL code “External (_SB_.PCI0.PEG0.PEGP.SGPO)”
    This is a conflicting declaration with some other declaration within the ASL code.
    This external declaration may need to be deleted in order to recompile the dsl file.

    Disassembly completed
    ASL Output: SSDT-9-SgPeg.dsl – 2277 bytes
    Jefreys-MBP:origin jefreyjunos$

    Can I just patch it?

  5. which file do i put back? DSDT.dsl or DSDT.aml?
    i guess the formoer? since that is the one we modified? but all the file in clover are aml ….i am so confused.

  6. Attachment

    Thank you for the great guide. Nice and clear. I have a question. What does the 0 error mean. Also, should I worry about the warnings?

    • Glad to hear that the guide helped you!
      0 errors mean that there is no error while compiling and as far the warnings are concerned those can be ignored safely

  7. Hi and thanks for the nice guide!

    Unfortunately I am stuck at the disassemble step – I got this error:

    External object resolution file SSDT-8-UsbCTabl.aml
    Input file SSDT-8-UsbCTabl.aml, Length 0xFA2 (4002) bytes
    ACPI: SSDT 0x0000000000000000 000FA2 (v02 LENOVO UsbCTabl 00001000 INTL 20160527)
    Pass 1 parse of [SSDT]
    Pass 2 parse of [SSDT]
    External object resolution file SSDT-8-TbtTypeC.aml
    Input file SSDT-8-TbtTypeC.aml, Length 0x15B7 (5559) bytes
    ACPI: SSDT 0x0000000000000000 0015B7 (v02 LENOVO TbtTypeC 00000000 INTL 20160527)
    Pass 1 parse of [SSDT]
    Firmware Error (ACPI): Failure creating [\_SB.PCI0.RP01.PXSX.TURP], AE_ALREADY_EXISTS (20180427/dswload-498)
    ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20180427/psobject-371)
    Could not parse external ACPI tables, AE_ALREADY_EXISTS

    Any hints?
    Thanks!

  8. Actually I figured out that there were duplicate files in the /origin folder. After removing these, all worked fine.

    I was also getting error by using the cmd line as noted above:
    iasl -da -dl -fe refs.txt DSDT.aml SSDT*.aml

    To solve it I was running each file separately and this worked without issue.

    Also, according to https://www.tonymacx86.com/threads/guide-patching-laptop-dsdt-ssdts.152573/ – you can run the disassembly without using the refs.txt – by simply using:
    iasl -dl DSDT.aml SSDT*.aml

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.