Hacker News new | past | comments | ask | show | jobs | submit login
Debian GNU/Linux running bare metal on the Apple M1 with a mainline kernel (twitter.com/alyssarzg)
327 points by nixcraft 58 days ago | hide | past | favorite | 94 comments

If you want to see Marcan's latest stream (just an hour ago): https://www.youtube.com/watch?v=3hPtyaUFfY8

And if you want to sponsor him: https://www.patreon.com/marcan/posts

You can also sponsor him on GitHub: https://github.com/sponsors/marcan

(Correct me if I'm wrong, but I think more of the money makes it to him through a GitHub sponsorship.)

It appears that GitHub Sponsors is still considered in beta (whatever that means) and is waiving the 10% fee.

An aside, this lady's accomplishments at her age make her someone I look up to, ngl

She (rightly) got the internship at the FSF the year I applied [1], so now I feel envious every time I read about something amazing she did.

[1] https://www.fsf.org/blogs/sysadmin/introducing-alyssa-rosenz...

Actually, that's not too surprising, given that a lot of technically minded folks start digging into their craft in their early teens. I think that it's only natural to get most of your accomplishments in at a relatively younger age, when your independence is at its peak. Like, say, once you become a husband and father, there's no time for anything any more.

Can confirm, as a father of two kids, I get no time or energy for projects. I used to get two 30 minute train journeys pre-covid. I'm not at all unhappy with this situation, but do still occasionally wish I had done more when I was younger.

Can confirm that with 3 kids under 3 I have ZERO time to do anything I would like to programing wise outside of work.

You’re holding it wrong.

Seek tech partnerships with others lacking such time constraints and optimize shared responsibilities with existing partners. YOLO Time waits for no man.

How do people react to information like this? Personally, it just makes me feel bad for myself, especially when I don't know the person in question. Most people usually react positively, but I am not sure if this is some kind of a "If you don't have anything good to say, don't say anything"-mentality, or if I am the bad one.

Feeling bad is not that unusual of a feeling here; achieving great things when you're young requires a combination of hard work, privilege, and supportive adults (parents/teachers/etc) and most people just didn't (or don't) have the same opportunities.

It's important to develop constructive (or at least non-destructive) habits to handle these feelings. I'd suggest "A Guide to the Good Life" by William Braxton Irvine as a resource. The right therapist can also help you "unpack" these feelings (although the different styles can be hit-or-miss for you, so shop around when you're on a "good" day).

I think that it's okay to set a personal goal for yourself that's different; the most you can ask of yourself is to try to contribute to society as best you can, whether that's "I'm working on the farm making food" or "I work at a big tech company and donate $5 to the campaign" or "I mentor startup founders".

I agree with your larger point, but I disagree with this bit:

> achieving great things when you're young requires a combination of hard work, privilege, and supportive adults (parents/teachers/etc) and most people just didn't (or don't) have the same opportunities.

I think that it's easy to externalize emotions about success in young people by projecting the help of an adult as the driving factor for that young person's success. Although this may be true in some cases, there are a large number of young motivated people who are just self-starters, with or without the resources of a backing adult.

I say this because, more than privilege or adult support, I think success at a young age boils down to hard work (as you've mentioned), having passion, and being prepared for luck, i.e. taking advantage of opportunities.

I think parents and teachers play a large role in the development of a person: this is obvious. What I'm not a fan of is when people lessen the success of a young person by shifting the accomplishment to be a simple cause of the environment in which they were raised, rather than the efforts and attitudes of the person who put the work in to accomplish what they did. Support ≠ doing it for them.

To summarize: I agree with your larger point (to not beat yourself up when seeing a great accomplishment at a young age) but disagree that success at a young age hinges on privilege and parents over luck and perseverance.

That is totally wrong. Young slackers without economic standing, waring parents that have no clue who has actual custody and guidance from only small minded individuals hiding from reality as “teachers” can, and frequently do, achieve great things. Those further Deep Thoughts about ‘unpacking feelings’ make me want to projectile vomit.

You and (other person) started your lives on different dates, in different places, in unique circumstances; you are statistically unlikely to end those lives at the same time and place. If the two of you appear to be following the same path for a portion of those lives just enjoy the company while it lasts. There is no single, universal measure of success, so the fact that one person's achievements exceed your own in one area is cause to celebrate that other person but not a reason to feel bad about yourself. Be better than you were yesterday, be kind to those around you. Your story (hopefully) has decades left to tell. It probably includes major characters that you haven't even met yet.

It makes me happy just seeing non-corporate kernel work. Signals [continuing] long term health of linux IMHO.

What do you mean? What I said is a compliment

I was generally speaking about praising someone's accomplishments because/despite of their age.

I get some praise for my FOSS work. Nobody mentions my gender or age ever, though. :) It would feel kinda weird I guess.

I mostly don't care about the praise, because it's not the motivating factor. I usually interpret it non-presonally as the other person being excited about similar things I am. (probably a projection, but whatever)

Also in > 80% of cases the communication goes 1) praise 2) I need this. :) So, being praised is associated with someone wanting something from me, by now.

The best praise is the one that comes with a donation. :)

