Hacker News new | ask | show | jobs
by pkulak 1756 days ago
I’m so worried this project will get 95% of the way there, and then all the fun issues will run out and the M1 will be just another MacBook with WiFi, Bluetooth and sleep issues.

The obvious issue is to pay someone to do the work, and I am, but I still can’t shake the fear.

8 comments

I wonder why we even bother trying to support these hardware vendors sometimes. I have been trying really hard to simply not deal with them for my own sanity. Are we not simply letting the leash out further for what we will accept and buy? Are we truly that powerless against the market forces which drive HW/OS sales?
Currently probably because M1 is absurdly better than the competition. They will certainly draw users away from Linux unless either this porting effort gets done, or unless other ARM options that support Linux better become available.
> They will certainly draw users away from Linux

And the beauty of non commercial software is that we don't actually have to care about that. If people choose performance increase over freedom, you can't really chose for them.

Now I'm not saying that we should not port free software to the M1. I'm saying that the good reason to do so is because the people porting it want to have it there, rather than thinking in term of user retention.

> And the beauty of non commercial software is that we don't actually have to care about that.

If that's really true, then why are so many so intent on increasing Linux Desktop adoption? Popularity means more people working on it, more people making software for it, more hardware having drivers, etc.

The problem, as I see it, is that "free software" becomes unfree when you have to pay to port it.

Back in the glory of more universal general computers this was perhaps a lesser spoken requirement of the system.

Today, it's clear to me that we are slipping back into chaos.

EDIT: Seems like FSF's "freedom to run" might fit the definitional benchmark for me. I'm not really sure how people are going to react to that though ;)

Free Software is not about getting stuff for free and never was. Free refers to freedom/liberty.

> Free software is software that gives you the user the freedom to share, study and modify it. We call this free software because the user is free.

https://www.fsf.org/about/what-is-free-software

> "free software" becomes unfree when you have to pay

Not the same meaning of "free". But anyway, for now, you have to pay Apple prices to have a computer with an M1 chip on it. If the price is a string requirement, one probably won't buy Apple hardware and rather get something that less expensive and is already well supported by free software :).

To quote fsf,

> Free software means that the users have the freedom to run, edit, contribute to, and share the software. Thus, free software is a matter of liberty, not price.

