Asahi Linux 7.1 Progress Report

Asahi Linux 7.1 Progress Report

Asahi Linux 7.1 Overview

Asahi Linux 7.1 focuses on expanding hardware support to the M3 series, resolving critical boot and power issues introduced by the macOS 27 developer beta, and implementing a custom firmware approach for hardware video decoding.

macOS 27 Compatibility and Boot Fixes

macOS 27 introduced a change to APFS metadata that prevents Asahi Linux installations from appearing in the boot picker.

Apple's boot tooling requires a "valid" macOS installation within an APFS container to recognize a bootable volume. Asahi Linux uses a small 2.5 GB APFS container containing m1n1 as the kernel to trick Apple's tools. In macOS 27, Apple began enforcing a specific bootable flag in the APFS metadata; if this flag is not set, the volume is hidden from the Startup Disk application and the boot picker.

To resolve this, the Asahi Installer now automatically sets this flag for new installations. For existing installations affected by the macOS 27 beta, users can:

  1. Run the Asahi Installer again and select the "Fix macOS 27 boot picker compatibility" option.
  2. Use a standalone tool developed by chaos_princess (available on GitHub at AsahiLinux/asahi-fix27) to fix the issue from within Linux, provided it is run before upgrading to macOS 27.

SMC Firmware and Emergency Shutdowns

A change in the System Management Controller (SMC) firmware in macOS 27 causes emergency shutdowns on Asahi Linux.

macOS 27 updated the SMC firmware, changing a battery management interface from returning a 32-bit integer to a single byte. This ABI change caused the Linux power supply driver to misinterpret the battery state as a failure, triggering an emergency shutdown to protect the system. This has been patched in the downstream kernel starting with version 7.0.12, which now supports both firmware ABIs.

M3 Series Hardware Support

Asahi Linux has achieved significant progress on M3, M3 Pro, M3 Max, and M3 Ultra SoCs, with several core components now functional.

Because Apple has maintained consistency in several hardware blocks since the M1, much of the M3 support was implemented via Devicetree additions and configuration files. Key achievements include:

  • High-Quality Audio: Speaker and headphone jack support are now functional on M3 machines due to the same I2S controller, Numerically Controlled Oscillator (NCO), and amplifier chips used in previous generations.
  • CPU Management: Support for CPU frequency switching and big.LITTLE task scheduling is now active, improving both energy efficiency and performance.
  • Hardware Sensors: SMC hardware sensors are now functional via Devicetree changes.
  • Core SoC Blocks: PCIe, WiFi, Bluetooth, NVMe, keyboard, and trackpad drivers are now operational for M3 series machines.

Apple Video Decoder (AVD) and Custom Firmware

Asahi Linux is implementing a custom firmware solution for the Apple Video Decoder (AVD) to avoid dependency on Apple's proprietary kexts.

The AVD is an ARM Cortex-M3 core that manages fixed-function hardware for decoding AVC (H.264), HEVC (H.265), VP9, and AV1. Apple bundles the firmware and configuration data inside the AVD kernel extension (kext), which varies by SoC. To avoid the logistical burden of extracting and updating firmware from kexts for every SoC revision, the Asahi team is writing their own firmware.

Since the Cortex-M3 does not verify the firmware it executes, the team has developed a custom blob that installs interrupt handlers and applies the necessary tunables for each AVD revision. This approach has enabled a working V4L2 driver for AVC hardware, supporting 10-bit AVC-encoded video up to 4K. Future work includes implementing support for VP9, HEVC, and AV1.

m1n1 Version 1.6.0 Release

m1n1 v1.6.0 is a major release that introduces a Rust requirement for stage 2 builds and moves GPU initialization into the bootloader.

Key changes in m1n1 1.6.0 include:

  • Rust Integration: Stage 2 builds now require Rust. The Apple Device Tree parsing code has been ported to Rust, and the bootloader uses no_std Rust targeting aarch64-none-softfloat.
  • GPU Initialization: GPU initialization is now handled by m1n1 rather than the kernel driver. This simplifies Devicetree bindings and removes the need for the kernel driver to handle floating-point numbers from Apple's hardware initialization data.
  • M3 and Future Support: The release adds SPMI controller and PCIe initialization for M3 series machines and lays the groundwork for M4 and A18 Pro (MacBook Neo) support by improving handling of non-macOS boot modes and power domain metadata.

Sources