Even though the M1 and M2 chips in modern Macs are based on ARM processor designs, they aren’t like any other ARM designs. That has made porting Linux to new Macs a difficult challenge, but there has been some impressive progress recently.
Much of the work around porting desktop Linux to Apple Silicon (M1 & M2) Mac computers has been under the Asahi Linux project, which already offers a desktop distribution that can boot natively on many models. Even though Linux has supported ARM chips for years, largely due to Google’s use of Linux for the Android kernel and devices like the Raspberry Pi, making everything work on Apple Silicon has been a challenge.
The core operating system and desktop experience has been working on Asahi Linux for a while now, so some developers have moved onto proper graphics support. Alyssa Rosenzweig helped reverse engineer the GPU in the M1 chip to create a user space driver, based on documentation work by Dougall Johnson. However, a kernel-level driver was still missing — a task taken up by VTuber Asahi Linya.
Asahi Lina explained in a blog post, “just like other parts of the M1 chip, the GPU has a coprocessor called an “ASC” that runs Apple firmware and manages the GPU. This coprocessor is a full ARM64 CPU running an Apple-proprietary real-time OS called RTKit… and it is in charge of everything! It handles power management, command scheduling and preemption, fault recovery, and even performance counters, statistics, and things like temperature measurement! In fact, the macOS kernel driver doesn’t communicate with the GPU hardware at all.”
Through much trial and error, Asahi Lina developed an M1 GPU driver for the Linux kernel, written in the Rust programming language. Last month, it became stable enough to run the GNOME desktop environment in the Wayland compositor, and ongoing work on the kernel and user drivers allows some games to work, including the classic shooter Quake. The blog post mentions, “since the GPU power management is handled by the firmware, all that just works. I tested Xonotic at 1080p inside a GNOME session, and the estimated battery runtime was over 8 hours!”
It will still be a few weeks (or months) before the new GPU drivers are easily accessible to anyone trying Linux on an M1 or M2 Mac, but work is progressing at an impressive rate — especially considering Apple hasn’t documented most of its CPU and GPU architecture at all.
Source: Asahi Linux
- › The Best Mini PCs of 2023
- › 5 Reasons the Mac Mini Is a Top Mini PC, Even for PC Users
- › Troubleshoot Your Mac With These Hidden Startup Options
- › System76 Gazelle (gaze18) Review: A Portable Linux Powerhouse
- › The New HyperX Cloud III Headset Works With All Your Devices
- › What It’s Like Using a Gaming Laptop as Your ONLY Gaming PC
- › 10 Common Backup Mistakes Most People Make
- › Can ChatGPT Write Essays: Is Using AI to Write Essays a Good Idea?