Most active commenters
  • psanford(8)
  • imiric(6)
  • 2OEH8eoCRo0(4)
  • mfuzzey(3)

←back to thread

OpenGL 3.1 on Asahi Linux

(asahilinux.org)
512 points simjue | 32 comments | | HN request time: 1.095s | source | bottom
Show context
kytazo ◴[] No.36213178[source]
Its been more than a year I'm running asahi on my macbook air and I can't stress how grateful I feel for enjoying such wonderful freedom.

I don't feel like ever going back to x86 to be honest, at this point there is nothing lacking or unable to run and when the neural engine drivers come online now that the GPU is starting to mature people will be able to juice out every last bit of computation this machine is capable of.

For the record, I've switched to the edge branch a couple of months ago and honestly I noticed no actual difference in my day-to-day tasks which is really telling about how powerful even the M1 is when it can handle software rendering in such an effortless manner coupled with anything else running.

Really thank god for asahi being a thing.

replies(8): >>36213250 #>>36213626 #>>36213905 #>>36214314 #>>36214545 #>>36215750 #>>36217933 #>>36218411 #
imiric ◴[] No.36214314[source]
> at this point there is nothing lacking or unable to run

Sure there is. You just haven't run into it yourself.

Faster, cooler and more power efficient hardware is great. I just don't think that it makes up for depending on a small team of volunteers to resolve all hardware issues in an ecosystem hostile to OSS, which might break at any point Apple decides to do so.

And the incompatibilities with ARM are not negligible. If all your software runs on it, great. If not, good luck depending on yet another translation layer.

I'm sticking with my slow, hot and power-hungry x86 machines with worse build quality for the foreseeable future. The new AMD mobile chips are certainly in the ballpark of what Apple silicon can do, so I won't be missing much.

replies(7): >>36214444 #>>36214810 #>>36215384 #>>36215475 #>>36215725 #>>36220131 #>>36220674 #
1. psanford ◴[] No.36214810[source]
> depending on a small team of volunteers to resolve all hardware issues in an ecosystem hostile to OSS, which might break at any point Apple decides to do so

You are describing how most OSS software has been developed. I don't see how this is any different than early linux when no hardware manufacturers had any interest in supporting it.

A lot of the work that the asahi team is doing is just fixing Arm issues in the linux kernel (and sadly user space). That work will benefit everyone using Arm systems, not just folks running asahi on Apple hardware.

Its good for there to be more hardware architecture competition! I'm glad I can run my server workloads on the Arm servers in AWS that are 20% cheaper than the equivalent x86 machines. I'm glad that I can run the software I like (linux) on legitimately nice hardware (m2 air). You can make different decisions on what architectures are best suited for your needs, but the competition in the market improves the options and prices for everyone.

I've been using Asahi since the fall of 2022. When I first started using it a lot of software was broken because of bugs in that software that had never been exposed before (specifically around page sizes larger than 4k). All of that software has now been fixed. Support for linux/arm will only continue to improve as more people use it.

replies(3): >>36215428 #>>36217181 #>>36218562 #
2. 2OEH8eoCRo0 ◴[] No.36215428[source]
Point me to the Apple contributed drivers in the kernel please.
replies(2): >>36215554 #>>36216120 #
3. throwaway894345 ◴[] No.36215554[source]
The parent already addressed the point that you're trying to make when he said:

> I don't see how this is any different than early linux when no hardware manufacturers had any interest in supporting it.

replies(1): >>36215716 #
4. 2OEH8eoCRo0 ◴[] No.36215716{3}[source]
This is not early Linux anymore.
5. psanford ◴[] No.36216120[source]
Why does Apple need to contribute to this work to make it somehow legitimate or good? I own some nice hardware (an m2-air), I want to run Linux on it. Asahi allows me to do that! Why can we not celebrate that the asahi team is bringing oss to new hardware?
replies(1): >>36216924 #
6. 2OEH8eoCRo0 ◴[] No.36216924{3}[source]
They don't need to. I keep seeing that Apple does no less than other companies w/ regard to Linux. Well- where are their kernel contributions then? Lenovo and Dell (my two laptop manufacturers) contribute.

https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux...

replies(2): >>36217015 #>>36217710 #
7. psanford ◴[] No.36217015{4}[source]
> I keep seeing that Apple does no less than other companies w/ regard to Linux.

