# Alpine on Framework For some years now my main personal laptop has been a 2013-era Macbook Pro. I've been mostly pretty happy with it and it honestly still works really well except that the battery is starting to die the final death and it's becoming hard to use when not actually plugged in. Major bummer, and I was sort of casually looking around for a new laptop but there wasn't anything super good looking out there so I decided to just wait... until a friend of a friend turned out to have a near-new Framework laptop they were looking to get rid of. Score :) My favorite Linux distro has been Alpine for a long time, but I've never really used it as my primary daily-use OS before, so I figured I might as well try it. It turned out to be mostly easier than I expected! ## Booting the Installer Getting an Alpine installer onto a stick is literally as easy as: $ wget alpine.iso alpine.iso.sha256 $ sha256sum -c alpine.iso.sha256 $ dd if=alpine.iso of=/dev/sdX $ cmp /dev/sdX alpine.iso The system came with a debian install on it that I didn't want. It took me a while to even figure out how to get into the boot menu; apparently the thing Linux does when you tell it to reboot causes some sort of fast reboot in the Framework's firmware (?) that makes the boot prompt not show up. Eventually I had to power off the machine, cold-boot it, and tap F12 to get into the boot menu... which offered my USB stick as an option but firmly refused to actually boot it. Hmm. I ended up needing to turn off UEFI secure boot, which was enabled - I don't know if the Framework came this way or not. Once I turned that off, the Alpine installer booted, although the Framework's firmware is a bit finicky: you apparently can't press F12 while the POST is running or it will hang. Ow. ## Installing Alpine I originally tried to follow a complicated, manual procedure to set up a LUKS encrypted root on LVM, which was both painful and ultimately totally not necessary. Don't do that; it's not worth the bother. I also briefly flirted with trying to set up LUKS by hand and run parts of the Alpine installation flow but that also did not yield a bootable system. What actually *does* work, and what I should have tried first, is to just run the setup-alpine script in the totally normal way and tell it to use an encrypted root. For whatever reason I didn't think Alpine would support this but it totally does and you should just do that. So, yeah: $ setup-alpine That took not very long, and then I was able to power the machine off, unplug the USB stick, and boot into my new system. Yay! ## Networking & X11 Getting networking going was easy, except that the package set I had did not seem to include wpa_supplicant, so I had to find an ethernet adapter to bootstrap things enough to get onto wifi. Simple enough. I have my system set up so that it doesn't start networking at boot[1], so when I want to be connected I do: $ /etc/init.d/networking start But no other fiddling was required here, except for writing a wpa_supplicant config file. X11 turned out to be a different beast. I was used to systems like Debian, where installing xserver-xorg also installs dozens of auxiliary packages with input drivers, graphics drivers, and so on. On Alpine, if you install the X server, you're just installing the X server, so when I installed X and did: $ startx It didn't start, complaining about not having any graphics drivers. That was easy enough to fix, but then I had an X with graphics output but no input... sigh, back to the package mines. I ended up installing: * xf86-video-intel * xf86-input-evdev However, xf86-input-evdev did *not* work with the Framework's touchpad at all; the cursor moved, but clicks didn't register. When I checked xinput, the touchpad was being detected as a "generic mouse". I suspected I could fix the lack of clicks, but I doubted I would get a pleasing result for multi-touch or swipe gestures, so I fell back on something I knew better: xf86-input-synaptics. I had to do a little bit of configuration to convince X to let the synaptics driver handle the touchpad: Section "InputClass" Identifier "mouse0" MatchIsTouchpad "true" Driver "synaptics" EndSection Normally you don't need to do this since modern X can figure stuff out. That got my a working touchpad... ish. ## Multi-touch None of the gestures I could figure out to paste actually worked, which was pretty irritating since my password manager likes to drop passwords into the clipboard. Fortunately the synaptics input driver has a ton of knobs, and I could do: Option "ClickFinger2" "2" Option "TapButton2" "3" ClickFinger2 is 2-finger click, so that line makes synaptics map that gesture to "middle mouse button", and TapButton2 is two-finger tap, which I had synaptics map to "right mouse button". Yay! ## Fonts Since the Framework has a very high-res display (2256 x 1504), everything was extremely tiny and kind of annoying to read. I am not actually sure what the correct way to fix this is, but what I actually did was just turn the font size up. In my .Xresources: UXTerm*faceSize: 16 ## Chromium I was pretty surprised when Chromium just worked immediately after install, including audio and such. The only thing that didn't work was my security key, which required a little bit of setup; by default udev doesn't know that security keys should be accessible to my user, so I wrote some udev rules to assign it: SUBSYSTEM=="usb" ENV{ID_VENDOR_ID}=="18d1" ENV{ID_MODEL_ID}=="5026" \ SYMLINK+="sk" GROUP="seat" KERNEL=="hidraw*", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="5026" \ GROUP="seat" MODE="0660" And that basically did the trick :) ## Tarsnap The last interesting piece of setup was tarsnap, which is actually packaged by Alpine, so all I had to do was: $ tarsnap-keygen --keyfile /root/tarsnap.key --user me --machine esper $ cp /etc/tarsnap/tarsnap.conf.sample /etc/tarsnap/tarsnap.conf $ vi /etc/tarsnap/tarsnap.conf $ tarsnap -c -f ... /etc /home/elly ## Overall Impressions So far so good! I quite like the feel of the hardware and the modular design, and Alpine has been much easier to get working than I thought it would be. In particular I was really bracing myself to have to get to grips with either sound or video acceleration, but actually they both seem to Just Work. Hooray Linux on the Desktop 2022! [1]: A habit I acquired a long time ago but still stick with - my machines start offline and are generally offline when I don't need them to be online. It helps me manage my own distractability. $#t Alpine on Framework $#s My experiences using Alpine Linux on an 11th gen Framework laptop $#o linux, sysadmin $#u 1036d6de-674b-4008-b094-d95da0b6cd14