Idk, maybe it depends on the person. I would take it positively, as its an accomplishment regardless of their age, but even more so given how young the person is.

I think that’s the point. It’s easy to feel useless when people younger than you have better accomplishments.

Well I certainly don't feel useless lol... People's lives have different paths, but regardless I admire when someone does something cool wrt tech

Why would you feel bad? There is nothing stopping you from working harder. There are still lots of hardware without open source drivers that needs reverse engineering.

Tech is skewed so strongly towards the young, that I thought your comment implied the author was old, not young.

A teen hacking together something awesome is commonplace. A 65 year old doing it is less so?

Even further aside, how are you deducing her age? Her photograph? I didn't see anything prominent about her age anywhere.

I tend to check out the personal websites of people with cool accomplishments

I don't even see an age there ... are you inferring it from her student status? Anyway, not that it's a big deal, I was just curious!

Her resume is up on her personal website.

Her résumé states she was a National Merit finalist in 2019, a scholarship competition for high school students.



Young hackers show us that becoming a hacker doesn't require that much time. A few years, perhaps. :)

My bet is that they started hacking (with help/guidance, most likely) since when they were able to read, which could have been as early as 3-4. So at this point they probably have 10+ years of experience and probably thousands of hours of practice.

Still amazing.

But coding is easy to get started with. Now, a 14 year old world renowned notary, that I will probably not see within my lifetime :-))

I don't really believe notary is harder or easier then programming. However there are very crucial reasons that you will never see a 14 year old world renowned notary.

1. It's a protected job in most countries 2. It's just boring for kids.

In addition with programming you can create and mod games which is how a lot of people start their first programming steps as a kid. Kids don't just start programming because they think hmm I want to program. No they want to do something and to do it they have program. There is 0 incentive for a kid to do notary work.

> harder

> 1. It's a protected job in most countries

Not all things which are difficult to do are difficult because laws of physics do not allow them ;-)

Huh? How are laws of physics even remotely related to a kid learning any adult profession?

I'll rephrase my previous comment: because being a notary is a protected profession in most country, it's hard (probably impossible) for a kid to become a successful notary.

Sometimes "hard" means "other people make it hard". It doesn't mean that it's hard in the sense that you have to discover new things or go to other worlds or be able to read binary code fluently while it's scrolling down the screen, Matrix-style :-)

Then I misunderstood your point. You are only impressed by something a child does if it's impossible?

> this lady's

Immediately knew where this was going.


Seems like you didn't get what I was on about. Very sad.

Thanks for pointing out to me that I did't get something/anything from the word you uttered.

Also thank you for pointing it out and not taking up the chance to start voluptuous chatter, now.

You must be a man of sparse words.

Get back to me when you've got it running on a dead badger:


/humor, in case you were wondering.