Where did I make that claim in this thread?

replies(1): >>36217515 #
8. imiric ◴[] No.36217181[source]
> I don't see how this is any different than early linux when no hardware manufacturers had any interest in supporting it.

It's very different. Hardware manufacturers in the 90s were incentivized to support Linux to expand their customer base. A trillion-dollar corporation has no incentive to sell their hardware to a niche of a niche of technical users who are not part of their software ecosystem.

Another major difference is that Asahi is a small team of dedicated volunteers who want to run Linux on their Macs. They're a niche intersection of Linux hackers and Apple fans. Unsupported hardware in the 90s typically had a much larger customer base and group of hackers willing to spend time adding supporting for it.

Even worse: Apple can decide at any point to make their hardware much more difficult to support. Newer models or firmware updates might break things. Being at the whims of a corporation that is the antithesis of F/LOSS to run Linux on their hardware doesn't inspire confidence.

> Its good for there to be more hardware architecture competition!

> Support for linux/arm will only continue to improve as more people use it.

Agreed. I'm glad that Asahi exists. But we've had ARM Linux distros for decades now. What Asahi is doing is specifically to support Apple hardware. Some improvements will trickle out to improve general ARM support, but this points out the gargantuan task they're actually up against. Not only do they need to reverse engineer the hardware, they have to resolve all software issues with Linux and ARM. My hat's off to them. The willpower, patience and skills required to wade through the absolute mountain of issues must be astronomical. Yet this is also part of my concern; how long can a developer keep the motivation and sanity to swim against the current?

It's great that Asahi works for you and everyone else. I'm just pointing out why it will likely never be my choice for any serious work.

replies(4): >>36217616 #>>36221161 #>>36223356 #>>36224575 #
9. 2OEH8eoCRo0 ◴[] No.36217515{5}[source]
> in an ecosystem hostile to OSS

> You are describing how most OSS software has been developed.

Nope. Disagree here

replies(1): >>36217904 #
10. psanford ◴[] No.36217616[source]
> Hardware manufacturers in the 90s were incentivized to support Linux to expand their customer base.

That is not an accurate description of linux support by hardware manufactures from that time period.

> Unsupported hardware in the 90s typically had a much larger customer base and group of hackers willing to spend time adding supporting for it.

I also don't think this is generally correct. Have you looked at all the random drivers in the linux kernel for niche hardware. A ton of that is from one or two hobbyists taking the time to add support.

> Apple can decide at any point to make their hardware much more difficult to support. Newer models or firmware updates might break things. Being at the whims of a corporation that is the antithesis of F/LOSS to run Linux on their hardware doesn't inspire confidence.

I guess, but so what? Apple can't break the hardware they are already shipping if you are just running linux on it. Its true, I might not buy a theoretical future laptop from Apple if I can't run linux on it, but I don't see how that would affect my purchasing decision for hardware that is currently available.

> The willpower, patience and skills required to wade through the absolute mountain of issues must be astronomical. Yet this is also part of my concern; how long can a developer keep the motivation and sanity to swim against the current?

