Some installation notes from getting Asahi Linux (alpha) running on an M1 MacBook Air (Apple Silicon).
Asahi Linux is a Linux distribution for Apple Silicon. The alpha installer release came
out on 18 March 2022, and being brave, I decided to give it a try.
https://asahilinux.org/2022/03/asahi-linux-alpha-release/
Before you do the install, you need to upgrade your Apple Silicon machine to macOS Monterey 12.3
or better. MacRumors reports that if you have had your logic board replaced recently there
are bricking issues with this release. My upgrade went smoothly, but if your MacBook has
been in the shop recently you should take extra care.
https://www.macrumors.com/2022/03/17/macos-monterey-bricking-macs-logic-boards/
The install process itself went smoothly. In the course of doing it, the script
will do a "live resize" of your existing MacOS partition to make room for a new
partition that has Asahi Linux on it. The configuration supports a dual boot setup,
so you can pick at boot time which OS you are running.
The installer downloads Asahi Linux, and if your network is not 1000% stable you
might see this message
Error downloading data (<urlopen error [Errno 60] Operation timed out>), retrying
The progress indicator here is a series of +++ signs, as long as those continue to
appear you'll be fine. If your network is not great it might take a long time,
expect to download between 700MB and 4GB of data.
Follow the reboot instructions precisely after doing the install. "You need to fully shut down your machine, then boot by holding down the power button until you see “Entering startup options”, choose your new OS in the boot selector menu, and follow the prompts."
You'll boot into Asahi Linux, which is a derivative of Arch Linux ARM. There
is an installer with a few options (pick your time zone, pick your keyboard
layout, set an initial password) and you'll be into a desktop based on KDE
Plasma. One of the things you'll pick is a system name; I chose a name
distinct from but related to the main name of my MacBook to make it distinct.
https://archlinuxarm.org
If you haven't used Arch before, the package manager is "pacman", and there's
a helpful "Rosetta" table which will help you figure out how to translate
commands from other package managers into this one.
https://wiki.archlinux.org/title/Pacman/Rosetta
Plasma is a desktop environment from KDE, providing a familiar windows-icons-mouse
environment. Coming from the Mac, you will notice that some keyboard bindings
are different, for me notably this is cut/copy/paste which I always get confused
in Linux systems. You may find Plasma familiar if you come from Kubuntu, which
is a Ubuntu distro that uses Plasma instead of GNOME.
https://kde.org/plasma-desktop/
Firefox is a supported browser in Asahi Linux. What I noted was that
the Retina display on my MacBook Air gave me teeny tiny text on the screen.
You can bump up the magnification in the window to make the browser
readable, but that's not quite enough to get the whole UI larger. Arch
has a detailed article on "high DPI displays" (HiDPI) which specifies all of
the various tweaks to the various applications that might be necessary to
make the display just the way you like it.
https://wiki.archlinux.org/title/HiDPI
The first application I installed was Tailscale, a VPN that I use to connect
my various and sundry systems together. The install went quickly using the
Arch Linux instructions, even though those instructions promise only 64-bit x86
support.
https://tailscale.com
Feeling brave, the next thing I tried was getting Obsidian up and running.
Obsidian is a personal notebook structured as a wiki based on Markdown. I
keep lots and lots of notes in Obsidian, and if I'm going to use Asahi for
any length of time I'll want to have it running. The options provided for Linux
for arm64 are "Appimage", tar, and deb formats. Arch Linux ARM does not appear
to have a prepackaged Obsidian ready to install, so I grabbed the tarball and
gave it a try. The immediate error message was "segmentation fault".
https://obsidian.md
Obsidian is based on Electron and Chromium, and there are notes in the Asahi alpha
distribution that Chromium is not supported due to its lack of support for 16K
page sizes. Different aarch64 chips support different memory allocation configurations,
with 4K pages being relatively universal and 64K pages originally found in RHEL
and CentOS configurations. The M1 hardware supports 16K and 4K pages, and the
Asahi team is starting with the 16K configuration for performance reasons as well
as to shake out any remaining software bugs for the relatively few systems remaining
that hard code a page size. The Chromium bug was first found by the Debian team
as they were doing a port.
https://bugs.chromium.org/p/chromium/issues/detail?id=1301788
The identification of a PAGE_SIZE bug generally affecting aarch64 systems
dates back at least as far as 2015, when the Go language was seen hard-coding
a 64K page for that architecture. That bug in Go was fixed in 2016, after it
was seen impacting the Docker overlay filesystem.
https://github.com/golang/go/issues/13191
The Asahi team has a short list of other software affected by the 16K page
size issue, with status towards patches. The Chromium bug affects a whole
set of Electron based applications. FEX, an x86 emulation library, is known
to have issues that may be difficult to resolve in practice due to the
deep-seated assumptions about the 4k page size in the x86 architecture. Emacs
(good old Emacs) makes some assumptions about the page size being defined
at compile time instead of at run time.
https://github.com/AsahiLinux/docs/wiki/Software-known-to-have-issues-with-16k-page-size
Overall impressions:
Installation was very smooth and painless for an "alpha" release, no complaints.
The general arm64 Linux ecosystem is in pretty good shape, which is reassuring
and bodes well for a server style installation of Asahi Linux.
2022 is the year of Linux on the desktop, and cut/copy/paste key bindings still
trip me up.
Page size bugs are the bugs that keep on giving, and are still affecting aarch64
software development years after they were first described and identified.