What if I told you Apple Silicon has a hidden superpower?
You can run NATIVE LINUX on any M1 Mac!
But wait, I thought Apple locked down it's computers!
And, it says here Linux is faster than macOS on the exact same hardware?
That can't be right?
Oh yeah, it is!
At least in some cases.
I upgraded to a Mac Studio, so in this video I'm gonna set up my old M1 Mac mini to dual
boot macOS AND Asahi Linux.
Asahi Linux is a new Linux distro for Macs with Apple Silicon.
And even though it's an alpha, it's pretty darn polished!
A couple years ago I tried replacing my Mac with a Raspberry Pi 4, which also has an ARM
processor, but it was just too slow.
Since then I've been waiting for an ARM computer that's efficient and relatively inexpensive,
but also really fast.
And you know what?
The M1 mac mini starts at $699, which is a little more expensive, but compared to a Raspberry
Pi?
It's wicked fast.
There are ARM developer boards like the Honeycomb LX2, but it costs $750, and that's just for the
board!
It's far from a complete desktop computer like the Mini.
And the Mini isn't exactly the same thing, but if I can get Linux booting on it, it'll
be a pretty darn respectable ARM computer.
It's efficient, quiet, and tiny, and heck, I can even run Photoshop on it!
But I'm getting ahead of myself.
First I'm gonna install Asahi.
Asahi's installer is currently a script you download and run.
Potential security concerns aside, the installer is easy to use.
At this point I guess I should include a 'don't try this at home'; if you only have one Mac
and use it as your primary computer, you might wanna wait until Asahi's more stable.
The installer requires at least a tiny bit of knowledge of disk partitioning, and if
you do the wrong things, you might have to reformat your Mac.
Since this Mac isn't my main computer, I was okay with the risk, but luckily I didn't have
to wipe anything in the end.
If you use Time Machine like I do, you might have to temporarily stop Time Machine and
delete local snapshots using this `tmutil` command so the installer has enough free space
to work.
The partitioning took a while, but after an hour or so, a couple new drive partitions showed
up, and the installer copied Asahi Linux to one of them.
Once that's done, the installer pops up one last prompt, probably the scariest part of
the whole process.
It tells you exactly what to do to complete the install process, but warns that failure
to complete the last step correctly will leave your new installation in an unbootable state.
Well, I didn't want that to happen, so I waited for my Mac to shut down, then I held down
the power button until I saw the OS selection screen appear.
Some people think Apple's gonna lock down Macs like iPhones and iPads, but it doesn't
seem that way.
M1 Macs all support booting from other OSes, and there's actually evidence Apple's fixing bugs the
community finds in the bootloader!
But that's besides the point.
On this screen, click on Asahi Linux, then continue.
The Mac boots to a macOS Recovery screen, and at that point, I entered my Mac's admin
password a couple more times.
The reason for that is you have to allow Asahi to turn down the Mac's 'security policy' so
it can boot other OSes besides macOS.
And now the moment of truth arrives.
After an excruciating few moments seeing just a blank screen, I saw this friendly Linuxy text,
then Asahi's setup wizard.
The wizard is handy enough, and after a few seconds setting up my account, it kicked me
over to the login screen.
I typed in my password, and I was in.
Asahi uses the KDE Plasma desktop environment, which is a little different than the Gnome
environments I've used on Fedora, but it's easy enough to get around.
The first thing I did was mess around a little, running a speedtest to make sure Firefox worked,
and I also made sure I could get the full gigabit of download bandwidth on my Internet
connection.
I also tested playing a video on YouTube, and was happy to see that even without any
GPU acceleration, I could play fullscreen HD video without any dropped frames.
And unlike most ARM SBCs, the UI was snappy the whole time.
On a Raspberry Pi, you usually have to wait a few seconds after you click fullscreen for
it to actually happen.
I also installed iperf to do some bandwidth tests, because I wanted to see if I could
make full use of my 10 gigabit network, but I actually found a bug in Asahi.
Asahi set the network adapter to use a single PCI Express lane, so my super fast 10 gigabit
NIC was limited to just 1.5!
I reported that bug in Asahi's support chat, and within minutes, a developer had a fix
ready, and once that's merged, 10 gigabit networking will work for all Asahi users!
How cool is that?
I also tested WiFi, and was able to get around 700 megabits just like I could on macOS.
While I was doing these tests, I also noticed that just having the graphical performance monitor
open caused the CPU load to go up to like 25%.
If I ran the command line version `htop` instead, CPU load went down to about 1%.
I can't wait until they get GPU support working.
Linux is really going to fly.
Speaking of flying, I wanted to benchmark something I do a lot: recompile the Raspberry
Pi Linux kernel.
I even have a shirt for it!
When I do it in macOS on this computer, a full recompile takes 9 minutes.
On the Raspberry Pi?
About sixty.
How about on Asahi Linux, on the exact same hardware that takes 9 minutes on macOS?
6 minutes.
That's 40% faster on the exact same hardware!
And that's the same speed I get on macOS on my new Mac Studio, with twice the performance
cores!
Another thing I do a lot is PHP programming, working on my Drupal website.
Docker for Mac, even with it's fast 'experimental filesystem' option, takes 45 seconds to install
my websites's dependencies.
Using Docker on Asahi?
It only takes 13!
Installing Drupal takes 21 seconds on mac OS, but only 16 on Asahi.
"But Jeff," you say, "Docker for Mac is running inside a virtual environment on macOS, so
of course it's gonna be slower!"
Yeah, that's true!
So let's run some native benchmarks.
There's an Apple Silicon version of Geekbench 5, so I ran that on macOS, and got 1749 single
core, and 7703 multicore.
For Asahi, I actually had to run a preview version for ARM64, since the Apple Silicon
version doesn't run on Linux, and it does score worse, at 1633 single core, and 6764
for multicore.
I started running a few Phoronix Test Suite benchmarks when I saw Michael Larabel already
ran 'em on his Mac mini, so let's take a look at his results:
For some benchmarks, like LevelDB, macOS has the advantage.
But scrolling down a bit, it looks like Asahi takes the lead on some tests, like WebP Image
encoding.
Now, Asahi is still in alpha.
There are a lotta performance improvements that can still be made, like boosting the
four efficiency cores the way macOS does.
But it's impressive how well the M1 runs Linux already, even without these optimizations.
When I was browsing the web, using LibreOffice, or doing pretty much anything that didn't
require heavy graphics, the computer felt just as responsive running Asahi as my new
Ryzen build runs Fedora.
That's to say, Asahi's already great, and it's only gonna get better.
But notice I said 'anything that doesn't require heavy graphics?'
There are still a lot of missing features.
There's a complete list on Asahi's website, but number one for me on that list is GPU support.
The M1 chips all have a bunch of fast GPU cores, but they're completely disabled on
Asahi Linux right now.
If you do anything that requires a lot of rendering or anything 3D at all, it's all
hitting the CPU.
The CPU is fast, but even a light game like Super Tux Kart brought the CPU to its knees
trying to render at 1080p.
Other than graphics, USB 3.0 works on some hardware but not everywhere.
Thunderbolt isn't supported at all, so I can't test PCI Express cards on Asahi yet.
Bluetooth is also missing right now, though WiFi worked great.
But even some features that are supported can be flaky, like sound output.
Sometimes I could get sound through the Mac mini's internal speaker, but other times no
audio devices would show.
But these are all expected growing pains, since Asahi has to reverse-engineer a lot
of the drivers for these M1 Macs.
But a lot of the missing features only matter if you wanna use a Mac as a Linux desktop.
What if you just want a super fast headeless ARM server?
Well, I have good news and I have bad news.
Good news?
I installed both Docker and K3s, and they ran great, running all the ARM64 containers
and apps that I run on my Raspberry Pis.
Bad news?
A lot of applications still aren't available for arm64 CPUs like the one in the M1.
A lot of server software you might wanna run in a homelab, like pfSense and opnSense, Proxmox,
and FreeNAS run great on Linux, but only on Intel or AMD.
A lotta companies still think ARM is only used on hobby computers.
Sometimes there are community-built versions, like Pimox7, which is Proxmox built for Raspberry
Pis,
and I tried it on Asahi, but it didn't install out of the box.
But my hope is that seeing Asahi and the efficient, quiet, power of Apple Silicon running Linux,
maybe more of these server vendors will start building for ARM.
It's their loss if they don't!
Old excuses like ARM computers only having a few gigs of RAM, or a few slow processor
cores just don't hold up anymore.
ARM boards and datacenter servers can have hundreds of gigs of RAM, and there are even
ARM chips with 128 CPU cores!
While I was working on this video, support for the Mac Studio was added, and now you
can run Asahi on an M1 ultra with 20 CPU cores and 128 gigs of RAM, running at 800 GB/sec.
That's borderline-hyperscale power!
If you wanna install Asahi on your Mac, you need at least 53 Gigabytes of free space.
Asahi only needs 15 gigs, but you need that extra free space so your macOS partition still
works.
But should you install it?
That's a good question.
I wouldn't install Asahi on my main Mac.
I never install alpha software, especially software that requires modifications to a
bootloader, on a machine I rely on.
But if you have a spare Mac, though, or you love living on the bleeding edge, give it a go!
Hopefully as the process gets more stable, Asahi can build out a more friendly installer
that makes the process less daunting.
You can always boot back into macOS.
You just shut down the computer, then hold down the power button until recoveryOS pops
up, and if you wanna uninstall Asahi, you can delete it's disk partitions and scale
your macOS partition back to the full size. But always make sure you have a backup first!
I think this is a great moment for Mac users.
And more so for people like me who really want an ARM workstation more powerful than
a Raspberry Pi, but cheaper and more polished than the developer boards out today.
It's not exactly the same thing—
Macs won't ever be ARM SystemReady certified, and won't ship with Linux by default.
And they'll always require some hacks to get native Linux boot.
But it works.
And at the very least, it means people could repurpose an M1 Mac to be an efficient Linux
server in a few years, extending the useful life of these machines and preventing more
E-waste.
Until next time, I'm Jeff Geerling.