Hmm, maybe you've not worked on projects like this, or are motivated by different things. To me, reverse engineering a thing to figure out how it works and then writing software to get it to do things the original designers hadn't planned for is one of the more satisfying and fun activities of being a software engineer. I suspect the asahi team is having fun doing a lot of this work. (That's not to say its all fun. It sounds like getting things upstreamed has been trying. I also think having to read giant comment threads where people are needlessly negative about their work might be a bit demoralizing.)

> It's great that Asahi works for you and everyone else. I'm just pointing out why it will likely never be my choice for any serious work.

You should obviously run whatever works for you.

replies(2): >>36217870 #>>36222815 #
11. imiric ◴[] No.36217710{4}[source]
They also don't need to contribute to the Linux kernel. Why would they? They don't support Linux on their hardware in any official capacity, otherwise projects like Asahi wouldn't need to exist.

And playing devil's advocate, Apple has open sourced their macOS and iOS kernels, and has some open source presence[1]. None of their contributions are crucial parts of their business, of course.

[1]: https://opensource.apple.com/

12. imiric ◴[] No.36217870{3}[source]
> Have you looked at all the random drivers in the linux kernel for niche hardware. A ton of that is from one or two hobbyists taking the time to add support.

Sure, for _niche_ hardware. When was the last time a GPU driver was added by reverse engineering it? The single Nouveau maintainer was burnt out, last I heard, and the project was never a serious alternative to NVIDIA's closed driver. Kudos to whoever found the energy to contribute to it, but these projects usually don't have a bright future.

Now expand that to include maintaining all Apple devices, and it's an insane amount of effort realistically unsustainable for any group of volunteers. But good luck to the Asahi team.

replies(4): >>36218036 #>>36218675 #>>36219052 #>>36222834 #
13. psanford ◴[] No.36217904{6}[source]
Cool, thats a different claim than what you said above but at least one I can actually engage with.

I've run linux on many Dell and Lenovo systems over the last 25 years. Most of those systems were fully unsupported by the manufactures for anything but windows. And yet, random people on the internet contributed to make that hardware (mostly) work. I've not seen any particular improvement in the driver situation since Dell started selling linux certified systems.

Its not really surprising though, Dell is just an integrator. All they do for their systems with linux pre-installed is to pick hardware that already has drivers. They took a little bit of work out of needing to research if a given configuration is likely to work or not with linux (which is good). They don't really deserve much credit beyond that.

Its also a little funny because most drivers from hardware manufacturers suck. I don't know why, but most hardware companies are terrible at writing software. Its easy to list off hardware companies that have a long history of shipping mediocre, buggy linux drivers: nvidia, amd, broadcom, realtek, (maybe i should just list every nic and wireless chipset manufacturer). Some of these companies have gotten better and have learned how to be good kernel contributors, but they were mostly bad for years and years. Thankfully in some of those cases random people on the internet reverse engineered the hardware and contributed from scratch drivers to the kernel. Most of the time I've been happier with the experience of running those from scratch drivers than what hardware manufactures ship.

replies(1): >>36218763 #
14. psanford ◴[] No.36218036{4}[source]
Nvidia/Nouveau is a good example. I've had a number of laptops with nvidia graphics. For most of that time Nouveau was _more stable_ than the official nvidia drivers. Linux clearly was a second class citizen for nvidia for most of the last 20 years. Maybe go back and rewatch linus' rant about nvidia if you need a reminder about how terrible they have been historically.

Nvidia now only sort of cares about linux because of gpgpu applications. They still clearly don't care about gaming on linux; or desktop stability.

Yes, I will take Nouveau over the official drivers whenever I can.

replies(2): >>36218228 #>>36223956 #
15. imiric ◴[] No.36218228{5}[source]
See, now I just think you're gaslighting me.

Nouveau has never been more stable, or nearly as performant as official NVIDIA drivers. I've had the exact opposite experience from you on every laptop I've had since Nouveau was released, so we must live in different universes.

> Linux clearly was a second class citizen for nvidia

And Linux is not even on the radar for Apple. :)

Anyway, I think we've exhausted our arguments here, and are just talking past each other now. Have a good day.

replies(3): >>36218319 #>>36219396 #>>36222511 #
16. psanford ◴[] No.36218319{6}[source]
If you've had good experiences with the nvidia drivers, thats great. My experiences with them have been bad and I will use Nouveau for general desktop environments unless I'm also doing gpgpu.
17. mfuzzey ◴[] No.36218562[source]
>A lot of the work that the asahi team is doing is just fixing Arm issues in the linux kernel (and sadly user space)

While I don't have Apple hardware so haven't been closely following Asahi I dont't think that is true. Linux has supported Arm for years (more like decades) now. They've been doing excellent work on support for Apple specific hardware sure, generic Arm not so much since it was mostly done.

replies(2): >>36218833 #>>36219079 #
18. mfuzzey ◴[] No.36218675{4}[source]
>When was the last time a GPU driver was added by reverse engineering it

Freedreno (for the Adreno family) Etnaviv (for the Vivante family) Panfrost / Bifrost (for Mali)

All these RE efforts built on each other, although the GPUs are different the tools built to do the RE were shared (and I think ashai is benefiting too).

AFAIK Google has now hired Rob Clark the Freedreno maintainer who started all this to work on Freedreno for Android / ChromeOS

Upstream Linux now has pretty good GPU support for all the major mobile GPUs these days. The hold out has been PowerVR but they are now working on an official (not reverse engineered) driver.

19. mfuzzey ◴[] No.36218763{7}[source]
Absolutely. A large part of the reason is that in the OSS world the architecture is optimised to make as much as possible common between drivers for different hardware.

