Asahi Linux project shows progress in graphics drivers on Apple's M1
- Reference: 1652189470
- News link: https://www.theregister.co.uk/2022/05/10/apple_m1_mesa/
- Source link:
Alyssa Rosenzweig, who is leading development of the [1]Panfrost and Asahi Linux graphics drivers, showed off her continuing work in a succession of tweets involving [2]Glmark2 , an OpenGL ES 2.0 graphics performance benchmark tool for GNU/Linux, successfully rendering the bunny in 3D detail..
Woo, got it!!!
if you don't dance when you fix your bugs, I don't know what you're doing programming~ [3]pic.twitter.com/g6RLyytfuw — Alyssa Rosenzweig (@alyssarzg) [4]May 9, 2022
It's impressive considering the lack of official support from Apple. It's therefore up to Rosenzweig and the community to reverse-engineer the hardware with the goal of creating drivers.
Rosenzweig opened up to The Register about the challenges involved.
"The GPU driver development is in the 'reverse-engineering and experimentation' phase," she said. "For the time being, our primary goal is to understand the hardware so we can later build proper OpenGL, Vulkan, and OpenCL drivers.
[5]
"Reverse-engineering and driver development do feed into each other, so over the past year, I've been developing a simple OpenGL driver to validate hypotheses about the hardware. This initial driver supports functionality for basic graphics acceleration: desktops, web browsers, and simple 3D games.
[6]
[7]
"Supporting sophisticated workloads like AAA games requires significantly more time and effort."
An early Alpha of Asahi Linux arrived in March and [8]we were able to bring up a desktop on an M1 Mac with surprising ease.
[9]
The "customized remix of Arch Linux Arm" performed well, even on our relatively low-spec Mac Mini, but there were some notable omissions. Bluetooth didn't work, Wi-Fi was temperamental, and sound was highly intermittent.
However, despite the visuals, there was a lack of GPU acceleration.
[10]We take Asahi Linux alpha for a spin on an M1 Mac Mini
[11]Asahi Linux reaches 'very early Alpha'
[12]What does 2022 have in store for Asahi Linux on Apple chips? Drivers aplenty, but that GPU still needs tackling
[13]Progress report: Asahi Linux brings forth a usable basic desktop on Apple's M1
"Hardware graphics stacks divide neatly into a kernel driver and a userspace driver," explained Rosenzweig. "The (Linux or macOS) kernel driver provides a safe abstraction for the hardware to the untrusted userspace. The userspace (Mesa or Metal) implements a graphics API (OpenGL, Vulkan, or Metal), translating high-level API calls to low-level hardware packets submitted to the kernel.
"Userspace requires the bulk of the work, as modern graphics APIs are massive and require a hardware-specific shader compiler.
"For graphics acceleration on Linux, we need both AGX kernel and userspace drivers. I'm focusing on the userspace driver, testing my work against the macOS kernel pending Linux kernel support.
[14]
"Other Asahi Linux developers are working on the kernel in parallel."
There remains a while to go yet. "When our work converges," said Rosenzweig, "we'll get a working Linux graphics stack for the Apple M1."
If fixing bugs to get Glmark2 showing signs of life merits some dancing, that working graphics stack will require a full-on penguin party. ®
Get our [15]Tech Resources
[1] https://docs.mesa3d.org/drivers/panfrost.html
[2] https://github.com/glmark2/glmark2
[3] https://t.co/g6RLyytfuw
[4] https://twitter.com/alyssarzg/status/1523475500097699840?ref_src=twsrc%5Etfw
[5] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2YnqMJ3PiCzDSmOLbnOZsdQAAAJQ&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0
[6] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YnqMJ3PiCzDSmOLbnOZsdQAAAJQ&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[7] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33YnqMJ3PiCzDSmOLbnOZsdQAAAJQ&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[8] https://www.theregister.com/2022/03/22/asahi_hands_on/
[9] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YnqMJ3PiCzDSmOLbnOZsdQAAAJQ&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[10] https://www.theregister.com/2022/03/22/asahi_hands_on/
[11] https://www.theregister.com/2022/03/21/asahi_linux_alpha/
[12] https://www.theregister.com/2021/12/16/asahi_linux_2022/
[13] https://www.theregister.com/2021/10/06/asahi_linux_m1_progress_report/
[14] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/oses&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33YnqMJ3PiCzDSmOLbnOZsdQAAAJQ&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[15] https://whitepapers.theregister.com/
Worth the effort?
3D graphics ... in Linux .... on Apple's M1 ????
I don't want to poo-poo anybody's hard work but it really does seem a lot of effort for a relatively small user base with an even smaller use-case.
"Supporting sophisticated workloads like AAA games requires significantly more time and effort."
Again, games... on Linux.... on M1?? For what, all 3 people who'll actually bother.
"It's impressive considering the lack of official support from Apple."
Or more realistically... it's a waste of time. If there was a large user base demanding this, Apple would be finding a way to make it work. There isn't, and that's the real message here.
Re: Worth the effort?
That was said about Linux too a number of years ago, and perhaps there will be less landfill Apples if you can put a good Linux distro on them the way so many do with Windows hardware.
One can assume Apple doesn't have any greater desire to extend the life of the hardware.
If you're not dancing to Chas 'n' Dave's "Rabbit" to celebrate your 3D rabbit, I don't know what you're doing programming...
All credit to her and the people involved, this is brilliant!