10 ms·
Debian GNU/Linux running bare metal on the Apple M1 with a mainline kernel
- luke2m 5y agoHow is GPU support going?
- Asmod4n 5y ago„Current dEQP-GLES2 status: 93.8% passing.“ https://twitter.com/alyssarzg/status/1419064274350080003?s=20 https://twitter.com/alyssarzg/status/1419064274350080003?s=2...
- marcan_42 5y agoThis 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.
- simcop2387 5y agoNot 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.
- svenpeter 5y agoThat 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.)
- londons_explore 5y agoAnd sadly that long tail of work will be completed just as the platform is becoming obsolete...
- freedomben 5y agoFrom 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.
- marcan_42 5y agoYou'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.
- freedomben 5y agoInteresting, thank you. How realistic do you think that goal is? (Honest question, nothing implied)
- marcan_42 5y agoI 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.
- 5y ago
- paulmd 5y agoSurprisingly 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. https://rosenzweig.io/blog/asahi-gpu-part-4.html https://rosenzweig.io/blog/asahi-gpu-part-4.html 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).
- flemhans 5y agoIs it fast?
- zibzab 5y agoIt's native Linux, wadaya think?
- imwillofficial 5y agoI 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.
- Karsteski 5y agoAn aside, this lady's accomplishments at her age make her someone I look up to, ngl
- kleiba 5y agoActually, 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.
- jjuel 5y agoCan confirm that with 3 kids under 3 I have ZERO time to do anything I would like to programing wise outside of work.
- vaxman 5y agoYou’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.
- deleted 5y ago[deleted]
- grumpyprole 5y agoCan 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.
- deleted 5y ago[deleted]
- deleted 5y ago
- cstross 5y agoGet back to me when you've got it running on a dead badger: https://www.abyssapexzine.com/2021/04/dead-badger/ https://www.abyssapexzine.com/2021/04/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 ...)
- svenpeter 5y agoOn 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.
- londons_explore 5y agoBut all that's needed is a bootloader exploit...
- svenpeter 5y agowhich is not impossible but very unlikely.
- Wowfunhappy 5y agoChkm8 was the first of its kind since the early days of iOS. It's not impossible but we'd have to get very lucky.
- sudosysgen 5y agoIt 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.
- svenpeter 5y agoUsually, 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/ 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 https://blog.svenpeter.dev/posts/m1_sprr_gxf) Getting past all that is going to be very hard if not impossible.
- bartvk 5y agoIf you want to see Marcan's latest stream (just an hour ago): https://www.youtube.com/watch?v=3hPtyaUFfY8 https://www.youtube.com/watch?v=3hPtyaUFfY8 And if you want to sponsor him: https://www.patreon.com/marcan/posts https://www.patreon.com/marcan/posts
- TimTheTinker 5y agoYou can also sponsor him on GitHub: https://github.com/sponsors/marcan 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.)
- jagger27 5y agoIt appears that GitHub Sponsors is still considered in beta (whatever that means) and is waiving the 10% fee.
- a2tech 5y agoThats great. The Mini leaning on the screen like that is only mildly triggering me.
- dmd 5y agoWhen 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 https://imgur.com/gallery/wHH3sow
- a2tech 5y agoI'd like to say I've never worked at/done those kind of things...I'd like to say it.
- rvz 5y agoWhat is so substantiative about this comment? To Downvoters: Perhaps you can point out to everyone what part of the parent comment has substance in this discussion? Imagine being downvoted for asking a good question.
- Subsentient 5y agoThis is excellent to see. The only possible good use of a Mac, is to run Linux on it. This has been true since the PowerPC days, and it's still true today. Though, today, you're probably better off just buying a normal PC and loading your favorite distro on it.
- Karsteski 5y agoI 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.
- kragen 5y agoIt'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.
- Karsteski 5y agoWell 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.
- kragen 5y agoThe 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.
- daviddever23box 5y agoAny 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.
- tenebrisalietum 5y agoYou'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.
- zamadatix 5y agoNot 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?
- deleted 5y ago[deleted]
- GekkePrutser 5y agoInteresting.. Now FreeBSD :)
- devwastaken 5y agoFree 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.
- babypuncher 5y agoYou must be fun at parties
- pabl0rg 5y agoWhich one of those has the best hardware?
- freedomben 5y agoThe 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.
- alien_ 5y agoThe 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.
- devwastaken 5y ago