NixOS on M1(github.com) |
NixOS on M1(github.com) |
This is mostly a restructuring of work many others have already done, and it wouldn't have been possible without them. Important parts of the Linux on M1 experience include:
Asahi Linux's m1n1 bootloader/hypervisor
Asahi Linux's kernel patches
Mark Kettenis' U-boot port
Janne Grunau's kernel configEven if he did not improve as much as he did our discussion, did you have to be so mean. It's Christmas, let him have it.
So, welcome, glad to have you here of course.
The answer is a commented "tldr" is widely used on news.ycombinator.com, and, as comments below say, it's become a conventional courtesy: people tend to scan comments for tldrs, in order to possibly avoid digressing into commonly (but not always) long winded posts.
Here's to hoping they get it to work. And wouldn't it be nice if Apple just for once helped out and opened up their hardware.
Considering M1 is directly derived from the SoCs that run the iPhone & iPad, Apple already did a complete 180° from how locked down their mobile platforms are. All the escape hatches to run third-party OS's are easily opened, there were post-release changes to the bootloader & tooling to make booting third-party kernels easier, etc.
We don't get any official docs, but unfortunately it's not like Apple has good docs even for the stuff they do actively support...
That's why it's to easy to run any OS you like on Apple hardware, isn't it?
This would be an outrageous, almost impossible situation in car "ownership", surely resulting in class action - "I want to use my car's trunk!". But, in computers/phones it's begrudgingly accepted or sometimes even argued for.
I'm not grateful to the manufacturer that I've been graciously allowed to use all of the car I bought, and only after a team of amazing volunteer locksmiths worked day and night adapting the trunk so anyone can use it.
Sure, buy a different car, right? But this also happens to be the safest and easiest one available to drive. And this isn't because the trunk is locked. The owner could equally lock it themselves, just like the rest of the car.
Would be great to use it like any other car, and chuck that potential spyware I'm paying extra in gas to haul around with me. Not thankful that the manufacturer didn't put a stronger lock on it. Actually, I've contempt for them.
Apple knows that you need to be patient when boiling the frog.
It should also -- at least theoretically — allow me to use Rosetta to run x86 Linux binaries. However, I'm getting segfaults when trying to build certain Nix derivations this way: https://discourse.nixos.org/t/local-x86-64-nix-builder-on-ar...
Can you "prove" that what you use NixOS for isn't overkill?
Everything I read about NixOS is how it's reproducible or something. I set up Cargo for Rust once and never thought about it again. Where does the need to reproduce toolchains come from?
Sure. At work I needed access to the office VPN. I copied a snippet into a single configuration file and everything just worked. It installed the necessary executables, and set up the needed services including the config files for these services.
* The author is quite responsive to personal messages or issues / pull requests. * The people who fork it and change a thing or two are champions, they play with adding rust compilation to the kernel, suspend, gpu drivers all before it is added to this repo. * Once you get to just NixOS, and you tweak your editor, battery monitor, etc. It is pretty hard to switch back. Nix is hard to get right, but when you get it right, it stays that way. * I still boot back to OSX every two days when I have to share screen on Microsoft Teams or do a work thing. Takes two minutes to switch to the dark side and then a few days to remember to go back to Linux. Super polished and compatible dev machine vs fast linux on M1 with sane development environment is a great combo.
Very happy I won't need to do the nixos stuff myself!
This is also a difference from the A series which only have a single display controller, so can only drive a single display.
Anything higher than the hardware limit is done in software, like screen mirroring or any of the macOS workarounds to get more displays.
I've been patching m1n1 to gain back the extra 64 pixels at the top of the screen in the notch area. I just saw a patch go by a few days ago to add a kernel flag to enable this so I need to switch over to that.
Overall the work in this project to track the asahi changes in the nixos way is being done very well. My system feels just like my other nixos systems.
Well, to be pedantic, ring 0 is the closest thing to ARM EL1 and EL2.
Other Linux distros will have to piggyback off the work of Asahi, and I think that generally they're avoiding jumping in yet because the hardware support is not very mature.
The end goal of the project is to not require their own distribution/repos.
I find it valuable to skim the original article first before I'm swayed by commenters opinions.
Could you share that Nix VPN config file example please?
https://stackoverflow.com/questions/18717016/what-are-ring-0... (scroll down to the ARM section)
If there's anything hardware hackers are famous for, it's abusing hardware to get it to do unintended things. I think my favorite that isn't Linux running on a badger is the RTL SDR, so maybe there's a way to get a super shitty software muxer going, or maybe map two displays into one but drive it from software so even if there's a special dongle required, the hard work isn't being done by that dongle making it a $30 piece of kit instead of $150.
https://web.archive.org/web/20211217132913/https://twitter.c...
Are you referring to that Sidecar or similar software which lets you use an ipad as a second display, or are there different workarounds you're thinking of?
https://www.macworld.com/article/675869/how-to-connect-two-o...
With some docks and adapters like https://www.sonnettech.com/product/m1-mac-dual-displayport-a...
They’re not completely successful from what I hear, but I know it works for some folks.
I have an M1 Max so I haven’t tried myself.
It means: Any OS I like.
What's so difficult to understand here? (I could offer to switch to German in case you have issues in understanding English).
Of course, one would need to port any particular OS first in case one wants to run it on some new hardware.
But porting any OS I like to Apple devices is as easy as doing that for any other open and properly documented hardware, right?
Please read the posting guidelines: https://news.ycombinator.com/newsguidelines.html
> In Comments: Be kind. Don't be snarky. [...] Comments should get more thoughtful and substantive, not less, as a topic gets more divisive. [...] Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith.
> But porting any OS I like to Apple devices is as easy as doing that for any other open and properly documented hardware, right?
Apple's hardware is not open nor properly documented, nobody here is arguing that either of these is true. My original statement was: M1 Macs are more open than most of Apple's hardware, and Apple is not doing anything to discourage tinkering and porting - quite the opposite, they left the escape hatches open, and even made later changes[1] specifically to accommodate third-party OS's.
So again: what point are you trying to make? Non-open platform is non-open, but despite being less non-open than most other non-open platforms out there, it's somehow still worse, because...?
[1]: https://web.archive.org/web/20211217132913/https://twitter.c...
Meanwhile, other people spend far more time maintaining and protecting their cars that can use cheaper gas and they have full access to. But they have to be much more vigilant about what neighborhoods they park in, and once two years comes around they can no longer get replacement parts, and if the lock has an issue, people can trivially steal their car.
Or maybe this is just a tortured analogy to start with. If you don’t like Apple, just buy something else.
https://www.tesla.com/ownersmanual/model3/en_cn/GUID-2E8E5E0...
> Vehicle Telematics Model 3 is equipped with electronic modules that monitor and record data from various vehicle systems, including the motor, Autopilot components, Battery, braking and electrical systems. The electronic modules record information about various driving and vehicle conditions, including braking, acceleration, trip and other related information regarding your vehicle. These modules also record information about the vehicle’s features such as charging events and status, the enabling/disabling of various systems, diagnostic trouble codes, VIN, speed, direction and location. The data is stored by the vehicle and may be accessed, used and stored by Tesla service technicians during vehicle servicing or periodically transmitted to Tesla wirelessly through the vehicle’s telematics system.
Meanwhile, real men/women drive sports cars they built themselves from scrap parts.
Hector Marcan claims it’s policy, too:
https://web.archive.org/web/20220824111844/https://twitter.c...
http://web.archive.org/web/20211217111414/https://twitter.co...
Yes my friend, you should do this once more. And than reconsider most carefully what you've actually written before.
> Non-open platform is non-open, but despite being less non-open than most other non-open platforms out there, it's somehow still worse, […]
Yes. :-)
Do you even realize how weird this statement is? A "non-open" platform (is this Apple's marketing speech for closed platform?) is in fact "non-open", even if it claims to be "less non-open" [sic] than something else. Very very true.
At least we're now on the same page regarding the fact that Apple's platform isn't open in any way. It's a closed ecosystem, hostile to anything that could threaten its gatekeeper (and in some parts monopoly) position around Apple's broader offerings.
Of course this makes it easy to run any OS you like on Apple hardware, right? ;-)
You're attacking my phrasing, rather than the argument.
> even if it claims to be "less non-open" [sic] than something else.
Apple never claimed anything here. No aspect of how open/closed the platform is is a part of their marketing, or any other official statement (they have literally kept their lips sealed even as they added the raw image boot option). My statement about their level of openness is based on observation, and comparison with contemporary and historical platforms.
> At least we're now on the same page regarding the fact that Apple's platform isn't open in any way.
I don't think we are. The only thing we've established so far is that Apple's platform is not 100% open, which was already a part of my original statement - and which is why I keep asking, what is your actual point? My original statement also included the remark that openness is a spectrum - your argument seems to boil down to the claim that openness is binary.
So, what is your benchmark for an open platform then? IBM PC, where literally everything was being reverse engineered, from 1981 onward? NVidia, where the open source driver is still unusable, 20+ years in? Raspberry Pi, where you have to upload a binary blob to the GPU, so it can bootstrap the main CPU? Modern x86 systems that block third-party OS's from booting[1]? Some median Android handset, which won't unlock the bootloader without an exploit, and will be forever stuck on an ancient kernel? Intel & AMD CPUs, which all have a dedicated core that runs a full OS, that is outside of the user's control?
Can you name a single system, that has any kind of market adoption (say >0.01%, so things like MNT[2] don't count), that does not make significant compromises on openness?
[1]: https://news.ycombinator.com/item?id=32023868 [2]: https://mntmn.com/
> Of course this makes it easy to run any OS you like on Apple hardware, right? ;-)
You're using sarcasm and rhetorical questions to make it seem like I am claiming something that I do not - this is very insincere. I have never made any claims that it's easy to port or run any OS to M1 Macs; only that it is still easier than on other, even more closed platforms (including even other Apple products, from which M1 is derived). Another observation: the Asahi project has made more progress towards developing a fully open GPU driver in 2 years than the similar effort for NVidia has done in 20.
Again, what is your benchmark?