For example for GPU drivers Mesa has tons of common code (NIR, GLSL parser etc) that is shared by all drivers with just the hardware specific parts being per driver whereas closed source vendor drivers reinvent the wheel each time.

Similarly for kernel wifi drivers there is a single MAC802.11 stack shared by all drivers.

Vendor drivers have an initial head start since those writing them have access to internal documents describing the hardware interface and don't have to do reverse engineering. But, over time, OSS drivers can be better as improvements to common code help all drivers.

In fact I think the best way hardware vendors could help OSS is not to provide drivers but documentation.

20. psanford ◴[] No.36218833[source]
Let me be more specific. There were a lot of bugs specifically related to non-4k page size architectures. Arm doesn't dictate the page size so most of the Arm systems out there have defaulted to 4k pages. The Asahi wiki has a partial list of userspace programs that were (or still are) buggy and broken because they made simplifying assumptions about how different architectures work[0].

Maintainers of other non-x86 architecture have said that this is improving things for them[1].

[0]: https://github.com/AsahiLinux/docs/wiki/Broken-Software [1]: https://www.talospace.com/2022/03/asahi-linux-gives-hope-for...

21. kelnos ◴[] No.36219052{4}[source]
> Nouveau maintainer was burnt out, last I heard, and the project was never a serious alternative to NVIDIA's closed driver

Simply not true. I recall in the mid '10s using it because the proprietary driver was crashy garbage. No, I didn't get the same performance possible with the proprietary driver, and I didn't have a bleeding-edge video card, but it was more than usable as a daily driver.

22. stirlo ◴[] No.36219079[source]
If you follow Hector Martin the lead Asahi dev he's encountered a number of bugs and race conditions in ARM linux systems which were never previously exposed because there weren't blazing fast ARM chips out there that could trigger them.
23. smoldesu ◴[] No.36219396{6}[source]
It's not gaslighting: https://nouveau.freedesktop.org/PowerManagement.html

Nouveau is an awesome project, but for later cards it's basically a dead project. You can get some features to work, but without proper power management there's no justifiable reason to daily-drive it. The proprietary driver is by no means perfect (particularly for Wayland) but it's the only real option if you own a modern card.

> And Linux is not even on the radar for Apple. :)

They must be awfully curious about why Xserve failed, then.

replies(1): >>36223536 #
24. philistine ◴[] No.36221161[source]
> Even worse: Apple can decide at any point to make their hardware much more difficult to support. Newer models or firmware updates might break things. Being at the whims of a corporation that is the antithesis of F/LOSS to run Linux on their hardware doesn't inspire confidence.

That is the case with every single PC maker who doesn't ship all their PCs with Linux.

I just don't understand why Apple has to be treated differently. They just went through a traumatic transition where they could have locked their computers very tightly, preventing you from booting anything but macOS. They did no such thing. They did the reverse. No they didn't formally support it, but they own their own OS. How could they be expected to?

25. chlorion ◴[] No.36222511{6}[source]
It depends on what device you have.

On some of the older devices, nouveau actually works very well right now. On these devices the open driver is as stable and performant as the closed driver and has all of the same features with the exception being GPU compute stuff.

I think mostly people misunderstand the limitations of the nouveau drivers and just assume they are bad in general, but it's very much dependent on the device.

One of the big issues right now is that nouveau can't bring the newer GPUs out of "idle mode". Nvidia has explicitly restricted this feature and the chances of the issue being resolved without cooperation from Nvidia is very low. I think a lot of people try nouveau on the effected GPUs and have horrible performance and then assume it's because nouveau is bad.

I have had an interesting experience with nouveau on the GT 710. For a little while there was a bug that would cause sway to crash back to tty, at first it would happen maybe once a day, then it became so bad that it would crash as soon as sway was launched. Now in kernel 6.3.3 it seems to be working flawlessly, which is how it was at some point in the past too.

Right now nouveau is working great for me though, so it is possible for nouveau to compete with the closed drivers in specific cases, but in general, for more modern GPUs it will have very low performance due to the reclocking thing.

26. matheusmoreira ◴[] No.36222815{3}[source]
> reverse engineering a thing to figure out how it works and then writing software to get it to do things the original designers hadn't planned for is one of the more satisfying and fun activities

