722 points · by frankjr · 3y ago · 273 comments
> Not only that, our driver passes 100% of the dEQP-GLES2 and dEQP-EGL conformance tests, which is better OpenGL conformance than macOS for that version. But we’re not stopping there of course, with full GLES 3.0 and 3.1 support well underway thanks to Alyssa’s tireless efforts!
That's very impressive work. Congrats to Asahi and Alyssa.
Not that they can't, it would be nice. When they capitulated and came out with the intel macs around 2007ish, it became sort of a golden era. You could run macos and windows on their machines, and the smart computer folks started getting and usefully using macs.
But now apple is years into a disappointing inward looking phase.
What a decent future would be like...
- vulcan/x
- take back xquartz into the fold
- actively pursue other linux graphics apis
- apple does virtualization
- maybe like rosetta but for all their software
- run macos9 in a window
- apple does containers
- what if there was something like docker for macos natively?
FROM macos:10.3
- apple actively supports open source projects
- open up ios
- let me see the filesystem
- let me run a firewall (true privacy?)
etc...But you lose the ability to talk about it.
Edit: The latest macOS has a great virtualization system built in, that many of the container platforms have already switched to.
* Please don’t take the exact number too seriously, as there are other differences too (Xonotic runs under Rosetta on macOS, but it was also rendering at a lower resolution there due to being a non-Retina app).
Nonsense.
They haven’t even implemented power management and it’s not even a fair comparison.
https://www.reddit.com/r/AsahiLinux/comments/11mjhx5/tips_fo...
Marcan (two weeks ago):
It's a known issue blocked on bureaucracy/politics with the kernel, so you just have to wait. Sorry.
ARM64 Linux does not want hardware-specific cpuidle drivers, instead relying on the PSCI firmware standard, but that standard is designed to rely on optional ARM features that Apple Silicon does not implement, so we can't implement it. Basically, PSCI assumes you have a "super-hypervisor" running the platform (TrustZone/EL3 on most Androids, but also somewhat similar to SMM mode on Intel), which is something Apple very deliberately stripped out of their CPUs very quickly because they don't need it and their security model relies on better solutions. Linux on AS truly runs on bare metal at the highest privilege, unlike the vast majority of other ARM64 platforms.
The current thinking is we need to make a new standard, either a new PSCI transport that does work on AS or something simpler/ad-hoc. We haven't had time to start that long conversation formally yet. I could write a hardware-specific cpuidle driver in a day, but of course they'd reject it upstream.
Doesn't seem like this is going to be fixed anytime soon. :(Do you realize that Vulkan as an idea (not even as a spec) appeared 1 year after Metal was shipped?
Do you realize that apart from Android there's no platform that truly supports Vulkan?
> That would solidify it as not only the best graphical workstation OS, but also the best gaming OS
Of course it wouldn't. Vulkan is on its way to become the next OpenGL
Is that surprising? Fewer pixels usually means faster rendering.
_Hence why she claims that it is in a similar performance range._
(instead of saying it's way fast, which is a result from taking sentences out of context and not fully reading the article)
What
I don’t see people making the same statements about work on the nouveau driver or on the Broadcom opensource wifi drivers. But somehow because the hardware was built by apple folks seem to think it’s more proprietary than anything else linux has run on.
A lot of peoples careers start this way. A lot of the hacking and the cracking scene was born this way. There is a certain kind of pleasure and satisfaction involved when you get a device that was previously not designed to do a certain thing behave in that way.
1. I try not to tell people what to do with their free time. While you may think it's "bizarre", this use of their time has value to them, not only in the hopeful end result (fully-functional Linux on ARM Macs), but also in the satisfaction of the technical challenge, bragging rights, and general reputation. I'm sure there are some people who might look at what you do with your spare time and think you're "wasting" it sometimes. But that's in the eye of the beholder, and at any rate, that's your prerogative, as this is theirs.
2. I used to run Linux on Mac laptops (gave up around 2016 or so, tried again in 2018, gave up again shortly after), and I get the appeal: the hardware is really nice. And by all accounts, the ARM Macs are even nicer than the Intel Macs. Sure, they're not perfect (lack of upgradeability/repairability, etc.), but running Linux on them can be great, if the hardware support is there. "I like this hardware and I want to run Linux on/with it, so I'll figure it out myself" seems like a perfectly reasonable thing to do. Many of the drivers in the Linux kernel for various bits of hardware only exist because someone adopted this attitude.
I also just think your premise is a bit flawed:
> open source developers go so far to contribute to a closed source proprietary ecosystem
This is a little bit of a weird statement, because these developers aren't doing that. The "closed source proprietary ecosystem" is macOS and its app store. The hardware itself is more or less just as open (or closed) as most non-Apple hardware. I mean, I can't rewrite the BIOS in my Framework Laptop, nor can I make heads or tails of any of the binary firmware blobs Linux loads into the WiFi chipset, graphics chipset, etc. Apple's hardware is undocumented, certainly, but that's pretty common when it comes to Linux hardware support.
> but they at times actually intentionally impede their work
Do they, though? From what I've read of the Asahi project's progress, they didn't run into cases where Apple intentionally tried to make things harder on them. Sure, some things were harder, but I don't think we can ascribe a malicious motive to Apple. The most likely explanation is that they just decided to design things in a particular way because they felt it would be best for their own purposes, and didn't really care to think about anything else.
They could have decided to actively cryptographically lock down the boot process to prohibit other OSes from running, but they didn't do that.
> That is a lot of time and effort of someone doing something for free that the manufacturer should be paying them to do and assist with.
Why "should" they? All hardware manufacturers decide what software to write, and what platforms to support. If they don't think the cost of writing and supporting drivers for Linux is worth what they'll get in return, they'll make the logical choice to just... not do that. We've seen plenty of vendors over the 30-odd-year lifetime of Linux do that math and decide Linux support wasn't worth it to them. It's a shame, but I don't think it's fair to come down on them hard for that. Certainly some vendors (nvidia comes to mind) have been actively hostile toward the Linux community at times, but I don't think we can say the same of Apple.
Off-topic: FreeBSD had an early version of Grand Central Dispatch ported to it, I wonder if Linux could benefit from that maybe with some io-uring goodness.
The sorry state of Apple's OpenGL drivers is a part of their strategy. They're choosing to not invest in OpenGL, and have even officially deprecated it. They want you to use Metal instead.
They literally just ported the whole platform to ARM which has had some great benefits for the whole OS + UX of using laptops.
If you're a layman it can be hard to find information on how graphics works that is technical enough (uses terms like "user space" and "kernel"), but simple and high-level enough for somebody who doesn't know much. There is stuff like that throughout the piece.
Here's the first example:
> In every modern OS, GPU drivers are split into two parts: a userspace part, and a kernel part. The kernel part is in charge of managing GPU resources and how they are shared between apps, and the userspace part is in charge of converting commands from a graphics API (such as OpenGL or Vulkan) into the hardware commands that the GPU needs to execute.
> Between those two parts, there is something called the Userspace API or “UAPI”. This is the interface that they use to communicate between them, and it is specific to each class of GPUs! Since the exact split between userspace and the kernel can vary depending on how each GPU is designed, and since different GPU designs require different bits of data and parameters to be passed between userspace and the kernel, each new GPU driver requires its own UAPI to go along with it.
Presumably there was an era of console games that did things this way, back before game consoles had OSes — but since that would be about 10–15 years ago now (the Gamecube + PS2 era) it'd be somewhat hard to judge from that what the perf margin for modern devices would be, since the modern rendering pipeline is so different than back then.
Presumably you're quite seasoned so I would assume you'd know: but Windows itself put a lot of its graphics rendering in kernel-space, they saw considerable performance gains from doing so but suffered 2 decades of severe bugs in rendering.
And yeah, if you imagine having to write a game as an OS kernel driver, then yeah, that's probably impractical. You don't want to have to program a game using kernel APIs.
But imagine instead, taking a regular OS with protected memory, and:
• Stripping out the kernel logic during context switches / interrupts, that de-elevates userland processes down to "ring 3" (or whatever the equivalent is on other ISAs.)
• Ensuring the kernel is mapped into every process's address space at a known position.
• Developing a libc where all the functions that make syscalls, have been replaced with raw calls to the mapped OS kernel functions that those syscalls would normally end up calling.
So you're still developing "userland" applications (i.e. there are still separate processes that each have their own virtual address space); but there's no syscall overhead. So a series of synchronous kernel syscalls to e.g. allocate O(N) tiny video-memory buffers, would be just as fast as (or faster than) what mechanisms like io_uring enable on Linux.
Probably not much. Applications already directly build data structures in userspace and hand them off to be rendered by the hardware; the kernel intervention is minimal, and AFAIK mostly concerns itself with memory allocation and queue management.
I'm excited for the day that I can easily install SteamOS (the modern one that runs on the Steamdeck) on an M2 Mac mini for an insanely powered "Steam console" for my living room TV.
I don't really get the V-Tuber thing (other than wanting to stay anonymous) but having code explained to me by an anime character is hilarious.
I honestly find it very hard to take someone seriously who chooses this kind of persona, even though it's hard to argue with their technical ability and results.
He's been clear that he's not Asahi Lina... and he's also not a GPU hacker as far as I know.
He/she is quite the creative person I must say.
Things are certainly looking better than they did a couple years ago, but getting ARM to run x86 code faster-than-native is an uphill battle. Maybe even an impossible one, but I've been surprised before (like with DXVK).
[0] Crysis on a Rockchip ARM SOC, for example: https://youtu.be/k6C5mZvanFU?t=1069
Not having any experience in that industry, I wonder what the driving forces of this are. I suspect it's some combination of incredibly brittle codebases that cease to build if glanced at the wrong way and aversion to spending anything on games post-release.
I'm pretty sure it's just vanilla ARM NEON so I don't think it will take any reverse engineering. The Apple Silicon GPU is custom, but the CPU is just minor extensions to (and compatible with) AArch64. Rumour has it that this is because AArch64 was designed by Apple and donated to ARM (who Apple has close relationship with being that they were a founding member).
Wow that's impressive!
The Asahi writeups are great, but certainly not all there is. Tons of reverse-engineering stuff and Linux documentation gets submit to this website, it just doesn't generally do as well in the ranking system.
[0] https://thisweek.gnome.org/
[0] https://pointieststick.com/category/this-week-in-kde/
Some people might not remember this, but hardware support for Linux was a real crapshoot back then, and it's only "mostly smooth" on PC today because we have a quarter century of work building out drivers and modules for the platform.
It's fun watching the breakneck pace at which they are going through the same processes with a brand new and proprietary consumer-oriented computing platform.
Also every blog they post are great read!
If that were remotely true TFA wouldn't be about reverse engineered GPU support on Apple Silicon. Nor would there really be a need for Asahi Linux to be developed in its own silo while it gets Apple Silicon support hammered out.
The Asahi Linux developers themselves have praised the openness of Apple Silicon, not because they have access to documentation or source code that we don't, but because it seems Apple has gone out of their way to make sure their platform can securely accommodate third party operating systems even though they have no incentive to. It's surprising in contrast to Microsoft, who has been slowly trying to make booting Linux on PCs that ship with Windows harder and harder.
I definitely think calling Apple Silicon an "open platform" is a bit of a stretch, but it's not the iron clad walled garden people think it is either.
They have ~16% of the global market. In no way do they have a dominant position.
And I do have a distaste for putting money in Apple's pockets for various personal reasons, from the huge pile of cache they're sitting on to the way they repeatedly updated my long-dead iPod's firmware just to break its compatibility with open-source tools for syncing music to it way back in the day to the upstream-hostile forming of WebKit from KHTML to their utterly cynical use of 'open-source' as a marketing ploy when they launched OS X. So if I do get an Apple Silicon Mac, it will have to be used even though I wouldn't otherwise want it to be.
Because most other hardware vendors suck, too, there are still things Apple could do, short of becoming some kind of open hardware company, that would make me reconsider that general sense of hostility I've gotten from them over the years, which I acknowledged in this other comment on this post: https://news.ycombinator.com/item?id=35233479
I just wish my interest in the Apple Silicon option could be wholehearted enthusiasm, instead of something complicated by my relationship to a company whose ethos screams that my values are unimportant on a bunch of different levels.
They have an ARM64 offering, but it's PlaySkool premium.
> Display Support
> Simultaneously supports full native resolution on the built-in display
> at 1 billion colors and:
>
> Up to two external displays with up to 6K resolution at 60Hz at over a
> billion colors (M1 Pro) or
> Up to three external displays with up to 6K resolution and one external
> display with up to 4K resolution at 60Hz at over a billion colors (M1 Max)
>
> Thunderbolt 4 digital video output
>
> Native DisplayPort output over USB‑C
> VGA, HDMI, DVI, and Thunderbolt 2 output supported using adapters (sold
> separately)
>
> HDMI digital video output
>
> Support for one display with up to 4K resolution at 60Hz
> DVI output using HDMI to DVI Adapter (sold separately)
https://support.apple.com/kb/SP854?viewlocale=en_US&locale=e...
Also, is anyone else afraid of the possibility of Apple deciding to screw us up by imposing restrictions to prevent people specifically from doing this for...reasons?
According to Marcan, Apple explicitly went out of their way to support secure booting of other OSs as well.
Also, it’s hard to predict, but I think it would only increase revenue if the small, but rich linux-using software community would choose MacBooks as “the next thinkpads”, and it’s not like most people would not just have both OSs available and switch between them.
On the other hand having kids is basically anathema to being able to live this life. So you are choosing work (in a broader sense of term than conventionally used) over family.
I can take you on a deep dive into every aspect of audio software. My kids and my wife did not obstruct that, and if anything, having responsibilities towards them forced me to be even better at the process that got me to where I am today.
Although it's unclear, perhaps you are talking about FOSS development (actually looking up Ardour from your profile, yes you definitely are). That's very impressive, then! So you did manage to juggle having a full-time job, FOSS development, and a family?
There are so few people with experiences like yours that it's sometimes hard to not let that get into my head.
So it's refreshing to see a different opinion.
Every time I see their progress in a such undocumented space, my jaw drops. Huge respect.
> If you want to support my work, you can donate to marcan’s Asahi Linux support fund on GitHub Sponsors or Patreon, which helps me out too! And if you’re looking forward to a Vulkan driver, check out Ella’s GitHub Sponsors page!
Lina also accepts donations on her streams. I think Alyssa is funded by her employer, but I'm not sure.
> No one talks about..
Yeah, nobody cares unless something new comes out.
Alyssa also works on the drivers for ARM Mali GPUs, which currently don't even support Vulkan 1.0.
This is actually what their plan is long term. That said in the short term it's way easier to implement opengl, it gives them a simple way to explore the hardware, and it also makes it so that real people will be able to run desktop linux on apple silicon macs way sooner.
> So what does this all mean for users of the Asahi Linux reference distro today? It means… things are way faster!
> Since the Mesa driver no longer serializes GPU and CPU work, performance has improved a ton. Now we can run Xonotic at over 800 FPS, which is faster than macOS on the same hardware (M2 MacBook Air) at around 600*! This proves that open source reverse engineered GPU drivers really have the power to beat Apple’s drivers in real-world scenarios!
If you're spending money on Mac I assume you want to buy in the whole MacOS environment, that's Apple value proposition in my eyes.
Is it the M1, it that fast and better than similar priced laptops running an x86-64? Or is it the novelty of using ARM-based stuff? Is the market for ARM-based laptops still Apple only?
Also is there relevant limitation on stuff you can't do on MacOS through homebrew or something and can on a Linux distro (not a mac user so I don't know).
Yes, I think the general opinion is that Apple's M1 and M2 platforms are superior to Intel, even at the Mac's (supposedly) higher price point.
Though MacOS is a complete Unix system, it is still proprietary, and there's nothing wrong with wanting to do your work (or play) on a free OS running on an excellent hardware platform. Asahi is giving people the opportunity to do that.
Finally, though I can't speak for the Asahi team, I think also there's an element of "because it's there". Here is a great new hardware platform offering a incredibly difficult challenge to a group of people who live for this kind of thing. Why would they not want to do it?
I would buy an iDevice if I could take it home, boot it up to make sure it works then install Fedora with everything working.
Even my current laptop failed that since I wanted to play with GPU programming and I had to hunt down drivers for the the AMD APU — which I never got working 100% correctly but that was probably my buggy code, GPU programming is hard.
I tend to run the same kinds of tools on both laptops (open source ones).
The Apple software experience matters less to me these days. I spend most of my time switching between the same applications that I would use on Linux and I mostly ignore all the iApps that come with macos. Beyond finder and preview, there aren't any Apple applications that I regularly use or need. Mostly I don't care about M1 vs. Intel. I'm not a native developer and all the stuff I care about is available for both cpu architectures. I just need the OS to get out of the way and allow me to do my thing. I used the linux laptop extensively for a while when I was without a Mac last year. Works great as a daily driver.
That's definitely part of it. You probably need to include battery life for it to really make sense. There's nothing else that will give you that performance and close to 20 hours of battery life in a slim laptop form factor.
There's also people who are mostly happy using macOS but may want to boot into Linux for specific tasks.
Also is there relevant limitation on stuff you can't do on MacOS through homebrew or something and can on a Linux distro (not a mac user so I don't know).
- $Dayjob bestows a Mac, MacOS is fine but seems to have stagnated due to focus on iOS- i3/Sway type window managers are more comfy
- Homebrew is hit or miss
- Apple seems to make the best bang-for-buck ARM laptops at the moment
- Asahi is a fine beer :)
The first is apple hardware is reliably nice. It's just done right, with minimal corners cut. Full aluminum body (not plastic), great screen (bright, high resolution, great color (accuracy and range), great keyboard, great touchpad, amazing CPU (fast and low power), very nice GPU (better than any other integrated GPU and much lower power than any faster discrete GPU), with a great memory system (100, 200, or 400GB/sec).
Sure the best laptops some close on some metrics, but generally have lousy iGPUs or lousy battery life. Laptop memory systems typically max out at 75GB/sec, which drives the need for discrete GPUs, which drives the need for larger batteries. Sadly FCC limits max batter size, so you end up with terrible battery life and performance if you aren't plugged in. Or they have are great, except for a poor screen. Or have a nice screen and a lousy keyboard or track pad.
I also find it interesting that if you try to buy a 3 or 5 year old laptop, but far the most expensive are apple laptops. Almost as if they are built better.
My second issue is I find OSX to be MUCH less intuitive. The lack of a real package manage for the OS is painful. Having to add my own, like brew is ugly. Then the UI inconsistencies drive me nuts. Even things like cut/paste (control-c/v) are annoying. Doubly so when using iterm2 where you don't need the control-c. Or if running xquartz I'd need a state diagram to map all the copy/paste rules.
Linux seems much more sane, granted I'm more familiar with it. I'm on a website and want to drag an image in, I just drag the image from any image viewer or file browser and it works. I can drop files into signal by dragging. Or documents into thunderbird as attachments. OSX seems much more finicky about dragging objects between applications, and I end up in the finder, which I find particularly counter intuitive. Oh, sure I could try to remember that bang, splat, apple A goes straight to apps. Seems that browsing from ~ should be WAY easier, or even better just have better drag/drop supports.
Linux just makes more sense to me. 99% of my installs are apt install <appname>, not playing the do I search for the web for a DMG, or try to find it in brew, crap that was a different user, or maybe I need a 3rd app store? Oh that works in a brew cask, but not a brew app, etc. etc. etc.
I also find apple's handling of multiple monitors quite annoying. I don't have anything fancy, just N desktop of 2 monitors each, with a quick keyboard combo to switch (control-alt right or control alt-left). I ask apple folks about their setup and they seem to always mention some weird paid app that worked with the N-1 version of the Apple OS, but the devel got bored and stopped updating.
If you just need Signal, Teams, chrome, Firefox, terminal, and like a nice coherent package manager, drag and drop (not select, control-c, select, control v) of strings, images, documents I'd recommend Linux. I find OSX frustrating to use.
At some point it would be good to break it and get rid of implicit sync in the Wayland use case. Keeping it forever is not worth it.
These are a couple of volunteers, working for free, and you're saying that it'd be better for them to volunteer their time for the benefit of a huge trillion dollar corporation and work on something that the aforementioned corporation explicitly does not want (but could very easily do itself).
Fully support bringing a well supported Linux distro to the hardware but MacOS is nothing like ChromeOS or some sort of thin client operating system.
All the icons are jumping around everywhere, everything is colourful, it's 2023 and you can't maximize a window or make it take up half the screen, etc.
I also hate the touch bar but I'd probably get used to that. I used a pre-touchbar Air for a few months and going back to windows felt amazing.
I am eagerly waiting for Asahi to be usable as a daily driver, my next laptop will probably run Apple silicon.
* no built-in package manager
* low hackability/customizability
* constant code signing prompts with 3rd party software, my OS is fighting me trying to use software
* constant prompts to please finally sign into icloud
* deprecated OpenGL
* general handholding in the OS getting in the way
How much of that work is being done in Electron?