[HN Gopher] Linux on Apple Silicon with Alyssa Rosenzweig
___________________________________________________________________
Linux on Apple Silicon with Alyssa Rosenzweig
Author : tosh
Score : 121 points
Date : 2024-11-01 20:30 UTC (2 hours ago)
(HTM) web link (softwareengineeringdaily.com)
(TXT) w3m dump (softwareengineeringdaily.com)
| AI_beffr wrote:
| its insane to me that people are working so hard on reverse
| engineering apple silicon. like, the diagrams are right there in
| cupertino. it just seems like such a waste. its like during some
| kind of economic depression there are people starving and
| struggling while a bunch of food and resources are just sitting
| around not being used. existential grid-lock.
| asdasdsddd wrote:
| whats the point of reverse engineering this again?
| umanwizard wrote:
| To run Linux on MBPs
| fragmede wrote:
| Some people _really_ like the hardware but can 't stand the
| software, and have the skills to do something about it.
| risho wrote:
| if you want an arm laptop with incredible specs, incredible
| build quality, incredible battery life and incredible
| performance that runs linux what other option is there?
| jrockway wrote:
| Yeah, the M4 is apparently the fastest CPU on single-core
| benchmarks. If you want a fast laptop, you have to get it.
| Not being forced to use Mac OS would be nice.
| tokinonagare wrote:
| Just run Linux inside a VM. Problem solved.
| Teever wrote:
| It is an inspirational demonstration of the hacker spirit and
| a way for the individuals involved to both expand their
| technical abilities and demonstrate them to prospective
| employers.
|
| I personally consider it very inspirational though I
| recognize that I will probably never be able to undertake
| such a difficult task. I can imagine that it is very
| inspirational to the next generation of extremely proficient
| and dedicated teens who want to master software development
| and explore leading edge hardware.
| linguae wrote:
| 1. Even if one loves macOS, Apple doesn't support its
| hardware forever. Being able to run an alternative operating
| system on unsupported hardware helps extends that device's
| useful life. My 2013 Mac Pro is now unsupported, but I could
| install Linux on it and thus run up-to-date software.
|
| 2. Some people want to use Apple's impressive ARM hardware,
| but their needs require an alternative operating system.
| baq wrote:
| macOS sucks. It does a disservice to the greatest laptop
| hardware package ever made.
| runjake wrote:
| I think it only fuels the possibility that Apple would open up
| the architecture documentation where it otherwise wouldn't if
| you didn't have people diligently reverse engineering it.
|
| Something similar to this happened in the early days of the
| iPhone, with the iPhone Dev Team. Initially, iPhone "apps" were
| going to be web pages, but then these reverse engineers came
| along and developed their own toolchain. Apple realized they
| had to take action and their "webpages as an app" strategy
| wasn't going to work.
| hu3 wrote:
| That's a rather incomplete, revisionist and rose tinted
| glasses view of the history of native vs web apps in iPhone.
|
| A much more plausible theory is that Apple likes their 30%
| app store commission from big players.
|
| > https://www.apple.com/newsroom/2023/05/developers-
| generated-...
|
| "App Store developers generated $1.1 trillion in total
| billings and sales in the App Store ecosystem in 2022"
|
| People forget the only thing fueling big corps is profit.
| reaperducer wrote:
| _That 's a rather incomplete, revisionist and rose tinted
| glasses view of the history of native vs web apps in
| iPhone._
|
| As someone who built one of the first web apps featured by
| Apple, I can say that your view, too, is incomplete and
| revisionist.
|
| _A much more plausible theory_
|
| Theories are not necessary. Apple was very up-front about
| its trajectory with the iPhone at launch.
| hu3 wrote:
| up-front at launch doesn't prevent changing their minds
| when looking at world record revenue.
|
| what makes you think it was set in stone?
| chrisoverzero wrote:
| Sure, but at the time that Apple made the decision, they
| had $0.0 trillion in billings and sales.
| hu3 wrote:
| A decision which changed once, you know, they saw the
| income potential.
| refulgentis wrote:
| I was there, part of a small community writing apps pre-
| SDK.
|
| Neither, I, nor anyone else, can promise you it wasn't
| just a simple $ calculation.
|
| That being said, literally every signal, inside, outside,
| or leaked, was that apps / public SDK, if it existed
| meaningfully before release, had to be accelerated due to
| a poor reaction to the infamous "sweet solution", web
| apps.
|
| I agree its logically _possible_ , but I'd like to note
| for the historical record that this does not jive with
| what happened, at the time. Even setting that aside, it
| doesn't sound right in the context of that management
| team that Apple wasn't proud of selling complements to
| their goods, they weren't huge on maximizing revenue from
| selling music or bragging about it. But they were huge on
| bragging about selling iPods.
| hu3 wrote:
| Thanks. I appreciate your information. Always nice to
| know how things started.
| runjake wrote:
| _I was there_ , writing apps with the DevTeam's toolchain
| before Apple ever released theirs. Were you?
|
| Further, I'm guessing you didn't read the Steve Jobs
| biography? Because it discusses this and contradicts your
| point.
|
| The one good point coming from your comment is that I
| remembered that I still have the Zdziarski book on the
| DevTeam toolchain. So that was a walk down memory lane.
| qubitly wrote:
| Exactly! It's like, Apple never budges--until someone reverse
| engineers it. Maybe Asahi can finally give them a nudge
| sschueller wrote:
| Apple would close down their macos just like iOS if they
| could get away with it so they can get their 30 percent on
| apps installed .
|
| However since their moat is now filling with European soil
| this is not something they will attempt at this point IMO.
| talldayo wrote:
| A recurring theme you'll encounter across most of Apple's
| products is that any feature that forces first-party Apple
| software to compete on fair terms with other products is
| conspicuously missing.
| hu3 wrote:
| Specially because Apple seems to not care much about the
| project even after current progress.
|
| m3 support still not there (let alone m4) because things broke.
| Which is expected from Apple, they are just doing their thing
| and improving their products.
|
| If they cared they would have at least hired these people by
| now. It wouldn't make a dent in their budget.
| Twisell wrote:
| M3 and M4 is not there because the Asahi Teams have a roadmap
| and stick to it.
|
| They don't want to leave M1/M2 half botched before moving on
| to the next gen that will ultimately support more features.
|
| If you are not happy with the pace go on and contribute, but
| don't invent false issues.
| almostgotcaught wrote:
| You think that's bad? Imagine how much churn there is because
| NVIDIA doesn't have open source drivers. I'll actually do you
| one better: part of my PhD was working around issues in Vivado.
| If it were open source I could've just patched it and moved on
| to real "science" but that's not the world we live in. And I'm
| by far not the only "scientist" doing this kind of "research".
| moffkalast wrote:
| If people wonder why some of us don't like Apple, this is the
| fundamental philosophy why. It's not about the M series, it's
| been their modus operandi since time immemorial. It's like if
| Microsoft owned x86 and nobody could run anything on it but
| Windows. And people would like it because it's a "cohesive
| ecosystem" or whatever.
| rched wrote:
| I'm not sure that's really the same thing. Apple doesn't own
| ARM and the main issue here seems to be the GPU no? Is this
| much different from how things work with Nvidia? I guess the
| difference is that Nvidia provides drivers for Linux while
| Apple does not. As far as I know Nvidia Linux drivers aren't
| open source either though.
| moffkalast wrote:
| Nvidia is not much better, but they do only make one
| component and generally ensure compatibility. If Nvidia
| went full Apple, their cards would have a special power
| connector for the Nvidia PSU, a custom PCIe express lane
| that only works with Nvidia motherboards, which also
| requires Nvidia RAM sticks and only boots NvidiaOS. And
| also most of the software that would run on it would be
| blocked from running on other OSes because fuck you that's
| why. Also if you tried running NvidiaOS in a VM, they would
| sue you.
|
| It's still profoundly weird to me that nobody can run
| Safari outside MacOS, even for testing. At least the EU has
| strong armed them into dropping thunderbolt ports now, so
| we have that minor interoperability going for us, which is
| nice.
| robbiewxyz wrote:
| This definitely sucks. I feel similarly about e.g. the
| jailbreaking community: I appreciate the work they do and at
| the same time I very much wish it wasn't necessary.
|
| If Apple and other companies like them were a little less
| greedy we could have far more nice things for free and Alyssa
| and other brilliant engineers could go work on other great
| projects. Also if regulators were a little more vigilant and a
| little less corrupt.
|
| Someday.
| jsheard wrote:
| Apple doesn't seem to be deliberately _impeding_ Asahi Linux at
| least, which is better than nothing. They could have locked the
| platform down tight like they do with iOS devices so that
| jailbreaking would be a prerequisite for running Linux, but
| they didn 't, the platform is wide open to running whatever
| once you figure how how to drive it.
| cheesycod wrote:
| For many people, the Apple Silicon GPU is an interesting
| problem to solve given that the firmware is loaded by the
| bootloader and all and its actually generally easier to
| interact with than say NVIDIA while having decent perf. Also
| GPUs in general are really complex beasts involving IP from
| tons of companies in general. Would not be surprised if even
| Apple doesn't have the full schematics...
| vlovich123 wrote:
| > and its actually generally easier to interact with than say
| NVIDIA while having decent perf
|
| I'm pretty sure that Turing and newer work the same way. The
| drivers basically do nothing but load the firmware & do some
| basic memory management if I recall correctly.
| FooBarBizBazz wrote:
| I get what you mean. I'm _glad_ that they 're doing this; it's
| _great_ that the best laptop hardware is going to run Linux
| before long; it 's a _fun_ endeavor -- but when you zoom way
| out and take the philosophical view, yeah, it seems silly that
| it should be necessary, in the same that way it feels absurd
| that impressive and courageous feats in battle should have
| actually needed to happen.
| tonymet wrote:
| blame the lawyers. any effort to share specs would be an
| implicit license.
| robbiewxyz wrote:
| I'm not familiar with this. Suppose Apple released docs under
| an "as is" type disclaimer like is so common in the open
| source community: would doing so potentially come back to
| bite them?
| imiric wrote:
| Godspeed to the Asahi team, but as much as I envy the performance
| and efficiency of Apple silicon, I could never depend on a small
| group of hackers to reverse engineer every part of a closed
| system and to maintain it in perpetuity so that I can run free
| software on it. As brilliant as this team is, and as much
| progress as they've made, fighting against a trillion-dollar
| corporation that can decide to shut it down at any moment is a
| sisyphean endeavor. Spending thousands of dollars on that bet is
| a hard sell, even for tech nerds.
|
| Not to mention that you'd be supporting a corporation that has
| this hostile stance towards their customers to begin with.
|
| Meanwhile, other x86 and ARM manufacturers are making substantial
| improvements that are shortening Apple's lead. You're not losing
| much by buying a new CPU from them in 2024 or 2025, but you gain
| much more in return. Most importantly, the freedom to run any
| software you choose.
| Wowfunhappy wrote:
| Aren't tons of Linux drivers for x86 laptops based entirely on
| reverse engineering? Maybe even most of them? I haven't used
| Linux seriously in almost two decades, but that's my memory.
| zeusk wrote:
| Most of the x86 platform (ACPI) is well defined and openly
| accessible (not free but open).
|
| There's still some offenders (Surface, HP, Broadcom) that
| introduce quirks that break sleep and some HID accessories
| but most of it works out of the box.
|
| ARM has been the Wild West for a while but they're going in
| the right direction with device trees et al. Apple however
| doesn't have to care about the "wider" ecosystem since they
| left x86 for their own silicon and tighter integration from
| bottom up allows for some really nice end user experience.
|
| I still think it's much better to use the VM infrastructure
| and just run Linux as a guest. Mac as a platform is very end
| user friendly as-is unlike Windows.
| imiric wrote:
| I'm not sure if "tons" is accurate, but some of them are,
| yes. And most of them are not great IME. Not discrediting the
| talented programmers who work on them, it's just the nature
| of supporting hardware in the dark, without any support from
| the manufacturer. Though this was more common during the
| early days of Linux, and nowadays many manufacturers offer
| some kind of support.
| bravetraveler wrote:
| We are well beyond the days of NDISWrapper, most of the
| kernel contributions come from hardware manufacturers or
| integrators
| renewiltord wrote:
| OpenChrome far exceeded Unichrome Windows drivers in
| performance. But things have changed. Modern engineers prefer
| "official" software. I understand why. Systems are more
| complex now.
| binkHN wrote:
| You've been out of the game for too long; almost every major
| hardware vendor has at least one or two people that are
| regularly submitting patches to the Linux kernel. My ThinkPad
| computer running Linux is a major thing of joy; in many ways
| it performs more reliably on Linux than it does on Windows.
| wslh wrote:
| I am genuinely looking forward to a Dell XPS 13 or Lenovo X1
| Carbon which is fanless and have the battery duration and
| performance of the Apple Macbook Air.
| andrewmutz wrote:
| Is the Linux support not there yet? How close is it?
| chickenzzzzu wrote:
| It's the hardware that's the problem, not Linux support.
| Simply, the hardware manufacturers don't make fanless,
| thin, light, performant, power efficient laptops.
| hnuser123456 wrote:
| What about fanless chromebooks?
| chickenzzzzu wrote:
| Yup that's a good start! It proves that a company other
| than apple can do something fanless. Probably they're
| plastic-y, but they are thin, light, and fanless. Power
| efficiency and performance are likely not good, but, at
| least google doesn't deliberately obfuscate their
| hardware like Apple does. Instead, they just let
| everything that's not ChromeOS fester, since they're
| trying to make money. But anyone who wants to start a
| business selling Alpine on Chromebooks can ;)
| somat wrote:
| What is the difference in battery life between linux on and
| macos on the Apple M1?
|
| That is, I would be surprised if linux on the M1 had close to
| macos levels of battery life. My theory being the better
| battery life on the M1 is more due to the tight integration
| between the OS and the hardware power profiles than the power
| profiles themself.
| wslh wrote:
| I'm sure Apple has some unique tricks when it comes to
| energy efficiency, but I haven't seen the same level of
| optimization in other operating systems. Apple's energy
| management is just another competitive advantage, offering
| a level of sophistication that sets it apart technically
| and strategically. Just add the Mx chips to the equation.
| talldayo wrote:
| I'd be surprised if MacOS could match the efficiency of
| Linux. MacOS relies on a hybrid kernel architecture that
| emulates a variety of different APIs that aren't used or
| integrated fully. The simple act of running software on
| MacOS is deliberately somewhat inefficient, which is a
| perfectly fine tradeoff for a desktop OS that's not
| intended for server or edge applications.
|
| The fundamental hardware of Apple Silicon is very efficient
| but I don't think MacOS is inherently optimized any better
| than the others. My experience installing Linux on Intel
| and PowerPC Macbooks tended to increase their battery quite
| noticeably.
| wslh wrote:
| Well, if in 2021 you took your MacBook Air M1 (8GB) out
| on a Friday, downloaded movies, watched them, browsed the
| internet, did some casual development, and came back late
| Sunday without needing to charge it, I'd be impressed.
| vlovich123 wrote:
| > As brilliant as this team is, and as much progress as they've
| made, fighting against a trillion-dollar corporation that can
| decide to shut it down at any moment is a sisyphean endeavor
|
| Apple historically cares very little about Linux on Mac whereas
| it seems like you're talking about the non-Mac product lines.
| Indeed, they go out of their way, if I recall correctly, to
| make it possible and easier in the first place.
| sys_64738 wrote:
| Apple does new hardware bring up using the Linux kernel.
| yjftsjthsd-h wrote:
| If they don't release that code to the public, what good
| does it do? (Also, if they are only doing a temporary in-
| house version for initial hardware work, they can do all
| kinds of ugly hacks that wouldn't really be good for
| upstream use any anyway.)
| imiric wrote:
| I wouldn't describe leaving the bootloader unlocked as "going
| out of their way" to make all of this possible. Clearly, if
| just booting another kernel would be sufficient, running
| Linux on their machines should be easy. Yet none of this is.
| "Going out of their way" would at the very least be providing
| documentation and support so that reverse engineering their
| hardware wouldn't be necessary.
|
| Also, what's not to say that they will decide to lock the
| bootloader just as they do on all their other devices? What
| does Apple practically gain by leaving it unlocked? If
| they're doing it as a gesture of good faith to their users,
| they're doing an awful job at it. Doing it so they can sell a
| negligible amount of machines to a niche group of hackers
| also doesn't make business sense.
|
| Depending on the good will of a corporation that historically
| hasn't shown much of it to the hacker community is not a
| great idea.
| Retr0id wrote:
| The changes made were not as simple as not-setting a lock
| fuse bit. Making the bootloader unlockable in a way that
| didn't compromise their existing security model did require
| going out of their way. The status-quo for previous "apple
| silicon" bootchains (iphone, ipad, etc.) was not built this
| way.
|
| Even T2 macs had no way to boot custom firmware on the T2
| chip, without exploits.
|
| Sure, they could've done way more, but evidently they'd
| rather not lock down the platform completely.
| mixmastamyk wrote:
| I'm with you in spirit, but most of the work has already been
| done. Purchased hardware won't change. Firmware updates could
| be held if needed as well. Another team could take a crack at
| it.
|
| Worse case you restore macos and possibly sell at a medium
| loss. That said I'm still waiting.
| jasoneckert wrote:
| While I don't feel I have enough information to comment about
| the likelihood that Apple would try to stop the Asahi project,
| those who are knowledgable are of the opinion that they would
| not.
|
| However, as a Mac Studio M1 owner that has used Asahi as a
| daily driver for software development since the first release
| (originally Arch, later Fedora), I can confidently say that I
| could care less. By running the software I want to run far
| faster than macOS could on the same hardware, Asahi has saved
| me countless hours and made me far more productive. And I'm
| incredibly grateful for this tangible benefit, regardless of
| what happens in the future.
| 2OEH8eoCRo0 wrote:
| They won't stop Asahi with a frontal assault, they'll stop it
| by churning out new chips every year until the work to
| support them all is unsustainable.
| amelius wrote:
| > While I don't feel I have enough information to comment
| about the likelihood that Apple would try to stop the Asahi
| project, those who are knowledgable are of the opinion that
| they would not.
|
| If that is true, why didn't they give that poor team some
| documentation to work with?
| skybrian wrote:
| Don't let worries about future hardware get in the way of using
| gear that works in the present. If future Macs aren't supported
| for some reason, that doesn't break your current hardware, and
| you can buy different hardware next time.
|
| There are people running Linux on _abandoned_ hardware from
| companies that went out of business, and that 's okay.
| pmarreck wrote:
| > other x86 and ARM manufacturers are making substantial
| improvements that are shortening Apple's lead
|
| x86 has fundamental issues that I believe prevent it from ever
| achieving the MIPS per watt efficiency of anything from ARM. I
| mean... the newest M4 laptop will have a _24 hour_ battery
| life. That exceeds anything remotely possible in the same
| laptop form factor but with x86 by nearly an order of
| magnitude.
|
| So now you're talking just ARM. Linux has been compilable on
| ARM for a while now, so where are the competing ARM laptops
| that are anywhere close to the power of Apple's version of ARM?
|
| I do get what you're saying though (I'm definitely a Linux fan
| and have a Linux Framework laptop), but I wish it wasn't an x86
| laptop because its battery life is crap (and that is sometimes
| important).
| talldayo wrote:
| > so where are the competing ARM laptops that are anywhere
| close to the power of Apple's version of ARM?
|
| Better question: where are the incentives for them to make
| it? Apple is pretty much the only company with an outstanding
| architectural license to design ARM cores, and the best off-
| the-shelf ARM core designs don't even compete with 5-year-old
| x86 ones. If you're a company that has Apple-level capital
| and Apple-tier core design chops, you might as well embrace
| RISC-V and save yourself the ARM licensing fee. That's what
| Nvidia does for many of their GPU SOCs.
|
| If SoftBank offered ARM licenses under more attractive terms,
| there would be genuine competition for good ARM CPUs. Given
| that Apple has a controlling stake in SoftBank, I wouldn't
| hold out faith.
| hybrid_study wrote:
| Sadly, this is the exact reason why I hold back trying Asahi
| and run the chance of liking any of it :-(
|
| Recently saw someone wondering why no one has tried building a
| laptop with as much quality as an Apple? A special version of
| Linux to run on such a laptop would offer more long-term
| commitment and maybe pull in more adoption.
| jjtheblunt wrote:
| > Not to mention that you'd be supporting a corporation that
| has this hostile stance towards their customers to begin with.
|
| Is the "this" in that sentence your previous paragraph of
| concern that Apple will purposefully break AsahiLinux?
| jsheard wrote:
| I haven't listened to this podcast yet so I don't know if this
| comes up, but a particularly scary part of running a custom OS on
| Apple Silicon machines is that the internal speakers temperature
| is regulated in software. The Asahi devs have had to
| painstakingly reverse engineer and reimplement the safety DSP
| that macOS uses on each device, and add some safety margin,
| because if they get it wrong they could literally blow up the
| speakers.
| grahamj wrote:
| She's a witch! Burn her!
___________________________________________________________________
(page generated 2024-11-01 23:00 UTC)