There is a lot of hype around Omarchy, and I wanted to see what all the fuss was about. I've run Archlinux in the past without any issues, but recently I've been running immutable Linux distros. In particular, the uBlue flavors of Fedora...specifically Aurora and Bazzite.

I have also been wanting a nicer laptop to run Linux on, but one that isn't too expensive. I don't actually use a laptop all that much outside or work, so I didn't need anything all that powerful. Just something that's a little easier to write email on or type generally that my iPad Pro.

Enter the 12" MacBook I found on eBay. The size is lovely, and makes the laptop barely noticeable in a bag. The one I found is a 2017 model with 16 gb of RAM and a 512 gb SSD. It has an Intel i7 in it, and support for intel Macs is about to be dropped from macOS, so it's the perfect time to try out Linux.

Omarchy installed easily enough. It basically just automates the archinstall script, so you end up with an arch install with default settings. Then, there are scripts that add DHH's default selections on top of that. You end up with a pretty install of Arch running Hyperland with minimal effort. Because I chose to use a MacBook, there are a few additional things needed to get everything working well. In particular, I had the following issues post-install.

  1. Cannot type login password because keyboard is not working
  2. No audio from internal speakers
  3. System not functional after returning from suspend

1. Keyboard not working at LUKS password prompt

DHH already has a script in place to fix this, but it doesn't actually get run on a 12" MacBook due to the way it is writting. To fix this I just saved DHH's script to my laptop, added the MacBook10,1 condition to the first if statement along with all of the other MacBook flavors called out, and ran it as sudo.

# Detect MacBook models that need SPI keyboard modules
if MacBook12,1; then
  echo "Detected MacBook with SPI keyboard"

  sudo pacman -S --noconfirm --needed macbook12-spi-driver-dkms
  echo "MODULES=(applespi intel_lpss_pci spi_pxa2xx_platform)" | sudo tee /etc/mkinitcpio.conf.d/macbook_spi_modules.conf >/dev/null
fi

After the script ran, the following command will re-generate the initramfs ensuring the new kernel modules that were added are loaded at boot.

sudo mkinitcpio -P

This script ensures that applespi, intel_lpss_pci, spi_pxa2xx_platform are loaded as kernel modules at boot, and it allows the keyboard to work before a user is logged in. This is great because it means I can keep the SSD encrypted.

2. No audio from internal speakers

There was no audio on my first boot. Not the end of the world, but it turns out the fix is relatively straightforward, so I went ahead and did it.

There is work-in-progress audio driver for this version of the 12" MacBook available on GitHub. The instruction are listed in the README on the GitHub repo, and after rebooting the audio was working.

3. System hangs when returning from suspend

This one was just a quick search away which lead me to this post on the Arch forums.

This works by disabling the d3cold mode on the nvme drive in the computer. The systemd service will apply this any time the computer restarts, so it's always in place.

Create a file named nvmefix.service in /etc/systemd/system with the following contents:

[Unit]
Description=Script to fix NVMe resume/sleep issues

[Service]
ExecStart=/usr/bin/d3cold_allowed

[Install]
WantedBy=multi-user.target

Then, create another file at /usr/bin containing the script the systemd service above will call.

#!/bin/sh
echo 0 > /sys/bus/pci/devices/0000\:01\:00.0/d3cold_allowed

After saving, make the script executable:

chmod 755 /usr/bin/d3cold_allowed

Finally, start and enable the new systemd service so it will start every time the computer boots up.

sudo systemctl enable --now nvmefix

To test if this is working, after a reboot, check that d3cold_allowed contains a 0 ensuring that it is, in fact, disabled.

cat /sys/bus/pci/devices/0000\:01\:00.0/d3cold_allowed