Remix.run Logo
Building a Linux GPU Driver for the M4 Mac Mini in One Month(codyho.dev)
97 points by ADevWithAnIdea 4 hours ago | 50 comments
MoltenMonster an hour ago | parent | next [-]

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.

drnick1 2 minutes ago | parent | next [-]

If Apple open sourced its drivers this issue wouldn't exist. AI at last gives the "community" a chance to use the hardware they bought the way they want. It's unreasonable to expect anybody to code this kind of stuff "by hand" when automated tools exist.

cromka 15 minutes ago | parent | prev | next [-]

I find it extremely ironic that big corp openly steals IP en masse to build their models but hackers are still concerned about using same models for their reverse engineering work.

I think at this point the hacking community needs to grow some balls.

SXX 37 minutes ago | parent | prev | next [-]

I certainly dont care about hiding LLM contributions and all crazy anti-LLM policies, but I really hope author can share process completely so this can be reproduced by someone not working for Apple.

alightsoul 20 minutes ago | parent | prev [-]

Even if this is the case, this is still a valuable contribution to learn upon.

MBCook 4 minutes ago | parent [-]

It’s taint. Anyone who looks at it can’t work on a real open source driver because they will have had access to information they’re not supposed to.

It won’t be clean room like the stuff Alyssa did.

thrwy19940314 an hour ago | parent | prev | next [-]

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...

IgorPartola 35 minutes ago | parent | next [-]

Now that this work is done and out in the open what in theory would prevent the next generation of LLMs from ingesting it and eventually a non-Apple employee creating yet another driver “from scratch” but with the knowledge of how the hardware works acquired from an LLM or with the help of one?

Basically, aren’t we facing a situation where LLM-assisted knowledge laundering is becoming a thing?

rjsw 15 minutes ago | parent | next [-]

Some arguments in the Apple vs OpenAI case look like they could lead to a decision on whether an LLM can wash away copyright or not.

iAMkenough 23 minutes ago | parent | prev [-]

Yes, as well as accountability laundering. Technofascists are loving it.

Nobody has been held accountable for AI selecting a grade school as a bombing target on the first day of America and Israel’s strikes on Iran. 100+ school girls killed, and no accountability.

ADevWithAnIdea 31 minutes ago | parent | prev | next [-]

Linking to another HN comment: https://news.ycombinator.com/item?id=49719480

nine_k 35 minutes ago | parent | prev | next [-]

There were and are many important pieces of Linux kernel that live out of tree; ZFS is a big example.

The problem with this driver is not licensing or code quality; I assume it's under a threat of receiving C&D letter, or maybe also a legal suit for breaking some NDA.

cromka 11 minutes ago | parent [-]

> important pieces of Linux kernel that live out of tree; ZFS is a big example.

Including the proprietary GPU drivers. If this MacBook driver end up out of tree, so be it.

porphyra 36 minutes ago | parent | prev [-]

Very sad. I really want to get Linux on newer Apple chips working flawlessly but I can understand the legal minefield about this particular work.

cromka 10 minutes ago | parent [-]

Nobody does. We're only about to start settling it in courts, likely the supreme ones.

porphyra a minute ago | parent [-]

I meant I can understand the fact that a legal minefield exists.

I didn't mean that I understand the actual intricacies of the legal situation.

Sorry for my confusing wording.

ndiddy 2 hours ago | parent | prev | next [-]

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.

MBCook 3 minutes ago | parent | next [-]

I’m sure it’s really easy when you can get help from the people who made the chip or write the Apple drivers.

ivanjermakov an hour ago | parent | prev | next [-]

Might be one of the only use cases where LLMs are necessary to succeed. Can't imagine the pain of reverse engineering a technology of this scale and "secrecy".

ADevWithAnIdea an hour ago | parent [-]

Traditional hardware RE centers around heroics by a small number of very smart people, see: marcan, Alyssa Rosenzweig, Asahi Lina, etc. What they did is insanely impressive, and given how hard it was with LLMs I'm sure I would not personally be able to do this work without LLMs. That said, I'm looking forward to a world where the staring at hexdumps and traces can be delegated to LLMs and talented humans can spend their time building as opposed to head banging.

ndiddy 18 minutes ago | parent [-]

Yeah I think it's a shame how much time and effort gets put into understanding things simply because other people want to keep them proprietary.

y1n0 an hour ago | parent | prev [-]

The problem I’m finding, at least with today’s models, is that it produces disposable software. It’s not good at making well-architected, durable software. Stuff that could be maintained and bug-fixed.

I mean you can get good stuff out of it if you know what you are doing and guide it, but if you just say “here’s a regression suite. Write an implementation that passes” you will get something that works for a while but ages quickly and will need to be thrown away.

teaearlgraycold an hour ago | parent [-]

