Live data from Hacker News

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

codyho.dev

41–50 of 292 posts

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

#41
post #31

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.

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.

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.

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

#42
post #6

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.

[deleted]

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

#43

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/c…

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?

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.

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

#44

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.

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.

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

#45

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

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.

Wouldn't using OpenAI break the cleanroom?

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

#46
post #29

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/c…

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.

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

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

#47

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/c…

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.

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

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

#48

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.

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…

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

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

#49
post #5

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 hand…

[deleted]

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

#50

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.

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

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.

Post reply on HN