The remarkable thing about Apple prices these days is just how affordable powerful M1 computers are. The entry-level Mac Mini costs $699 (https://www.apple.com/shop/buy-mac/mac-mini). In single-core CPU benchmarks the M1 chip has a Geekbench score of 1744 (https://browser.geekbench.com/v5/cpu/9460112), which is slightly higher than the Intel Core i9-11900F, which scored 1726 (https://browser.geekbench.com/processors/intel-core-i9-11900...) and has a recommended customer price of $422-$432 (https://ark.intel.com/content/www/us/en/ark/products/212254/...). (To be fair, in multi-core benchmarks the i9 outperforms the M1 by nearly 2000 GeekBench points, but the M1 is still comparable with good chips like the AMD Ryzen 9 5900HX) By the time you add a motherboard, RAM, storage, and graphics, a Core i9-11900F build would be more expensive than an entry-level Mac Mini. Also, the M1 chip has a TDP of just 15W, while the Core i9-11900F has a 65W TDP.

While it's unfortunate that Apple has kept many of the technical details of their M1 Macs secret, thus making it a gigantic effort to port Linux and other alternative operating systems to it, what has people so excited about the M1 is the performance-per-watt and performance-per-dollar ratios the chip provides.

> Not the same meaning of "free". But anyway

Would you care to enlighten me please? Otherwise your comment is of no value.

But the point is that Apple's software that runs on the M1 is absurdly better than the competition, especially on the M1, because both the macOS software and the M1 hardware were designed to work together hand-in-hand fast and efficiently.

So even if you could get all the hardware drivers working properly, Linux/Gnome still will lose out to macOS because that hardware simply wasn't designed for that software, and that software simply wasn't designed for that hardware, while macOS and M1 were both designed to work together.

But Gnome was originally designed to run on X-Windows, whose hardware model is a MicroVAX framebuffer on acid.

https://donhopkins.medium.com/the-x-windows-disaster-128d398...

The color situation is a total flying circus. The X approach to device independence is to treat everything like a MicroVAX framebuffer on acid. A truly portable X application is required to act like the persistent customer in Monty Python’s “Cheese Shop” sketch, or a grail seeker in “Monty Python and the Holy Grail.” Even the simplest applications must answer many difficult questions:

WHAT IS YOUR DISPLAY?

   display = XOpenDisplay("unix:0");
WHAT IS YOUR ROOT?

    root = RootWindow(display, DefaultScreen(display));
AND WHAT IS YOUR WINDOW?

    win = XCreateSimpleWindow(display, root, 0, 0, 256, 256, 1,
                              BlackPixel(
                                  display,
                                  DefaultScreen(display)),
                              WhitePixel(
                                  display,
                                  DefaultScreen(display)));
OH ALL RIGHT, YOU CAN GO ON.

    (the next client tries to connect to the server)
WHAT IS YOUR DISPLAY?

    display = XOpenDisplay("unix:0");
WHAT IS YOUR COLORMAP?

    cmap = DefaultColormap(display, DefaultScreen(display));
AND WHAT IS YOUR FAVORITE COLOR?

    favorite_color = 0; /* Black. */
    /* Whoops! No, I mean: */
    favorite_color = BlackPixel(display, DefaultScreen(display));
    /* AAAYYYYEEEEE!! */

    (client dumps core & falls into the chasm)
WHAT IS YOUR DISPLAY?

    display = XOpenDisplay("unix:0");
WHAT IS YOUR VISUAL?

    struct XVisualInfo vinfo;
    if (XMatchVisualInfo(display, DefaultScreen(display),
                         8, PseudoColor, &vinfo) != 0)
        visual = vinfo.visual;
AND WHAT IS THE NET SPEED VELOCITY OF AN XConfigureWindow REQUEST?

    /* Is that a SubstructureRedirectMask or a ResizeRedirectMask? */
WHAT??! HOW AM I SUPPOSED TO KNOW THAT? AAAAUUUGGGHHH!!!!

    (server dumps core & falls into the chasm)
The "it was all designed by Apple so can't be outperformed in parts" has got to be a trope at this point.

If that's the case why is Chrome able to put benchmark Safari on my M1?

Not to mention the OS shouldn't be the bottleneck for anything performance related in a desktop type system anyways.

Where did you get that quote? It's certainly not what I wrote, or meant.

And what is a "put benchmark"? Why would you only benchmark a web browser's HTTP "PUT" method?

The quote is to describe the aforementioned integration trope, not sure it has a succinct name beyond that hence the long description in quotes. It first got really popular when it was note one of the iPhone A* processors added JavaScript specific rounding to much "that's how safari can be so great on this device release, it integrates straight to the hardware" only to find out from a safari dev it hadn't even gained that yet. Yes end to end integration is a huge boon to a consistent user experience but it doesn't change efficiency nearly as !uch as some like to think, certainly not more than can be gained from normal optimizations still available and it's certainly not the ultimate goalpost even for consistent experience just a great aid.

Put = out, please forgive mbile keyboard while on a plane :). I do like the level of creativity for an http put benchmark though!

Because safari isn't purely optimized for speed. It's optimized for 'fast enough', but also low power usage. Chrome is _only_ optimized for speed (and thusly uses far more power), though it's my understanding that google is rethinking that balance somewhat.
Recent Ryzen chips perform better than M1 chips.
Not in most workloads, no. M1 is made on a better fab. Future chips might be better, provided the next process they use (rumors are, TSMC "6nm") is close enough to TSMC "5nm".
I'm curious, sources ?
Define "perform". Power efficiency? Raw processing speed? Both?
The M1 significantly outperforms Ryzen when measured by performance/watt and single-core performance
It's a strategic move from Apple to allow other OSses. They could've gone the iOS route, requiring jailbreaking.

