Ivory Siege Tower

mobile construct built of thoughts and parentheses

UMPC Valkyrie

[2025-04-05]

emacs guix iron linux personal setup st_dev st_post umpc

§ Intro

I've been using a GPD Pocket Mini in my Samurai's two-laptop setup for a while, and to a surprisingly great pleasure. In a pocket on my belt I'm carrying a familiar Linux system, with the settings exactly replicated from the "stationary" 15'-machine. It's convenient enough to work as a wearable terminal/editor, with the smallest keyboard that fits under my hands and a touch-screen, eliminating a need of a separate Android tablet. And the idea of traveling light, without carrying 2kg laptop chassis together with extra chargers (only with a USB-C power adapter) - I love it so much!

Unfortunately, there are a few flaws in the first GPD Pocket Mini that prevent it from becoming an all-purpose device. The crowd-sourced chassis is not perfect: the charger and mini-HDMI ports are located too close together and one cannot plug in the power cord and external display at the same time. Multimedia is garbage, streaming a video causes the device to over-heat (that's followed by a lag but also by a disgusting high-pitched noise). The low-consumption Intel Atom has a reduced instruction set and does not support vectorization - sometimes it matters.

^ The Fleet. Top: GTD Galatea - reliable MSI GS-60 with numerous upgrades. Bottom left: GTF Apollo - GPD Pocket Mini model one. Bottom right: GTF Valkyrie - the new Intel N100 UMPC laptop.

I didn't mind all those flaws: in the end, I got my GPD Pocket dirty cheap from Wallapop, in order to try and test such form-factor. Pleased, I started a hunt for a higher GPD model to make myself a birthday gift. Unfortunately, right about that time (~beginning of the year 2025) the GPD Pocket Mini-III with Intel Core i7 processors were already out of stock. What was left were Pentiums with reduced throughput compared to i7. The upcoming Fourth model of GPD Pocket (featuring AMD Ryzen) was only available for pre-order. Besides, its pen is gonna lack pressure sensitivity, and I'm a sucker for hand-writing.

Therefore, for my next device I've ordered a "No-Name-UMPC-Tablet-Convertible-from-Amazon", a.k.a. Tuofudun N100. A risk I sort of mitigated by adding an insurance on top of the order from my autonomo business account. I somehow did not skim Reddit beforehand, and only later found a thread devoted to what looks like exactly the same model, where OP complains on not being able to install Linux on it. Funny, I was reading it within Ubuntu on that very device after a smooth dual-boot installation...

At the moment I'm using the UMPC as a main laptop, and quite happy with it. I've set it up exactly as intended: a compact multipurpose device with medium throughput suitable for most daily tasks, two usage modes - laptop and tablet - and that's light, silent and easy to carry.

I follow the naming conventions of starship classes and capital ships from Freespace that loosely correspond to the machine usage pattern. That's how the UMPC got a hostname of one of the best interceptor fighter of the Great War...

...the Valkyrie

^ Valkyrie resting in its nest.

§ The Chassis

Characteristics of the laptop:

  • Intel N100 Alder-Lake quad core 3.4GHz

  • 12Gb DDR5 RAM. Obviously, that is fewer than 16 but larger than 8.

  • I took the maximum 2Gb SSD drive option, to split in half between two dual-booted operating systems.

  • 8 inch 1280x800 touchscreen

  • pressure-sensible stylus pen communicating through MS protocol. The stylus input is recognized as a separate device (and needs to be rotated separately in Linux with orientation change, see below).

  • peripherals: Ethernet socket, HDMI, one USB-3, one USB-C, stereo jack and a built-in microphone.

    Keyboard on an 8' surface is large enough to be comfortable (it's bigger than on a GPD Mini where it was quite manageable). It includes an optical-sensor track point mouse.

    The battery holds approx 4 hours in Windows. In Linux with lightweight graphical environment and my routine work activities its life extended to approx 6 hours.

    Both USB ports can be used for charging. A USB-C hub with power delivery pass-through works fine to both plug the device and extend the available ports number.

    The screen flip-rotates 180 degrees and folds on top of the keyboard, converting the device to a tablet mode. I prefer to hold it the way the heat exhaust pointing up - it's conveniently located on a longer edge.

    So far the only aspects that I wish were better are connected with audio. The speakers could be a bit louder (they are Ok for a quiet room though). The built-in microphone registers quite a lot of noise, but I guess it's a tradeoff for placing it on a compact frame of a device with an active cooling. Anyways, those are not critical and easily solved with e.g. a headset. For the rest of the chassis, I'm quite happy with it.

