Live data from Hacker News

Gnome Shell on the Apple M1, bare metal

twitter.com

81–90 of 141 posts

Re: Gnome Shell on the Apple M1, bare metal

#81
post #36

Earlier quoted context omitted.

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.

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)

Re: Gnome Shell on the Apple M1, bare metal

#82
post #49

Earlier quoted context omitted.

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-...

Re: Gnome Shell on the Apple M1, bare metal

#83
post #70
post #67

Earlier quoted context omitted.

"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…

> 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…

The real problem is with desktops, on laptops it's more standardized (most have Intel wireless).

Re: Gnome Shell on the Apple M1, bare metal

#84
post #24

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.

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 fi…

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" ;)

Re: Gnome Shell on the Apple M1, bare metal

#85
post #4

I’m extremely impressed with anyone’s ability to do this at any age, but if I remember correctly, she’s like 17-19 years old or something? Incredible! You go Alyssa!

From what I remember from that age, it was the sweet spot for having the intelligence, the enthusiasm and the time to just grab a problem and completely loose myself in it. I didn't care at what time I slept, there were no children requiring attention, my bachelors was pretty easy and didn't require much time investment. My parents were also pretty easy and let me be at my computer for very long times at very strange hours.

It was a nice time for me to learn Linux, compile kernels, install Gentoo. For me this was about 2004 btw.

Ok, this is pretty next level and way cooler than what I did, but my point is that people at this age are not to be underestimated, they are smart AND have resource ;) (Note that I'm also not claiming that this is what is happening here, but it could be).

Re: Gnome Shell on the Apple M1, bare metal

#86
post #74
post #28

Earlier quoted context omitted.

> the current defacto standard of a MacBook as the development laptop of choice the problem with that is that the macbook hardware sucks. a lot.

The trackpad is unparalleled. I'm assuming they have a patent on it, because the physical clicker trackpads in every other laptop feel awful.

It's good for a trackpad, but I personally really don't like it; it's too big and I'll take a Thinkpad with smaller trackpad, 3 physical buttons and a touchpoint any day.

Re: Gnome Shell on the Apple M1, bare metal

#87
post #77

Earlier quoted context omitted.

> 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 high…

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…

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.

Re: Gnome Shell on the Apple M1, bare metal

#88
post #36

Earlier quoted context omitted.

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.

Recent Ryzen chips perform better than M1 chips.

Define "perform". Power efficiency? Raw processing speed? Both?

Re: Gnome Shell on the Apple M1, bare metal

#90
post #77

Earlier quoted context omitted.

> 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 high…

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…

Apple is probably actively working against you if you want to get the fingerprint scanner and its ‘Secure Enclave’ to work.
Post reply on HN