• Become a Premium Member for $25/year with no ads to improve your community experience.

EliteMacx86

Administrator
Staff member
Joined
Jul 22, 2018
Messages
6,558
Motherboard
Supermicro X11SPA-T
CPU
Intel Xeon W-3275 28 Core
Graphics
2xAMD RX 580 8GB
OS X/macOS
13.x
Bootloader
  1. OpenCore (UEFI)
Mac
  1. Mac mini
  2. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
How to Patch Laptop DSDT and SSDTs

This guide covers patching Laptop DSDT and SSDTs for macOS/OS X. By following this guide, you'll be able to patch your OEM DSDT/SSDTs.

I. Overview


To enable macOS features and various hardware and maintain stability, DSDT and SSDTs patching are required. Patching the DSDT and SSDTs makes the perfect functioning of the laptop and also avoids issues and conflicts with the hardware.

Before you start the process, here are some notes.

Using DSDT and SSDTs from another system is relatively easy than patching yours but will not result in any benefit as each hardware is unique, even if it's from the same manufacturer. Every laptop has different ACPI tables which might not match your laptop and the results may not be as expected. Sometimes you might even fail to boot or have a few restarts/panics or crashes. The hardware would not be stable and can cause errors with functions. The effect could be adverse like issues with Audio plugins for DAWs. Such practice is dangerous and highly discouraged.

Even if you tend to use the same model from the same manufacturer, the tables may be different than yours. The reason is that the other laptop may have a different BIOS/firmware version than yours, different RAM size, BIOS/firmware options configured, and WiFi hardware can make a difference resulting in unstable hardware and other bugs. In addition, such differences can make various OperationRegion addresses different, resulting in incompatible with one another. Also, the same laptop can have a different motherboard, hence incompatible ACPI files when used for another laptop. So it's better to patch your specific DSDT and SSDTs.

You need to re-extract and re-patch your DSDT and SSDTs if any of the following events take place.
  • BIOS/Firmware Update
  • Changing Memory size
  • Changing BIOS/firmware options
  • Changing any other hardware (such as WiFi)

The patching involves 6 different steps which include:
  1. Extracting ACPI files
  2. Disassembly
  3. Patching
  4. Compiling
  5. Saving
  6. Installing

II. Extracting ACPI Files


The very first step is to extract the native ACPI files. The native ACPI files can be extracted using Clover Bootloader, macOS, Linux, or even Windows. This guide will focus on three methods of extraction: But the only recommended method is using the Clover Bootloader.

Method #1: Using Clover

Extracting the native ACPI files using the Clover method (F4) is recommended due to the ease of extraction, and due to the ease of comparison between ACPI/origin and ACPI/patched directory (for troubleshooting) and avoiding any further errors and corruption. Follow the steps below to extract your native ACPI files using Clover.

1. To begin with the process of extraction, you need to have Clover Bootloader installed. If you're using OpenCore as your primary bootloader, you'll need to install Clover Bootloader to your ESP or the USB Flash Drive.
2. Load Optimized Defaults and then apply necessary changes in your BIOS/firmware before extracting the native ACPI files. See BIOS Settings for macOS for more information.
3. On your target system, boot to the Boot menu.
4. Boot using your USB or the System Drive.
5. When at Clover picker, press F4 to extract the native ACPI files. It will take some time, typically a few seconds to extract the files.
6. After extracting the ACPI files, boot back to macOS/OS X and verify the ACPI files. If you're unable to boot the target system, you can still use the Bootable USB on any other system containing the dumped ACPI files. The dumped/extracted ACPI files are located/saved under EFI/Clover/ACPI/origin directory. If the files are present in the directory, it means the extraction is successful.

NOTES:
  • The BIOS must be set before extracting the ACPI files. See Setting up BIOS for booting macOS/OS X for more information.
  • To extract the native ACPI files, it is not required to configure the config.plist as per your hardware. Only Clover installation is necessary for extracting the ACPI files.
  • A folder with the name origin must exist in the EFI/Clover/ACPI/origin directory. Automatically created when installing Clover bootloader.
  • Some laptops use the Fn+Fx function so when in doubt, press both Fn+F4 and F4. Never press F4 or Fn+F4 twice to prevent duplicate or incomplete extraction.
  • There's no progress on the screen during extraction or after the dump, just a slight delay as the files are written onto the ESP or the USB. The delay is more noticeable if the ACPI files are being written to USB (in case booting the Clover off the USB Flash Drive). It might feel stuck/hung but at that time, the Clover dumps/writes the files to your USB or the system drive.
  • The extracted files are the native/unpatched ACPI files. You'll need to patch these.

The Clover will extract all the native ACPI files in the EFI/Clover/origin directory. If you're using any "Clover Fixes" (hotpatch), Clover will dump one additional ACPI file with the name DSDT-XXXXXXXX. Where, the XXXXXXXX are the random characters. This DSDT will include the Clover fixes and therefore, you must exclude such DSDT when disassembling the ACPI files. However, extracting the ACPI files without the "Clover Fixes" is a much safer approach.

Method #2: Using Linux

If you're familiar with Linux, the native ACPI files can be extracted directly from the File System. To extract using Linux, follow the steps below.

1. Boot into Linux (if already installed). Note that it is not necessary to install Linux. If you do not have Linux installed on the target system, you can create a Linux USB and can boot into Linux Live.
2. In Linux, the ACPI files can be found at /sys/firmware/acpi/tables and /sys/firmware/acpi/tables/dynamic.
3. Create a directory on your Desktop and copy all the ACPI files from the above directory.


Method #3: Using AcpiDump

Method #4: Using Patchmatic

Provided that you're not booting with any patched ACPI files, you can extract the native ACPI files using patchmatic. Note that this method requires macOS/OS X to be installed on the target system. However, this method is not recommended. To extract using patchmatic, follow the steps below.

1. Download patchmatic.
2. Create a working directory on your Desktop. You can use any name of your choice. For ease of this guide, we'll be using the name ACPI.
3. Extract patchmatic and copy the patchmatic to the directory you created above.
4. Open the Terminal and execute the following commands.
Bash:
#Move to the directory
cd Desktop/ACPI