(More seriously: this is great stuff, but it's on a desktop Mac Mini; I suspect getting it running on an iPad Pro might be just slightly harder ...)

On the computers (i.e. mac mini, macbook, iMac) Apple ships an unlocked bootloader and we can just install our own bare metal code very early on using their official tools.

On the iPad Pro that bootloader is locked down and running Linux on there is unfortunately very unlikely to ever be possible.

It would be possible, though very difficult, to turn the OS into a staging bootloader, and load another OS bare-metal from there. Still insanely difficult though.

Usually, once you can run code in kernel mode it’s just a matter of bringing the hardware back to a sane state.

Unfortunately, “just” running code in kernel mode is incredibly hard on the iPad. There’s e.g. a hardware mitigation that turns a memory region to read-only and also only allows kernel code to run from this region. This mitigation is locked down and cannot be disabled once XNU is running on the iPad (http://siguza.github.io/KTRR/).

On top of that page tables are also protected by a “kernel within the kernel” (https://blog.svenpeter.dev/posts/m1_sprr_gxf)

Getting past all that is going to be very hard if not impossible.

I thought the first-generation iPad pro was checkra1n-compatible? Isn't checkm8 a bootloader exploit?

Yes the first gen iPad Pro can, and the second generation one too. The target user base for Linux on those might be too small though.

But all that's needed is a bootloader exploit...

Chkm8 was the first of its kind since the early days of iOS. It's not impossible but we'd have to get very lucky.

which is not impossible but very unlikely.

It’s fun to do an’ all, but the lack of drivers really made the experience half-baked for me when I realized I couldn’t use any of the badger’s limbs.

Thats great. The Mini leaning on the screen like that is only mildly triggering me.

When I started[0] at my current job there was a production service running on a mac mini that was dangling by its ethernet cable from the ceiling

[0] https://imgur.com/gallery/wHH3sow

I'd like to say I've never worked at/done those kind of things...I'd like to say it.

How is GPU support going?

„Current dEQP-GLES2 status: 93.8% passing.“ https://twitter.com/alyssarzg/status/1419064274350080003?s=2...

This is on macOS, using the macOS kernel driver with the mesa open source userspace (i.e. not Metal) that Alyssa is working on.

It means that right now there is no GPU support on Linux, but once the kernel driver (which is simpler than the userspace part) is written, things will go from nothing to likely able to run a full accelerated desktop in days, since the bulk of the userspace work will already be done.

I'm working on the display controller driver first (since it is arguably more complex in interface, but shares concepts, and is also a dependency for "real" GPU acceleration since you need things like vsync/page flipping to do it properly), and once that's able to at least do basic screen bring-up, I'll tackle the GPU side.

Surprisingly well, I think. I haven't heard any updates in a couple months (and I don't see it on her blog) but it sounded like Alyssa Rosenzweig had hammered out an early compiler and started working on a graphics driver itself.


At the launch there were various pronouncements that "it'll never happen, Apple will have locked it down so hard it'll never go anywhere" and the more optimistic "there should be a start in a couple years" and at this point I wouldn't be surprised if there was something alpha or pre-alpha grade that you can toy around with by the end of the year (my words not hers - I have no relation to any of the Asahi Linux efforts).

Not entirely sure myself, but with this I'm sure it'll be easier to reverse engineer and work on. I'm curious how the other periphrial support is still. Looks like some patches needed for at least usb, I winder what else.

That missing patch is the iommu driver which is currently under review and will hopefully make its way to mainline soon.

Once that one is merged there's already another series to enable PCIe (which needs the iommu driver) which gives us more USB ports, ethernet and with another small patch WiFi. There's also a WIP series for NVMe.

What's missing are then a few smaller things (i2c, spi, keyboard on the macbooks etc.).

And then there are a few bigger tasks left, e.g. thunderbolt support, usb super speed support, support for the secure enclave, and ofc the largest one being the display controller and the GPU.

And once that's all done there's the long tail of making this all work nicely (e.g. power management, making the installation as easy as possible, etc.)

And sadly that long tail of work will be completed just as the platform is becoming obsolete...

From what I've been told, full support as it's becoming obsolete is mostly the point. Running Linux on a highly closed and manufacturer hostile system will never be a good experience. Anyone who wants a Linux machine will buy a frame.work, system76, Lenovo or Dell, etc, not an apple. The point of linux support here is to give the device a longer life once apple drops support. In other words, when the hardware is no longer a sufficient apple machine and is more of a toy, at least it will be possible to put something else on it.

You've been told wrong; our goal is absolutely to catch up to Apple's hardware cadence and make Linux on Apple Silicon something people want to run as an alternative to macOS, well within the platform's support lifetime.

Interesting, thank you. How realistic do you think that goal is? (Honest question, nothing implied)

I think it's entirely doable, especially with the interest the platform has. There will always be things macOS does better, but there are also things Linux will do better.

Personally, I'll consider the project at success if we can match or exceed the features and stability of an average x86 laptop running Linux, with the performance and power efficiency advantages that Apple Silicon brings, which I think is totally possible.

Apple doesn't throw away their SoC design and start from scratch. Future iterations will share much of the same code. For example, the interrupt controller and the UART hardware haven't really changed since the first iPhones.

Free work for the richest company in the world so that their overpriced locked in unrepairable computers can run an open source OS and divert revenue from competitors that natively support linux.

I don't believe I've seen work that advocates against itself harder than this. Competitors that actually care about linux support should be the ones worked towards, and the ones that should receive your money.

That kinda was how GNU got started in the first place, though - bringing an open user-land to propiatary platforms?

If nothing else, the ability to run Linux on an m1 makes me feel more confident that the hw won't stop being useful when Apple ceases support, and moves on to m2 or whatever.

>If nothing else, the ability to run Linux on an m1 makes me feel more confident that the hw won't stop being useful when Apple ceases support, and moves on to m2 or whatever.

That's the problem, that diverts the market. M1 will never officially support linux, and it will never have drivers equivalent to OSX. Apple products are wasteful by design. That should dispel confidence, not increase it.

I tend to agree with you, but I also think it's important to remember that people are doing this free work entirely on their own. They want to do it for free. As much as I'd like to see the effort go toward a hardware OEM that deserves it, the labor/work doesn't exist and merely needs allocation. It exists specifically because people want to do it for Apple's hardware. The choice is likely between nothing or Apple, not between <OEM> or Apple. From a purely Linux perspective, this work helps make Linux even more of a force, so there's definitely reason to appreciate it :-)

Which one of those has the best hardware?

The Dell hardware has gotten amazing and for most users Linux will run great on it. Look for models that ship OEM with Ubuntu.

Lenovo ThinkPads are also fantastic, and very repairable. They're certainly not eye candy but Linux is a first class citizen.

I'm stoked about the frame.work laptop also. Haven't gotten one yet, but I will.

The reality is that the M1 beats pretty much all Intel-based laptops when it comes to getting the sweet spot on performance, battery life and silent operation.

Yes it's costly, restrictive, the hardware still has some flaws and you can't replace parts but most Apple users, myself included, are happily paying the price.

I have an M1 Macbook Pro for a few months now and it's blazingly fast, the battery lasts for 15-20 hours and I've only heard the fan for a few minutes so far while stressing it with heavy compilation. Under normal circumstances it's entirely silent. I wouldn't trade it for anything else at this point.

You're not "happily paying the price". That assumes you've had to go through the genious bar destroying your monitor, or losing all your data, or having to buy a whole new macbook because a $1 component died and Apple prevents it from being replaced.

Again, it's just advocating against yourself. Nobody cares until it happens to them, and then they wonder how things have gotten this bad.

It's unfortunate Dell laptops are limited by Software. Their hardware is pretty good otherwise. And linux runs flawlessly for the most part.

You must be fun at parties

Any expectations that Debian GNU/Linux would be faster on this device than Apple’s own optimized OS should be tempered with a dose of reality; that said, there must be a headless arm64/M1-optimized Darwin variant in-house that it would be curious to benchmark against.

Not that software performance on M1 devices is much of a concern (poorly optimized apps tend to run amazingly well thanks to brute force speed) but if Chrome can benchmark better than Safari on it why couldn't other software?

You're right, but sometimes speed is not the top priority. I have a 1Ghz single core ARM-based Guruplug with 512MB of RAM - slow, but I would run certain tasks on it because I can control and verify the code path from the bootloader all the way to userspace.

Is it fast?

It's native Linux, wadaya think?

I ran Linux on an old PowerBook back when it wasn’t so old, it was slow as a dog.

“Native Linux” half implemented, makes no statements on speed.

Interesting.. Now FreeBSD :)


I don't think this is fair to MacOS. Millions of people are very happy with how it works in its highly integrated but restricted fashion. While it's not the choice for you and I, I think credit where credit is due is important here.

Other than being proprietary, macOS is definitely much better than Windows. The problem is that macOS requires Apple hardware, which has been dog shit for years now.

Apple has the highest user satisfaction with hardware of any mainstream manufacturer.

I’m curious who you think does better than they do.

> Apple has the highest user satisfaction with hardware of any mainstream manufacturer.

This is from people who chose to buy Apple hardware. If you buy a Macbook with AppleCare and then sell it again by the time it expires, it doesn't bother you that it can't be repaired because you never own it out of warranty. That only works if you can afford a new Macbook every three years, but that's what Apple customers do. So then you get "hardware satisfaction ratings" that don't reflect the quality of the hardware.

For example, for decades Apple has been sacrificing reliability for silence. In most PCs, if the temperature starts getting up there, it will spin up the fans. Apple characteristically doesn't do this until the temperature is at the limit of what the hardware is rated for. So the machine stays quiet, but operating at the upper limit on temperature for years negatively affects reliability. Pull the hard drive from a ten year old iMac and dump the SMART data from it. Chances are it says the drive has exceeded the drive manufacturer's temperature limits and correspondingly has non-zero reallocated sectors, if it hasn't already failed and been replaced.

Also, you ask people how satisfied they are with their "hardware" and the fact that it runs a Unix instead of Windows is going to bleed into the answers.

> I’m curious who you think does better than they do.

So this is the other factor in this. If you go to Dell or Lenovo, they have low end models, and the low end models are lower quality, and they're also more popular (because they're cheaper). Apple doesn't have low end models. If you then do a survey by manufacturer, you're comparing high end hardware to low end hardware. It's the same reason Alienware does better than Dell even though they're the same company.

