Live data from Hacker News

Linux Running on Apple M1

twitter.com

271–280 of 282 posts

Re: Linux Running on Apple M1

#271

Earlier quoted context omitted.

Agreed. Check out the state of Linux support on Intel Macs that were released in and after 2016[1], it's abysmal. Once Apple started adding non-standard hardware, Linux support never caught up. It isn't like the lack of support is Linux developers' fault. Apple doesn't provide datasheets for their hardware, and they don't cooperate with developers writing drivers for their custom hardware. There are hundreds, if not…

Apple is a hardware vendor. How are the parts they use "non-standard"? What are the "standard" parts that Linux uses and further what consumer or business hardware has Linux indicated is standard? It appears what should be being asked for is Apple to commit resources to natively support things like: Docker, Kubernetes, Virtualization and Linux drivers on their M1 Macs going forward.

Interfacets, it is mentioned in the article

> Apple designed their own interrupt controller, the Apple Interrupt Controller (AIC), not compatible with either of the major ARM GIC standards. And not only that: the timer interrupts - normally connected to a regular per-CPU interrupt on ARM - are instead routed to the FIQ, an abstruse architectural feature, seen more frequently in the old 32-bit ARM days. Naturally, Linux kernel did not support delivering any interrupts via the FIQ path, so we had to add that.

and many others

https://corellium.com/blog/linux-m1

It is on top of HN now https://news.ycombinator.com/item?id=25859907

Re: Linux Running on Apple M1

#272

Earlier quoted context omitted.

> A Mac with subpar support for a webcam, energy saving, suspend/resume, the trackpad, brightness/volume controls, etc is not a laptop, it's an expensive paperweight. There are Mac desktops as well. That said, I'd say the list of mandatory components on a laptop is: - Decent GPU Drivers - Workable power management with sleep/ awake - Trackpad (this should be straight forward) The webcam, and brightness controls are s…

Most Windows laptops thankfully use Intel Wi-Fi. Apple is unfortunately completely married to Broadcom. There are open drivers for Broadcom Wi-Fi, at least not-the-newest ones, but they do suck.

Good, sounds like things have improved a lot since I was using Linux. Sucky drivers are a starting point, last time I was on Linux as a daily driver, I had to use a PCMCIA card with a binary blob from Broadcom because the internal wireless card was dead.

Hopefully with a little bit of money and some enthusiasm from the team, they'll be able to make more progress.

A lot of people bitching about this being a waste of effort, but all the things they do here have follow on effects. If they improve the Broadcom drivers for the M1, much of that work will directly benefit everyone else on Broadcom.

Re: Linux Running on Apple M1

#273

Earlier quoted context omitted.

> having been a proprietary kernel driver developer for Windows, FreeBSD and Linux May I ask how you learned how to do this? I'd like to learn too! I had a great experience developing a Linux user space driver for my own laptop's LEDs. Couldn't figure out how to control the fans though.

1. Accept that printf (preferably over serial) is The One True Debugger. It is the tool you always have - if you can't get a print over serial, you're in too deep to use a debugger anyway. 2. Play around with embedded. You can use an arduino, but get rid of the Arduino IDE. Once you've ridded yourself from their weird environment and code in C, you're pretty close to what kernel programming is: Direct hardware contro…

I got to build a driver once, making an NDIS LWF encap/decap driver for Windows. I found it extremely soothing, and kind of old school - I had to use a real machine in my office with firewire debugging, and use windbg like a greybeard.

But not having the right documentation was a challenge. MSDN is okay, but the weird mechanics of MDL chains don't really get discussed on Stack Overflow.

Re: Linux Running on Apple M1

#274
post #127

Earlier quoted context omitted.

The thing is, many more people are using Windows, than Macs and many more people are using Macs, than desktop Linuxes. So your anecdata goes against a mountain of anecdata from people using those platforms.

The thing is, many more people are using phone and tablets, than Windows and many more people are using Windows, than Macs and many more people are using Macs, than desktop Linuxes and many more people are using desktop Linuxes, than desktop BSDs. So the anecdata goes against your mountain of anecdata that goes against a world of anecdata from people using those platforms.

And smartphones runs mostly Android, that is Linux kernel.

Re: Linux Running on Apple M1