They know very well how they became so big. It was in the early 2000's, because they had the support of many developers.

Yes and no. Specifically, Mac was lifesupport marketshare until Intel. Bootcamping or VMing Windows was a huge selling point at the time. (But maybe in the long-run, it turned out that UNIX was more valuable after all.)

With apple silcon, Apple is dropping what was a huge feature -- Windows. Ability to run Linux distros on Mac hardware is like rounding error hacker stuff.

Less than 5% of Mac users used bootcamp according to Apple.
Now, but I expect it was a lot more common in the early days of the Intel transition.
Or, or, or.. bear with me.. do we simply like what’s being offered and nothing about it turns us off to change our habits and try alternative products, all of which come with their own brand of bullshit anyway?
* turns us off enough
For some people it's a nice challenge to tackle.

Additionally, M1 is currently best? platform when comparing performance with power usage, and (at least MBA) comes in a great form factor. AFAIK there is no comparable device that has decent support for Linux.

Ryzen mobile is of course still faster in multi-core tasks, although with a higher power demand.
Actually not--a 5900HX is about 1400/7500 (ST/MT GB5)

An M1 is about 1700/7600.

So call that a tie for MT, and 20% faster in ST...with a chip using about a third the power.

No, M1 is clearly slower in multi-core (to be fair, it has fewer threads). Not sure where you got your numbers from. 5900HX gets about 7800 in Geekbench 5, and the difference is much larger in some other multi-core tests. For example Cinebench gives 7800 for M1, 13800 for 5900HX.

E.g. https://nanoreview.net/en/cpu-compare/apple-m1-vs-amd-ryzen-...

It says in your link there is a 3% difference in "Geekbench 5 (Multi-Core)" between the two? I would say that is practically equivalent, particularly since 5900HX comes in several TDPs. (It says "54 Watt" at your link.)

I took my data from perusing the Geekbench DB for the latest submissions...

> For some people it's a nice challenge to tackle.

So is killing a tiger, but you don't see any stripes on my wall.

Sure, getting Linux to run on hardware you purchased is equivalent to poaching. Very reasonable take.
I guess I took the OS X 10.4 joke a bit too far huh?
Well sticking the skin on your wall is just tacky. I normally just wait until people ask about the clawmarks and then feign reluctance as I explain.
Why all this anxiety over a proprietary general purpose computer?

> I’m so worried this project will get 95% of the way there, and then all the fun issues will run out and the M1 will be just another MacBook with WiFi, Bluetooth and sleep issues.

No one cared that the old G3/G4 Macbooks couldn't run "X" at the time they were released.

AMD is also working on an Arm with RDNA2. I'm more excited about that chip than the M1 as it will be inside of more machines than the M1, even if outperformed by the M1. The M1 is boring as it just comes glued inside of Apple hardware that I have no interest in.

> The obvious issue is to pay someone to do the work, and I am, but I still can’t shake the fear.

If you want the M1 opened because you already bought one hoping it would become open then you counted your chickens before they hatched. The anxiety is your own fault.

> AMD is also working on an Arm with RDNA2. I'm more excited about that chip than the M1 as it will be inside of more machines than the M1, even if outperformed by the M1. The M1 is boring as it just comes glued inside of Apple hardware that I have no interest in.

AMD GPU on ARM is also likely going to be a good but since that RDNA2 is going to paired up with a Samsung CPU it's not as compelling as Samsung CPU's are not close to the M1 CPU. So far the rumours suggest RDNA2 is coming to Samsung phones. I don't about you but that's hardly exciting. For me to interested about RDNA2 on ARM it needs to come on laptop with a great CPU as well.

> I’m so worried this project will get 95% of the way there, and then all the fun issues will run out and the M1 will be just another MacBook with WiFi, Bluetooth and sleep issues.

You are right to be worried. Getting all the nitty-gritty details about modern hardware without access to documentation is impossible. In the end this will somewhat work but will almost certainly have worse performance than MacOS with higher energy usage and be otherwise rough around the edges (like sleep problems, lack of support for fingerprint scanner and other issues typical to hardware that are not directly supported to run Linux by the vendor).

