Asahi Linux project's OpenGL support on Apple Silicon officially surpasses Apple
arstechnica.com
arstechnica.com
https://news.ycombinator.com/item?id=39371669 (100+ comments)
Conformant OpenGL 4.6 on the M1 (rosenzweig.io)
The important part to note is that the M1 hardware doesn't map well to newer OpenGL standards because Apple deprecated OpenGL in 2018:
> Regrettably, the M1 doesn’t map well to any graphics standard newer than OpenGL ES 3.1. While Vulkan makes some of these features optional, the missing features are required to layer DirectX and OpenGL on top. No existing solution on M1 gets past the OpenGL 4.1 feature set.
> How do we break the 4.1 barrier? Without hardware support, new features need new tricks. Geometry shaders, tessellation, and transform feedback become compute shaders. Cull distance becomes a transformed interpolated value. Clip control becomes a vertex shader epilogue. The list goes on.
OpenGL has been officially deprecated since macOS Mojave (2018), so it shouldn't come as a surprise to anyone that in 2024 the hardware doesn't map well to newer OpenGL features. The media narrative is trying to push this as an "outdoing Apple at their own game" thing, but Apple very clearly stopped supporting OpenGL and did so with advance warning years ago.
That said, it's an impressive accomplishment that they managed to translate the newer calls into compute shaders and other tricks. It's very impressive work.
Of course they push metal but that's not interesting to desktop developers.
Big Linux at it again, eh?!
Conformant OpenGL 4.6 on the M1 - https://news.ycombinator.com/item?id=39371669 - Feb 2024 (103 comments)
https://asahilinux.org/2021/08/progress-report-august-2021/
> Since the hypervisor is built on m1n1, it works together with Python code running on a separate host machine. Effectively, the Python host can “puppeteer” the M1 and its guest OS remotely. The hypervisor itself is partially written in Python! This allows us to have a very fast test cycle, and we can even update parts of the hypervisor itself live during guest execution, without a reboot.
> We then started building a Python implementation of this RPC protocol and marshaling system. This implementation serves a triple purpose: it allows us to parse the DCP logs from the hypervisor to understand what macOS does, it allows us to build a prototype DCP driver entirely in Python, and it will in the future be used to automatically generate marshaling code for the Linux kernel DCP driver.
Code here: https://github.com/AsahiLinux/m1n1/blob/main/proxyclient/m1n...
If you watch any of Asahi Lina's streams from the time before they had their full drivers implemented in Rust, she's able to weave together complex bitflag-manipulating pipelines at the speed of thought with self-documenting code, all in Python running on the host machine, all while joking with viewers via her adorable avatar. I've never seen anything like it before. The whole workflow is a tremendous and unprecedented accomplishment by the entire Asahi team.
https://www.p99conf.io/session/sharpening-the-axe-the-primac...
Young Bryan is on a whole different level.
I wonder if one day the USB4 ports will be able to fully support USB3, so confusing.
Anyway I haven't felt the need to boot macos so far :) and the installation was a breeze, big thanks to the team.
As a bonus the unified memory allowed me to get an LLM running locally, but I suspect it is CPU bound and probably not using the new GPU driver.
The one I run into quite often is that Google Maps will hang for long periods of time. This is a known issue and they are working on it, so I'm sure it will be fixed sometime this year.
> For a bit of context -- Google Maps loads images to the GPU at.. inopportune times. While games would typically load their images during a load screen (so slow image loading just means longer loading screens), Google Maps loads when scrolling around I think (so slow image loading means the whole map stutters). I don't think there's a fundamental driver bug we can fix here, but we can make image loading a lot faster which makes the symptoms go away.
[0]: https://github.com/AsahiLinux/linux/issues/72#issuecomment-1...
but also a bunch of other things
like it uses mesa and similar parts of the normal GPU support stack
and also involved some kernel patches outside of the rust kernel module as far as I vaguely remember
really a grate achievement where in the end rust was like a tool to make certain parts easier but all the hard parts are in the end unrelated to rust (like reverse engineering, coming up with solutions for the many issues of mapping GPU APIs Apple doesn't care much about to hardware mainly focused on on just Metal etc.)
"Asahi's most recent update blog post, published in mid-January, highlighted HDMI support, support for DRM-protected websites via Google's proprietary Widevine package, Touchbar support for the handful of Apple Silicon Macs that use one, and more."
Seems odd to me that a Linux open source focused something would spend so much effort on supporting DRM over USB3 functionality. So for them to go that direction implies to me they have good reasons. Are they trying to satisfy users? My knee jerk reaction would be the users willing to use this would be accepting of not supporting DRM.
The skillsets and amount of work involved in getting Widevine working (quickly porting the binary from ARM64 ChromeOS) vs USB 3 (reverse engineer Apple's unique undocumented implementation and write a Linux kernel driver for it) are completely different.
It's open source, if someone volunteers a Widevine implementation for Asahi then the maintainers aren't going to say no.
Generally speaking Alyssa does GPU reverse engineering, Marcan does the other hardware reverse engineering, Asahi Lina writes the GPU driver and everyone else does various miscellaneous bits (like userspace binaries).
They're not all that different to be honest
Does anyone know whether these improvements will also help with gaming on macOS? I assume that Mac ships its own driver without these APIs, but e.g. will Proton for Mac or Whisky (Wine for Mac) be able to make use of them?
Apple is a hardware company primarily, so if someone buys their hardware because it will be compatible with an OS they may like more, that's still a sale for Apple. No funds are lost, because MacOS doesn't charge for a new install on Apple hardware.
Nobody is buying the iPad or iPhone because it has better specs. Most don't even know how much memory they have.
It's because of the OS, apps, ecosystem etc.
Even UNIX, CP/M and MSX vendors, only supported their own version of it, on their own hardware.
Are you referring to the San Bernadino shooter's iPhone?
Because Apple's attempt to introduce CSAM scanning is certainly not what I would call a stand against US law enforcement.
My pet theory is basically a rouge VP started the on device scanning project with whatever external org they worked with, and basically blindsided the rest of the company. Tim Cook probably called the person and was like what the fuck. Or at least I’d like to imagine that. I wonder if that VP still works at Apple?
Apple's solution for a lot of things in general, is to favour on-device solutions.
I can't think of anyone in my circles who would accept this. It's just so extremely out of bounds. And I lost a lot of respect for Apple as a result considering they thought it was ok to propose this.
And it would have been total theater anyway because obviously the real offenders would just use something else.
look at what apple did: they lined up E2EE, got the pushback from law enforcement, floated a solution that would have accomplished the stated goals, then effectively invoked the court of public opinion which said "hell no" and then just launched E2EE anyway.
Now we are in the end-state of successfully having E2EE without a bunch of backdoors, and the only real victim is apple's public reputation with a bunch of android nerds who were never going to like them anyway.
I don't agree. I have several Apple fan friends whose admiration for Apple really dropped. They're still on iOS and Mac because they're so invested (walled garden and all). But the enthusiasm and deep devotion is gone.
Not just because of that, though it was the first drop. But also the recent sideloading malicious compliance thing. That deep trust is gone.
I used to be an apple fan too but I already dropped off earlier (for want of deciding what I can run on my own hardware). So I'm definitely an android nerd. But this made waves even inside the Apple camp.
And on what authority can you make that claim? We assumed notifications weren't backdoored until, oops: https://arstechnica.com/tech-policy/2023/12/apple-admits-to-...
I do. Because they listened to the dissent and changed course. CSAM scanning offline on the phone is effectively dead.
And the recent hardware back door that existed for years:
https://news.ycombinator.com/item?id=38783112
https://arstechnica.com/security/2023/12/exploit-used-in-mas...
There probably are others.
Apple almost certainly has CSAM scanning and has had so for years.
They just wanted to move it to your device where it's private rather than doing so server side.
Instead, good faith between apple and third party developers is totally burned and not even Valve is writing games for mac anymore despite how absurdly performant these devices are, especially compared to ten years ago when mac gaming was supposed to get its renaissance per apples marketing and the good relationships they had with developers back then.
The hardware is amazing. The battery life is astounding.
The software, in almost every area, is inferior to my experience in Linux. The Apple parts generally worst of all (only Microsoft Office on it is worse). In the end, I'm probably 70% as efficient on macOS as I was on Linux after 3 years of using it.
The one thing macOS did better than my Linux box, hands-down, was supporting a 4k monitor. My Linux install was a little long in the tooth, though, so hopefully it's gotten better?
I really look forward to using Asahi when/if it's ready. I'd love to go back to Linux.
Example gripes:
- macOS offers this great feature that announces the time every half hour (or whatever you set it to). For a year, after a major OS update, it just didn't work after reboot unless you went in and changed it. Solutions? Wait for Apple to fix it (or write a wonky script to fix it on boot, which I did). Eventually they did, but ug.
- to support using 3 finger clicks as middle-click I had to buy software. On Windows this is just built in. On Linux it's on by default.
- to make Spotify work somewhat properly I had to download separate software (BeardSpice). After 3 years, I forget what that actually does
- if I open Spotify and hit the Play button on my keyboard, Apple Music opens. (Once I actually play Spotify it fixes it, though)
- it took me a LONG time to figure out how to set Excel to open CSVs instead of Apple's Numbers app
- The Apple calendar app alerts me whenever I create an event in another app (Outlook, Google, whatever). Like I got invited. To an event I created. It didn't used to do that...
My latest woe is getting newsboat to refresh my rss feeds either as a cronjob or launchd service. On my mojave machine this was as trivial as it sounds, either a single line in crontab or a single line with some window dressing to make it into a launchd plist file then its OK. I try and do this now and it doesn’t work, since it appears newsboat runs and pulls changes but is unable to actually write changes to the cache database now.
I have gone down the rabbit hole now of giving full disk access to the shell, cron, launchd, launchctl, and the newsboat binary, but no dice. I can’t get it to work and I can’t find anything about why this shouldn’t work other than permitting full disk access. Even then that shouldn’t be required because the cache.db file sits in the users home directory.
I deal with these things daily using a Thinkpad with a display that requires 1.5x scaling to be usable. Can’t wait for these issues to be solved and for the asterisks to disappear.
Yea, GTK4 to my knowledge until now doesn't support fractional scaling, but the new™ ngl and vulkan renderers should be able to do fractional scaling. If it's actually hooked up to do so is another question.
On Linux, I plugged in the 4k and everything is tiny tiny tiny. I tried to make it a little bigger, and some stuff grows, other stuff doesn't, and some stuff just broke. Then in the end I was sort of stuck in this weird frankenstein of settings that looked like crap on any monitor. Like I said, this was over 3 years ago and the Linux install was very old at that point (I think it was a Linux Mint based on 18.04 at the latest, possibly even 16.04 still).
Mac has a slider that changes the scaling of everything, smoothly and all at once.
I probably should have just gotten a bigger 4k
KDE will have working fractional scaling for the DE and apps using QT and there you can adjust a slider to a % you like.
Integer scaling is silly for me: it's either huge or tiny.
Yes, KDE does it better and with Wayland you can also do fractional scaling. But the original point stands: it sucks on (most) linux and works flawlessly on Mac.
Windows/Android also use the superior direct render approach. The reason you always heard about Windows having horrible scaling was due to legacy Windows apps not having an understanding of how to use scaling, the actual scaling approach itself is very good (and most all apps still getting updates should be good by now).
Not really, if you have a discerning eye.
Any non-integer resolution on macOS is rendered at twice that resolution, and then raster-scaled down and anti-aliased. So, if you have MacBook with a 2560×1400 display and you select any other resolution besides that and 1280×800 (exactly half), the desktop render will be raster scaled.
To be fair, it works better than Wayland's previous behaviour because of the 2× rendering factor, but you can absolutely still see scaling artifacts if you look for them, and I certainly do. Ringing around text in a dark-mode editor is especially obvious.
The only OS that has gotten HiDPI right is Windows.
By contrast I have never been able to use Linux successfully as a desktop OS because there is a dearth of polished commercial apps, and the HW compatibility has always been iffy. MacOS generally works out of the box with the HW, and the apps are generally highly polished.
I caveat the apps as “generally” because there are some turds for sure. iTunes and now Music have always been horrible, and somehow they managed to make Music even worse than iTunes.
Historically Macs do benefit from 3rd party software (see also Alfred), over time the best of it seems to eventually get baked into the OS. I don’t see that as a downside really.
I have found more recently that I can get something reasonable (for me) set up, although I'm confident I'll always need a Mac nearby to do some things on.
I didn't really run into this as an issue at all. Then again, "commercial apps" sounds largely like a relic of the 90's. It has Slack and Teams and Spotify and can run most games thanks to Valve.
Biggest thing I ran into was that MS Word is too buggy to 100% reliably read anything created in alternate programs. I know it's Word and not LibreOffice or anything because it happens between different versions of Word too.
In the olden days it was having a decent unix comand line environment. Windows didn't, osx and linux did, and many of us switched. For others it's a good Adobe suite experience. For others it will be Excel and Office etc.
I totally sympathise with parent and Apple Music starting up every damn time the play button is pressed without a media app already started. That's a button I used to press a lot, and at some point I stopped playing music on the mac altogether.
The move to kill kernel extension nullified a lot of the historical advantage of the mac: many stuff that was changing low level behavior became a lot more unreliable . Having keyboard remappings get stuck or unresponsive for instance is a huge QOL degradation.
I cannot imagine how this matches at all to anyone's workflow. Nobody at apple works on a single project across multiple applications (documentation in browswr, your IDE, an emulator, some terminals, etc.).?
You have to install a specific app and give it some crazy permissions to fix those issues. Pfft
> Solutions? Wait for Apple to fix it (or write a wonky script to fix it on boot, which I did). Eventually they did, but ug.
Writing a wonky script to fix something on boot sounds eerily like my Linux experiences.
> to support using 3 finger clicks as middle-click I had to buy software. On Windows this is just built in. On Linux it's on by default.
This could also be phrased as "in some ways macOS works differently to Windows and Linux. However, there is a solution for those who prefer the Linux way."
> to make Spotify work somewhat properly I had to download separate software...
That's Spotify, not macOS.
> if I open Spotify and hit the Play button on my keyboard, Apple Music opens
Yes, Apple Music opening for inexplicable reasons is very annoying.
> it took me a LONG time to figure out how to set Excel to open CSVs instead of Apple's Numbers app
That's just not understanding how macOS works. A 10-second web search would have ended your suffering.
> The Apple calendar app alerts me whenever I create an event in another app (Outlook, Google, whatever).
That doesn't sound entirely unreasonable to me.
No one will disagree.
OP would be a bit more specific, and say "worse."
Still, it's annoying when you search for how to do something in OS X and the first few threads are full of people saying "that isn't how it works! Instead of wanting to change it, you need to understand and follow the Apple Way™!" You're usually able to find the solution after a bit more searching, but the Apple Forums are especially bad.
Being mad at software for operating in a different paradigm than you are used to is not productive. This all applies just as much to users coming to macOS from Windows (or imitations thereof) to macOS as it does to users coming to git from svn.
> Being mad at software for operating in a different paradigm than you are used to is not productive. This all applies just as much to users coming to macOS from Windows (or imitations thereof) to macOS as it does to users coming to git from svn.
I guess I can see how you intended your comment to mean what you're saying, but reading these two comments in sequence I think one can understand my confusion. You may wish to directly say what you mean, rather than speak in glib generalities.
Thus, all progress is made by unreasonable men. (Paraphrased)
> Being mad at software for operating in a different paradigm than you are used to is not productive.
Indeed, it is often the ONLY thing that causes progress.
What most people on this thread are asking for is to be given the ability to mold/configure things that most other non-Apple apps provide. It's a well known trope to have the Apple culture say "You are wrong, do it this other way instead" rather than "here's how you get what you want".
Autosave also has versioning. You can always go back through the auto save history. You can also revert to the original opened file. This is done from the file menu.
Also, if like a good mac user you have Time Machine configured and on, you can browse your versions further into the past.
Heavy iWork user, I don’t know about Xcode though.
And I'll bet you you can't bind xkill to Ctrl-Alt-Esc, and your cursor turns into a little skull-and-crossbones, and whatever you click immediately vaporizes via a SIGKILL, on a Mac. :p
Anyway, keybindings are certainly changeable if you're ready to dive into a hundred distinct projects each defining their own key handling. There's no truly system wide way to alter system keybindings in any meaningful sense.
For example, I use Super for tiling window management, launching programs, and other things. On macOS, with Yabai and skhd, you can't use plain Cmd to do that.
Overloading Ctrl has downsides, but I think it is a net benefit overall.
Anyway, you can use cmd, you just need to have an actual command (non-modifier-key) to pass it—I have no use for a key that does one thing.
Currently I think KDE is the least-bad option, as common shortcuts can be remapped globally, but it could be a lot better — Qt can universally remap ‘Control’ shortcuts to the GUI key, but it's only available on Mac builds.
How would he even enforce this?
HN's mods then edited links to his domain so they would emit the referral header, and he responded by implementing a browser exploit to detect if certain HN URLs were in your browser history.
In any case, I apologize for using the wrong wording.
That's literally it.
There are multiple people I've seen express this in-desire towards HN
I am very much at a loss as well as this has never been my experience.
A lot of the arguments started with "when you enable showdead, there's lots of dead comments of people being vile".
Just not sure what to say.
Indeed, it does often boil down to dead comments being... not great, unsurprisingly.
Duh. Of course they won.
The original blog post has tinges of this framing, which just reads sort of like dunking/hostility to me (for the reason above). This Ars article, and others I’ve seen, just run with it and make it the centerpiece.
Apple isn’t trying. It’s not a race. So framing it like that is a disservice to the reader.
Just celebrate the accomplishment. Write about the fact the team is doing so great. You don’t need to shove it into some incorrect narrative.