Linux on Apple Silicon Macs Is Now Good Enough for Gaming Linux has long been a popular choice for desktop computing, but it hasn’t always been good enough for gaming. That’s no longer the case, though. In fact, some games now run well on Linux thanks to recent improvements in the platform. One of the biggest contributors to Linux’s gaming success is Valve Corporation. The company develops and distributes games such as Half-Life 2 and Portal 2 using the platform. These games are typically very demanding, but they’ve been able to run well on Linux thanks to recent updates. Other developers are also contributing to Linux’s gaming success. For example, Unity Technologies has released a game engine that can be used to create games for both desktop and mobile platforms. This engine is being used by several developers to create new games that are playable on Linux systems. Overall, there have been many improvements made to Linux over the past few years that have made it a better platform for gaming. This has led to more developers creating games that are playable on Linux systems, which in turn has led to increased popularity of the platform among gamers. ..


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