Fixing Storage Sleep and TRIM on Legacy Hackintosh Builds

Solve Hackintosh storage issues after sleep: enable TRIM on third-party SSDs, inject ACPI patches for SATA power management, and avoid APFS pitfalls on older macOS versions.

One of the most persistent stability issues on legacy Hackintosh builds is storage behavior after system sleep. A disk that fails to spin down correctly, or a drive that does not wake with the controller, can cause kernel panics, data corruption, or a machine that refuses to re-enter the desktop. These problems are often rooted in missing ACPI methods for the storage controller, inadequate TRIM support on third-party SSDs, or improper configuration of the SATA/IDE controller in the bootloader. This guide addresses three interconnected areas: enabling TRIM on unsupported drives, configuring ACPI for proper storage power management, and avoiding common pitfalls with APFS on older macOS versions.

TRIM on Third-Party SSDs: From Kext Patching to trimforce

Apple’s TRIM support was originally limited to its own SSDs. Starting with OS X 10.10.3, the trimforce command allowed users to enable TRIM on any SATA SSD. On earlier versions (10.6–10.10.2), the only reliable method was to patch the IOAHCIBlockStorage kernel extension. The patch replaces a string in the kext binary that tells the system to recognise the drive as an Apple SSD. This is a binary patching operation – not a runtime injection – and must be reapplied after any system update that replaces the kext.

For 10.6–10.9, you can use a tool like TRIM Enabler (trusted, free version) or patch manually. The manual method: open /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage in a hex editor, locate the string Apple SSD and replace it with Apple SSd (change one byte). On 10.10–10.10.2, the same kext is used but the string location shifts slightly. Backup the original kext before patching.

For 10.10.3 and later, simply run sudo trimforce enable in Terminal. The tool will display a warning about data integrity – accept it. After reboot, check System Information under SATA/SATA Express for a line that says “TRIM Support: Yes”. Note that trimforce works on SATA SSDs only; NVMe TRIM on legacy systems requires additional ACPI patches and is not covered here. For a full hardware compatibility baseline, see our Legacy Hackintosh Storage: SATA, IDE, and NVMe Compatibility Guide.

APFS on Legacy macOS: A Caution

Apple File System (APFS) was introduced in macOS 10.13 High Sierra as the default for SSDs. On any Hackintosh running 10.13 or earlier, using APFS on a non-Apple SSD can cause boot delays, inconsistent disk mounting, and increased wear due to incomplete TRIM support. The bootloader must include an APFS driver (e.g., OpenCore.efi or apfs.efi for Clover) to recognise the partition. More importantly, macOS 10.12 and earlier cannot read APFS volumes at all. If you are dual-booting with a newer macOS, keep the legacy system on HFS+ (Journaled). For single-boot legacy installs, avoid APFS entirely – format the drive as Mac OS Extended (Journaled) during installation.

ACPI and Storage Power Management

When a Hackintosh enters sleep, macOS sends a _PS0 (power state 0) and _PS3 (power state 3) control method to each device, including the SATA controller. If the motherboard’s ACPI tables lack these methods for the controller, the system may not properly spin down the drives, or the controller may hang on wake. You can verify this by reading the ioreg for the controller device (e.g., AppleIntelPCHSeriesAHCI) and checking for IODeviceTree:/pci0/sata0 entries. A missing device-type or AAPL,slot-name property can also cause power management issues.

The solution is to inject a custom SSDT that defines the _DSM method for the SATA controller. This SSDT should include the built-in property set to 1 and a device-type string such as "AHCI Controller". Additionally, you may need to provide a _PRW (power resource for wake) method if the controller is not waking from sleep. Many legacy boards (Intel 6-series, 7-series, and some AMD chipsets) require this patch. The SSDT can be compiled with iasl and placed in /EFI/OC/ACPI/ (OpenCore) or /EFI/Clover/ACPI/patched/ (Clover).

Multi-Disk Setups and IRQ Conflicts

Adding multiple hard drives, especially on older chipsets, can trigger IRQ conflicts. macOS expects storage controllers to use a single interrupt line. If your motherboard has two SATA controllers (e.g., one Intel, one third-party like JMicron or Marvell), you may need to disable one in the BIOS or add a device-id property to the SSDT to force macOS to use the correct driver. For IDE mode (often used on 10.6–10.7 builds), the AppleIntelPIIXATA kext may need to be injected if the controller is not natively supported. Check the kernel log for messages like AppleIntelPIIXATA: Found unsupported device. The fix is to spoof the device ID via device properties in the bootloader to match a supported model (e.g., 0x27C0 for ICH7).

Verifying Storage Power Management

After applying the SSDT and enabling TRIM, test sleep and wake behaviour. Use pmset -g log to view sleep/wake events. If the machine wakes but the drive does not appear, check the console for disk0s2 mount errors. A common symptom is a kernel panic with AppleAHCI Port Timeout – this indicates the controller is not receiving the wake command. In such cases, increase the darkwake setting in the bootloader to 1 or 2 (OpenCore: DarkWake in NVRAM). Also, disable hibernatemode (set to 0) because hibernation writes memory to disk and can fail on unsupported controllers.

Example: Enabling TRIM and Sleep on a Samsung 840 EVO (10.11)

Consider a build with a Gigabyte GA-Z77X-UD5H (Intel Z77 chipset) and a Samsung 840 EVO SSD running OS X 10.11 El Capitan. The system would wake from sleep but the drive would not be recognised until a hard reset. The solution: add the following SSDT for the SATA controller (device 0x1E02 on Z77) with built-in and device-type. Then run sudo trimforce enable. After reboot, the drive’s TRIM status showed Yes in System Information, and sleep/wake worked reliably. The exact SSDT code is outside the scope of this article, but the process confirms that combining TRIM and ACPI patches resolves the most common storage power issues on legacy Hackintosh hardware.