HN
Today

Progress Linux 7.2 – Asahi Linux

Asahi Linux unveils a significant "Progress Report" for Linux 7.2, detailing their ongoing battle against Apple's deeply proprietary hardware. The team has made strides in deciphering complex power management, enabling newer M3/M4/M5 chips, and accelerating video decoding. This post highlights the remarkable reverse engineering efforts and technical ingenuity required to bring full Linux functionality to Apple Silicon, resonating strongly with HN's appreciation for challenging technical feats.

23
Score
2
Comments
#5
Highest Rank
6h
on Front Page
First Seen
Aug 27, 12:00 AM
Last Seen
Aug 27, 5:00 AM
Rank Over Time
2499765

The Lowdown

The latest Asahi Linux progress report, coinciding with the Linux 7.2 release, details numerous advancements in bringing a functional Linux environment to Apple Silicon Macs. The report highlights intricate technical challenges overcome, particularly concerning power management, hardware compatibility for newer M-series chips, and desktop video acceleration.

  • Complex Power Management: Apple Silicon's power management infrastructure, split across SMC, PMGR, and PMP, poses significant challenges. While Linux typically uses the standard PSCI interface, Apple's lack of an EL3 firmware layer prevents direct PSCI use. Asahi Linux is innovating with a UEFI Runtime Service based PSCI conduit, allowing the kernel to interact with m1n1 (their custom firmware) for proper power management, even at the same Exception Level.
  • CPU Idle Behavior on M4: A specific issue on M4 chips causes WFI (Wait For Interrupt) to lose core state and crash the system. Apple now locks down state retention configurations from M4 onwards. A kernel command-line parameter was introduced to manage idle loop behavior, allowing the system to boot before the Asahi cpuidle driver takes over and saves core state.
  • Secure Page Table Monitor (SPTM): Apple's SPTM, integrated with the Guarded Execution Framework (GXF) and custom SPRR permissions, isolates page table management for security. This made running XNU under the m1n1 hypervisor impossible on M4+ devices. Asahi Linux has successfully emulated GXF and SPRR within m1n1, enabling the hypervisor to load and monitor Apple's SPTM and XNU on newer chips.
  • M3 Series Progress: Significant progress has been made on M3 devices, including full webcam and microphone support, and updates to ATCPHY for USB3, DisplayPort, and Thunderbolt. The transition from CD3217 to ACE3 USB controllers on M3 Pro/Max required reverse engineering the new SPMI bus, which is now functional. M3 devices will target macOS 14.8.3 firmware ABI, with DCP support nearing feature parity.
  • M4 and M5 Bringup: Initial work on M4 and M5 chips includes fixing a breaking change in Apple's NVMe controller firmware (macOS 15.x), enabling NVMe on these devices. PCIe enumeration and multi-core CPU crash fixes have also been implemented, though these chips are not yet ready for general installation.
  • Desktop Video Acceleration (AVD): Support for Apple Video Decoder (AVD) has advanced, enabling hardware-accelerated H.264, H.265, and VP9 decoding. Given the V4L2 Stateless API's limited desktop adoption, Asahi Linux is utilizing a forked VA-API to V4L2 Stateless translation layer, allowing desktop software to leverage AVD for video acceleration.
  • Direct Scanout: A major goal is to eliminate framebuffer copies for power and performance. By leveraging Apple's Interchange framebuffer format, the team is enabling direct scanout from AGX (GPU) and DCP (display controller), with AVD integration underway. This allows for direct display of rendered frames, reducing CPU load and memory bandwidth, though integration with compositors like Kwin is still evolving.
  • Upstreaming Efforts: The team continues to upstream patches to the main Linux kernel, with recent contributions including I2S peripheral changes, hwmon driver device tree patches, and fixes for SMC firmware interface changes.

The report concludes by thanking the community and sponsors, whose support has been crucial for enabling contributors to tackle these complex hardware challenges and continue bringing the bleeding edge of Linux to Apple Silicon.