Most active commenters
  • psanford(4)
  • imiric(4)

←back to thread

OpenGL 3.1 on Asahi Linux

(asahilinux.org)
512 points simjue | 13 comments | | HN request time: 1.617s | 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 #
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 #
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 #
1. 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 #
2. imiric ◴[] No.36217870[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 #
3. psanford ◴[] No.36218036[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 #
4. imiric ◴[] No.36218228{3}[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 #
5. psanford ◴[] No.36218319{4}[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.
6. mfuzzey ◴[] No.36218675[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.

7. kelnos ◴[] No.36219052[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.

8. smoldesu ◴[] No.36219396{4}[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 #
9. chlorion ◴[] No.36222511{4}[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.

10. matheusmoreira ◴[] No.36222815[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.

11. matheusmoreira ◴[] No.36222834[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.

12. lmm ◴[] No.36223536{5}[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.
13. somat ◴[] No.36223956{3}[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