Hacker news

  • Top
  • New
  • Past
  • Ask
  • Show
  • Jobs

Building a Linux GPU Driver for the M4 Mac Mini in One Month (https://codyho.dev)

417 points by ADevWithAnIdea 4 days ago | 289 comments | View on ycombinator

SXX 4 days ago |

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 4 days ago |

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 4 days ago |

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 4 days ago |

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 4 days ago |

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

SXX 4 days ago |

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.

Agingcoder 4 days ago |

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.

shipp02 4 days ago |

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

AKSF_Ackermann 4 days ago |

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.

laidoffamazon 4 days ago |

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.

sscarduzio 4 days ago |

/goal have all this upstreamed to Linux

erichocean 4 days ago |

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

superdisk 4 days ago |

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!

preisschild 4 days ago |

Wouldnt it make sense to just implement a Vulkan driver and then use Zinc on top of that for OpenGL?

acd 4 days ago |

I think to reduce ewaste part it should be mandatory with open firmware and open hardware specifications

cromka 4 days ago |

Author, do TouchID next.

xyst 4 days ago |

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

getcrunk 4 days ago |

All the controversy aside, someone can now white box reimplement this if they are concerned

prier 4 days ago |

What did you use for making those rather sexy diagrams/figures?

rowanG077 4 days ago |

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.

cyberclimb 4 days ago |

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)?

kova12 4 days ago |

Why this thread reads like it's from Reddit?

henrikklee 4 days ago |

Fantastic work. I've been following M4 Linux progress almost daily, waiting for when I can use it as a daily driver.

GeekyBear 4 days ago |

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

undefined 4 days ago |

undefined

nnm 4 days ago |

This is a great use case of LLM.

undefined 4 days ago |

undefined

nicman23 4 days ago |

just yeeting a qwen flash (iq3) with radare2 installed is so good to not slog through the regular loop of re

carterschonwald 4 days ago |

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

protoman3000 4 days ago |

Can you next please bring Asahi to M4 in one month? I would greatly appreciate it!

ReshamJoshi 4 days ago |

[dead]

varispeed 4 days 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.

kmeisthax 4 days ago |

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.