# Running Asahi Linux on a M2 Air I switched to Arch almost a decade back, and haven't distro-hopped since. While I'm an i3 user, I've been trying out KDE on the Steam Deck, and been wanting to use it further. And when Asahi recently announced experimental GPU Support on the M1/M2, I decided to dive in and try it out. ## Why It is my firm belief that _all software sucks_[^ass]. This includes Operating Systems as well. It just happens that I prefer Linux's warts to MacOS. [^ass]: I once gave a talk about it. [Slides](https://docs.google.com/presentation/d/1aua-R4pSUy4ltHpJz8IxqSxtAnCdtemTX4N56AMuUUE/pub?start=false&loop=false&delayms=60000) are here, as include suggestions on how to deal with it (Build resileint software). I've run Linux on dedicated hardware in the past (System76 Galago Pro, 2014 Edition[^galago], Dell XPS13 Developer Edition), as well as on Apple Hardware (M1 Air 2015). I didn't like the build quality of the former, and the processing power on the latter. I don't like the newer Macbook Pros (M1/M2), and find them bulky. Linux on a powerful and light Macbook Air is the best of both worlds for me, so it was a fairly straight forward choice. [^galago]: I [reviewed it back in 2014](https://captnemo.in/blog/2014/07/04/galago-ultra-pro-review/). I don't plan to use this daily, just for travel. I'm travelling for the next month, so this is my *current daily driver*. Once I'm back home, I'll switch back to my desktop (Arch on a ASUS Mini PC). I made the decision between M1 and M2 based solely on the MagSafe port in the M2 - it lets you charge the device while using both the USBC ports as well. My home setup is dual-monitor so I'll be needing both the ports while charging. ## Installation Experience Installation was a breeze - great UX, and idiot proof. Only two notes of consequence: 1. You have to decide on a disk partitioning scheme. I did a 50% split between MacOS and Linux, but this is on a 128GB Mac. Asahi Linux is a small overlay (with 10-20 packages from the asahi repository) over a standard ArchLinux ARM installation[^arm-mirror]. If you don't like ArchLinux, there's unofficial scripts that use the Asahi installer to install other distros: https://github.com/AsahiLinux/docs/wiki/SW%3AAlternative-Distros. I haven't tried these, so can't vouch for such a setup. [^arm-mirror]: I noticed the lack of a ArchLinux ARM Mirror in India. I might get to setting one up, but I'll gladly sponsor to any such effort. ## Pros: 1. Battery Life is amazing. I easily get 12-14 hours of usage (with intermittent suspends). 2. Fanless, so it can't make any noise. Even if I compile stuff. 3. The build quality is better than pretty much any other laptop. My Dell XPS13 came close, but Macbook is just far ahead. 4. The keyboard is far better than previous gen Macbooks. ## Cons A switch to Asahi Linux on Apple Silicon is in reality 2 switches: Switching to ARM, and switching to Linux on an Apple device. ### Switching to ARM While ArchLinuxARM itself is pretty good, in terms of package coverage from ArchLinux, the same isn't true of other software. So far I've noticed the following software to be missing: 1. Steam 2. Signal Desktop 3. Widevine DRM[^drm] 4. Zoom (Joining calls in browser works fine) While Steam isn't essential, Widevine not being available many streaming services won't work[^stream]. Signal Desktop does have an [ARM package on AUR](https://aur.archlinux.org/packages/signal-desktop-arm), but you need to built it yourselves. [^stream]: I've tested Spotify, and Prime Video so far. [^drm]: Yet another reason why DRM sucks: Google can unilaterally decide whether I can watch media I already pay for, by deciding the build targets for Widevine. A few surprise vendors do support ARM64: 1. Telegram Desktop 2. Sublime Text I've had a few issues crop up with python/ruby extensions. There's also the typical Docker architecture change issues. Beyond that, these are mostly similar issues faced by early M1 adopters, and most of these have been smoothed over as a result. I haven't tried running Rosetta/QEMU/Box64 etc to run x86 software yet, but that's planned - I have a bunch of Humble Bundle linux binaries that were x86 only. Asahi also uses 16KB as its page size, which is not common, and some software breaks as a result. Asahi docs have a nice page documenting the issue: https://github.com/AsahiLinux/docs/wiki/Broken-Software, which they want to fix upstream instead of patching it. I've only been impacted by Zig and Wine's unavailability so far. ## Switching to Apple Hardware I've dealt with these issues in the past when I ran ArchLinux on a Macbook Air. Webcam/Mic required a separate driver then, and it doesn't work here yet. There were also surprising bonuses to such a setup - I could Daisy Chain monitors on Linux. My 2015 Air had a single DP out that connected a single monitor. However, it wasn't supported on MacOS, with the same hardware. ### Keyboard A common quirk of Linux on Macbooks is the weird keyboard layout. I used a [patched `apple-hid`](https://aur.archlinux.org/packages/hid-apple-patched-git-dkms) driver to fix the keyboard layout earlier, switching from: <kbd>Fn</kbd><kbd>Ctrl</kbd><kbd>⌥</kbd><kbd>⌘</kbd><kbd>Space</kbd><kbd>⌘</kbd><kbd>⌥</kbd> (Default Apple) to <kbd>Ctrl</kbd><kbd>Fn</kbd><kbd>⊞</kbd><kbd>Alt</kbd><kbd>Space</kbd><kbd>Alt</kbd><kbd>Ctrl</kbd> (Standard PC) Most of this patch is now upstreamed, so Asahi supports changing it to: <kbd>Ctrl</kbd><kbd>Fn</kbd><kbd>⊞</kbd><kbd>Alt</kbd><kbd>Space</kbd><kbd>Alt</kbd><kbd>⊞</kbd> for now. The right Win is confusing, but hoping to get this fixed upstream soon. The [Apple Keyboard](https://wiki.archlinux.org/title/Apple_Keyboard) page on the ArchWiki has good instructions. This is the configuration I'm running with: ```conf options hid_apple swap_opt_cmd=1 fnmode=2 swap_fn_leftctrl=1 ``` ### Hardware Support I switched to the `asahi-edge` kernel to get access a few important features that are still considered experimental: 1. GPU. 2. Keyboard Backlight 3. Display Backlight 4. Suspend GPU support has been pretty good - no crashes, and video works well. I've had minor issues with Display Backlight Support (It goes to minimum on wakeup), and suspend support is not quite there yet: 1. X fails to start ocassionally on wakeup, so I have to restart the display manager manually. 2. USB/BT/WiFi disconnects on wakeup. The following features are still WIP, and it might take a few more months to get these shipped to stable: 1. Speakers 2. Microphone 3. Thunderbolt 4. DP Alt Mode The important ones here are the Speaker/Mic, which I'm workaround around by using my phone for now. Not being able to use an external monitor is an issue, but since I'm travelling, this is a non-issue for now. The following are yet to be picked up, so don't expect much progress on these for the near future: 1. Secure Enclave Processor 2. Webcam 3. Neural Engine 4. Video Encoder 5. TouchID In urgent situations if I have to access the webcam, I can always boot up MacOS as well. ## tl;dr Asahi works great on Apple Silicon. There's a small collection of software (like Widevine/Zig) that isn't available on Asahi/ARM64, and some important features that are still in progress (Speakers/Webcam/Mic/External Monitors). GPU and Sleep support is still experimental, but the device is usable enough for me (No critical showstoppers so far).