I feel the same way. I made a small driver for my laptop's keyboard lights and it was one of the most fun projects I've ever made. I can't even imagine how satisfying it must have been for the Asahi developers to get OpenGL running on that hardware.

27. matheusmoreira ◴[] No.36222834{4}[source]
> the project was never a serious alternative to NVIDIA's closed driver

Because it can't properly clock the card since nvidia uses DRM to lock it out. Were it not for that, I'd be using nouveau every single day. In my experience it's more stable than the proprietary driver.

28. endorphine ◴[] No.36223356[source]
I think you're underestimating how easy it is for a corporation to change it's narrative from "we support Linux" to "we don't care about Linux".

Whatever hardware you're using, it's not like the company has signed a contract to support Linux for life.

29. lmm ◴[] No.36223536{7}[source]
Claiming that Nouveau is or ever was as stable as the proprietary nvidia drivers feels like gaslighting to me, and I think that's what GP was saying. Nouveau has always been flaky.
30. somat ◴[] No.36223956{5}[source]
In the same vein I used to consider intel drivers to be the most stable and best for desktop use. Now understand there are many caveats to this statement.

I use a lot of openbsd and you won't be running nvidea drivers on openbsd for love or money. there is nouveau and they are doing amazing work, however, they are also up against a petty, secretive company that appears to hate them. So nvidea is out.

Understandably openbsd gets zero support from the manufactures. So we need an opensource driver and some brave heroic soul to volunteer their time to get it running.

AMD drivers worked well enough and if you want decent 3d acceleration the only real choice. However they tended to crash and 3d acceleration is usually not a priority if using openbsd. Also starting with amdgpu the drivers got big, really big. The amdgpu driver nearly has more code then the rest of the openbsd kernel[1]. it is this big mess of generated code where each card uses a slightly different ISA. I understand why having a stable ISA is not a priority for AMD(it lets them change the card architecture easier) however sometimes i wish it were documented and pinned down. it would certainly make for a more stable driver that is easier to integrate.

And then there is intel, Note that I have not used intel graphics since 2016 so my experience is out of date. but once you got past the first generation of intel graphics the experience was rock solid, the drivers always worked well for me. if asked for the best openbsd experience I would recommend intel every time. However my last few machines have been amd and unfortunately there is no intel graphics add-in card(i looked). My last intel box I had an amd 3d card but I only used it under windows to play games. for work/openbsd I would just use the onboard intel graphics as they were more stable.

1. https://flak.tedunangst.com/post/watc

31. rsynnott ◴[] No.36224575[source]
This feels... fairly ahistorical.

> Hardware manufacturers in the 90s were incentivized to support Linux to expand their customer base.

Outside of some server niches (though even then, mostly not til the noughties), not really. You generally weren't looking at much first-party support at all in the 90s.

> Unsupported hardware in the 90s typically had a much larger customer base and group of hackers willing to spend time adding supporting for it.

This... is really not the case. The M1/2 Macs are _close_ to being one platform with something on the order of a hundred million units out there. Hardware in the 90s was pretty diverse; if you wanted support for your video card, say, there might be twenty chipsets out there, with maybe fifty manufacturers. Later on, there was a fair bit of consolidation, with virtually every computer, say, ending up with pretty much the same sound card chipset, but not in the 90s.

> Apple can decide at any point to make their hardware much more difficult to support. Newer models or firmware updates might break things.

Yeah, again, that _very_ much happened in the 90s.

replies(1): >>36249557 #
32. imiric ◴[] No.36249557{3}[source]
> You generally weren't looking at much first-party support at all in the 90s.

I wasn't making a historical claim, but a philosophical one. Hardware manufacturers in the 90s had that incentive, if they wanted to pursue it. To Apple, a trillion dollar corporation, selling a negligible amount of laptops to a niche crowd of tech enthusiasts who will never become part of their software ecosystem is just not worth the effort to even pursue.

> This... is really not the case. The M1/2 Macs are _close_ to being one platform with something on the order of a hundred million units out there.

Right. And how many of those buyers are also Linux hackers willing to dedicate their time to work on projects like Asahi? How many of those would even be willing to run Linux instead of macOS? We're talking about an extremely small community of users compared even to the small Linux community in the 90s.

> Yeah, again, that _very_ much happened in the 90s.

Never said it didn't. Except that Apple is known for locking down their products, so the good faith they're showing now with leaving Macs relatively open can disappear at any moment.