With today’s technology I’d still want a GPU driver developer guiding the LLM rather than some rando who is out of their element. But cutting down the exploration cycle time and giving the developer massive parallelism (have 10x agents exploring different hypotheses or features) is the real win. We don’t need to skip all the way to slop just to squeak out a little more effort savings.

porphyra 2 hours ago | parent | prev | next [-]

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/

ADevWithAnIdea an hour ago | parent | next [-]

:) I think we have a surprise in store here. Asahi don't have a monopoly over Linux for Apple Silicon, and upstream Linux absolutely does *NOT* ban LLMs.

doctorpangloss 37 minutes ago | parent [-]

i install proprietary modules for nvidia all the time, i'm not going to care if i have to do it for something else that i own

zamadatix an hour ago | parent | prev | next [-]

Asahi's long term goal is to get everything possible merged into the (actually) upstream projects anyways so any distro can just work. It'd be nice to see that continue rather than have forks on forks for the sake of singular differences (and it looks like proper upstreaming is what they are going after per the Remaining Work section).

smith7018 2 hours ago | parent | prev [-]

I imagine either they or others can take their discoveries and write a real driver now, though. The hard part was always the reversing the black box system.

Agingcoder 2 hours ago | parent | prev | next [-]

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.

ADevWithAnIdea an hour ago | parent [-]

I still can't quite believe it either!

AKSF_Ackermann an hour ago | parent | prev | next [-]

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.

ADevWithAnIdea an hour ago | parent [-]

Great observation, two things:

- During my time at Apple I never saw any of the macOS source code, at all, even for userspace components. I had not even heard of things like SPTM.

- I have not worked there since June 2025

I don't believe that there's any risk due to my former Apple employment. As another example, WINE does not ban all former Microsoft employees, they just ban anyone who has ever looked at the Windows source code. If I felt there was even a chance that my employment at Apple may have exposed me to relevant internal secrets, I would refrain from contributing to community projects.

throw1234567891 10 minutes ago | parent [-]

Have you consulted this with a lawyer, or is it what you simply think/believe.

cromka 3 minutes ago | parent [-]

I guess it's none of our business.

SXX 34 minutes ago | parent | prev | next [-]

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.

ADevWithAnIdea 32 minutes ago | parent [-]

For the kernel driver it's literally just: run the hypervisor, wait for the kick, save the UAT state, replay the whole thing, make sure the output pages change, then just follow the pointer to initdata until you've built the whole tree from scratch. LLM handles the rest.

SXX 17 minutes ago | parent [-]

Thanks for the post and answering here, but for someone to follow in your steps there really need to be more information: how did you handle physical hardware? Did it got stuck / frozen / whatever? How did you managed reset / etc? What is your actual step-by-step process other then just telling codex / claude code "do X"? What else had to be solved along the way?

I just think one good part of Marcan's work is that they streamed a lot of their workflow with all kind of problems occured along the way and you could see how to solve them.

And please so not let anti-llm crowd discourage you. People like me who want to use good hardware and already choose to pay for Apple one just need drivers that work good and feature complete - code purity and "quality" is secondary.

GeekyBear 2 hours ago | parent | prev | next [-]

Figuring out how the hardware works and how to interface with it to submit work is a significant step all by itself.

carterschonwald an hour ago | parent | prev | next [-]

im pretty literate in intellectual property, but im pretty confused about the no looking at binary code artifacts bit.

ADevWithAnIdea 28 minutes ago | parent [-]

TL;DR:

1. We want to guarantee our work is not a "derivative work" of anything Apple wrote.

2. If we look at any Apple binaries, there's no way prove that our code didn't borrow from Apple.

3. Since we didn't look at any Apple binaries, then there's no way our work can be a derivative work-- we didn't even look at their stuff.

larpingscholar 12 minutes ago | parent [-]

Wouldn't using OpenAI break the cleanroom?

xyst 19 minutes ago | parent | prev | next [-]

So this is specific _only_ to M4 Mac Mini and Neo? Or will this work on any M4 SoC such as M4 Max?

sscarduzio an hour ago | parent | prev | next [-]

/goal have all this upstreamed to Linux

kmeisthax an hour ago | parent | prev | next [-]

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.

jamesgeck0 an hour ago | parent [-]

The previous “Part 1” post is very candid about the approach, and the titles of both posts mention prompting.

varispeed 2 hours ago | parent | prev [-]

> 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.

hypercube33 29 minutes ago | parent | next [-]

Claude models were blocked from logging into my own VM with my own credentials I gave it using ssh that I also gave it by its guard rails. I wouldn't doubt other models are nerfed but...you should provide some context around your comment

ADevWithAnIdea an hour ago | parent | prev | next [-]

Can't disagree more, but my experiences are my own.

recsv-heredoc 2 hours ago | parent | prev [-]

proof?

NamlchakKhandro an hour ago | parent [-]

See preview comment