For work I have had the most expensive Dell and Lenovo laptop models. Although cool, the build quality nowhere approached my $1k MacBook Air. Not. Even. Close.

These were $5k+ machines.

These are not alike things.

Apple presents themselves as a luxury brand. Self-satisfaction from your purchase is part of the experience. If you own a Ferrari you own a fucking Ferrari!

Other computer hardware manufacturers are selling you business or entertainment machines.

I don't buy this at all.

Other than the keyboard, Apple's screens and trackpad are amazing. Also, when in warranty, their support is genuinely great.

It's legitimate to protest against injustices and menaces to human rights even when millions of people accept those injustices and don't recognize those menaces. You're reframing the issue as a personal choice, but to a large extent it is not.

Sure, that is a legitimate protest, but the statement that was made was "there is no possible good use for a mac" and that is simply not true. You're reframing the issue to be about morality when that wasn't in question in the original comment.

No, the statement that was made was, "The only possible good use of a Mac, is to run Linux on it." Plausibly the poster might have had reasons other than moral considerations for making such a statement—maybe they really prefer Xlib to Quartz, System-V-style system calls to BSD, or Nautilus to Finder—but I doubt it. Apple's unethical and abusive treatment of their users seems more the more likely rationale for such a statement, since running Linux has historically been the escape route from such practices.

It's legitimate to protest against injustices and menaces to human rights even when millions of people accept those injustices and don't recognize those menaces.

Well now you've gone in a completely different direction with it...

How many companies whose products we all use on a daily basis are directly or indirectly involved in abhorrent practices? Probably a lot, to be honest.

I'm not disagreeing with you, btw. I'm just saying the depth of what you're saying is a bit much for most people, since it feels inescapable.

The problem isn't that Apple is "directly or indirectly involved in abhorrent practices." The problem is that the abhorrent practices in question are specifically the licensing and technical design decisions of MacOS, and how they affect the owners of Apple M1 computers, especially those who run MacOS on them.

I'm not talking about arm's-length issues like the extent of Apple's responsibility for Foxconn-factory worker welfare and to what extent Foxconn's workers are better or worse off than they would have been without Apple—whatever the truth of the accusations, they are unaffected by whether your Macintosh runs Linux or MacOS.

I'm talking about proprietary software licensing turning your own computer into a weapon against you, and reserving the understanding and control of the world you live in (the birthright of every human being) for Apple's anointed priesthood of licensed developers, who retain their status purely at Apple's pleasure. This is the central issue solved by installing a free-software operating system like Linux.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact