Apple's M4 chips forget everything when they sleep, and that's why Linux wouldn't boot

The Forgetful CPU (Linux on M4)

Apple's M4 chips forget everything when they sleep, and that's why Linux wouldn't boot

I bought an M4 Mac mini in 2024 hoping to boot Linux, but Apple's new SPTM security and a CPU quirk got in the way. The M4's WFI instruction wipes all registers, violating the ARM64 spec. By replacing every WFI with NOP, I finally booted Linux with all cores. The fix is now in mainline Linux and m1n1, and it also works on M4 Pro, M4 Max, and M5.

If the system is configured such that the WFI instruction can be completed, then the WFI instruction must not cause a loss of architectural state.

More from this day

2026-10-02