^ Sculpting in MagicaCSG in tablet mode. Reported the author that I'd like some options to scale the gizmo controls - it is hard to hit them with the stylus.

§ The Setup

A licensed Win11 Pro is pre-installed on the laptop and works fine, besides displaying "To be filled by O.E.M." everywhere instead of chipset name and information. Same is shown in BIOS, and I guess that without disassembly it's hard to tell anything about the motherboard.

However, the rest of the components all identify fine. There was no fight for the right driver so far. In either of them operating systems.

Installation of Ubuntu 24.04 LTS went smooth: I just had to disable Fast Boot in the BIOS, and the bootable USB went first in the boot options (I flash them with balenaEtcher for convenience). From there the installation is straightforward.

The following are details from my configuration log. Essential settings are shared among all my devices via Syncthing together with their origin - the Org-Roam personal wiki, a slice of which you are reading now.

§ Guix

I use Guix in package management mode, alongside the system package manager. The main reason is seamless installation of Emacs and StumpWM (my daily used Lisp systems) plus their tricky dependency packages e.g. telega.el. Plus some other heavy software that's not used daily, like Blender. Plus I've got long-living plans of getting my hands on other features of Guix, like virtualization, isolated environments inside guix shell etc. So many pluses here...

First of all, it is necessary to install locales for the current profile:

  guix install glibc-locales

Otherwise, after guix home reconfigure lightdm will crash with an error. All because command in /.profile will throw a warning.

§ Fonts

When installed from Guix, the fonts are visible for fontconfig by doing

  ln -s ~/.guix-profile/share/fonts ~/.local/share/fonts
  fc-cache -fv

§ Emacs

Installed from Guix together with:

  • emacs-use-pakcage

  • emacs-telega-server

  • emacs-telega-contrib

  • emacs-pdf-tools

  • emacs-sly

  • emacs-sly-asdf

  • emacs-sly-quicklisp

  • emacs-elfeed

  • emacs-elfeed-org

  • emacs-elfeed-goodies

  • emacs-combobulate

as well as tree-sitter and tree-sitter-* packages. The rest of Emacs add-ons are are fine to be installed from MELPA.

After Emacs is initially obtained this way, a new shell must be spawned to catch up with: ~/.guix-profile/share/emacs/site-lisp/guix-emacs.el:guix-emacs-autoload-packages

When anything's not Ok, start with --debug-init to catch bugs and misconfigurations.

§ Python and Python Applications

  sudo apt-get install python3
  sudo apt-get install python-is-python3
  sudo apt-get install python3-pip

When called as before, for --user, pip will argue that it doesn't work within a virtualenv:

error: externally-managed-environment

× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.

To mitigate that, one can use pipx:

  sudo apt-get install pipx
  pipx install fortls             # example package to be used system-wide

§ StumpWM

Packages used when installing from Guix:

  • stumpwm-with-slynk

  • cl-stumpwm

  • sbcl-stumpwm-ttf-fonts

  • sbcl-stumpwm-pass

  • sbcl-stumpwm-swm-gaps

To add StumpWM to the Lightdm session menu, a session file should be placed under /usr/share/xsessions/stumpwm.desktop with contents like:

  [Desktop Entry]
  Encoding=UTF-8
  Name=StumpWM
  Comment=Login using StumpWM
  Exec=/home/<username>/.guix-profile/bin/stumpwm
  Type=XSession

