Live data from Hacker News

Native Linux GPU Driver for Apple M1

twitter.com

201–210 of 322 posts

Re: Native Linux GPU Driver for Apple M1

#201
post #39

"Please temper your expectations: even with hardware documentation, an optimized Vulkan driver stack (with enough features to layer OpenGL 4.6 with Zink) requires many years of full time work. At least for now, nobody is working on this driver full time3. Reverse-engineering slows the process considerably. We won’t be playing AAA games any time soon." From https://rosenzweig.io/blog/asahi-gpu-part-6.html

Totally non-sarcastic question: then why bother? It's an honest question. Even if someone (or a team) could somehow be paid for this work, by the time the results are usable, the hardware will be more or less functionally obsolete. And that is on top of the fact that ARM64 on MacOS will always be a small slice of the gaming pie, and ARM64 on Linux games and GPU applications virtually nonexistent.

Your desktop that you're using to post this is likely using GPU acceleration to composite your windows. Not having GPU acceleration for graphics is a killer with today's HiDPI displays. The CPU generally can't keep up, and even when it technically can it is extremely power inefficient.

Re: Native Linux GPU Driver for Apple M1

#202
post #3

This is one of the first Linux kernel driver writen in rust! Also all of this has progressed so fast thanks to Alyssa doing bunch of GPU reverse engineering on macOS and writing coresponding userspace MESA driver. https://rosenzweig.io/blog/asahi-gpu-part-6.html

Quoted post unavailable.

Most hardware needs reverse engineering to work - we only got the opensource AMD GPU driver relatively recently.

Kernel work is niche in general so really you could say the same thing about Linux itself - yet here we are, it likely works on many devices you use.

Re: Native Linux GPU Driver for Apple M1

#204

Earlier quoted context omitted.

Yeah, it's because of this statement from an extremely trustworthy source that I'm looking for context here. I suspect most of the big problems haven't been suddenly and magically overcome? E.g. how close are we, given this, to supporting an AAA game, let's say from a few years ago?

What AAA games run not only on Linux, but ARM Linux? This is more for going on YouTube with hardware acceleration than gaming, which is niche upon niche in its current state anyway.

You can always do this: https://wiki.debian.org/QemuUserEmulation to run amd64 binaries on an arm64 machine, or vice-versa. Docker desktop sets this up so you can pull amd64-only Docker containers on your M1 and not notice. I did some very minimal testing and it's not even insanely slow or anything (but obviously for many games, you can't leave this much performance on the table).

I do this on my workstation and can run anything, it's quite nice:

  $ lscpu | grep Architecture
  Architecture:                    x86_64
  $ GOARCH=arm64 go build main.go
  $ file ./main
  ./main: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, ...
  $ ./main
  Hello, world.

Re: Native Linux GPU Driver for Apple M1

#205
post #39

"Please temper your expectations: even with hardware documentation, an optimized Vulkan driver stack (with enough features to layer OpenGL 4.6 with Zink) requires many years of full time work. At least for now, nobody is working on this driver full time3. Reverse-engineering slows the process considerably. We won’t be playing AAA games any time soon." From https://rosenzweig.io/blog/asahi-gpu-part-6.html

Totally non-sarcastic question: then why bother? It's an honest question. Even if someone (or a team) could somehow be paid for this work, by the time the results are usable, the hardware will be more or less functionally obsolete. And that is on top of the fact that ARM64 on MacOS will always be a small slice of the gaming pie, and ARM64 on Linux games and GPU applications virtually nonexistent.

>Totally non-sarcastic question: then why bother?

Because most of us looking into Asahi don't care for playing AAA games with it. We want Linux on our Mac laptop, with hw acceleration for the desktop and apps.

Re: Native Linux GPU Driver for Apple M1

#206
post #147

Earlier quoted context omitted.

There's a much lower standard than "AAA gaming" which still delivers massive value to most users in running a desktop environment. Also, the Apple GPU has evolved from PowerVR roots dating back to the 1990s. It is fairly safe to assume that the next generation of Apple GPU will share enough with the current generation that in 3 years, supporting whatever new hardware exists will be incremental rather than transformat…

