Live data from Hacker News

Linux Running on Apple M1

twitter.com

81–90 of 282 posts

Re: Linux Running on Apple M1

#81
post #57

Earlier quoted context omitted.

> What makes porting GPU drivers significantly more challenging than everything else? Multiple reasons: 1) GPU manufacturers are notorious for not publishing documentation out of IP/patent concerns. Worst offender is NVIDIA here. 2) For embedded GPUs there isn't much interest in open source drivers... the big customers (think Samsung and the likes) have direct support from the chip design vendor and get drop-in drive…

A lot of this comment I don't understand how it applies to the Apple M1. I'm not saying it doesn't. I'm completely ignorant of these things. Am I just missing it?

Apple's M1 chip has a custom GPU built into it. There is no documentation on how that GPU works and Apple hasn't released any.

Making any modern GPU work is a lot of work because of how complicated they are. That's even with the full documentation.

In the Apple M1 case, the GPU will have to be reverse engineered to understand how it works, then a driver will need to be written for Linux that supports it.

Re: Linux Running on Apple M1

#82
post #7

There's a bit of competition now going between asahi and corellium. While most of the spicy tweets have been removed, there's a summary https://twitter.com/AsahiLinux/status/1350547056679477250 Essentially, while this project may be quicker to get visible results, they may not be able to release all the code kosher for merging upstream. It will be interesting to see the next steps.

Competition is fine, but the "spiciness" was really just drama+pettiness on both sides :/ I'm hoping they're both past that now, as they should know better, but having two competing projects unable to assume good faith from each other is generally not healthy at all.

Haven't followed this at all so I have no idea how far I'm off, but I could easily imagine that the type of person who dives deep to take on the M1 Linux challenge is exactly the kind of person who could enjoy, after noticing another team taking on the same project, to celebrate each other by not only agreeing to disagree, but agreeing to disagree * with all the drama they can muster*. "Hey, you're cool, let's publicly sling mud at each other!"

I wouldn't dare considering it the most likely scenario, but it's surely the most lovely.

Re: Linux Running on Apple M1

#84
Linux might run, but good luck with the drivers. And good luck with it keeping working with future upgrades of both, hardware and software. Heck, even today it is pretty difficult to get things working reliably unless it is a thinkpad or some other Linux friendly brand.

A Mac with subpar support for a webcam, energy saving, suspend/resume, the trackpad, brightness/volume controls, etc is not a laptop, it's an expensive paperweight.

In my opinion, other than doing it for the sake of learning and the challenge of it, this will lead nowhere in the long term unless you get any kind of commitment or support from Apple. And I hope I'm wrong but that's very, very unlikely to happen any time soon.

Re: Linux Running on Apple M1

#85

Earlier quoted context omitted.

Does it actually require any serious development or it is just mostly tweaking and changing things here and there? I am sorry if that sounds ignorant, but I thought these are just low hanging fruits to harvest. Also why Apple wouldn't do that themselves? To me it is an opposite to "nerd marketing", a big middle finger to Linux users - essentially "you are on your own".