#Extract using patchmatic
/Users/yourusername/Desktop/ACPI/patchmatic -extract

5. Once extracted, quit Terminal.

The patchmatic will extract all the loaded ACPI files in the ACPI directory. If you're using any patch which affects the DSDT/SSDTs, you'll not be able to get native ACPI files. For example, dropping any ACPI tables using DropSSDT=Yes (Chameleon) or DropOem=True (Clover) or ACPI>Delete (OpenCore), the native SSDTs will be dropped before macOS/OS X can load them and it will be missed in the patchmatic extraction. The same applies if you're using Clover's DSDT Fixes or ACPI Renames as these are directly patching the native DSDT and to do your own patching, you definitely don't want that. Any addon SSDTs or Hotpatch will inject extra SSDTs which can cause complications during the disassembly. Due to all such complexity involved, this method is not recommended and Clover F4 is much more preferred option.

Method #4: Using SSDTTime

III. Disassembly


The next step is to disassemble the extracted files. Follow the steps below to disassemble your native ACPI files. Depending on the OS your computer has, choose one of the appropriate methods to disassemble your native ACPI files.

For macOS users
For users with macOS computers, there are two methods available which are described below. Depending on your preferences, choose one of the methods described below. For users with macOS computers, we recommend Offline Method for creating the Bootable USB.

I. Preparing iasl compiler

Before you start disassembling the ACPI files, you need to prepare iasl compiler, which is run from the Terminal. To disassemble the extracted files, you'll need the iasl compiler. Follow the steps below to download and copy the iasl compiler. Depending on your Laptop type, select one from below

BranchNotes
Rehabman
  • Recommended for Laptops with old BIOS/UEFI
ACPICA
  • Recommended for Laptops with new UEFI, with new ACPI specification

Depending on the branch you choose, download the latest version. The latest version is recommended to avoid any errors during disassembly.

(a). Rehabman Branch
If you're using Rehbaman Branch, follow the steps below to obtain iasl compiler.

1. Visit the Rehabman acpica downloads
2. Download iasl from top.
3. Extract the downloaded .zip file
4. Once extracted, you'll get the iasl compiler from the zip.

(b). ACPICA Branch
If you're using ACPICA Branch, follow the steps below to obtain iasl compiler.

1. Visit the ACPICA downloads
2. From the Downloads section, select UNIX Source Code.
3. Download UNIX Format Source Code and Build Environment with Intel license.
4. Extract the downloaded .tar.gz file to your Desktop.
5. Open the Terminal and execute the following commands
Bash:
#Move to the directory
cd Desktop/acpica-unix-VERSION

#Build iasl compiler
make clean
make iasl

You can also build the iasl using the command below
Code:
#Move to the directory
cd Desktop/acpica-unix-VERSION

#Build iasl compiler
CFLAGS="-mmacosx-version-min=10.7 -O3" \
LDFLAGS="-mmacosx-version-min=10.7" \
make iasl -j $(getconf _NPROCESSORS_ONLN)

You'll find the iasl compiler in generate/unix/bin/iasl directory.



QUICK NOTE:
  • Replace the VERSION with the actual acpica version. For example, 20220331.

II. Copying iasl compiler

The next step is to copy the compiler to the working directory so that it can be easily accessed.

1. Create a working directory on your Desktop. Use the name of your choice. For ease of this guide, we'll be using the name origin.

For Rehabman Branch
Copy the iasl from the Downloads directory to the origin directory.

For ACPICA Branch
Copy the iasl from Desktop/acpica-unix-VERSION/generate/unix/bin directory to the origin directory.

III. Disassembling ACPI Files

The next step is to disassemble the ACPI files. The extracted files can be opened using MaciASL but it is not recommended. As if the AML has complex references to other AMLs, it will not disassemble correctly and when compiling, it will be left with many errors. Some of those errors can be fixed and some might be difficult enough to fix due to poor disassembly. So it's recommended that you disassemble your native ACPI files properly. To disassemble the extracted ACPI files, follow the steps below.

1. Copy all the native DSDT and SSDT files to the origin directory on the Desktop. Do not copy ACPI files that don't begin with DSDT or SSDT.
2. Make sure all the files are present as original when extracted. The extracted files will have a *.aml extension. If not, rename the files to .aml extension.
3. Create a refs.txt file where you've placed the DSDT and SSDTs. The advantage of using the refs.txt when disassembling the files is, that it can eliminate several common errors while disassembly resulting in saving time to fix the common errors. Sometimes there are additional unresolved externals (symbols not defined in any file). The iasl disassembler will attempt to guess the number of arguments, but often it guesses poorly. You can correct it, by providing the External declarations in a text file. Some common unresolved symbols are SGPO, ECRD, ECWT, and MMTB.

The following refs.txt content has some common (and not so common) missing symbols that the disassembler tends to be confused by.

Refs:
Code:
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)

4. Open the Terminal and execute the following commands
Bash:
#Move to the directory
cd Desktop/origin

#Copy the above refs text

#Paste copied text to refs.txt
pbpaste>refs.txt

This will create a refs.txt file in your current working directory.

5. Assuming the Terminal is still open, execute one of the following commands in Terminal

Using Refs.txt:
Bash:
/Users/yourusername/Desktop/origin/iasl -da -dl -fe refs.txt DSDT.aml SSDT*.aml

New Laptops don't need refs.txt and the following disassembly command should be used:
Bash:
/Users/yourusername/Desktop/origin/iasl -da -dl DSDT.aml SSDT*.aml

Also, note that for newer ACPI sets, (usually, Skylake and later) there is no need for -da and refs.txt as they have external opcodes and can conflict with the embedded External opcodes. The following disassembly command should be used in such cases:
Bash:
/Users/yourusername/Desktop/origin/iasl -dl DSDT.aml SSDT*.aml

You'll see something similar to the following as an output of the operation:
Code:
Intel ACPI Component Architecture
ASL+ Optimizing Compiler/Disassembler version 20180427(RM)
Copyright (c) 2000 - 2018 Intel Corporation

