Home 誰 Sitemap Blogroll

## My Experience with the Framework Laptop

### Ordering

I’d been eyeing the Framework laptop since somewhere in October 2021, but the EU release got delayed and they were very hesitant to give time estimates. I only managed to get my hands on it in late February, and I ended up having to have it delivered to France. I understand the difficulty of setting up logistics especially these days, but I broke my previous laptop and being stuck in limbo like this was not fun.

On top of that, since I had it delivered to France, I was forced to use the French-language website. I wish websites wouldn’t get this wrong, since there’s a lot of people who don’t speak the native language of the country they’re in for various reasons.
I asked their customer service to make a small change to the delivery address, but never got a reply, and the address wasn’t changed. This was a non-issue, in the end, though~

### Set-up

#### Hardware

I got the DIY edition with the (lowest-end) i5-1135G7 CPU, 2x16GB RAM. I brought my own 1TB SSD. The higher spec CPUs didn’t seem worth the money to me. The RAM is probably overkill.

Assembling the DIY edition took no time at all; you could probably speedrun this in <30 seconds. The level of care here is excellent - all that’s needed to replace virtually any part is the included screwdriver, and parts pop off easily. All screws are easily accessible, and every part is labelled with a QR code that links to their knowledge base with replacement instructions.

Replaceable RAM, storage and battery are table stakes - you can get that in plenty of laptops if you look for it. What’s impressing about the Framework is first of all the sheer ease with which to disassemble it. It’s a world of difference even compared to my old Thinkpad X230t, which is​^H​^H was an extremely servicable laptop (;_;). It’s an experience.

Also very impressing is the sheer extent of things that can be replaced. You can see their store of replacement parts here and it includes everything from the audio board to the hinge to the CPU heatsink and so on. The parts aren’t even expensive either!

My enrapturement was short-lived, though, as after a quick assembly my new laptop would not boot up or charge. Not even the charging light would come on. After some searching we did find a guide with instructions on how to fully power cycle the mainboard, and that resolved the issue. It seems the issue could potentially be caused by a dead CMOS battery. Regardless of what caused it, the fix was an obscure and somewhat dangerous fix for what I’d consider a big quality assurance failure.

The more you look at it, the nicer it gets!

#### Software

I installed Gentoo GNU+Linux on the laptop, just like I have on my desktop. I used an Ubuntu live CD as the install medium together with the Gentoo stage3 tarball, and it worked well. I didn’t really have to jump through any laptop-specific hoops, it was a very nice experience. I did use the dist-kernel rather than configuring my own.

The laptop held up well during compiling. It’s not as fast as a desktop of course, but compile times are not limiting. I’ve put this thing through bootstrapping GCC for a cross-compilation toolchain, which is just about the biggest compile job I’ve ran, and it wasn’t that painful.

##### Display scaling

Simply setting `Xft.dpi: 192` in .Xresources was enough for the vast majority of applications to use 2x scaling, which looks very good on this display. This is on X11 obviously; I don’t use Wayland.

The odd application requires its own scaling setting. Rofi requires setting `rofi.dpi` in .Xresources, SDDM required a settings change, Steam also requires a settings change, but for the most part things “just work”.

##### Display manager

I used SDDM which works very well. I wanted to go for something a bit fancier looking, and this delivers. I don’t usually use things in the whole QT ecosystem, so it’s refreshing.

##### Hibernate/suspend-to-disk

This required setting up a swap file and setting a kernel command line parameter to refer to it, but it was easy to do. It works well. I’ve observed the laptop auto-hibernating when the battery runs out, but it doesn’t do this reliably, so I should probably configure it myself.

##### Guake-like transient terminal

Using some `fish` scripts, `bspwm`, `picom` and `xst` I rigged up a transient, transparent terminal to use for quick shell jobs. I used the scripts and config file in Appendix A to do this. The implementation is a bit hacky, and it’s not impossible to break, but it serves my purposes well (and more important, it was fun to make)!

##### Wallpaper-setting script

I wrote a script to set a random wallpaper.

    #!/usr/bin/env python3
    import os
    from random import choice

    pape_path = os.path.expandvars("$HOME/Pictures/Wallpapers")

    def set_wallpaper():
        files = os.popen(f"ls {pape_path}").read().split('\n')
        pape = choice(files)
        pp = os.path.join(pape_path, pape)

        os.popen(f"hsetroot -full {pp}")
        os.popen(f"echo {pp} > /tmp/wallpaper")

    if __name__ == "__main__":
        set_wallpaper()

##### Lockscreen

I hacked together some pretty crappy code to lock the screen using `i3lock`, with my wallpaper composed with a little lock icon as the background. Very overengineered.

Simple, but cute!

Is there a better lockscreen out there that will let me set my own image as the background? They all seem pretty scrappy.

##### TODO

- Battery level notifications
- sleep-then-hibernate
- Battery tuning

### Impressions

##### Build Quality

The laptop is made of aluminium and feels solid but light. The screen does seem pretty flimsy, though. I probably wouldn’t want to drop this thing. It looks sleek and elegant, but pretty muted.

##### Screen

This is my first time ever using a high-DPI screen, and I’m very impressed by it. Text looks unbelievably crisp and pleasant to read. I was somewhat worried about the linux high DPI situation, but I am having no issues whatsoever.

The colours on the screen look very good too, and the black levels are very impressive. I feel like display technology has come a long way in recent times. I have professional colour calibration equipment at home, so I’ll give calibrating the screen a shot when I get back. The 3:2 aspect ratio works very well for a laptop and I like it a lot.

