I wanted to have a small ``portable'' computer that is suitable for word processing and lightweight web browsing (e.g. online banking). I don't like laptops which are non-modular and increasingly non-repairable, so I built a prototype using Raspberry Pi and some spare and recycled items I had around. The inspiration was taken from Commodore 64 executive model that was the first ``luggable'' color computer with a small 5" monitor.
My hardware requirements for a portable luggable computer:
Optional features:
* Raspberry Pi OS / 64-bit / Debian 12 (bookworm)
You would think that when using official software and components, everything would work out-of-the-box. That is not the case here. This is a genuine Linux, so you need to tinker around late at night to get something even somewhat working. At least time passes quickly.
The first problem was that when booting the install image for the first time, the boot hangs somewhere with a blank screen. It's attempting to start the GUI in a loop, but always fails. Doing a power reset and connecting an HDMI display helped, so that it was sometimes able to boot, and I was able to enable the SSH server for debugging. The issue turned out to be related to display detection, and googling around I found a workaround. Adding the following magic to /boot/firmware/config.txt the system is able to boot all the way to GUI reliably:
[all] dtparam=i2c_vc_baudrate=50000
The second annoyance was to realize that the official 7" Pi touchscreen display, when mounted on the so-called premium case, is actually upside down. Luckily, the rotation can be changed within the GUI, by clicking:
Preferences -> Screen Configuration Layout -> Screens -> DSI-1 -> Orientation -> Inverted
This will still leave the boot messages being written upside down. For that, I added the following to /boot/cmdline.txt:
fbcon=rotate:2
Then I disabled the boot Splash Screen to get more verbose output (and also because I couldn't figure out how to rotate the splash screen):
$ sudo raspi-config System Options -> Splash Screen -> No
Finally I had a reliably booting system with everything displayed with a correct orientation.
The touchscreen remains at wrong orientation. Since I don't use it, I added the following to config.txt to disable it:
disable_touchscreen=1
Once you start to use the system, you will soon realize that a small 800x480 display does not work at all with some applications. Remember the days when early web sites greeted you with ``Please browse this site with this and that resolution'' non-sense? Well, Linux GUI is just like that still today. Instead of properly adapting to whatever display size they seem to assume some hardcoded size. The most notable example is LXTerminal Preferences settings window - the OK button is out of screen, and for no reason because the window is mostly blank empty space! And this is an LXDE application that is supposed to ``run anywhere''. What a joke.
This problem was annoying and the first thing I tried was setting smaller screen defaults from:
Preferences -> Appearance Settings -> Defaults For medium screens: Set Defaults
Unfortunately this didn't help. I was already about to throw this project to trash, but again after some late night googling I learned about some ``hidden'' features. While GUI people seem to be poor at implementing generic and usable solutions, they are still good at engineering a lot of neat extra features that help working around the issues they created. The rescue was a feature called ``panning'' that allows creating a larger virtual screen that you can scroll if needed:
$ xrandr --output DSI-1 --panning 1000x1000
After you do this, you can finally press OK in the settings and disable the LXTerminal menu bar from:
Preferences -> Display -> Hide menu bar
Unfortuntely there is no permanent setting for the panning feature so you need to remember to enable it manually whenever needed. Anyway, with the menu bar disabled I can get a reasonaly sized (80x24) terminal on screen. 25th line would be possible if I knew how to disable the title bar from the terminal.
It's amazing how much screen space is wasted when such bars are layed on top of each other. Firefox is another crappy example: there is by default a title bar, tab bar, search box, bookmarks bar.
Later I learned that good old xterm and uxterm provide a full screen mode to allow better user experience on small displays. It's very neat: pressing Alt + Enter gives you a full screen terminal, just like in the old framebuffer console days. I have been using X since 1990s and I was never aware of this handy feature.
The main benefit of using the full screen mode is that you can use one point bigger font to fit 80x25 terminal dimension on screen. I have the following in my .Xresources file:
xterm*faceName: Monospace xterm*faceSize: 11
The following is also useful to get copy-paste compatible with e.g. Firefox:
xterm*selectToClipboard: true
Too bad Raspberry Pi OS chose to use lxterminal in their default install. I believe the first impression is very poor for many Pi users with small displays.
Raspberry Pi runs on SD card by default. I don't trust storing my data using just a single flash card, so I added another one using an USB SDcard reader. Then I migrated the ext4 rootfs on top of encrypted RAID1. Debian-based Raspberry Pi OS boots nicely with mdadm and cryptsetup, you just have to set up it manually from the command line, but everything is just normal stuff.
I have also learned that RAID1 doesn't protect from bit rot happening. If a device returns a successful read, but bogus data, then it will silently corrupt the file system. Even if another drive would contain the valid data, RAID1 has no way to know it. To address this problem, I'm running RAID1 on top of ``dm-integrity'' which provides transparent integrity checking.
Unfortunately distros do not support ``dm-integrity'' for use cases like this out of the box, and automatic activation of devices during the boot is missing. But I was able to make it work nicely with fairly minimal modifications:
TBW
The performance of flash disks got to reasonable level after I switched to expensive SanDisk Extreme PRO SD cards (originally I was using Kingston/Phison USB pen drives; while they turned out be reliable, the performance was terrible). I'd still say that a normal spinning disk is multiple time faster on writes. On reads the difference is not that big. Reliability remains to be seen.
The power consumption of the whole system is less than 10 W during the normal usage. This is very reasonable, so I didn't even bother to make any more specific measurements (display off, wi-fi off, etc.).
With slow disk I/O, all writing needs to be minimized to get decent usability. Some low-hanging fruits:
Generally any heavy disk usage will get system stuck. Consider using your system to do one task at a time. E.g. if you browse web don't do anything else. Or if you do a package install or distro update, have a cup of coffee meanwhile. Terminal applications are more forgiving. As a rule of thumb: terminal use good, GUI sucks.
NOTE: iotop-c package is highly useful when tracing who's writing to disk. Also fatrace is very nice.
Last updated: 2025-07-02 23:23 (EEST)