Input file DSDT.aml, Length 0xD8E0 (55520) bytes
ACPI: DSDT 0x0000000000000000 00D8E0 (v02 HP     INSYDE   00000001 MSFT 01000013)
External object resolution file SSDT-x0_3-ApCst.aml
Input file SSDT-x0_3-ApCst.aml, Length 0x119 (281) bytes
ACPI: SSDT 0x0000000000000000 000119 (v01 PmRef  ApCst    00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x0_2-Cpu0Cst.aml
Input file SSDT-x0_2-Cpu0Cst.aml, Length 0x891 (2193) bytes
ACPI: SSDT 0x0000000000000000 000891 (v01 PmRef  Cpu0Cst  00003001 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x0_1-ApIst.aml
Input file SSDT-x0_1-ApIst.aml, Length 0x303 (771) bytes
ACPI: SSDT 0x0000000000000000 000303 (v01 PmRef  ApIst    00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x0_0-Cpu0Ist.aml
Input file SSDT-x0_0-Cpu0Ist.aml, Length 0x432 (1074) bytes
ACPI: SSDT 0x0000000000000000 000432 (v01 PmRef  Cpu0Ist  00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-0-CpuPm.aml
Input file SSDT-0-CpuPm.aml, Length 0x9F1 (2545) bytes
ACPI: SSDT 0x0000000000000000 0009F1 (v01 PmRef  CpuPm    00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
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]
Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)

Parsing completed

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

Parsing completed
 Warning - Emitting ASL code "External (_SB_.PCI0.GFX0.DD02._BCM)"
           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 - 428844 bytes

 iASL Warning: There were 17 external control methods found during
 disassembly, but only 10 were resolved (7 unresolved). Additional
 ACPI tables may be required to properly disassemble the code. This
 resulting disassembler output file may not compile because the
 disassembler did not know how many arguments to assign to the
 unresolved methods. Note: SSDTs can be dynamically loaded at
 runtime and may or may not be available via the host OS.

 In addition, the -fe option can be used to specify a file containing
 control method external declarations with the associated method
 argument counts. Each line of the file must be of the form:
     External (<method pathname>, MethodObj, <argument count>)
 Invocation:
     iasl -fe refs.txt -d dsdt.aml

Input file SSDT-0-CpuPm.aml, Length 0x9F1 (2545) bytes
ACPI: SSDT 0x0000000000000000 0009F1 (v01 PmRef  CpuPm    00003000 INTL 20051117)
External object resolution file SSDT-x0_3-ApCst.aml
Input file SSDT-x0_3-ApCst.aml, Length 0x119 (281) bytes
ACPI: SSDT 0x0000000000000000 000119 (v01 PmRef  ApCst    00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x0_2-Cpu0Cst.aml
Input file SSDT-x0_2-Cpu0Cst.aml, Length 0x891 (2193) bytes
ACPI: SSDT 0x0000000000000000 000891 (v01 PmRef  Cpu0Cst  00003001 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x0_1-ApIst.aml
Input file SSDT-x0_1-ApIst.aml, Length 0x303 (771) bytes
ACPI: SSDT 0x0000000000000000 000303 (v01 PmRef  ApIst    00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x0_0-Cpu0Ist.aml
Input file SSDT-x0_0-Cpu0Ist.aml, Length 0x432 (1074) bytes
ACPI: SSDT 0x0000000000000000 000432 (v01 PmRef  Cpu0Ist  00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file         DSDT.aml
Input file DSDT.aml, Length 0xD8E0 (55520) bytes
ACPI: DSDT 0x0000000000000000 00D8E0 (v02 HP     INSYDE   00000001 MSFT 01000013)
Pass 1 parse of [DSDT]
Pass 2 parse of [DSDT]
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
ACPI Error: AE_ERROR, [/_SB_PCI0GFX0DD02_BCM] has conflicting declarations (20180427/dmextern-1148)
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-CpuPm.dsl - 14753 bytes
Input file SSDT-x0_0-Cpu0Ist.aml, Length 0x432 (1074) bytes
ACPI: SSDT 0x0000000000000000 000432 (v01 PmRef  Cpu0Ist  00003000 INTL 20051117)
External object resolution file SSDT-x0_3-ApCst.aml
Input file SSDT-x0_3-ApCst.aml, Length 0x119 (281) bytes
ACPI: SSDT 0x0000000000000000 000119 (v01 PmRef  ApCst    00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x0_2-Cpu0Cst.aml
Input file SSDT-x0_2-Cpu0Cst.aml, Length 0x891 (2193) bytes
ACPI: SSDT 0x0000000000000000 000891 (v01 PmRef  Cpu0Cst  00003001 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x0_1-ApIst.aml
Input file SSDT-x0_1-ApIst.aml, Length 0x303 (771) bytes
ACPI: SSDT 0x0000000000000000 000303 (v01 PmRef  ApIst    00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-0-CpuPm.aml
Input file SSDT-0-CpuPm.aml, Length 0x9F1 (2545) bytes
ACPI: SSDT 0x0000000000000000 0009F1 (v01 PmRef  CpuPm    00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file         DSDT.aml
Input file DSDT.aml, Length 0xD8E0 (55520) bytes
ACPI: DSDT 0x0000000000000000 00D8E0 (v02 HP     INSYDE   00000001 MSFT 01000013)
Pass 1 parse of [DSDT]
Pass 2 parse of [DSDT]
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
ACPI Error: AE_ERROR, [/_SB_PCI0GFX0DD02_BCM] has conflicting declarations (20180427/dmextern-1148)
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-x0_0-Cpu0Ist.dsl - 9925 bytes
Input file SSDT-x0_1-ApIst.aml, Length 0x303 (771) bytes
ACPI: SSDT 0x0000000000000000 000303 (v01 PmRef  ApIst    00003000 INTL 20051117)
External object resolution file SSDT-x0_3-ApCst.aml
Input file SSDT-x0_3-ApCst.aml, Length 0x119 (281) bytes
ACPI: SSDT 0x0000000000000000 000119 (v01 PmRef  ApCst    00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x0_2-Cpu0Cst.aml
Input file SSDT-x0_2-Cpu0Cst.aml, Length 0x891 (2193) bytes
ACPI: SSDT 0x0000000000000000 000891 (v01 PmRef  Cpu0Cst  00003001 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x0_0-Cpu0Ist.aml
Input file SSDT-x0_0-Cpu0Ist.aml, Length 0x432 (1074) bytes
ACPI: SSDT 0x0000000000000000 000432 (v01 PmRef  Cpu0Ist  00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-0-CpuPm.aml
Input file SSDT-0-CpuPm.aml, Length 0x9F1 (2545) bytes
ACPI: SSDT 0x0000000000000000 0009F1 (v01 PmRef  CpuPm    00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file         DSDT.aml
Input file DSDT.aml, Length 0xD8E0 (55520) bytes
ACPI: DSDT 0x0000000000000000 00D8E0 (v02 HP     INSYDE   00000001 MSFT 01000013)
Pass 1 parse of [DSDT]
Pass 2 parse of [DSDT]
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
ACPI Error: AE_ERROR, [/_SB_PCI0GFX0DD02_BCM] has conflicting declarations (20180427/dmextern-1148)
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 12 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-x0_1-ApIst.dsl - 6017 bytes
Input file SSDT-x0_2-Cpu0Cst.aml, Length 0x891 (2193) bytes
ACPI: SSDT 0x0000000000000000 000891 (v01 PmRef  Cpu0Cst  00003001 INTL 20051117)
External object resolution file SSDT-x0_3-ApCst.aml
Input file SSDT-x0_3-ApCst.aml, Length 0x119 (281) bytes
ACPI: SSDT 0x0000000000000000 000119 (v01 PmRef  ApCst    00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x0_1-ApIst.aml
Input file SSDT-x0_1-ApIst.aml, Length 0x303 (771) bytes
ACPI: SSDT 0x0000000000000000 000303 (v01 PmRef  ApIst    00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x0_0-Cpu0Ist.aml
Input file SSDT-x0_0-Cpu0Ist.aml, Length 0x432 (1074) bytes
ACPI: SSDT 0x0000000000000000 000432 (v01 PmRef  Cpu0Ist  00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-0-CpuPm.aml
Input file SSDT-0-CpuPm.aml, Length 0x9F1 (2545) bytes
ACPI: SSDT 0x0000000000000000 0009F1 (v01 PmRef  CpuPm    00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file         DSDT.aml
Input file DSDT.aml, Length 0xD8E0 (55520) bytes
ACPI: DSDT 0x0000000000000000 00D8E0 (v02 HP     INSYDE   00000001 MSFT 01000013)
Pass 1 parse of [DSDT]
Pass 2 parse of [DSDT]
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
ACPI Error: AE_ERROR, [/_SB_PCI0GFX0DD02_BCM] has conflicting declarations (20180427/dmextern-1148)
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-x0_2-Cpu0Cst.dsl - 43831 bytes
Input file SSDT-x0_3-ApCst.aml, Length 0x119 (281) bytes
ACPI: SSDT 0x0000000000000000 000119 (v01 PmRef  ApCst    00003000 INTL 20051117)
External object resolution file SSDT-x0_2-Cpu0Cst.aml
Input file SSDT-x0_2-Cpu0Cst.aml, Length 0x891 (2193) bytes
ACPI: SSDT 0x0000000000000000 000891 (v01 PmRef  Cpu0Cst  00003001 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x0_1-ApIst.aml
Input file SSDT-x0_1-ApIst.aml, Length 0x303 (771) bytes
ACPI: SSDT 0x0000000000000000 000303 (v01 PmRef  ApIst    00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-x0_0-Cpu0Ist.aml
Input file SSDT-x0_0-Cpu0Ist.aml, Length 0x432 (1074) bytes
ACPI: SSDT 0x0000000000000000 000432 (v01 PmRef  Cpu0Ist  00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file SSDT-0-CpuPm.aml
Input file SSDT-0-CpuPm.aml, Length 0x9F1 (2545) bytes
ACPI: SSDT 0x0000000000000000 0009F1 (v01 PmRef  CpuPm    00003000 INTL 20051117)
Pass 1 parse of [SSDT]
Pass 2 parse of [SSDT]
External object resolution file         DSDT.aml
Input file DSDT.aml, Length 0xD8E0 (55520) bytes
ACPI: DSDT 0x0000000000000000 00D8E0 (v02 HP     INSYDE   00000001 MSFT 01000013)
Pass 1 parse of [DSDT]
Pass 2 parse of [DSDT]
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
ACPI Error: AE_ERROR, [/_SB_PCI0GFX0DD02_BCM] has conflicting declarations (20180427/dmextern-1148)
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 11 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-x0_3-ApCst.dsl - 2928 bytes

This will disassemble all of your extracted ACI files (DSDT and SSDTs) in the origin directory and from this point onwards, you will work with the .dsl files exclusively using MaciASL. Although to use those DSDT and SSDTs, they must be saved as ACPI Machine Language Binary with an .aml extension. However, it is always recommended to keep the original and patched .dsl files in case you need to apply more patches in the future.

Disassembly Errors

Duplicate ACPI Files

Sometimes, Clover writes duplicate SSDTs. These duplicate SSDTs can cause problems during disassembly. If you have duplicate definitions issues during disassembly, you'll need to analyze all the SSDTs to eliminate the files which are duplicated. To find out the duplicate files, you can check the file size. Files with equal size are likely duplicates. However, checking the content is highly recommended.

To check the file sizes in bytes of all SSDTs, follow the steps below.

1. Open the Terminal and execute the following commands.
Bash:
#Move to the directory
cd Desktop/origin

#List file size
ls -l SSDT*.aml

You'll see something similar to the following as an output of the operation:
Code:
-rwxrwxrwx  1 elitemacx86  staff  2545 Nov  8 20:51 SSDT-0-CpuPm.aml
-rwxrwxrwx@ 1 elitemacx86  staff  1074 Nov  8 20:51 SSDT-x0_0-Cpu0Ist.aml
-rwxrwxrwx  1 elitemacx86  staff   771 Nov  8 20:51 SSDT-x0_1-ApIst.aml
-rwxrwxrwx  1 elitemacx86  staff  2193 Nov  8 20:51 SSDT-x0_2-Cpu0Cst.aml
-rwxrwxrwx  1 elitemacx86  staff   281 Nov  8 20:51 SSDT-x0_3-ApCst.aml

If you have files of the same size, delete them and re-disassemble the files and you should have the disassembly successful. Note that you must delete the existing disassembled files before the re-disassembly.

Could not parse external ACPI tables, AE_ALREADY_EXISTS
Another common issue during disassembly is Could not parse external ACPI tables, AE_ALREADY_EXISTS. This error is mainly caused due to duplicate ACPI files and when the files are disassembled incorrectly. For example, disassembling ACPI files from a Comet Lake using the refs option (iasl -da -dl -fe refs.txt DSDT.aml SSDT*.aml) or the option (iasl -da -dl DSDT.aml SSDT*.aml) will give such error. You must disassemble the files correctly.

iASL: Segmentation Fault; iASL: Terminating
Another common issue during disassembly is iASL: Segmentation Fault iASL: Terminating. When you have this error, the disassembly will not be completed and you must fix the issue to disassemble the ACPI files. This error is mainly caused when disassembling the ACPI files using Refs.txt, where it is not required. Typically, SKL and newer.

NOTES:
  • Whenever you start the disassembly, make sure that you disassemble all the files at a time.
  • Do not disassemble other ACPI files other than the ACPI files starting with the DSDT and SSDT names.
  • Do not disassemble specific files only. It will be prone to error.
  • The disassembled files will have a .dsl extension.
  • If you directly open the .aml files using MaciASL and then click on compile button then you're doing it wrong. Doing so will not only cause errors when compiling but also you would waste time in fixing the common errors due to poor disassembly.
  • Sometimes you might get errors while disassembling the native files. The reason is due to the duplicate SSDTs. If there are any such errors, find the duplicated SSDT and remove it and then disassemble it.
  • You must replace "yourusername" with your actual username.

IV. Analyzing Native ACPI Files


Once you're done with the disassembly, you may want to look at the content of each .dsl file to familiarize yourself with the contents of each disassembled file. Certain patches are dependent on the content and in some cases, you might need to add/remove or modify the content to apply the patch. For example, if you're patching the DSDT to disable the discrete graphics, you may be looking for the _OFF method as it relates to that device. However, disabling the discrete graphics is covered in a separate guide and has been also linked later in this guide.

Except for patching to disable the discrete graphics device and map the brightness hotkeys (rare case), it is really not necessary to patch any SSDTs which are accompanied during the ACPI extraction process as the common renames can be done via the config.plist (Clover or OpenCore) and is the recommended method instead of patching the DSDT with renames. Although, both methods will have the same effect. Note that with the recent progress of Lilu, WhateverGreen, and other related kexts, the renames are done on the fly and for most of the cases, you don't need to rename via config.plist.

For the most part, the main focus is the DSDT. However, SSDTs have their own importance as well.

V. Fixing Errors


After the disassembly, the disassembled native ACPI files can still have errors even when disassembling all ACPI files at once and with the refs.txt method. The disassembled files can have errors due to several underlying factors such as changes in iasl, bugs in iasl itself, and the differences in the compilation environments between our laptops and the OEM. These errors must be fixed otherwise the files will not be compiled and saved further.

Most of these errors can be fixed using RehabMan patches for the Laptops. The patches for syntax/error problems begin with [syn] in the patches. You can use it to fix common errors. In order to determine the patches needed to fix the error, you can simply look at the error message coming from the iasl compiler and the code at the line the error was detected. You can also attempt to apply a patch just to see if it makes changes as shown in the Preview window in MaciASL. If you're not familiar with each type of error, it can take some experimentation and trial/error.

Other errors can be fixed by removing/uncommenting the lines causing the error. However, it depends on whether the line is necessary for the proper operation of the code or not. For example, errors caused by External declarations can be generally removed to fix the error. If you have any experience with the ACPI spec and some programming experience, this process can be a lot easier to follow. The goal is to get each .dsl file to compile without any errors. Once you have the files that compile without errors, you can start patching your DSDT/SSDTs to fix the issues you may have with the macOS/OS X installation.

External Declratations
It is very common to have extraneous/unnecessary External declarations. For example a recent DSDT I looked at had quite a few "Name already exists in scope" errors. For DTSE, DTS1, DTS2, DTS4, BNUM, PDTS, PKGA, SPST.

The fix is to simply comment out the related External declarations.

Code:
//   External (DTS1, FieldUnitObj)    // (from opcode)
//   External (DTS2, FieldUnitObj)    // (from opcode)
//   External (DTS3, FieldUnitObj)    // (from opcode)
//   External (DTS4, FieldUnitObj)    // (from opcode)
//   External (DTSE, FieldUnitObj)    // (from opcode)
... and so on ...


Another common error with some Dell DSDT files is due to the ECRW (in a _CRS method). It's a common error caused by the iasl bug. It can be simply fixed by replacing the code which is given below.

Replace this code:
Code:
If (LEqual (PM6H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, ECRW)  // _RW_: Read-Write Status
                    Store (Zero, ECRW (If (PM0H)
                            {
                                CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, F0LN)  // _LEN: Length
                                Store (Zero, F0LN)
                            }))
                }

with this one :
Code:
If (LEqual (PM6H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, ECRW)  // _RW_: Read-Write Status
                    Store (Zero, ECRW)
                }
If (PM0H)
                            {
                                CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, F0LN)  // _LEN: Length
                                Store (Zero, F0LN)
                            }

Invalid leading asterisk (*pnpxxxx)
Another common error in the DSDT is "Invalid leading asterisk (*pnpXXXXX)". Where the X represents the HID name. You can apply Fix *pnp/pnp lower case Error patch to fix this error.

Name already exists in scope (__DSM)
Another common error in the DSDT is "Name already exists in scope (DSM)". You can apply Rename _DSM methods to XDSM patch to fix the error.

syntax error, unexpected PARSEOP_PACKAGE
Another common error in the SSDT is syntax error, unexpected PARSEOP_PACKAGE. Usually relevant for CPU SSDT Sandy Bridge to Broadwell systems. You can apply the Remove _PSS placeholders patch to fix the error.

Invalid type (Target is [Package], Source must be a package also)
Another common error in the SSDT is Invalid type (Target is [Package], Source must be a package also). Usually relevant for some GPU SSDT. Note that this error can be related to some other SSDT and as well as other devices than GPU. To fix this issue, you'll need to find the error line and replace PCAP with Package {PCAP}

Warnings/Remarks/Optimizations

During compiling the ACPI files, you might have noticed that there are several warnings, remarks, and optimizations. However, warnings, remarks, and optimizations don't matter but errors do. You cannot save the particular DSDT or SSDT file until you have all errors resolved. Therefore, you must fix all the errors before you can save the ACPI file as ACPI Machine Language Binary (with .aml extension)

VI. Patching the DSDT and SSDTs


After fixing the disassembled files, (error free), the next step is to patch the DSDT. Once you disassemble the native files, create a folder and place all the disassembled DSDTs and SSDTs in this new directory.

Before you start patching your DSDT/SSDTs, it would be good if you compile the disassembled files and look for the errors, if any. This is because when you apply some patches, they might not be suitable for your DSDT/SSDTs and it can cause errors when compiling. So determining whether the specific patches are causing the errors or the native disassembled DSDT/SSDTs themselves, can be difficult. Once you compile the disassembled files, and if there's no error, you can continue to apply the patches.

Download MaciASL

BranchNotes
Rehabman
  • Crashes often
  • No AutoSave
  • For a few ACPI files, it would be better to use this branch.
Acidanthera
  • Syntax Coloring
  • Live tree navigation
  • Native OS X autosaving and restore
  • File patching
  • Online patch file repositories
  • Updatable iASL binary
  • Customizable text and layout
  • Compiler summary and hinting


Copy MaciASL

1. Download the MaciASL of your choice.
2. Extract the MaciASL and move it to the Applications folder.

There are some common patches for the DSDT and SSDTs which needs to be applied. The common patches are listed below.

Common Patches (DSDT)
CategoryPatch NameRequiredNotes
AudioLayout IDYES
  • Injects HDEF Properties.
  • Required for built-in Audio and HDMI/DP Audio.
  • Depending on the AppleHDA or the other Audio method you use, change the layout ID in the DSDT.
  • Do not use if using SSDT-HDEF.aml.
BatteryBatteryYES
  • Apply the Battery patch depending on your Laptop model.
  • Do not use if using SSDT-BATT.aml or SSDT-BATC.aml.
Graphics
  • Rename GFX0 to IGPU
  • Rename PCI0.GFX0 to PCI0.IGPU
  • Rename PCI0.VID to PCI0.IGPU
  • Rename VID/ADP1 to IGPU
YESRequired for IGPU Power Management.
Only use it if you're using IGPU as a Graphics Device.
  • Rename GFX0 to IGPU
    • Renames GFX0 to IGPU for better IGPU Power Management.
    • Most DSDT/SSDTs use GFX0 for the integrated graphics device, but there are a few Laptops that use VID or AGP1.
    • If your DSDT uses VID or AGP1 instead of GFX0, see the alternate patch Rename VID/AGP1 to IGPU.
  • Rename PCI0.GFX0 to PCI0.IGPU
    • Renames PCI0.GFX0 to PCI0.IGPU for better IGPU Power Management.
    • Useful for some machines that have both a PCI0.GFX0 and PCI0.PEG.GFX0.
    • Most DSDT/SSDTs use GFX0 for only the integrated graphics device. But some use it for both the integrated device at PCI0.GFX0 and the discrete device at PCI0.PEGP.GFX0. This patch is for the latter scenario.
    • This is an optional patch.
  • Rename PCI0.VID to PCI0.IGPU
    • Renames GFX0 to IGPU for better IGPU Power Management.
    • Usually required for Lenovo Laptops. Do not use this patch if your DSDT/SSDT does not have PCI0.VID address.
    • Useful for some Lenovo machines that have both a PCI0.VID and PCI0.PEG.VID.
    • Most DSDT/SSDTs use GFX0 for the integrated graphics device. If that is the case with your DSDT, do not use this patch and instead use Rename GFX0 to IGPU.
    • This is an optional patch.
  • Rename PCI0.VID to PCI0.IGPU
    • Renames GFX0 to IGPU for better IGPU Power Management.
    • Usually required for Lenovo Laptops. Do not use this patch if your DSDT/SSDT does not have PCI0.VID address.
    • Most DSDT/SSDTs use GFX0 for the integrated graphics device. If that is the case with your DSDT, do not use this patch and instead use Rename GFX0 to IGPU.
Fix *pnp/pnp lower case ErrorOptional
  • Fixes pnp error caused by an asterisk in the Name (_HID *pnpXXXX).
AC Adapter FixOptional
  • Enables loading of AppleACPIACAdapter.
  • Required if AppleACPIACAdapter is not loading.
  • Check IOReg to confirm whether AppleACPIACAdapter is loading or not.
  • Do not use if using SSDT-ADP1.aml.
Add IMEIOptional
  • Adds missing IMEI Device
  • Do not use if IMEI/HECI/MEI Device is present with the 0x00160000 address in the native DSDT.
  • Requires a custom device-id to be set in DeviceProperties for Sandy Bridge and Ivy Bridge.
  • Do not if using SSDT-IMEI.aml.
  • Applying this patch will remove the existing IMEI device in the native DSDT.
Add MCHCYES
  • Adds missing MCHC Device
  • Fixes AppleSMBus support in macOS/OS X.
  • Do not use if using SSDT-MCHC.aml.
  • SSDT-MCHC.aml is preferred over this patch. See Fixing SMBus for more information.
Fix _WAK Arg0 v1
Fix _WAK Arg0 v2
YES
Fix Mutex with non-zero SyncLevelYES
  • Fixes Failed Battery Status and other related issues.
Fix PNOT/PPNTOptional
  • Required if you're dropping OEM CPU-related SSDTs.
  • Don't use this patch if you're including all OEM SSDTs. It is intended only if you exclude the OEM CPU-related SSDTs.
Haswell LPC
Skylake LPC
YES
  • Haswell LPC
    • Required for Haswell CPU (8-series chipset), and AppleLPC.kext is not loading.
  • SkylakeLPC
    • Required for Skylake CPU (100-series chipset), and AppleLPC.kext is not loading. AppleLPC is likely not needed with SKL and later.
HPET FixYES
IRQ FixYES
  • Fixes non-working audio on certain OEM (Dell, HP) machines.
  • Required for X79, X99 and Laptops
OS Check Fix
  • Linux
  • Windows 7
  • Windows 8
  • Windows 10
  • Windows Vista
YES
  • Linux
    • Simulates the DSDT to Linux when running under Darwin (macOS/OS X).
    • Required for fewer Dell XPS Laptops.
  • Windows 7
    • Simulates the DSDT to Windows 2009 when running under Darwin (macOS/OS X).
  • Windows 8
    • Simulates the DSDT to Windows 2012 when running under Darwin (macOS/OS X).
  • Windows 10
    • Simulates the DSDT to Windows 2015 when running under Darwin (macOS/OS X).
  • Windows Vista
    • Simulates the DSDT to Windows 2006 when running under Darwin (macOS/OS X).
OS Check Fix must be applied accordingly based on your Laptop. Do not apply all the OS Check Fix. For newer Laptops, use Windows 10.
To check what's applicable for your Laptop, select the patch and check if there is an option to apply.
Do not use if using SSDT-XOSI.aml.
RTC FixYES
Shutdown Fix v2
SMBUS FixYES
  • Adds missing SMBUS (Intel System Management Bus) device to the system.
  • Fixes AppleSMBus support in macOS/OS X.
  • Do not use if using SSDT-SBUS.aml or SSDT-SMBU.aml.
6-series USB
7-series/8-series USB
Injects Power Properties for USB.
  • 6-series USB
    • Required for 6-series Laptops.
  • 7-series USB
    • Required for 7-series/8-series Laptops.
USB3 Instant Wake
  • To fix the sleep/wake function, you need to use "instant wake" patches. The scenario is like the laptop will not go to sleep and the power LED/indicator continues to glow after few seconds. Use only "USB _PRW 0x6D (instant wake)" or "USB _PRW 0x0D (instant wake)" as it relates to an existing code in your DSDT. The specific patches are also included for skylake and later.
  • You should examine your DSDT to determine what _PRW methods is used in your DSDT and then applying the appropriate patch.
Rename B0D3 to HDAUOptional
  • Injects HDAU Properties.
  • Required for Haswell and Broadwell Laptops only.
  • Do not use if using SSDT-HDAU.aml.

Common Patches (SSDTs)
Patch NameNotes
Rename GFX0 to IGPU
  • Renames GFX0 to IGPU for better IGPU power management.
  • This rename is required for implementing IGPU Power Management.
  • Only use it if you're using IGPU as a Graphics Device.
Rename B0D3 to HDAU
  • Injects HDAU Properties.
  • Required for Haswell and Broadwell Laptops only.
  • Do not use if using SSDT-HDAU.aml.
Cleanup/Fix Errors (SSDT)
  • If using refs.txt (recommended) for disassembly, this patch isn't required.
Remove _PSS placeholders
  • Required for Sandy Bridge, Ivy Bridge, Haswell, and Broadwell Laptops.

Problem Specific Patching

Backlight Hotkeys

Battery Status

Backlight Control

Disabling Discrete Graphics

VoodooI2C

ASUS SMC


QUICK NOTE:
  • Applying patches that are not relevant to your Laptop and applying duplicate patches can cause errors when compiling. Even, if the file does not cause any errors when compiling, the laptop may result in a non-bootable state when using such DSDT and SSDTs.

Applying the Patches

To apply the patch, follow the steps below.

1. Open your disassembled DSDT or SSDT using MaciASL.

Screen Shot 2022-11-24 at 8.45.50 PM-min.png

2. Click on the Patch button and you'll several patches available to apply in the left pane.

Screen Shot 2022-11-25 at 7.31.22 AM-min.png

3. Find and select the patch from the left pane and click on Apply. For example, we would be applying the IRQ Fix.

Screen Shot 2022-11-24 at 8.46.30 PM-min.png

4. Once the patch is applied successfully, you'll see something like below.

Screen Shot 2022-11-24 at 8.46.46 PM-min.png ]
5. Click on Close and you'll see something like below.

Screen Shot 2022-11-24 at 8.45.50 PM-min.png

VII. Compiling


After patching the DSDT and SSDTs, you need to compile the files.

Simply click on compile and look for errors in the Compiler Summary. If there's an error, fix it and again click on Compile.

Screen Shot 2022-11-24 at 8.45.50 PM-min.png
Screen Shot 2022-11-24 at 8.46.56 PM-min.png

If there's no error, the files will be compiled successfully.

VIII. Saving the ACPI files


After compiling, the next step is to save the file to be loaded by the bootloader.

1. Go to File
2. Select Save as
Screen Shot 2022-11-24 at 8.47.20 PM-min.png

3. A dialogue box will appear asking for the location and the file format to save the file.
Screenshot 2022-11-24 at 8.05.15 AM-min.png

4. Select a new location.
5. Select ACPI Machine Language Binary under the File Format.
6. Click on Save.

NOTE:
  • It's a good idea to save the patched DSDT and SSDTs in any other location than the original directory.

IX. Installing the DSDT and SSDT


After finishing all the steps, you need to install the DSDT and SSDT.

1. Copy all the patched DSDT and SSDTs
2. Mount your EFI partition
3. Depending on your bootloader,

For Clover:
If you're using Clover, copy all patched DSDT and SSDTs to EFI/Clover/ACPI/patched directory.

For OpenCore:
If you're using OpenCore, copy patched DSDT and SSDTs to EFI/OC/ACPI directory. You'll also need to add the ACPI entries in ACPI>Add section of your config.plist

Recommended configurations for using DSDT and SSDTs

The following configurations are the only valid configurations. Anything else is likely wrong and should not be used. We prefer the full patched DSDT+SSDTs

Full patched DSDT + SSDTs:
- Patched DSDT.aml in ACPI/patched (Clover) or in ACPI (OpenCore).
- Full set of patched OEM SSDTs in ACPI/patched (Clover) or in ACPI (OpenCore). (SSDTs names must be the same as in ACPI/origin)
- Add-on SSDTs also placed in ACPI/patched (Clover) or in ACPI (OpenCore).
- SortedOrder required to set SSDT load order(SSDTs order must be same as in ACPI/origin)
- DropOem=True

Partial Hotpatch:
- Patched DSDT.aml in ACPI/patched (Clover) or in ACPI (OpenCore).
- Only add-on SSDTs in ACPI/patched (Clover) or in ACPI (OpenCore) (eg. no patched SSDTs)
- SortedOrder left unspecified
- DropOem=False



Extra Information




Credits:
RehabMan
 
Last edited:
Got this error while patching DSDT SSDTs on my ASUS X541UA.
I am using Mojave.
 

Attachments

  • IMG_20181130_014550.jpg
    IMG_20181130_014550.jpg
    3 MB · Views: 1,426
  • IMG_20181130_014655.jpg
    IMG_20181130_014655.jpg
    3 MB · Views: 1,662
Booting problem solved, means I replaced the config.plist file form bootable media and copied it in the EFI partition of the PC. Now I am able to boot. I have patched the DSDT & SSDTs.

From following Guide, first two steps are done and I am not able to understand how I can do Add-on SSD patching. When the above error comes I have done DropOem=True and for "SortedOrder required to set SSDT load order" this step previously I entered the names of the SSDT in the sorted order field (Please refer the attachment) of the config.plist file . The order of names are same as same as in ACPI/origin.

Full patched DSDT + SSDTs:
- Patched DSDT.aml in ACPI/patched
- Full set of patched OEM SSDTs in ACPI/patched (SSDTs names must be same as in ACPI/origin)
- Add-on SSDTs also placed in ACPI/patched
- SortedOrder required to set SSDT load order(SSDTs order must be same as in ACPI/origin)
- DropOem=True
 

Attachments

  • Screenshot 2018-11-30 at 1.54.47 PM.png
    Screenshot 2018-11-30 at 1.54.47 PM.png
    71.7 KB · Views: 1,775
Booting problem solved, means I replaced the config.plist file form bootable media and copied it in the EFI partition of the PC. Now I am able to boot. I have patched the DSDT & SSDTs.

From following Guide, first two steps are done and I am not able to understand how I can do Add-on SSD patching. When the above error comes I have done DropOem=True and for "SortedOrder required to set SSDT load order" this step previously I entered the names of the SSDT in the sorted order field (Please refer the attachment) of the config.plist file . The order of names are same as same as in ACPI/origin.

Full patched DSDT + SSDTs:
- Patched DSDT.aml in ACPI/patched
- Full set of patched OEM SSDTs in ACPI/patched (SSDTs names must be same as in ACPI/origin)
- Add-on SSDTs also placed in ACPI/patched
- SortedOrder required to set SSDT load order(SSDTs order must be same as in ACPI/origin)
- DropOem=True

Its done. I again followed the above guide of Full patched DSDT + SSDTs: and now the system booted. I can I confirm that the patched are applied successfully?
 
Booting problem solved, means I replaced the config.plist file form bootable media and copied it in the EFI partition of the PC. Now I am able to boot. I have patched the DSDT & SSDTs.

From following Guide, first two steps are done and I am not able to understand how I can do Add-on SSD patching. When the above error comes I have done DropOem=True and for "SortedOrder required to set SSDT load order" this step previously I entered the names of the SSDT in the sorted order field (Please refer the attachment) of the config.plist file . The order of names are same as same as in ACPI/origin.

Full patched DSDT + SSDTs:
- Patched DSDT.aml in ACPI/patched
- Full set of patched OEM SSDTs in ACPI/patched (SSDTs names must be same as in ACPI/origin)
- Add-on SSDTs also placed in ACPI/patched
- SortedOrder required to set SSDT load order(SSDTs order must be same as in ACPI/origin)
- DropOem=True
Still no PR files attached. Read here: https://www.elitemacx86.com/threads/faq-read-first-questions-related-to-laptop.175/
 
Its done. I again followed the above guide of Full patched DSDT + SSDTs: and now the system booted. I can I confirm that the patched are applied successfully?
Provide the PR files.
 
In previous reply I want to ask How can I conform that patched are applied successfully?
PR files are attached.
There are no details in SMBIOS. How to do it?
 

Attachments

  • Shekhar.zip
    14.4 MB · Views: 661
In previous reply I want to ask How can I conform that patched are applied successfully?
You can search for the patch in your DSDT and SSDTs.
PR files are attached.
IOReg is corrupt. The issue you're having is due to the "DSDT" is not in the sorted order list. Probably you've excluded it. Only SSDTs are there. Once you include the DSDT, it should be fixed.
There are no details in SMBIOS. How to do it?
That's normal. As per the guide, after the installation, you should generate a new SMBIOS for your hardware.
 
But my Config is not listed and I am confused which is the best matching configuration should I select.
Included the DSDT. Screen is Attached.
 

Attachments

  • Screenshot 2018-11-30 at 8.41.42 PM.png
    Screenshot 2018-11-30 at 8.41.42 PM.png
    495.8 KB · Views: 1,608
  • Screenshot 2018-11-30 at 8.48.42 PM.png
    Screenshot 2018-11-30 at 8.48.42 PM.png
    309.4 KB · Views: 1,838
Last edited:

Trending Threads

Latest posts

Forum statistics

Threads
1,453
Messages
13,790
Members
20,618
Latest member
hitosan