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

365 points - yesterday at 7:30 PM

Source

Comments

SXX today at 2:49 AM
Dear fellow humans from "Hacker News". Hacking a driver that in itself documentation to black box Apple hardware is not any different from hacking $10 4G LTE modem.

Fact that a person who was not previously driver developer can achieve this in a few weeks is pure wonder. No matter what tools are used.

Leave legal questions to Linux Foundation laywers or whoever is responsible to accept or not accept the patches.

If Apple actually wanted to prevent any of this from happening they can just lock bootloader. They not just gonna do it now because someone used fancy text generator to make working GPU driver.

Attacking a person who spent their personal time and money on making walled garden black box hardware more usable, more privacy friendly and further away from landfill is a crime against the future of humanity.

MoltenMonster yesterday at 10:23 PM
https://www.reddit.com/r/AsahiLinux/comments/1whecn1/comment...

> The author was banned from Asahi Linux for hiding his extensive use of LLMs from us in another attempted contribution, and (more importantly) for concealing that he is a former Apple engineer with direct contacts to the people involved in Apple Silicon development. Make of this what you will.

ndiddy yesterday at 9:35 PM
It's extremely impressive that they were able to make a working driver so quickly. I think this is one of the best use cases for LLMs. You don't need someone to spend years reverse engineering undocumented hardware anymore. It will interesting to see how good the driver the LLMs came up with is, and whether it can be upstreamed into the Linux kernel.
porphyra yesterday at 9:35 PM
This is super great. The biggest pain point of Asahi Linux is how it doesn't have GPU acceleration on M3 and newer, especially now that M6 is out!

However, Asahi Linux has a strictly no-AI policy [1]. So this great work can't be upstreamed. I expect to see a bunch of AI-assisted forks that get things working smoothly on newer hardware to dominate as most people just care about getting stuff working, while only a handful of purists stick to the non-AI version running on ancient hardware.

[1] https://asahilinux.org/llm-policy/

thrwy19940314 yesterday at 10:05 PM
All this work is tainted since the poster is ex-Apple[1]. There is no way Linux will take that code, since people from Apple also contribute to Linux and this creates a major conflict.

There's also ongoing issues around Codex for this sort of thing, given Apple is suing OpenAI over stolen trade secrets[2]. And nobody knows whether training data in other models is similarly tainted.

[1]: https://codyho.dev/documents/cody_ho_resume.pdf

[2]: https://www.theguardian.com/technology/2026/jul/10/apple-sue...

Agingcoder yesterday at 9:35 PM
Maybe I’m getting really old, and I know we live in changing times but the fact this works at all is insane, as in black magic insane.

I assume I’ll get used to it, but my mental model of what’s possible hasn’t been fully rewired yet.

SXX yesterday at 10:37 PM
To the developer: it doesnt matter whatever you can upstream it or not. Just share the code and documentation of how this process can be reproduced.

There plenty of us not working at Apple who can reuse the same approach for M5 and next generations of hardware.

shipp02 today at 3:36 AM
What is the state of Nvidia and AMD GPU drivers on Linux? Maybe these techniques can finally give us reasonably good open source drivers which can be supported for a long time.

AFAIK Nvidia drivers are proprietary and AMD has a tendency to drop support quickly

superdisk today at 9:37 AM
Damn, I did exactly this already for the M3 and got it working. Was hoping to make a post about it but this kinda scoops it. Bravo!
deleted today at 11:39 AM
prier today at 11:42 AM
What did you use for making those rather sexy diagrams/figures?
acd today at 8:50 AM
I think to reduce ewaste part it should be mandatory with open firmware and open hardware specifications
cyberclimb today at 9:51 AM
What would it take to run pytorch on the M4 GPU efficiently? Is there still a gap between what MPS offers and this driver (if properly hooked into Pytorch)?
erichocean today at 12:10 PM
Would be fun to get this API working on it now: https://github.com/sebbbi/NoGraphicsAPI

You could code for it now directly, instead of having to wrap a driver API. (There's also a few API bits missing on Metal today, that are present on Vulkan—and the the hardware can do it.)

AKSF_Ackermann yesterday at 9:58 PM
I am not by any means a copyright lawyer, so can anyone enlighten me on if it is a good idea for upstream projects to accept such kind of code from an ex-Apple employee, especially since Apple is currently suing OpenAI.
getcrunk today at 1:48 AM
All the controversy aside, someone can now white box reimplement this if they are concerned
cromka yesterday at 11:48 PM
Author, do TouchID next.
protoman3000 today at 10:34 AM
Can you next please bring Asahi to M4 in one month? I would greatly appreciate it!
kova12 today at 10:12 AM
Why this thread reads like it's from Reddit?
sscarduzio yesterday at 10:03 PM
/goal have all this upstreamed to Linux
henrikklee today at 5:15 AM
Fantastic work. I've been following M4 Linux progress almost daily, waiting for when I can use it as a daily driver.
nnm today at 4:18 AM
This is a great use case of LLM.
nicman23 today at 6:13 AM
just yeeting a qwen flash (iq3) with radare2 installed is so good to not slog through the regular loop of re
deleted today at 10:11 AM
GeekyBear yesterday at 9:39 PM
Figuring out how the hardware works and how to interface with it to submit work is a significant step all by itself.
carterschonwald yesterday at 10:19 PM
im pretty literate in intellectual property, but im pretty confused about the no looking at binary code artifacts bit.
laidoffamazon today at 6:03 AM
This is extremely impressive work; kudos. I was thinking about this with regard to Asahi's anti-LLM policy just last week - they're going to get completely outmoded by LLM-harnessed reverse engineering, if only for personal use and not upstreaming.

I'm surprised you worked with Niklas on this. I'd have assumed you'd think he was competent, given he went to Binghamton and not Stanford.

rowanG077 today at 1:32 AM
Awesome to see that another project has started that does use LLM to build linux on top of apple silicon. Asahi linux was dead in the water for me once they made their extreme anti-LLM stance clear.
xyst yesterday at 10:52 PM
So this is specific _only_ to M4 Mac Mini and Neo? Or will this work on any M4 SoC such as M4 Max?
ReshamJoshi yesterday at 11:31 PM
[dead]
varispeed yesterday at 9:19 PM
> GPT-6 Astra and GPT-5.6 Sol are absolutely insane

Perhaps before Astra was nerfed. It is now the dumbest model right after Gemini. Sol still holds up.

kmeisthax yesterday at 10:06 PM
Clean room is not 100% legally necessary for RE, but I would never touch an LLM to do RE work when there's even a chance the models have been trained on the thing I ultimately plan to reimplement.

Furthermore, given that Asahi Linux, the biggest game in town when it comes to running Linux on Apple silicon, is trying to be cleanroom, it is incredibly rude of you to not mention LLMs until after showing a page full of LLM-derived firmware ABI. This is a trap for anyone who's trying to be cleanroom.