> The obvious issue is to pay someone to do the work, and I am, but I still can’t shake the fear.

I don't think just paying someone is going to help unless Apple provides documentation (which they won't do).

If they can reverse engineer a whole undocumented display controller and GPU, then a fingerprint scanner is easy. The barriers to these 'minor' things is motivated people to do it, not anything technical. This is something that can be helped with money.

Fundamentally like many engineering things, it's a Pareto principle thing. You can have a "basically working" device but it's a surprising amount of (potentially dull) work to get every last thing working properly.

That's why I started a Patreon for this, and set a minimum threshold below which the project would not start. I've been there and done "fun challenges only" ports (e.g. PS4 Linux) and I know things never get to the point where they need to be if people are only working on it for fun.

The Patreon turns this into a job, which means I have reason to keep chipping away at all those "minor" things. It also means everyone else working on the project can choose what they work on, and I pick up whatever is left that nobody wants to do.

> If they can reverse engineer a whole undocumented display controller and GPU

Who says they reverse engineered whole of it? Making it display images is easier compared to making it work fast, support video decode, power saving, etc. Nouveau has been around for long time and never transitioned from former to latter state.

> then a fingerprint scanner is easy.

Yes, but it is not the point I was making.

> The barriers to these 'minor' things is motivated people to do it, not anything technical. This is something that can be helped with money.

I've been working on Linux kernel for some time now and I stand by my opinion that the main barrier to do it is technical. You can disagree though.

Nouveau has a problem with nonredistributable firmware. We don't have that problem because Apple distributes their firmware themselves and it gets loaded before Linux boots. I already put together a prototype installer that deals with the whole firmware situation for users.

I've been porting Linux to undocumented platforms for 10 years and the main barrier to getting it polished is motivational, not technical. It's precisely the hard problems that motivate people.

Okay, Hector, so assuming your Patreon reaches 100% when can we expect to have Linux working on M1 with similar performance, battery life and hardware video decoding in mplayer and Firefox?
There's no way to make hard promises about reverse engineering projects, but if you want an educated guess: basic accelerated graphics by the end of this year, and polish to the level of proper sleep states/PM/video decode and such by the end of 2022.
Apple is probably actively working against you if you want to get the fingerprint scanner and its ‘Secure Enclave’ to work.
Linux can use the Secure Enclave just as well as macOS can. We fully intend to support Touch ID and things like offloading SSH key authentication to the Secure Enclave from Linux.

All this "Apple hates us and half the things are never going to work" FUD is getting really tiring. There isn't a single instance where Apple have put roadblocks in front of Linux support in the history of the Macintosh. All existing problems come down to lack of drivers or nonstandard design choices. Solving that is the entire goal of the project: developing support for the hardware.

"WiFi, Bluetooth and sleep issues."

This is true for almost any random laptop, and has been since forever.

Its obvious the M1 and its successors have a chance of becoming a well known constant since its a SoC, and not a collection of random components from many vendors (that might or might not have good inline-Linux driver). Intel Macs, other laptops have had different hardware components even for the same model over its lifetime.

> This is true for almost any random laptop, and has been since forever.

Not this old trope again.

I haven’t had WiFi and sleep issues with Linux for at least a decade (I don’t use Bluetooth on laptops so can’t comment there). And I do use random laptops, including MBPs.

People seem to hold on to the same old arguments about Linux that were true back when XP was released but things have unsurprisingly moved on since then.

Haven't had any Bluetooth issues in the better part of a decade on any laptop running Linux, and I've been using Bluetooth headphones as my main audio output for the majority of that time, so I'd think I would have.
Counterpoint: I have an old ThinkPad, known for good compatibility. WiFi and sleep work great. Bluetooth? Not so much. It works, but I get lots of random disconnections, after which I may or may not be able to reconnect.
The real problem is with desktops, on laptops it's more standardized (most have Intel wireless).
> This is true for almost any random laptop, and has been since forever.

