"ACPI… the final frontier…". No, not really. But this is how overwhelmed most Hackintosh users feel the first time, they open an .aml
file and look inside it. Understanding what to make of all of it seems like an expedition of epochal proportions impossible to grasp. And that's who this introduction is for.
Did you ever wonder what a DSDT
or SSDT
table is and what it does? Or how these rename patches that you have in your config.plist
work? Well, after reading this, you will know for sure! But first things first…
ACPI stands for Advanced Configuration & Power Interface. It is an architecture-independent power management and configuration standard originally developed by Intel, Microsoft, Toshiba and other manufacturers who formed the ACPI special interest group. In October 2013, the assets of the ACPI specifications were transferred to the UEFI Forum.
Each computer mainboard ships with a set of ACPI Tables stored in the BIOS (or UEFI). The number and content of ACPI tables varies from used mainboard and chipset - it even can vary between different BIOS versions as well. ACPI is literally just a set of tables of texts (converted into binary code) to provide operating systems with some basic information about the used hardware. DSDTs
and SSDTs
are just two of many tables that make up a system's ACPI – but very important ones for us.
The latest version of the ACPI Specification (v6.5) was released in August 2022. ACPI serves as an interface layer between the operating system and system firmware, as shown below:
Source: UEFI.org
In the ACPI subsystem, peripheral devices and system hardware features of the platform are described in the DSDT
(Differentiated System Description Table), which is loaded at boot and in SSDTs (Secondary System Description Tables), which are loaded dynamically at run time. The ACPI system describes a machine's hardware information in .aml
format and does not have any driver capabilities of its own.
The ACPI subsystem is initialized after the system's POST. The initialization works as follows (chronologically, from top to bottom):
Source: ACPI Introduction and Overview
The ACPI subsystem itself consists of 2 data structures: data tables and definition blocks (see figure below). These data structures are the primary communication mechanism between the firmware and the OS. Data tables store raw data and are consumed by device drivers. Definition blocks consist of byte code that is executable by an interpreter:
We can make use of SSDTs to inject said Definition Blocks into the system to change things as needed. We can add (virtual) devices, rename devices, change control methods (or redefine them), modify buffers, etc. so macOS is happy.
A common problem with Hackintoshes is missing ACPI functionality when trying to run macOS on X86-based Intel and AMD systems, such as: Networking not working, USB Ports not working, CPU Power Management not working correctly, screens not turning off when the lid is closed, Sleep and Wake not working, Brightness controls not working, etc.
These issues stem from DSDTs written with Windows support in mind on one hand and Apple not sticking to ACPI tables which conform to the ACPI specs 100 % for their hardware on the other hand. These issues can be addressed by dumping, patching and injecting a patched DSDT
during boot, replacing the original.
As shown earlier, the system firmware updates the ACPI tables dynamically during runtime, so injecting a patched (fixed) DSDT might not the be the smartest idea. And since a DSDT can change when updating the BIOS, injecting an older patched DSDT on top of it can cause conflicts and break macOS functionalities.
Therefore, dynamic patching with SSDTs is preferred and much cleaner in regards to acpi-conformity than using a patched DSDT. Plus the whole process is much more efficient, transparent and elegant. And that's why you should avoid patched DSDTs. So whoever tells you that a hackintosh without a patched DSDT
is incomplete or not fully functional is not fully functional either.
Continue to the next Chapter, ASL Basics.
- Original ASL Guide by suhetao
- ACPI Specifications
- ASL Tutorial by acpica.org (PDF). Good starting point if you want to get into fixing your
DSDT
withSSDT
hotpatches.