#275
post #265

Earlier quoted context omitted.

My 2019 Macbook Pro has consistent issues waking from sleep. Nothing plugged in except the included power supply. Screen will remain black. Or, screen will power on, display nothing. Or, screen will power on, mouse cursor will appear, but no password prompt.

You should return it and get a free replacement. It’s clearly defective.

No, this is a software problem, not a hardware problem. The replacement would exhibit the same behavior.

Re: Linux Running on Apple M1

#276

Earlier quoted context omitted.

Agreed. Check out the state of Linux support on Intel Macs that were released in and after 2016[1], it's abysmal. Once Apple started adding non-standard hardware, Linux support never caught up. It isn't like the lack of support is Linux developers' fault. Apple doesn't provide datasheets for their hardware, and they don't cooperate with developers writing drivers for their custom hardware. There are hundreds, if not…

Apple is a hardware vendor. How are the parts they use "non-standard"? What are the "standard" parts that Linux uses and further what consumer or business hardware has Linux indicated is standard? It appears what should be being asked for is Apple to commit resources to natively support things like: Docker, Kubernetes, Virtualization and Linux drivers on their M1 Macs going forward.

The T2 chip is non-standard and unique to Macs. It affects the boot process and disk access in non-standard and proprietary ways. Apple's SMC is also non-standard, as is their UEFI implementation.

You can see a list of differences between Macs and standard PCs here: https://en.wikipedia.org/wiki/Apple%E2%80%93Intel_architectu...

Re: Linux Running on Apple M1

#277

Earlier quoted context omitted.

These drivers are baked, even if there are specs for them. The thing is, that these SoCs have no PCIe or other enumerable bus. You (=your kernel) must know what hardware it is running on and which drivers to load without being able to ask the hardware, what is really present. One wrong POKE and the entire system can hang. And that is on top of the problem, how to boot in the first place. There is not such thing as UE…

> Every single one is a special snowflake with its own special way to boot Eh, the majority of embedded crap comes with U-Boot (sometimes built without EFI support but always with Linux image support, at least).

I've run into more than a few ARM SoCs that use custom U-Boot forks, too.

Re: Linux Running on Apple M1

#278
post #207

Earlier quoted context omitted.

No one should be purchasing a brand new M1 Mac with the expectation of perfect Linux support any time soon. However, I’m optimistic that these will be mostly usable on Linux before they’re too obsolete or outdated. The platform is so popular and iconic that it’s drawing a lot of attention from Linux devs and reverse engineering crowds.

I'm not at all as optimistic as you are. You still need out-of-tree drivers to run Linux on a 2017 MacBook Pro, and various things don't work at all on Intel Macs from 2016 (possibly earlier) to the present. Sure the M1 is the new shiny, and people will be attracted to it in the short term, which might boost reverse-engineering efforts. But I expect that to die down as people get frustrated, and we'll have the same (…

Right. And by the time there is halfway decent support for first gen M1s a new generation will come out with a ton of new breakages.

Re: Linux Running on Apple M1

#279
post #95
post #84

Linux might run, but good luck with the drivers. And good luck with it keeping working with future upgrades of both, hardware and software. Heck, even today it is pretty difficult to get things working reliably unless it is a thinkpad or some other Linux friendly brand. A Mac with subpar support for a webcam, energy saving, suspend/resume, the trackpad, brightness/volume controls, etc is not a laptop, it's an expensi…

On the contrary, this could be fantastic for a headless server running on an M1 Mini to build and test ARM code before deploying to AWS Graviton. It doesn't all have to be about laptops.

This is how a lot of people used Linux on PowerPC macs in the early aughts. It set them up for larger projects on IBM hardware and the goofy risc engineers got to walk around looking cool because they had a powerbook.

Re: Linux Running on Apple M1

#280

Earlier quoted context omitted.

> Every single one is a special snowflake with its own special way to boot Eh, the majority of embedded crap comes with U-Boot (sometimes built without EFI support but always with Linux image support, at least).

I've run into more than a few ARM SoCs that use custom U-Boot forks, too.

I don't think I have used an Arm SoC that _didnt_ use either a custom uboot, or some custom stage one loader (often a stripped down uboot).
Post reply on HN