A middle finger from Apple would be locking the bootloader–keeping it open, plus providing minimal tooling and telling people to figure it out, is about as close to "we'd love to see what you'll do with it" as Apple could possibly give. (Dealing with the GPU is going to be the majority of the work, I'd think.)

While Correlium is a bit of a minefield for obvious reasons, I don't understand why Apple hasn't blessed Marcan's work. I wouldn't expect them to commit any development resources of their own, but I'd think it would be in their interest to (A) provide Marcan with some documentation and (B) make an engineer available to answer occasional questions.

Apple makes money selling hardware, and Linux support will sell more hardware. Perhaps not much more, but for a commensurately low amount of effort. What does Apple gain by forcing Marcan to reverse engineer everything?

Re: Linux Running on Apple M1

#86
post #41

Earlier quoted context omitted.

A good number of comments here mention dealing with the GPU is going to be a major hurdle. What makes porting GPU drivers significantly more challenging than everything else?

They're very complex, very stateful devices which also run their own compiled shader code. Not to mention auxiliary DSPs like video decoders (not sure if M1 has it as part of GPU or a separate block), power gating control and many many more. They may have in order of 100 registers to talk to them and they're horribly proprietary with pretty much no standardisation. Reverse engineering that is hellish at best - you ca…

The hurdle Noveau is facing is that some things, like reclocking, need firmware loaded onto the card. The firmware is not in non-volatile memory on the hardware, but a file shipped with drivers, the one shipped with proprietary drivers is not redistributable and if you wanted to make your own, it needs to be signed by Nvidia anyway.

That's pretty much game over for Noveau, and it is not due to difficulties in figuring out registers and NV ISA.

Re: Linux Running on Apple M1

#87

Love to see the competition between the projects trying to get linux running on the m1. Though I think they will hit a wall trying to enable GPU support. I think opening up just enough to enable this effort also serves as some good nerd marketing for Apple. This race keeps the m1 in the news regularly, giving hope to those who want a low-power and performant ARM machine that wouldn't otherwise consider an apple machi…

Does it actually require any serious development or it is just mostly tweaking and changing things here and there? I am sorry if that sounds ignorant, but I thought these are just low hanging fruits to harvest. Also why Apple wouldn't do that themselves? To me it is an opposite to "nerd marketing", a big middle finger to Linux users - essentially "you are on your own".

To be honest I’m amazed Apple even cares enough one way or another that they mentioned Linux virtualization in the M1 announcement. But it’s not a middle finger, this was more or less exactly how they handled multiboot on Intel: let the community figure out a solution, see if it gets uptake, support it with a first party solution if it does. That’s how we got Boot Camp, as there was a lot of interest in booting Windows at the time.

It’s a good sign that the latest betas (11.2 IIRC) officially support multiboot in the UI. That’s a good indication Apple sees the level of interest in Linux on M1 that they intend to at least let it happen.

I’d say it’s still up in the air whether they’ll go for full first party support with drivers or an open spec, but it’s definitely not out of the question. And they may even have direct interest in it, as I’m sure they’d like to get the benefits of their hardware in their data centers.

Re: Linux Running on Apple M1

#88
post #84

Linux might run, but good luck with the drivers. And good luck with it keeping working with future upgrades of both, hardware and software. Heck, even today it is pretty difficult to get things working reliably unless it is a thinkpad or some other Linux friendly brand. A Mac with subpar support for a webcam, energy saving, suspend/resume, the trackpad, brightness/volume controls, etc is not a laptop, it's an expensi…

I have confidence in the parallel efforts being spearheaded by Marcan. He knows what he's doing and he's working on it full time.

Re: Linux Running on Apple M1

#89
post #84

Linux might run, but good luck with the drivers. And good luck with it keeping working with future upgrades of both, hardware and software. Heck, even today it is pretty difficult to get things working reliably unless it is a thinkpad or some other Linux friendly brand. A Mac with subpar support for a webcam, energy saving, suspend/resume, the trackpad, brightness/volume controls, etc is not a laptop, it's an expensi…

Yeah, other than an experimental exercises I don't get why anyone would ever want to do this. You will spend WAY more money for the Apple hardware, you will struggle to get things to stay consistent. If your goal is to run linux then don't buy a Mac.

Re: Linux Running on Apple M1

#90
post #41

Earlier quoted context omitted.

They're very complex, very stateful devices which also run their own compiled shader code. Not to mention auxiliary DSPs like video decoders (not sure if M1 has it as part of GPU or a separate block), power gating control and many many more. They may have in order of 100 registers to talk to them and they're horribly proprietary with pretty much no standardisation. Reverse engineering that is hellish at best - you ca…

The hurdle Noveau is facing is that some things, like reclocking, need firmware loaded onto the card. The firmware is not in non-volatile memory on the hardware, but a file shipped with drivers, the one shipped with proprietary drivers is not redistributable and if you wanted to make your own, it needs to be signed by Nvidia anyway. That's pretty much game over for Noveau, and it is not due to difficulties in figurin…

The reclocking never really worked well on chips that were older than this signing requirement either.

But that's a bit besides the point :)

Post reply on HN