8 ms·
Building a Linux GPU Driver for the M4 Mac Mini in One Month
- SXX 18d agoDear 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.
- mitxela 18d agoAI reverse engineering can be an amazing jumping off point. It's not production ready and someone still has to go over it with a fine tooth comb before it can be called production ready. It is okay to publish things that aren't production ready and they are much better than nothing at all, and we shouldn't harshly criticise the best thing in a category unless we make something better. The difference between AI RE and non-AI RE, is being able to see AI_SubmitCommandQueue instead of FUN_92f475a1 when you are reading some other function, and knowing that function probably submits a command queue even if you haven't got to it yet. This makes it way easier to check the function you're currently in - for every function. There's still a good chance it's wrong, also. At some point you get to AI_SubmitCommandQueue and have to verify it does actually submit a command queue, then you can rename it to just SubmitCommandQueue. Or at least that's how I'd do it
- SXX 18d ago> It is okay to publish things that aren't production ready and they are much better than nothing at all, and we shouldn't harshly criticise the best thing in a category unless we make something better. So much of this. Production ready or not we should praise all people who made decision to try, put an effort and find a way to made any device more usable with Linux. This isnt just another vibe coded rewrite of XYZ library in rust or vibe coded javascript framework. We dont have a queue of people to work on open source GPU drivers or RE in general. Even if its mostly prompting and testing. I'm just a game developer and linux nerd and for me fact that something like this is now possible is ultimately best news ever. It means I now motivated to try it myself and work on devices I want. Most inspiring and amazing thing ever!
- gjsman-1000 18d ago> before it can be called production ready Define "production ready." Can any driver developed without official specifications, corporate approval, or long-term support plan, ever be properly considered production ready? At this scale, the only question is if it gets merged upstream. Outside of that it's a "nuh uh, you didn't design it my way."
- mitxela 17d agoYes of course it can. Unless you're corporate. This is open source though.
- throw10920 17d ago> Dear fellow humans from "Hacker News". Please don't lump HN users together to attack them. This is "sneering at the community", which is explicitly forbidden in the guidelines: > Please don't sneer, including at the rest of the community. If you have a specific comment to respond to, then respond to it.
- kova12 18d agoWhy this thread reads like it's from Reddit?
- sscarduzio 18d ago/goal have all this upstreamed to Linux
- varispeed 18d ago> 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.
- recsv-heredoc 18d agoproof?
- NamlchakKhandro 18d agoSee preview comment
- ADevWithAnIdea 18d agoCan't disagree more, but my experiences are my own.
- hypercube33 18d agoClaude 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
- Agingcoder 18d agoMaybe 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 18d agoI still can't quite believe it either!
- afr0ck 18d agoAnd this kiddo is probably barely 22yo
- porphyra 18d agoThis 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/ https://asahilinux.org/llm-policy/
- smith7018 18d agoI 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.
- ADevWithAnIdea 18d ago:) 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 18d agoi 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
- bpye 18d agoNvidia's kernel module is open source these days, it's the usermode stack that's still closed.
- yonatan8070 18d agoEven though the kernel module is open-source (sort of, development still happens behind closed doors), it's still an out-of-tree module, rather than being built into the kernel, which would give you as smooth an experience as with AMD or Intel, who's GPUs literally do just work on any distro with no fuss.
- ndiddy 18d agoIt'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.
- ivanjermakov 18d agoMight 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 18d agoTraditional 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 18d agoYeah 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.
- srmatto 18d agoAsking out of genuine curiosity... Do you think the Asahi maintainers could use your work to speed up future GPU driver development? M4, M5, M6 and so on... I am assuming they wouldn't just accept your work outright, but instead could they use it to substantially speed up their development process by mapping out a lot of the GPU after which they can focus on optimization and other aspect of drivers? Do you think they will? I don't use Asahi now but that's largely because my current Apple M series hardware is still supported. I see a day where an older unsupported Mac is running in a rack in my basement or being used by my kids as a general purpose computer.
- GeekyBear 18d agoFiguring out how the hardware works and how to interface with it to submit work is a significant step all by itself.
- AKSF_Ackermann 18d agoI 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 18d agoGreat 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 18d agoHave you consulted this with a lawyer, or is it what you simply think/believe.
- cromka 18d agoI guess it's none of our business.
- deleted 18d ago[deleted]
- thrwy19940314 18d agoAt least according to your own accounts on the Asahi IRC rooms, you were very aware of SPTM (which is part of the AS platform) and knew the people working on it: https://oftc.catirclogs.org/asahi-dev/2026-06-04#35383763 https://oftc.catirclogs.org/asahi-dev/2026-06-04#35383763
- 18d ago
- thrwy19940314 18d agoAll 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 https://codyho.dev/documents/cody_ho_resume.pdf [2]: https://www.theguardian.com/technology/2026/jul/10/apple-sues-openai-trade-secrets https://www.theguardian.com/technology/2026/jul/10/apple-sue...
- porphyra 18d agoVery sad. I really want to get Linux on newer Apple chips working flawlessly but I can understand the legal minefield about this particular work.
- kmeisthax 18d agoClean 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 18d agoThe previous “Part 1” post is very candid about the approach, and the titles of both posts mention prompting.
- outworlder 18d ago> when there's even a chance the models have been trained on the thing I ultimately plan to reimplement. Are you claiming models were trained on proprietary Apple code? How would that even be possible?
- viraptor 18d agoThe title is literally "I Came, I Prompted, I Left". I'm not sure how this can be clearer.
- nicman23 18d agoJarvis, please the gpu
- Orphis 18d agoThere's also a chance the people claiming to do clean room are cheating and took some shortcuts. It's easy to make random claims that are impossible to prove or disprove.
- carterschonwald 18d agoim pretty literate in intellectual property, but im pretty confused about the no looking at binary code artifacts bit.
- ADevWithAnIdea 18d agoTL;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 18d agoWouldn't using OpenAI break the cleanroom?
- compiler-guy 18d agoThat is the debate. And it is hotly contested. The legal framework around all this is way too immature to make a definitive statement one way or the other. Anyone who says otherwise is speculating. The only way to clarity will be legislation or court cases, because it really could go either way.
- tiahura 18d agoNot hotly contested by impartial legal types. There is a -6543.21% chance the Roberts’ Court does anything to hold ai back.
- josephg 18d agoWhy would it? Unless you think OpenAI is training on Apple’s proprietary code?
- Orphis 18d ago
- MoltenMonster 18d agohttps://www.reddit.com/r/AsahiLinux/comments/1whecn1/comment/pa1spia/ 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.
- SXX 18d agoI 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.
- Krssst 18d ago> crazy anti-LLM policies Weird how justified reasonable policies get the "crazy" label.
- SXX 18d agoAsahi state as one of its goals upstreaming Apple Silicon support into Linux Kernel and kernel does not have similar anti-llm policies. Imagine what happen if OP submit patches upstream skipping Asahi and they gonna be accepted.
- thrway69421 18d agoImagine how crazy it is to be throwing shade at someone for having ethics and holding themselves to a higher than required standard.
- happymellon 18d agoApple offer LLMs, so they are already on board with the LLM arguments. I have many frustrations with LLMs, mainly around the type of user whos brain shuts down, but Apple would be walking a very fine line if they offer a service that they also will sue you for using. Perhaps they should have used the Foundation Models to build their code. Really put Apple in a difficult position.
- SXX 18d agoTo 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 18d agoFor 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 18d agoThanks 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.
- ADevWithAnIdea 18d agoI detail most of the development process in part 1: https://codyho.dev/blog/hypervisor-macbook-neo/ https://codyho.dev/blog/hypervisor-macbook-neo/ tl;dr you reboot the device with `macvdmtool`, you install m1n1 as the boot object, you talk to the m1n1 proxy over a python shell. I'm documenting the process as I go also (see: the blog posts, also my github repos) both so others can do it and as record of the clean room nature, but this really is just GPT go brrrrr
- xyst 18d agoSo this is specific _only_ to M4 Mac Mini and Neo? Or will this work on any M4 SoC such as M4 Max?
- ADevWithAnIdea 18d agoRight now I'm focusing specifically on the M4 Mac Mini and Neo, I just don't own any M4 Pro or Max hardware. My guess is that most of the drivers will just work on the other platforms, but we'll have to test.
- ReshamJoshi 18d ago[dead]
- cromka 18d agoAuthor, do TouchID next.
- porjo 18d agoFyi,there's a comment on the Omarchy-M annoucement [0] referencing Touch ID > Dj is writing the GPU drivers, and got Touch ID working by talking directly to the Secure Enclave [0] https://omarchy.org/news/2026/09/introducing-omarchy-m/ https://omarchy.org/news/2026/09/introducing-omarchy-m/
- cromka 18d agoA brief look shows that these projects are LLM-backed. Will be interesting to see how this works for Omarchy in light of legality concerns expressed here in this thread. It's also interesting to see all this work seems adjacent to Asahi's own.
- rowanG077 18d agoAwesome 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.
- bigyabai 18d agoIf contributor policies are enough to make projects "dead in the water" for you, the rest of Linux' desktop efforts will leave you appalled.
- SXX 18d agoIt's okay to have policies against shitty code, blatant copyright violations or being an ass. It's not okay to ban tool use when a person is honest about it. The only thing you can achieve with a ban is that people will learn to lie about it and conceal it better.
- bigyabai 18d agoIt's not my policy, and I don't personally agree with many/most of them. But they do objectively exist in many desktop Linux projects. If you are the sort of person that sees software as "dead in the water" from AI prohibition, desktop Linux will feel like a mausoleum compared to macOS or Windows.
- rowanG077 18d agoContributor policies that ban LLM use wholesale. Not contributor policies in general. So many people are clinging to practices that are rapidly becoming antiquated. Even Linus had to put his foot down and had to stop the ideologues from attempting to stop AI use in the linux kernel.
- lostmsu 18d agoWhy?
- bigyabai 18d ago
- getcrunk 18d agoAll the controversy aside, someone can now white box reimplement this if they are concerned
- nicman23 18d agojust yeeting a qwen flash (iq3) with radare2 installed is so good to not slog through the regular loop of re
- shipp02 18d agoWhat 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
- z3ratul163071 18d agoamen to that. amdgpu is a shitshow for years. im sure the firmware plays its part in the shitshow, but amdgpu does as well.
- Azantys 18d agoAMD driver support is great due to community effort, even for 10+ year old cards. Nvidia also now has (partly?) open drivers.
- nnm 18d agoThis is a great use case of LLM.
- henrikklee 18d agoFantastic work. I've been following M4 Linux progress almost daily, waiting for when I can use it as a daily driver.
- laidoffamazon 18d agoThis 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.
- cromka 18d agoSounds like you’re right, just looking at the recent Omarchy announcements regarding heir work on Macs. It’s all LLM accelerated and they don’t seem to care.
- acd 18d agoI think to reduce ewaste part it should be mandatory with open firmware and open hardware specifications
- superdisk 18d agoDamn, 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!
- tiahura 18d agoShare your code please.
- superdisk 18d agoI'm currently traveling but I'll post it tomorrow. That said, you could recreate it yourself by just cloning the Asahi repos and asking Astra to make it work on the M3. I followed along with Alyssa Rosenzweig's original series of articles and tried to reproduce the milestones that she did in the same order to sanity check the work. The whole thing took about a week.
- tiahura 18d agoI’m going to try getting it going with codex and Claude code this evening. I’ve just found that having more cousin projects to be inspired by really helps llms. Plus, you never know what future project/agent may find a gem in your project to apply somewhere else.
- superdisk 15d agoJust posted code here: https://github.com/SuperDisk/asahi-plus-slop https://github.com/SuperDisk/asahi-plus-slop
- smith7018 18d agoThis article is about the M5 and the A18 Pro so your M3 contributions will be extremely useful!
- cyberclimb 18d agoWhat 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)?
- deleted 18d ago[deleted]
- deleted 18d ago[deleted]
- protoman3000 18d agoCan you next please bring Asahi to M4 in one month? I would greatly appreciate it!
- deleted 18d ago[deleted]
- prier 18d agoWhat did you use for making those rather sexy diagrams/figures?
- quentindanjou 18d agoI am also looking for what was used, I really like the design of these!
- ADevWithAnIdea 17d agohttps://news.ycombinator.com/item?id=49736144 https://news.ycombinator.com/item?id=49736144
- ADevWithAnIdea 17d agoClaude Design, the only Anthropic product I genuinely like. I spent a LOT of time on those, so I'm glad you enjoyed them! I'm about the least artistic person you ever met in your life (everything in my life is very functional and very unaesthetic) so I'm a rather big AI design tool enjoyer.
- erichocean 18d agoWould be fun to get this API working on it now: https://github.com/sebbbi/NoGraphicsAPI 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.)
- preisschild 18d agoWouldnt it make sense to just implement a Vulkan driver and then use Zinc on top of that for OpenGL?