This setup works even with transparent windows - no need for explicit installation of a compositor like compton - I guess it's a novelty in Ubuntu Mate 24.04

Final functionality test: slynk connection to :stumpwm package within Emacs.

§ Hledger

Compilation of hledger takes very long, and its version available in Guix is quite old. Therefore I just put a prebuilt binary downloaded from the release page inside /usr/local/bin. Hledger-Utils require few additional python packages:

  pipx install hledger-utils
  pipx install PyQt6
  sudo apt-get install python3-tk

§ TouchScreen and Stylus orientation

In Windows, the UMPC tracks the gyro sensor orientation and rotates the screen accordingly. Out there on GitHub a gist exists that shows how to enable that sort of behavior in linux (it's written originally for Lenovo Yoga - pay attention to the comments).

I could follow the script for a laptop-style orientation, but when I'd reached the tablet I realized auto-rotation wouldn't be convenient: first, two different processes need to apply quite different rotation matrices since the screen of the tablet is upside-down AND flipped w/r to the laptop. Second, I got lost and annoyed figuring out transitions for that weird orientation. And lastly, I don't quite need the automatic rotation for that kind of device. I can hardly think of a scenario when it would be really useful.

So, instead I've made four separate shortcuts that rotate TouchScreen and Stylus matrices. Attached standard icons to them and put the shortcuts in the menu and on the panel. Here's the sample script:

  DNAME=DSI-1
  ROTATION="right"
  CTM="0 1 0 -1 0 1 0 0 1"
  #ROTATION="left"
  #CTM="0 -1 1 1 0 0 0 0 1"
  #ROTATION="normal"
  #CTM="1 0 0 0 1 0 0 0 1"
  #ROTATION="inverted"
  #CTM="-1 0 1 0 -1 1 0 0 1"
  SCREENDEV=$(xinput list | grep 'ELAN Touchscreen' | grep pointer | sed 's/.*id=//' | sed 's/\s.*//' | head -n1)
  STYLUSDEV=$(xinput list | grep 'ELAN Touchscreen Stylus' | grep pointer | sed 's/.*id=//' | sed 's/\s.*//' | tail -n1)

  xrandr --output $DNAME --rotate $ROTATION
  xinput set-prop $SCREENDEV --type=float 'Coordinate Transformation Matrix' $CTM
  xinput set-prop $STYLUSDEV --type=float 'Coordinate Transformation Matrix' $CTM

^ having the orientation shortcuts duplicated in the Menu is useful when the panel becomes hidden or obstructed somehow

§ Onboard Virtual Keyboard

The built-in virtual keyboard is slightly buggy and crashes on startup. The cure is listed here close to the end:

I entered onboard-settings (from mouse menu) and went to Keyboard -> Advanced -> Input options and set Input Event Source to GTK and it stays.

§ Scrivano for Handwritten Notes

The best app that I know for hand-writing and annotating. It's a must-have for every touchscreen setup (one actually doesn't even need an active pen to use it). The interface is intuitive, its work performance responsive and very convenient, and it takes pressure sensitivity into account ofc.

Linux version is free on the official website, but I bought some copies as gifts through Windows App Store, in order to support the author.

§ MagicaCSG for 3D Sculpting

Another brilliant piece of indie software that I'm a patron of: MagicaCSG by @ephtracy, the author of MagicaVoxel and Aerialod 3D-goodies. In MagicaCSG he uses Signed Distance Fields algorithm for 3D-scene composition from primitives, their modificators and logical operations. Creation of relatively simple models in MCSG is a blast: fast yet the result is cute and eye-pleasing. Moreover, the rudimentary export allows to e.g. 3D-print the models after some post-processing.

Recently I found MagicaCSG quite useful for sketching of my ceramics creations. One feature I requested is scaling of the GUI elements: right now I struggle to hit them with the pen in tablet mode.

MCSG runs smooth under Wine with Mesa OpenGL drivers in Linux - a sign of quality C code. It seems to even show better performance than in Win11!