For sone random hp or whatever crappy netbook maybe yes, but you can’t compare a MacBook to that. There are good laptops that don’t have those problems, I haven’t run into any issues with my Thinkpad.

> The obvious issue is to pay someone to do the work, and I am, but I still can’t shake the fear.

Sounds like you’re already onboard, so this comment isn’t for you. For those who don’t know, you can donate to this project directly. Please sign up if you want to see this project succeed. I’m not affiliated, just a fan of the work.

https://asahilinux.org/support/

Years ago I did a hackintosh just for fun but it was completely unusable. NIC issues and no way to use Ethernet. There were keyboard and mouse issues but they were easy to work around.
Sleep would definitely be a fun issue, without ACPI to just do it™ for you.

Wi-Fi, well, it's still Broadcom. It's gonna work as well as it does on Intel macs.

My suspicion is that you'd be lucky if there are only Wi-Fi, Bluetooth, and sleep issues.

Considering that the GPU is completely properietary, without specs, and only used in a couple models, it's highly unlikely you'll ever see any driver in a working state for it. I mean, etnaviv and the like do exist, but it's definitely NOT in the same state as say intel or amd.

And if there's any type of roadblock (say signed firmware like nvidia) then goodbye.

There aren't any roadblocks; we already have the signed firmware situation worked out, and Alyssa's Mesa driver is passing >90% of the GLES2 tests under macOS (Apple kernel, open userspace not using Metal). What's left is the kernel side driver.

Your "highly unlikely" is my "I'm aiming for an accelerated desktop by the end of the year" ;)

Sure, and you will succeed where countless others have miserably failed because ... ?

The PowerVR driver is the oldest of the bunch, has been a FSF priority project for like _a decade_ and has produced exactly 0 usable results (but a lot of prototypes!), and the hardware was of such popularity that it is the one used by Apple before they looted Imgtech. So why expect a usable driver when tens of people have failed on literally more popular hardware? What's different this time? The planets are better aligned?

For the people who expect to ever have a RE'd driver that is on the level of Intel or AMD's, just go and use any of the existing RE'd drivers on your favourite ARM platform, and check for yourself. Try Etnaviv on a Purism for a couple days. If you think the AMD drivers are crashy, or slow, or use a lot of power..

And ironically poster was complaining about potentially unstable Wi-Fi, which is several orders of magnitude easier to RE than a GPU.

I am really not sure what your problem is. You are bitter because, what, they're actually managing it this time? This entire project so far has been an absolutely incredible exercise in reverse engineering, with excellent results, from a whole range of people. It should be applauded.
Bitter? I am just warning that it's highly unlikely that they will be succesful, and that even the meaning of succesful does not mean exactly what the poster has in mind if he thinks "Wi-Fi, Bluetooth or sleep problems" are relevant. The problems that you are to expect are in an entirely different league, it will not be "yet another slightly non-functional x86 laptop" like the previous Macs. We are talking about a graphics card with fully RE drivers and if it is actually usable it would be a _FIRST_ in the community -- so yes, I'm skeptical. Even Larabel agrees with me:

> the elephant in the room will be the custom Apple graphics hardware and the significant resources there needed to bring up a new driver stack for Apple M1 without any support or documentation from Apple. The reverse-engineering is more complicated there than the likes of other ARM SoCs where at least there is generally closed-source Linux blobs to plug into and slowly replace. Even in those other ARM cases like with Panfrost, V3DV, Freedreno, and Etnaviv it's been a multi-year effort and that is with having a better starting point than Linux on the M1.

https://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-A...

And it is not like people weren't trying "hard enough" before.

You do realize the same person working on the Panfrost driver is working on Asahi, right?

We aren't a bunch of random people; we've been in this game for years. I think we have a better idea about the development effort required, likely timelines, and what project structure works than Larabel, who runs a blog.

As I said, we already have the userspace graphics stack passing a big chunk of basic test suites. We're already a good part of the way to getting this to work, in ~8 months including all of the hardware bring-up, not just GPU.

So they shouldn't try? What exactly is your point, other than being obtuse?