Home Blog

Upgrading a modified reMarkable 2 to OS 3.27 and Oxide

My reMarkable 2 had been running OS 3.2.3.1595 since early 2023, with KOReader launched by a shell script, rm2fb doing the drawing, and a swipe up from the bottom edge toggling between the reader and the reMarkable interface. All of it installed by hand. No Toltec, no package manager, no record of what had been done beyond the files themselves.

I had left the setup alone because it worked. When I wanted to add a newer tool, I found that most of the surrounding software had moved on.

I wanted to use reManager, a desktop app for managing reMarkable mods through the Vellum package manager. Getting there required an OS upgrade, a replacement for the old display setup, and a fix for Oxide startup with Wi-Fi disabled.

What was actually installed

I started by checking the running processes to reconstruct what I had installed:

651 root  {ko.sh} /bin/sh /home/root/scripts/ko.sh
654 root  rm2fb-server
658 root  {koreader.sh} /bin/sh /home/root/apps/koreader/koreader.sh
663 root  {reader.lua} ./luajit ./reader.lua
241 root  /home/root/apps/touchinjector

The launcher script explains the architecture in fifteen lines:

systemctl stop xochitl
LD_PRELOAD=/home/root/.lib/librm2fb_server.so.1.0.1 /usr/bin/xochitl &
sleep 2
export LD_PRELOAD=/home/root/.lib/librm2fb_client.so.1.0.1
/home/root/apps/koreader/koreader.sh

xochitl is the reMarkable's own application. The trick is to kill it, then restart it under an LD_PRELOAD that turns it into a framebuffer server for someone else. The rM2 has no writable /dev/fb0, so rm2fb fakes one by hooking the one process that does have display access.

The swipe was handled separately by touchinjector, a compiled ARM binary. strings showed which commands it ran:

/dev/input/event2
swipe right
swipe left
execute custom script
~/scripts/swipeup.sh

The script path is compiled into the binary. Changing it would require rebuilding from source that I no longer had, so I could not rely on keeping that gesture handler during the migration.

Back up first, and verify the backup

The tablet keeps /home on a separate 6.9 GB partition from the two OS slots. I backed it up with rsync over the USB network interface:

rsync -a --numeric-ids --delete [email protected]:/home/root/ home-root/

The 811 MB copy took about a minute. I then compared it with the tablet:

rsync -rn --checksum --delete --itemize-changes \
  [email protected]:/home/root/ home-root/

Dry run, checksum comparison, itemized output. Zero differing files. This reported thirteen "skipping non-regular file" lines, all symlinks, which --checksum in dry-run mode does not compare. They were in the real copy. One of them mattered a lot later:

apps/koreader/fonts/CustomFonts -> /home/root/CustomFonts/

KOReader uses that symlink to find custom fonts. Losing it during a restore would leave 82 MB of fonts present but unavailable to the reader.

Upgrading in two stages

The plan was to reach 3.27.3.0, the newest image reMarkable publishes for the rM2. Every gesture and launcher package in the Vellum index requires 3.23 or newer, most require 3.26, so almost nothing would install on 3.2.3.

reManager lets me select a specific OS image. I initially expected one installation to reach the target, but its source showed why the tablet needed an intermediate release:

const minSwupdateVersion = "3.11.2.5"

func (a *App) isLegacyOS() bool {
	v := a.activeOSVersion()
	return v != "" && rmversion.Compare(v, minSwupdateVersion) < 0
}

reMarkable changed updaters partway through the 3.x series. Older systems use update_engine, an Omaha-protocol client; newer ones use swupdate. My tablet had no swupdate binary at all, so reManager correctly classified it as legacy and offered only the older .signed images, which stop at 3.11.2.5. The newer .swu images start at 3.18.1.1. The two ranges do not overlap, so it is two installs with a reboot between them.

For a legacy update, reManager starts a small Omaha server on the desktop, tunnels it to the tablet over SSH, redirects update.conf to that tunnel, and restores the original configuration before rebooting. My existing update.conf suggested a similar updater had been used before:

#SERVER=http://10.11.99.2:8000

Checking the rollback partitions