I don't really understand what's the difference between AAA game and Google Chrome? I thought that modern applications heavily use GPU acceleration. Is it some subset of GPU commands that's required for desktop, compared to AAA game? Is it possible that Google Chrome will crash the OS with some tricky CSS animation (may be in the future version)?

>I don't really understand what's the difference between AAA game and Google Chrome?

Hundreds of GPU features the latter doesn't use in normal hw-accelerated rendering of webpages... except maybe in doing WebGL content (and even less much fewer and older features than what AAA games want)

Re: Native Linux GPU Driver for Apple M1

#207
post #39

"Please temper your expectations: even with hardware documentation, an optimized Vulkan driver stack (with enough features to layer OpenGL 4.6 with Zink) requires many years of full time work. At least for now, nobody is working on this driver full time3. Reverse-engineering slows the process considerably. We won’t be playing AAA games any time soon." From https://rosenzweig.io/blog/asahi-gpu-part-6.html

Totally non-sarcastic question: then why bother? It's an honest question. Even if someone (or a team) could somehow be paid for this work, by the time the results are usable, the hardware will be more or less functionally obsolete. And that is on top of the fact that ARM64 on MacOS will always be a small slice of the gaming pie, and ARM64 on Linux games and GPU applications virtually nonexistent.

> why bother?

I wonder the same thing, but from an ideological perspective.

Why should the free software community promote Apple hardware by making it more accessible to OSS enthusiasts, when Apple only cares about OSS when it directly benefits them? Apple makes great hardware, but they're actively hostile to everything free software stands for. If Apple cared about this user base, they would work on this themselves.

That said, from a technical standpoint, this is nothing short of impressive, so kudos to the team. I can't even imagine the dedication and patience required to work on this project.

Re: Native Linux GPU Driver for Apple M1

#208

Earlier quoted context omitted.

Totally non-sarcastic question: then why bother? It's an honest question. Even if someone (or a team) could somehow be paid for this work, by the time the results are usable, the hardware will be more or less functionally obsolete. And that is on top of the fact that ARM64 on MacOS will always be a small slice of the gaming pie, and ARM64 on Linux games and GPU applications virtually nonexistent.

You can't tell people who are doing the work what to work on.. but considering there is a mountain of linux development for people with the expertise to be done for more open platforms. This work pretty much only helps one of the richest companies and Apple shows very little inclination to help by providing documentation or support (they let an alternative OS boot seems to be the extent of it).

Maybe it's the reverse engineering aspect that makes it interesting. Those of us in that line of work already spend our time at work turning docs into device drivers. It would be like working at Apple without getting paid.

Re: Native Linux GPU Driver for Apple M1

#209

Earlier quoted context omitted.

Totally non-sarcastic question: then why bother? It's an honest question. Even if someone (or a team) could somehow be paid for this work, by the time the results are usable, the hardware will be more or less functionally obsolete. And that is on top of the fact that ARM64 on MacOS will always be a small slice of the gaming pie, and ARM64 on Linux games and GPU applications virtually nonexistent.

The answer could be: because they like it. People do great stuff with computers and programming and I think this is a good example. Passion is what it's all about.

This is not about just doing it for passion or for hacking fun despite being worthless of something. There's a very pragmatic reason that makes it very useful!

The "why bother" is missing the crucial point, that the most important use of the GPU driver for Asahi would be HW accelerated desktop (and driving external monitors, etc) - it's not like a GPU driver for M1 is useless if no AAA games aren't supported...

Re: Native Linux GPU Driver for Apple M1

#210

How is a gpu driver ported? Isn't it proprietary? From a past article, reversing a printer protocol was derided for its complexity and there is a wire to snoop.

There's also a "wire" to snoop here. Marcan wrote m1n1 which allows you to run Mac virtualised and shows the hardware communication.
Post reply on HN