The brightness goes up quite high, but colours feel somewhat washed out at high brightness, and the display is very glossy, so it’s a bit distracting in direct sunlight. I heard some people complain that the hinge is floppy, which is true. It’s not all that problematic, but I really don’t agree with the decision to optimize for one-handed operation over stability.

##### Keyboard

Framework seems to advertise their keyboard as having particularly deep travel, but it mostly just feels like any chiclet keyboard to me. Not a bad chiclet keyboard, but not that great, either. The layout is fine, but it makes me miss the thinkpad.

##### Touchpad

I’ve never had a decent touchpad before, so I was pleasantly surprised. I expected to miss the trackpoint on the thinkpad a lot, but this is fine, though it’s still a step down. Pinch to zoom doesn’t work very well, but I don’t use that functionality a lot. I miss having dedicated mouse buttons; the clicking functionality on this touchpad works fine for me, but it’s hard not to mess up left/middle/right click. That’s a good incentive for me to practice relying on the mouse less, though. There’s plenty of work being done on the Linux touchpad experience software-side, too. It’s a nice time to be a linux laptop user!

##### Battery

With the disclaimer that I haven’t tested very intensely and I haven’t tuned power settings very much.
I seem to get about 6.5 hours of real-world use time when using Emacs and doing light web browsing. I don’t have a good benchmark for more intensive tasks, but compiling does hit the battery pretty hard. All in all I’m very happy with it, getting decent battery life on Linux is hard. It might be worth eventually buying a power bank for it though, for travel~

##### Expansion cards/ports

The little expansion cards are one of Framework’s big marketing things. I think they’re pretty neat, though I don’t always quite understand the way people talk about them, as “dongle killers”. I would find hotswapping these about equally obnoxious as carrying dongles. The idea of aftermarket expansion cards is interesting, though - these are low level, high bandwidth ports, with I think similar capabilities to the ExpressCard ports on old business laptops, but more modern with a USB-C port. I’m looking forward to the USB4 era!

##### Performance

So far I haven’t felt limited by performance at all, the experience has been really snappy. I haven’t thrown particularly difficult things at it, though, but that’s fine - most of what I do on a laptop is reading, web browsing, and text editing. I played some Factorio on it and that seemed fine, but using the touchpad felt limiting so I didn’t play very much.

### Closing words

Getting this laptop set up has been really fun! It’s a good opportunity to take stock of where we’re at. On the hardware side, I am very impressed that it’s now possible to make a laptop that’s this user-servicable, this well-specced and still not that expensive. It’s a reminder of how much better things could be.

On the software side, I feel like the GNU/Linux end-user ecosystem has come a long way. The experience was very painless, though I am also an advanced user, of course. How different are things now than when I got started on Linux Mint Olivia.

Personally, I’m getting a rare chance to critically examine all the little config files, scripts, programs, plugins and workflows I have. It’s fun to re-ignite the spark of join in configuring software and figuring out fluent, comfortable ways of doing things. I look forward to once more exploring and documenting the joy of computers…! <3

## Appendix A: Transient Terminal Sources

`togglescratch`

    #!/usr/bin/env fish

    if test ! -e /tmp/scratch_id
        exec xst -e makescratch
    end

    set nid (cat /tmp/scratch_id)

    if test -e /tmp/scratch_on
        rm /tmp/scratch_on
        bspc node $nid --to-desktop z
    else
        touch /tmp/scratch_on
        bspc node $nid --to-desktop focused --focus --state fullscreen --flag private=on
    end

`makescratch`

    #!/bin/fish
    set nid (xdo id)
    echo $nid > /tmp/scratch_id
    bspc node $nid --state fullscreen --flag private=on --to-desktop focused
    touch /tmp/scratch_on
    set decid (printf '%d' $nid)
    xdotool set_window --name "scratchterminal" $decid
    exec "$HOME/Scripts/cleanscratch"

`cleanscratch`

    #!/usr/bin/env fish

    $SHELL
    rm /tmp/scratch_id
    rm /tmp/scratch_on

`picom.conf`

    fading = true;
    #no-fading-openclose = true;
    fade-delta = 5;
    vsync = true;
    backend="glx";
    opacity-rule=["90:name = 'scratchterminal'"];
    #opacity-rule=["90:class_g = 'xst-256color'"];

## Appendix B: lock.py

    #!/usr/bin/python3
    import os
    import sys
    import time

    if __name__ == "__main__":
        width, height, lwidth, lheight = 2256, 1504, 320, 320
        icon = "$HOME/Pictures/lock_small.png"
        pape = os.popen("cat /tmp/wallpaper").read()[:-1]
        cache = os.popen("cat /tmp/lockscreen_cache").read()[:-1]

        if pape != cache or '--ignore-cache' in sys.argv:
            os.popen(f"convert {pape} -resize {width}x{height} -background black -gravity center -extent {width}x{height} /tmp/wallpaper.png").read()
            os.popen(f"convert -composite /tmp/wallpaper.png {icon} -geometry +{width//2 - lwidth//2}+{height//2 - lheight//2} /tmp/wallpaper.png").read()
            os.popen(f"echo {pape} > /tmp/lockscreen_cache")

        os.popen("i3lock -u -i /tmp/wallpaper.png")
        time.sleep(0.5)
        os.popen("loginctl suspend")

## TODO

remark on modularity of charger remark on finish of modules

last modified: 2022-03-21