The rM2 has two OS partitions and updates write to whichever is idle. I had assumed that meant the whole climb was reversible. Checking the partitions directly showed otherwise, because both slots held the same version:

mount -o ro /dev/mmcblk2p3 /tmp/p3chk
cat /tmp/p3chk/etc/version   # 20230227165950

So the slots fill like this:

Point p2 p3 Can return to
Start 3.2.3 (active) 3.2.3 3.2.3
After stage 1 3.2.3 3.11.2.5 (active) 3.2.3
After stage 2 3.27.3.0 (active) 3.11.2.5 3.11.2.5

Stage two overwrites the last copy of the original. After it, the oldest reachable system is 3.11.2.5, because a 3.27 system will not accept a legacy .signed image and the .swu range does not go low enough. Going further back means USB recovery flashing, which erases the device.

I therefore needed to check the tablet after the first stage, while returning to 3.2.3 was still possible.

Replacing rm2fb

rm2fb hooks xochitl at hardcoded addresses, one set per release, listed in src/shared/config.cpp:

!3.2.3.1595
update addr 0x3a1a10
create addr 0x3a4364
...

The list contains 45 versions, ending at 3.3.2.1666. My old release was supported, but the target release was not. Adding support would require disassembling the new xochitl to locate five function addresses.

The replacement is not a newer rm2fb. Current KOReader supports three display backends on the rM2, and picks between them by environment variable:

if is_qtfb_native then
    fb_module = "ffi/framebuffer_qtfb"
elseif is_blight_native then
    fb_module = "ffi/framebuffer_blight"
else
    fb_module = "ffi/framebuffer_mxcfb"
end

blight comes from Oxide, qtfb from AppLoad. The check that used to fail hard now returns early:

if is_rm2 then
    if is_qtfb_native or is_blight_native then return Remarkable2 end
    if not os.getenv("RM2FB_SHIM") and not is_qtfb_shimmed then
        error("reMarkable 2 requires a RM2FB server and client to work ...")

The old KOReader binary could not move to the new system: v2025.10 has no blight backend. I installed the program through the package manager and copied six settings paths: settings/, settings.reader.lua, history.lua, defaults.custom.lua, styletweaks/, and clipboard/.

Reading positions were already stored in .sdr directories beside the books. Since /home/root/books stayed in place, all 41 directories survived the upgrade.

Oxide would not start

Both OS updates completed successfully. The packages installed, and KOReader registered its launcher entry:

{
    "bin": "/home/root/xovi/exthome/appload/koreader/koreader.sh",
    "environment": { "KO_USE_BLIGHT": "1" },
    "flags": ["nopreload"]
}

And then launcherctl switch-launcher oxide --start failed:

Job for tarnish.service failed because a timeout was exceeded.

The journal was unusually clear about where it died:

tarnish[1407]: Info: Starting wpa_supplicant...
tarnish[1407]: Info: Waiting for wpa_supplicant dbus service...
systemd[1]: tarnish.service: start operation timed out. Terminating.

Oxide waited ninety seconds for a D-Bus name that never appeared. The supplicant unit had this start condition:

ExecCondition=bash -c "! grep -q '^\s*wifi\s*=\s*off\s*$' ${CONFIG_DIR}/csl.conf"

My csl.conf contained wifi=off, since I normally use the tablet offline. systemd skipped wpa_supplicant, leaving fi.w1.wpa_supplicant1 unclaimed. Oxide’s WifiAPI waited for that service until it timed out.

In this setup, Oxide would not start with Wi-Fi disabled. Turning Wi-Fi on and retrying started it immediately, even though I did not need networking to use the launcher.

During this manual switch, Oxide’s OnFailure handler recovered the reMarkable interface. It stops the launchers, starts xochitl, and resets the launcher configuration to none if that also fails.

That recovery worked during the manual switch. A later reboot showed that I could not rely on it at boot.

One more gap

With Oxide running, systemctl is-enabled tarnish still reported disabled, and xochitl.service was still in multi-user.target.wants. switch-launcher changes the running state, not the boot state; the enable case in Oxide's launcherctl backend is an empty no-op:

is-enabled | enable | disable)
    ;;

So the switch does not survive a reboot until you do it yourself:

systemctl enable tarnish.service
systemctl disable xochitl.service

Disabling xochitl at boot does not prevent the failure handler from starting it explicitly with systemctl start.

A blank screen after reboot

After testing the running setup, I rebooted the tablet.

It showed the boot logo, then stayed blank. Ping and SSH still worked, so I could inspect it over the USB connection.

tarnish.service          activating   (stuck)
xochitl.service          active
wpa_supplicant.service   inactive (dead, Result: exec-condition)

The same wifi=off setting had blocked startup again. I had turned Wi-Fi on to start Oxide, then disabled it after testing. csl.conf lives on /home, so that setting survived the reboot.

This time, the fallback did not restore a usable display.

xochitl reported active, and the OnFailure handler had run, but the screen remained blank. The recovery I had seen during a manual launcher switch did not work in this boot sequence.

I also could not turn Wi-Fi back on through the settings because the display was blank. SSH over USB was the only way I had to recover it.

I needed Oxide to start reliably while Wi-Fi remained disabled.

Starting the supplicant with the radio off

I first tried a systemd drop-in to clear the Wi-Fi condition. An empty assignment resets the condition list, after which I could restore the other two conditions:

[Service]
ExecCondition=
ExecCondition=mkdir -p ${CONFIG_DIR}
ExecCondition=touch -a ${CONFIG_DIR}/csl.conf ${CONFIG_DIR}/wifi_networks.conf

I did that, set wifi=off, restarted the unit, and it failed:

Could not read interface wlan0 flags: No such device
nl80211: Driver does not support authentication/association or connect commands
wlan0: Failed to initialize driver interface

wlan0 did not exist. lsmod showed cfg80211 and brcmutil loaded, and brcmfmac absent. Turning WiFi off on this device does not just idle the radio. It unloads the driver, and the interface goes with it.

This is why removing the condition alone makes things worse rather than better. Before, the unit was skipped cleanly. Now it starts, dies on a missing interface, and Restart=on-failure retries it five times in two seconds until systemd gives up:

wpa_supplicant.service: Start request repeated too quickly.

The retries left the supplicant in failed, with its D-Bus name unclaimed and the screen still blank. Clearing the condition alone was insufficient.

I loaded the driver manually to check whether the interface could exist with the radio off:

$ modprobe brcmfmac && rfkill list
1: phy1: Wireless LAN
	Soft blocked: yes
	Hard blocked: no

The driver comes up soft blocked. So the interface can exist without the radio transmitting, which is precisely the combination the problem calls for: wpa_supplicant needs a wlan0 to attach to, and I need the radio off. wpa_supplicant starts happily against a blocked interface and logs one line about it:

wpa_supplicant[2668]: rfkill: WLAN soft blocked

The finished drop-in has three moving parts:

[Unit]
StartLimitIntervalSec=0

[Service]
ExecCondition=
ExecCondition=mkdir -p ${CONFIG_DIR}
ExecCondition=touch -a ${CONFIG_DIR}/csl.conf ${CONFIG_DIR}/wifi_networks.conf

ExecStartPre=/bin/sh -c 'modprobe -q brcmfmac; for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do if [ -e /sys/class/net/wlan0 ]; then break; fi; sleep 1; done; exit 0'

ExecStartPost=/bin/sh -c 'if grep -q "^[[:space:]]*wifi[[:space:]]*=[[:space:]]*off[[:space:]]*$" ${CONFIG_DIR}/csl.conf; then rfkill block wlan; else rfkill unblock wlan; fi'

RestartSec=3

Removing the condition lets the supplicant start regardless of wifi=off. ExecStartPre loads the driver so the interface exists. ExecStartPost applies the Wi-Fi setting to the radio, allowing the service to remain available when Wi-Fi is disabled.

StartLimitIntervalSec=0 is the small print. The stock unit's Restart=on-failure combined with the default rate limit is what converts a transient failure into a permanent one, and a permanently failed supplicant is the blank screen. Removing the limit means the unit keeps trying instead of giving up in the one state I cannot recover from without a cable.

Rebooting with wifi=off now gives what it should have given all along:

uptime            68 s
csl.conf          wifi=off
wpa_supplicant    active
tarnish           active
systemctl --failed   (empty)

Once boot settled, something unloaded brcmfmac again and wlan0 disappeared. wpa_supplicant kept its D-Bus name, and Oxide continued working. The launcher needed that service to be available, but did not need an active network interface.

Setting the hardware clock

I also checked the date. The tablet thought it was May 2025, fifteen months behind. The hardware clock reported:

$ hwclock -r
Fri Jan  2 23:29:23 1970

With Wi-Fi disabled, chronyd had no time source. The RTC reading suggested that the hardware clock had not been set, leaving the tablet to reconstruct an approximate time at each boot.

Setting it over the cable takes one line, and the second half is the half that matters:

ssh [email protected] "date -u -s '$(date -u +'%Y-%m-%d %H:%M:%S')'; hwclock -w -u"

date -u -s rather than timedatectl, which refuses to set the clock while an NTP daemon is enabled. hwclock -w -u writes the system time to the RTC, which is the step that makes it persist. It survived the next reboot, which is more than it had managed in a year.

The swipe, restored

Oxide's own documentation describes the gesture I wanted:

Swipe up from the bottom of the screen

The gesture opens an application switcher, so returning to KOReader takes one extra tap compared with the old toggle script. It also works with all registered applications, which is more useful than the old hardcoded script path.

Adjusting default font weights

Once the launcher worked, I added fonts and checked their default weights.

Variable fonts carry a default instance, used when nothing selects an axis position. For a text face you would expect that default to be Regular. It frequently is not:

f = TTFont("SourceHanSerifSC-VF.ttf")
[(a.axisTag, a.minValue, a.maxValue, a.defaultValue) for a in f['fvar'].axes]
# [('wght', 250.0, 900.0, 250.0)]

250 is ExtraLight. That font had been sitting in my fonts directory for years, and every time I read Chinese in it I was reading hairline strokes on a reflective grey display. Google's Bitter and Noto Sans SC both do the same thing, defaulting to 100.

The thin strokes were particularly hard to read on the e-ink display.

I generated static font files at the weights I wanted:

from fontTools.varLib import instancer

f = TTFont(src)
instancer.instantiateVariableFont(f, {"wght": 400}, inplace=True)
f['OS/2'].usWeightClass = 400

Names have to be rewritten too (IDs 1, 2, 4, 6, 16, 17), along with fsSelection and head.macStyle, or the reader will not group the styles into one family and will synthesize a fake bold over your real one.

What went on the tablet, all under the SIL Open Font License:

Font Script Why
LXGW WenKai GB Screen Chinese Kai style, screen-hinted, with mainland glyph forms for reading Chinese on e-ink.
Source Han Serif SC Chinese Rebuilt at 400 and 700 from the ExtraLight-defaulting original.
Noto Sans SC Chinese Proper multi-weight sans, replacing a single-weight file of uncertain provenance.
Literata English Designed for reading in Google Play Books.
Charis English SIL's readability workhorse, holds up at small sizes.
Bitter English Slab serif drawn for screens; the heavier stems suit e-ink.

I installed four styles for each Latin family and two weights for the CJK families, totaling 124 MB. /home had 5.3 GB free. The root filesystem had only 21 MB free at 91 percent usage, so I kept the fonts and other additions on /home.

Checks I would make before upgrading

If I were repeating the upgrade, I would check three things before starting: that the backup matches the tablet, which image formats the updater accepts, and what is actually installed in the rollback slot.

The checksum comparison took about a minute and confirmed that I had the files needed for recovery. The updater source explained the two-stage process. Inspecting both OS partitions showed exactly when the original release would be overwritten.

For the launcher timeout, the last journal entry before the ninety-second wait pointed directly to the missing supplicant service.

Testing a reboot with Wi-Fi disabled was just as important as testing the running session.

Turning Wi-Fi on temporarily let me test Oxide, but did not solve startup for the way I normally use the tablet. I needed to test with Wi-Fi off and without relying on the screen for recovery.

Clearing the supplicant’s start condition was only part of that fix. I also had to load the driver and keep the radio blocked. The failed first attempt made that dependency visible.