---
title: "Building a Linux GPU Driver for the M4 Mac Mini in One Month"
slug: building-a-linux-gpu-driver-for-the-m4-mac-mini-in-one-month
url: https://listedarticles.com/articles/building-a-linux-gpu-driver-for-the-m4-mac-mini-in-one-month
canonical_url: https://codyho.dev/blog/gpu-driver/
content_type: blog_post
language: en
published_at: 2026-09-15T19:30:03.000Z
updated_at: 2026-09-16T15:49:44.704Z
author: "Cody Ho"
author_url: https://codyho.dev
authored_by: agent
publisher: "Cody Ho"
publisher_url: https://codyho.dev
topics: ["Linux", "GPU Drivers", "Apple Silicon", "Reverse Engineering", "Open Source", "Graphics"]
license: all-rights-reserved
word_count: 299
reading_minutes: 1
citation: "Cody Ho, Cody Ho. \"Building a Linux GPU Driver for the M4 Mac Mini in One Month.\" 15 Sept 2026. https://codyho.dev/blog/gpu-driver/ (all-rights-reserved)"
# The full text follows. The web page shows an extract and sends readers
# to the source above; quote the citation and link the canonical URL.
---

# Building a Linux GPU Driver for the M4 Mac Mini in One Month

> Cody Ho and a collaborator reverse-engineered Apple's M4 AGX GPU firmware ABI and built a fully OpenGL ES 3.0 compliant Linux driver in roughly one month, a process that normally takes years. The work was done in a clean-room manner using only hardware traces from a custom hypervisor, not Apple binaries.

> **Indexed summary.** This entry is an agent-written synopsis of an article first published at [codyho.dev](https://codyho.dev/blog/gpu-driver/). Read the original for the full text.

Cody Ho describes building an OpenGL ES 3.0 compliant GPU driver for the M4 Mac Mini (and MacBook Neo) in collaboration with Niklas. The driver targets Apple's AGX GPU and was produced through clean-room reverse engineering: the team used a previously built hypervisor to capture hardware traces from the running M4, then derived the firmware ABI and command stream format from those traces without inspecting Apple's binaries.

The resulting driver includes a custom IR and shader compiler, a command stream builder, and a full Linux kernel driver for the AGX firmware ABI. The driver is fast enough to run Minecraft at 200fps and Chrome and Firefox with working WebGL compositing.

## Key points
- Full OpenGL ES 3.0 compliance achieved in roughly one month, versus the typical years-long timeline for GPU driver development
- Reverse engineering relied solely on hardware traces from a custom hypervisor — no Apple binary inspection
- The team reverse-engineered M4, A18 Pro, and partially M5 user space, discovering hardware features not emitted by Apple's own driver
- Components built include a custom shader compiler, command stream builder, and full Linux kernel driver
- A friend provided documentation on required Apple blobs as opaque objects, enabling a clean-room user-space implementation
- The code is not yet ready for end users but is being prepared for distribution

## Why it matters
GPU drivers for Apple Silicon under Linux have been a significant gap. This work, using novel hypervisor-based reverse engineering, compresses a multi-year engineering effort into weeks and demonstrates that clean-room compliance is achievable at a pace that makes Linux on Apple hardware practically viable much sooner than expected.

---

*Source: [Building a Linux GPU Driver for the M4 Mac Mini in One Month](https://codyho.dev/blog/gpu-driver/)*
