Live data from Hacker News

Asahi Linux project's OpenGL support on Apple Silicon officially surpasses Apple

arstechnica.com

11–20 of 172 posts

Re: Asahi Linux project's OpenGL support on Apple Silicon officially surpasses Apple

#11
One of the coolest things (IMO) about the entire Asahi effort, and why I'm not at all surprised that they surpassed Apple, was the dedicated effort to build bespoke developer-friendly Python tooling early in the reverse engineering process.

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.

Re: Asahi Linux project's OpenGL support on Apple Silicon officially surpasses Apple

#12
post #7

I switched to an M1 Air back at the beginning of 2021, was on Linux (desktop machine) about a decade before that. It's basically purely a work machine (software and management). 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…

The way these modern macs are set up in terms of permissions is really strange and has put some projects on a backburner for me.

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.

Re: Asahi Linux project's OpenGL support on Apple Silicon officially surpasses Apple

#14
post #11

One of the coolest things (IMO) about the entire Asahi effort, and why I'm not at all surprised that they surpassed Apple, was the dedicated effort to build bespoke developer-friendly Python tooling early in the reverse engineering process. 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. Effecti…

I really like this talk by Bryan Cantrill on tool making.

https://www.p99conf.io/session/sharpening-the-axe-the-primac...

Re: Asahi Linux project's OpenGL support on Apple Silicon officially surpasses Apple

#15
post #7

I switched to an M1 Air back at the beginning of 2021, was on Linux (desktop machine) about a decade before that. It's basically purely a work machine (software and management). 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…

By 4k monitor do you mean a high DPI monitor? Not much has changed in regards to resolution support, that should always have been fine, but a lot has changed in regards to high DPI support with Wayland now having "real" (direct) fractional scaling which makes it even better at approaching the problem than macOS which has "fake" (render and scale) fractional scaling. KDE Plasma and QT apps (the default desktop environment for Fedora Asahi) should support this already, I don't remember if Gnome has gotten around to defaulting to the newer protocol yet or if it was still experimental.

Re: Asahi Linux project's OpenGL support on Apple Silicon officially surpasses Apple

#16
The original article ( https://rosenzweig.io/blog/conformant-gl46-on-the-m1.html ) has more details.

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.

Re: Asahi Linux project's OpenGL support on Apple Silicon officially surpasses Apple

#18
post #2

Honestly, I have been a bit disappointed by Apple. On one hand, they make some seriously awesome hardware with amazing performance doing tasks like rendering and whatnot. On the other hand, they seem incapable of getting awesome performance in other areas, the hardware is incredibly locked away from the supposed owners of the devices, and the pricing for RAM and storage are insane. I don't want to dislike Apple becau…

> their stand against US law enforcement on things like encryption 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 understanding is that on-device scanning was meant to prevent an argument from {government, law enforcement, 'think of the children' types} against E2EE solutions.

Apple's solution for a lot of things in general, is to favour on-device solutions.

Re: Asahi Linux project's OpenGL support on Apple Silicon officially surpasses Apple

#19
post #2

Honestly, I have been a bit disappointed by Apple. On one hand, they make some seriously awesome hardware with amazing performance doing tasks like rendering and whatnot. On the other hand, they seem incapable of getting awesome performance in other areas, the hardware is incredibly locked away from the supposed owners of the devices, and the pricing for RAM and storage are insane. I don't want to dislike Apple becau…

It feels like the hardware engineers are just marching blind making stronger hardware for these computers by the year. Like the hardware feels like it has no constraints when you run a game. The emulation layers the game has to run through seem to limit the fps to 40, but interestingly there is zero performance impact to changing graphical settings all the way to ultra for many games that are able to run through rosetta. This shows there is a ton of headroom available if apple developers bothered making it easy for game developers to write natively for these computers.

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.

Post reply on HN