# Bananarchy Linux changelog This file tracks public release builds of **Bananarchy Linux**. Release versions follow the `
` format (where `2026` is `a`, followed by the two-digit month and day). **Current device builds (`a1108` — codename `dejavu`)**: - **Nokia 8110 4G (`nokia-argon`)**: https://bananarchy.top/builds/bananarchy-nokia-argon-a1108-dejavu.zip --- ## Unreleased — decisive known-good 2720 Flip recovery - **Live regression**: after the final `a1108` image set, X started and SSH worked, but the user saw a garbled main panel and reported that input was unresponsive. X inspection found a viewable `dmenu` window holding the keyboard path; `xdotool key Escape` unmapped it. The fullscreen `Phone Lock` window was already unmapped. - **One decisive recovery**: entered EDL directly from Linux with `next_reboot_mode=edl`, then performed one verified `--method lk2nd` flash from the last physically working `images-before-release` set. No fastboot/menu reboot loop was used. - **Recovery image hashes**: - raw `bananarchy-nokia-beatles.img`: `e2267187c58920b5c5b822d940b81e0df8f59e7788fed00e3d31dfbdb290c7fc` - standalone `boot-bananarchy-nokia-beatles.img`: `6715abd414fd02fd21ca8c2cd621a8a21e78f46d079b2d185b38a1f7a4a3e659` - display `boot-lk2nd-nokia-beatles-display.img`: `e1fdd8551b6393184a465638881b63ca58c04e1e8f655f092260a18379e1cbe6` - shipping DTB remains `8a14f7bc0499c254da9fb524fba1ef3ce0a3e721afb8ee43d37d72a75b615b3b`. - **Flash result**: `boot` and `recovery` read-back matched, `userdata` wrote successfully, the stock `system` superblock was cleared, and reset returned `18d1:d001` Linux USB with root SSH, user network, Xorg and dwm running. - **Post-boot state**: `state=unlock`, no lock flag, backlight 14, `xset` OK, `keypad`, `gpio-keys` and `pm8941_pwrkey` enumerated by X, `fb0=240,320` at 32 bpp, `/dev/fb1` absent, no `spi_mux`/`mux_gpio`/`mux_core` loaded, and both `dmenu` and `Phone Lock` windows unmapped. The X screenshot is a normal 240x320 desktop with 12118 colors rather than a garbled or blank frame. - **Release note**: the verified `images/` artifacts are local build outputs and are not tracked in git. `scripts/check-rebuild.sh` pins their hashes when present; `prepare-release.sh` rebuilds missing artifacts from source and copies `bootloader/lk2nd-msm8909.img` for non-beatles targets. `BA_REBUILD=1` remains the explicit forced-rebuild path. - **Final source guard**: `dwm` is back on the known-good 350 ms wake guard, and the X session performs one startup `dmenu` close plus `Escape` to release stale keyboard grabs. The known-good display lk2nd binary predates the low-bit reboot cookie, so `scripts/check-lk2nd-beatles.py` accepts that one image with `--allow-missing-cookie` while the source patch retains the cookie. - **Cleanup**: EDL backup dumps, local lk2nd build caches, Python bytecode, stale diagnostic boot images and scratch logs were removed from the release tree. Image blobs were removed from git tracking while the local verified copies remain available for immediate packaging and flashing. Both `nokia-argon` and `nokia-beatles` images were rebuilt into scratch output directories and validated for flashability without overwriting the verified release images. ## Unreleased — cover overlay rollback after live regression - **Live failure**: with the `spi-mux` cover overlay applied, X reported viewable dmenu windows and the keypad watcher logged both raw evdev and X key events, but the user still saw no dmenu and reported the keypad and main panel as unresponsive. Plymouth also disappeared from the visible boot chain. The external overlay is therefore not safe to ship on this unit. - **Rollback**: restored the known-good single-panel beatles DTB (`8a14f7bc...`), removed the folded `spi-mux`/`gpio-mux`/external-panel nodes from `qcom-msm8905-nokia-beatles.dts`, restored `spidev@1` and kept `cover-panel.dtsi` as a compile-checked but unapplied hardware-gated reference. `check-rebuild.sh` now rejects a shipping DTB that contains the cover overlay. - **Live state after rollback**: forced sysrq reboot with the base DTB, `/dev/fb0` is again 240x320 internal, `/dev/fb1` is absent, `bananarchy-coverctl STATUS` reports `backend=none`, `state=unlock`, backlight 14, no lock flag, and no kernel oops or RCU stall. - **Kept fixes**: OpenRC parallel startup with the patched `local` service, bounded `udevadm settle`, independent USB fallback sshd, event-driven 80 ms lid debounce, boot-open unlock guard, compiled C daemons and 32-bpp cover renderer code remain; the 120 ms keypad wake experiment was reverted to the physically verified 350 ms guard, and the X session now releases stale `dmenu`/xlocker keyboard grabs once at startup. The cover renderer is idle until hardware exposes `/dev/fb1`. - **Finalized release method**: the physically verified known-good raw image, standalone boot image and display lk2nd image hashes are pinned by `scripts/check-rebuild.sh`. The display lk2nd binary predates the low-bit reboot cookie, so `scripts/check-lk2nd-beatles.py` accepts that one image with `--allow-missing-cookie` while the source patch retains the cookie for future builds. `prepare-release.sh` packages the verified images by default; set `BA_REBUILD=1` to regenerate them from source. - **Cleanup**: removed EDL backup dumps, local lk2nd build caches and Python bytecode from the release tree. Temporary diagnostic images and scratch logs are no longer part of the shipped release set. - **Release state**: the raw image, standalone boot image and validators are rebuilt against the rolled-back DTB. Physical main-panel/keypad verification after this rollback is required before any further cover-panel work. ## Unreleased — startup, keypad and cover-panel regression fixes - **X startup**: measured `Xorg` starting 48.92 s after kernel boot, with an approximately 27 s gap between the early sysinit services and the default runlevel. The unbounded sysinit `udev-settle` service was the gate: missing modem firmware keeps udev events pending. `overlay/rootfs/etc/conf.d/udev-settle` pins `udev_settle_timeout=2` and `bananarchy-lid` starts before `tinydm` so the X session does not wait for the modem/network chain. A live test with `rc_parallel="YES"` moved Xorg from 48.92 s to 27.96 s, but the stock OpenRC `local` service deadlocked on its `after *` dependency. `etc/init.d/local` is now patched to `after modules udev-settle`, parallel startup is enabled, and `bananarchy-sshd-debug` is an independent default-runlevel service. - **Boot keypad**: `bananarchy-x11-session.sh` previously always wrote `/tmp/bananarchy_screen_locked` and `state=lock`, mapping a fullscreen `Phone Lock` window that consumed keys. The flip X session now waits up to 2 s for `/run/bananarchy/lid-state`; an open lid removes the lock flag and starts `state=unlock`, while a closed lid starts `screenoff` with both backlights off. `locker.so` now accepts a trusted `CLOSE` after the root lid daemon clears the lock flag, releasing any stale keyboard grab and unmapping the lock window. - **Lid reaction**: the 600 ms debugfs-polling debounce was replaced with an event-driven `EV_SW` switch-mask reader on `/dev/input/event2` (`SW_LID` and `SW_KEYPAD_SLIDE`), an 80 ms stability window and debugfs gpio36/gpio92 only as fallback. The daemon writes the boot state file, directly writes `brightness`/`bl_power`/keypad LED before spawning the measured 2.4 s `sxmo_state.sh set screenoff` hook, and clears the lock flag before `sxmo_state.sh set unlock`. - **Cover display**: The cover-panel nodes are folded directly into `devices/nokia-beatles/qcom-msm8905-nokia-beatles.dts`; `cover-panel.dtsi` remains a compile-checked reference. The shipping DTB disables the conflicting `spidev@1`, adds `gpio-mux` on gpio13 and `spi-mux` with internal `display@0` registered before external `display@1`, and omits `dc-gpios` on the external panel so `mipi_dbi_spi_init()` uses 9-bit MIPI DBI Type C Option 1 SPI instead of fighting the internal panel for gpio110. `bananarchy-cover-idle` renders `TEST bars`, `TEST solid`, `TEST off` and the clock to `/dev/fb1`; `check-rebuild.sh` verifies the final DTB contains the overlay and stock qcom IDs. Physical gpio13 selection and external reset polarity still require user sign-off. - **Cover renderer bus error**: the shipping `/dev/fb1` is a 32-bpp DRM fbdev (`bits_per_pixel=32`, `stride=960`, `smem_len=230400`). The old 16-bpp `mmap()`/`msync()` renderer received `SIGBUS` on the first pixel write. `bananarchy-cover-idle` now reads the fbdev geometry from sysfs, renders XRGB8888 into a shadow buffer and commits it with `write()` plus `fsync()`. Live `bananarchy-coverctl STATUS` reports `backend=fb`, `TEST bars` writes a nonblank framebuffer, and the service stays started. - **Validation state**: the connected phone was force-rebooted after the earlier `reboot -f` did not fire. OpenRC parallel startup with the patched `local` service puts Xorg at 27.38 s and `dwm` at 30.74 s, with root SSH on port 2222, `local`, `bananarchy-lid`, `bananarchy-sshd-debug` and `bananarchy-cover-display` all started. `/dev/fb0` is 240x320 internal, `/dev/fb1` is 240x240 external, and there is no kernel oops or RCU stall. A transient boot xlocker mapping was fixed with a 10 s open-lid unlock guard; after an X restart the phone is `state=unlock`, the lock window is unmapped and backlight/keypad are on. No Python daemon or network poller is present. The final raw image, standalone boot image, lk2nd images, all offline validators and `e2fsck -fn` pass. Physical keypad, flip close/open and cover-panel appearance still require user sign-off; the cover overlay was subsequently rolled back after a live regression. ## Unreleased — lid hall-sensor debounce - Stopping the compiled lid daemon held the phone at `state=unlock`, `lock=no`, backlight 14 with both hall lines high, proving the repeated `screenoff` was caused by a momentary hall/GPIO transition rather than missing keypad events. Added `LID_STABLE_MS 600` to `bananarchy-lid`: a candidate open/closed state must remain stable for 600 ms before `sxmo_state.sh set screenoff`/`unlock` and backlight/cover IPC actions run. `check-rebuild.sh` guards against the old immediate-transition logic. - Deployed the debounced ARM `bananarchy-lid` to the live phone and restarted the service. With both hall lines high, the phone stayed `state=unlock`, `lock=no`, backlight 14 for the full observation window, with no Python process and no network poller. The final image set was rebuilt with the debounced daemon and all offline validators pass. ## Unreleased — keypad wake and lock-screen diagnosis - The keypad watcher showed 27 raw kernel key presses and 29 X key presses with matching releases: the matrix, udev, Xorg and XKB path is not dropping keys. The phone was on the fullscreen `Phone Lock` passcode screen, so xlocker intentionally consumed those events. Unlocking via the locker IPC restored `state=unlock`, removed `/tmp/bananarchy_screen_locked`, unmapped the lock window and restored the backlight. - Reduced the post-wake input suppression in `dwm` from 350 ms key / 500 ms softkey to a 120 ms `WAKE_KEY_DEBOUNCE_MS`, and reduced locker unlock/locking suppression from 350/400/80 ms to 120/120/40 ms. This removes the "press again" feel immediately after wake or unlock while retaining a short guard against accidental wake keys. - Rebuilt `dwm` and `locker.so`, restarted the X session and re-unlocked the live phone. State is `unlock`, the lock window is unmapped, backlight is restored, no Python process remains in the idle system, no `nmcli device monitor` poller is running and the shell-only keypad watcher was restarted. The final image set was rebuilt with the new X11 binaries and debounce guards; `check-rebuild.sh`, boot/DTB/lk2nd validators and `e2fsck -fn` pass. A fresh physical key test is still required after the unlock. ## Unreleased — compiled idle daemons and keypad latency - **No Python-based idle daemons**: rewrote `bananarchy-lid`, `bananarchy-cover-idle` and `bananarchy-volume-keys` as dependency-free C ARM binaries under `src/bananarchy-daemons/`, added `scripts/build-bananarchy-daemons.sh`, removed the three `.py` daemons from the shipping overlay and switched all OpenRC services to the compiled commands. A `SIGCHLD` reaper prevents the zombie `sxmo_state.sh`/`sxmo_audio.sh` children left by the Python daemons; `poll()` loops, stale-fd pruning and `flock` singletons keep the idle CPU near zero. `check-rebuild.sh` now fails if any retired Python daemon script or service reference returns. - **Keypad latency**: the X session now sets `xset r rate 180 30` instead of the 660 ms default auto-repeat delay, and the session hooks stop the leftover `nmcli device monitor` poller. The temporary Python physical-verification watcher was removed; a shell-only keypad watcher is used when capturing physical key events. - **Live verification**: no `python3` process remains in the idle system, the three compiled services are started, `bananarchy-coverctl STATUS` round-trips, X reports `auto repeat delay: 180 / repeat rate: 30`, the `nmcli device monitor` poller is gone, there are zero zombie children, and a 2 s `/proc/stat` sample reports 96% idle. The final raw image was rebuilt with the compiled binaries, no retired `.py` daemon scripts and service commands pointing at the compiled ARM ELF files; `check-rebuild.sh`, boot/DTB/lk2nd validators, `sync-beatles-bootfs.py --check` and `e2fsck -fn` pass. A shell-only keypad watcher logs raw evdev and X events to `/run/bananarchy-keypad-verify.log`; the user still needs to press keys and report whether the keypad feels responsive. ## Unreleased — lk2nd menu and release hygiene - **lk2nd Fastboot menu restored**: the Power menu's `sxmo_power.sh loader` writes `FASTBOOT_MODE` into `PON_SOFT_RB_SPARE[1:0]`, but the stock boot chain scrubs bits `[7:2]` before chain-loading lk2nd while upstream lk2nd only reads those high bits. `platform/msm_shared/reboot.c` now prefers the low-bit cookie and writes low-bit cookies for all small reboot reasons, while still accepting the high-bit `fastboot reboot-bootloader` cookie. The display-enabled image is the default for `flash-edl.py`, `check-rebuild.sh` validates it, and `prepare-release.sh` packages it. Live verification: the Power-menu cookie reaches lk2nd fastboot in 6 s, `fastboot oem screenshot` stages a 240x320 frame with the menu text, `fastboot getvar lk2nd:version` reports `bananarchy-beatles-a1109-display-r3`, and `fastboot reboot-bootloader` returns to the same lk2nd menu. Use `fastboot reboot` to return to Linux. - **Abandoned pstore_blk diagnostics removed**: `CONFIG_PSTORE_BLK`, `CONFIG_PSTORE_ZONE` and the scratch `cache` PARTUUID settings are gone from the kernel config copies; `vmlinuz`, `System.map`, config, modules and DTBs were rebuilt from the clean config. `pstore_blk_get_config` no longer appears in either shipped `System.map`, and the stale `-debug`/`-ramoops` standalone boot images were removed. - **Cover kernel modules built**: `scripts/build-kernel-audio.sh` now builds and exports `mux-core.ko.zst`, `mux-gpio.ko.zst` and `spi-mux.ko.zst`; `modules-load.d/bananarchy-hardware.conf` and `local.d/10-bananarchy-hardware.start` load them, and `check-rebuild.sh` guards the modules, config and release hygiene. `devices/nokia-beatles/cover-panel.dtsi` remains opt-in: gpio13 polarity and external reset/DC routing still require physical validation before it is applied to the shipping DTB. - **Full clean rebuild**: `./rebuild-image.sh nokia-beatles --mkinitfs` was rerun against an empty scratch rootfs with the pinned `a1108` / `dejavu` release. It regenerated `images/bananarchy-nokia-beatles.img` and `images/boot-bananarchy-nokia-beatles.img`; `check-rebuild.sh`, `check-beatles-bootimg.py`, `sync-beatles-bootfs.py --check`, `build-lk2nd-beatles.sh --check`, `test-lk2nd-beatles-port.py`, Python/shell syntax checks and `e2fsck -fn` all pass. A dangling `/bin/linux32` BusyBox symlink from the fresh package set initially aborted the overlay; `apply-bananarchy-overlay.sh` now removes dangling symlinks before recreating them and `check-rebuild.sh` guards that path. - **Final EDL flash**: the EDL menu path entered `05c6:9008`, the clean image set was flashed with `--verify`, the live `boot` partition read back as the display lk2nd image, and the post-reset `lk2nd:version` matched before `fastboot reboot` returned to Linux. Main and fallback SSH, `a1108` / `dejavu`, release `quiet splash` cmdline, loaded `mux-core`/`mux-gpio`/`spi-mux`, camera/spidev nodes, X keypad devices and idle lid/cover/volume services were verified. The abandoned `--debug-boot` flasher path was removed with its stale diagnostic images. A temporary hardware watcher now logs lid transitions to `/run/bananarchy-physical-verify.log`; the user still needs to close/open the flip and visually inspect the cover display. - **Physical verification**: the lid daemon's close/open transitions are unit-tested and live services are idle, but final physical lid close/open and cover-panel appearance must be confirmed on the final flashed image by the user. ## Unreleased — flip lid handling, idle cover daemon - **Closing the lid did not blank/lock**: `dwm` only reacts to `SW_LID` and then re-checks `EVIOCGSW` 60 ms later, but the 2720 hall sensors are effectively momentary and `EVIOCGSW` reads back 0 while the native cover daemon still reports `lid=closed`. Added `bananarchy-lid.py` (OpenRC service `bananarchy-lid`) with a singleton lock, stale-fd pruning and 0.2 s polling. It reads the raw hall levels from debugfs gpio (gpio36/gpio92 are `in high` with the flip open and go `low` on close) as the authoritative signal, with EV_SW events as a fallback; it handles both `SW_LID` and `SW_KEYPAD_SLIDE`. On close it runs `sxmo_state.sh set screenoff` (which already blanks the backlight, turns the keypad LED off and writes the lock file), forces both backlight sysfs nodes to 0 and tells the cover daemon `LID CLOSED`; on open it runs `sxmo_state.sh set unlock` and restores them. Verified live: close -> `state=screenoff`, backlight 0, keypad LED 0, lock file present; open -> `state=lock`, backlight 10, keypad LED 1. - **Cover daemon CPU spin**: the recovered native `bananarchy-coverd` busy-loops at ~100% CPU on every backend (`none`, `sim`, `spidev` all measured ~100 ticks/s) and paints nothing because gpio110 (DC) is owned exclusively by `panel-mipi-dbi-spi`. Replaced it in the default runlevel with `bananarchy-cover-idle.py`: a 0%-CPU Unix datagram server that keeps the full `bananarchy-coverctl` protocol (PING/STATUS/LID/NOTIFY/CALL/SMS/BATTERY/TEST/REFRESH/QUIT), tracks lid state and renders a 240x240 RGB565 clock to `/dev/fb1` as soon as the kernel exposes it. Verified `STATUS`/`LID CLOSED` round-trips and all three daemons at 0% CPU. - **Cover panel still blank**: there is no `/dev/fb1` (or usable `/dev/spidev0.1` DC line). The remaining work is kernel-side: build `mux-core`/`mux-gpio`/`spi-mux` (`CONFIG_MULTIPLEXER`/`CONFIG_MUX_GPIO`/`CONFIG_SPI_MUX` are already `=m`), wire the compile-tested `cover-panel.dtsi` into the DTB so a second `panel-mipi-dbi-spi` exposes `/dev/fb1`, and confirm how the gpio13/gpio36 switch routes DC/CS. The userspace renderer is ready and waiting. - `check-rebuild.sh` guards the lid daemon, its debugfs fallback, the idle cover daemon and the service wiring. ## Unreleased — volume daemon CPU-spin regression (camera app appeared hung) - The camera plugin was not hung: it was sleeping normally in `poll()` but starved of CPU. Two `bananarchy-volume-keys.py` instances (one from OpenRC, one left over from a debug run) were each burning ~44% CPU because destroyed uinput test devices left `(deleted)` evdev fds that `select()` reports readable forever, and the read-error path just looped. On the 2-core MSM8905 that left 0% idle and froze the whole UI. - The daemon now: takes an exclusive `flock` singleton, prunes stale fds on every rescan, closes/forgets any fd that raises `ENODEV`/`EIO`, never passes evdev fds as `exceptfds` (real key events can be reported exceptional, which dropped the fd before reading), and sleeps briefly on errors. Verified after the fix: one daemon at 0% CPU, 95% idle. - `apply()` used `/usr/bin/su`, which does not exist (BusyBox `su` is `/bin/su`), so injected volume events were seen but no volume change happened. It now spawns `sxmo_audio.sh` directly with `user=10000, group=10000` and an explicit session environment, falling back to `/bin/su`. - The `bananarchy_vol_debounce()` used a lock directory released by a background subshell; replaced with a `/proc/uptime` timestamp so a stale lock can never block future volume steps. - Verified live after the fix: injected `KEY_VOLUMEUP` moves logical 90 -> 95 and the PipeWire sink 0.90 -> 0.95; `xcamera` returns immediately and `bananarchy-photo` produces a valid 600x800 JPEG in both repeated runs. ## Unreleased — camera, side volume keys, cover-panel spidev device - **Camera persistence**: `msm8905-cam.ko` is in the image but the boot-runlevel `modules` service silently skipped most of `/etc/modules` (it needs `/bin/sed`, one of the missing BusyBox applets). `modprobe msm8905-cam` registers `/dev/video0` and `v4l2-ctl --stream-mmap` captures a real 800x600 RGB3 frame. Added `etc/modules-load.d/bananarchy-hardware.conf` and a `etc/local.d/10-bananarchy-hardware.start` retry loop so `msm8905-cam` and `spidev` are always loaded; verified `/dev/video0` exists after a full reboot. Also restored the 33 missing `/sbin` BusyBox applets (`reboot`, `poweroff`, `halt`, `syslogd`, `klogd`, `mdev`, `ip-*` ...) via `scripts/busybox-sbin-applets.txt`; `/sbin/reboot` was missing, which is why the Sxmo power menu and earlier reboot attempts did nothing. - **Volume keys actually change volume**: the side rocker (`gpio-keys` KEY_VOLUMEUP / `pm8941_resin` KEY_VOLUMEDOWN) now reaches X with the correct `XF86AudioRaiseVolume`/`XF86AudioLowerVolume` XKB symbols, but `apply_vol_out()` pinned the PipeWire sink to a fixed 100% through `pactl set-sink-volume @DEFAULT_SINK@`, which does not resolve when wireplumber has no default configured node. Added `bananarchy_set_sink_volume()` to `sxmo_audio.sh`: it finds the first live sink id from `wpctl status` and sets it to the sxmo logical percentage (falling back to `pactl`). Verified `sxmo_audio.sh vol up 5` moves the sink 0.60 -> 0.65. Because synthetic XTest/uinput keys did not always trigger dwm's passive X grab, added `bananarchy-volume-keys.py` (a dependency-free evdev reader for KEY_VOLUMEUP/KEY_VOLUMEDOWN) with an OpenRC service, plus a 300 ms `bananarchy_vol_debounce()` in `sxmo_audio.sh` so the X and evdev paths cannot double-step. Verified with injected uinput key events: logical 80 -> 85 and PipeWire sink 0.80 -> 0.85. - **Cover display kernel path**: added `spidev@1` (`rohm,dh2228fv`, reg 1, 50 MHz) under `spi@78b9000` to the shipping DTS/DTB, the kernel patch notes, the standalone boot.img appended DTB, `prebuilt/.../dtbs/` and the raw image's bootfs. `spi-qup` has 4 native chip selects and `spi_qup_set_cs()` always toggles the single physical CS line, so `display@0` keeps driving the internal panel while the daemon gets a second logical device. After reboot `/dev/spidev0.1` exists and `bananarchy-coverd` reports `backend=spidev` (it previously reported `backend=none`). GPIO 110 (the shared DC line) is claimed exclusively by `panel-mipi-dbi-spi`, so `dc_gpio = -1` in `/etc/bananarchy/cover-display.conf` lets the spidev backend open without fighting the kernel driver; gpio13 (mux) and gpio23 (reset) are free and used by the daemon. Fully driving the cover panel's DC still requires the `spi-mux` kernel modules plus hardware confirmation of how the switch routes DC/CS; `CONFIG_MULTIPLEXER`/`CONFIG_MUX_GPIO`/`CONFIG_SPI_MUX` and the compile-tested `cover-panel.dtsi` overlay are staged for that next step. - `check-rebuild.sh` now guards the camera auto-load, `/sbin` applet list, PipeWire sink mirroring, the evdev volume daemon and debounce, and the `spidev@1` DT node. ## Unreleased — live boot verification: BusyBox applets, keypad, lk2nd splash - Reflashed the fixed image over EDL and booted successfully. Plymouth now shows its boot splash between lk2nd and X; after that `ssh user@172.16.42.1` with `147147` and `keys/phone_id_ed25519` both work on port 22, and the USB-only fallback works on port 2222. - **Actual SSH root cause**: the flashed rootfs was missing 35 BusyBox applet symlinks, including `/bin/ash` (the `user` login shell) and `/bin/grep`. sshd refuses an account whose shell does not exist, so `user` was rejected even though the shadow hash and PAM stack were correct; `root` (shell `/bin/sh`) always worked. Restored the full canonical applet list via `scripts/busybox-applets.txt`, made `apply-bananarchy-overlay.sh` fill in missing symlinks on any rootfs, and added an offline `debugfs` guard that fails `check-rebuild.sh` if the shipped image lacks `/bin/ash`. - **Actual keypad root cause**: without `/bin/grep`, OpenRC's `openrc-run.sh` cannot start the `udev` service in the sysinit runlevel (`CONFIG_DEVTMPFS=y is required...` was a misleading downstream error). With no udev, `/dev/input/event*` stayed `0600 root:root` and had no `ID_INPUT_KEYBOARD`/`seat` tags, so elogind never handed them to the non-root X server and `xinput list` showed only the virtual core devices. Starting udev after restoring the applets produced `crw-rw---- root:input` nodes, added all four keyboards to seat0, and after `rc-service tinydm restart` Xorg enumerates `keypad`, `gpio-keys`, `pm8941_pwrkey` and `pm8941_resin`. Added `99-bananarchy-input-seat.rules` so the seat tag is guaranteed. - **lk2nd boot screen**: replaced the striped RGB565 test pattern in `paint_boot_banner()` with a compact branded splash (dark background, banana crescent, `BANANARCHY` / `LINUX` wordmark from a built-in 5x7 font, and a progress bar). It uses only integer RGB565 writes, needs no image decoder or new library, and is still safe before the SPI bus is proven. All three lk2nd images were rebuilt and revalidated; the display variant was written to the phone's `boot` partition and read back byte-for-byte. - **Cover display**: the shipped image already contained a native `bananarchy-coverd`/`bananarchy-coverctl` daemon, config, lid profile, udev rule and service that were absent from the source tree. A first attempt replaced it with a Python renderer; that has been reverted and the original ARM binaries recovered into `prebuilt/bananarchy-coverd/` and mirrored into the overlay, so clean rebuilds reproduce them. The daemon now starts (`backend=none`) and its IPC socket answers `STATUS`; it will switch to `fb` or `spidev` automatically as soon as the kernel exposes `/dev/fb1` or `/dev/spidev0.1`. That still requires the `spi-mux` kernel modules from `CONFIG_MULTIPLEXER`/`CONFIG_MUX_GPIO`/`CONFIG_SPI_MUX` plus the hardware-validated `cover-panel.dtsi` overlay; it is the one remaining hardware-gated item. - Verified after a full power cycle: `user/147147` and key login on port 22, `/bin/{ash,grep,sed,ps}`, `udev` started, all four keyboards attached to X, `quiet splash plymouth.*` in `extlinux.conf`, and the new lk2nd image hash in `boot`. ## Unreleased — first boot fixes: USB SSH, boot splash, keypad input, cover display - **USB SSH login**: the shipped image rejected `user / 147147`. The postmarketOS drop-in sets `UsePAM yes`, which makes `/etc/init.d/sshd` select `/usr/sbin/sshd.pam`; the plain `/usr/sbin/sshd` rejects that very directive as an unsupported option, and the image's `/etc/shadow` had been hand-edited with empty aging fields (`sp_lstchg == 0`). Added an explicit `/etc/pam.d/sshd` PAM stack, `PasswordAuthentication yes` / `KbdInteractiveAuthentication yes`, `SSHD_BINARY="/usr/sbin/sshd.pam"`, proper shadow aging fields, `sshd` in the `shadow` group, and `authorized_keys` for `user` and `root` (mode 0700/0600, correct uids). A second USB-only listener (`/etc/ssh/sshd_config_debug`, port 2222 bound to 172.16.42.1) uses the non-PAM binary with no `UsePAM` directive, so a broken PAM stack can never lock the developer out. Both sshd variants were verified under ARM emulation: password `147147` and the injected key both log in. - **Boot splash**: `scripts/sync-beatles-bootfs.py --debug-cmdline` had replaced `quiet splash` with `loglevel=8 ignore_loglevel initcall_debug panic=10` in the shipped `extlinux.conf`. The pmOS initramfs defaults to `nosplash=y` and only starts `plymouthd` when the literal `splash` parameter is present, so the screen stayed on lk2nd's blue stripes until X started. The shipping cmdline is restored to `quiet splash plymouth.ignore-serial-consoles plymouth.prefer-fbcon`; the sync tool can now restore it, and both boot-image and bootfs validators reject debug cmdlines and require `splash`. - **Keypad input**: the DT matrix is correct (the mainline `matrix_keypad` driver cancels `gpio-activelow` against `GPIO_ACTIVE_LOW` exactly as needed), so the failure is in userspace device classification. Added `99-bananarchy-keypad.rules` (forces `ID_INPUT_KEYBOARD`, `input` group, mode 0660), an explicit Xorg `InputClass` matching `MatchProduct "keypad"` without relying on that udev tag, and `bananarchy-keypad-diagnose.sh` to dump devices, switch states, dmesg and X input state for live `evtest` diagnosis. - **Cover display**: committed the external GC9305 firmware and init notes (`nokia,beatles-gc9305-ext-panel.bin/.txt`) that existed only inside the flashed image, enabled `CONFIG_MULTIPLEXER`, `CONFIG_MUX_GPIO` and `CONFIG_SPI_MUX` in the kernel config, added the compile-tested `devices/nokia-beatles/cover-panel.dtsi` spi-mux overlay, and recovered the native `bananarchy-coverd`/`bananarchy-coverctl` daemon, its config, lid profile, udev rule and OpenRC service from the shipped image into `prebuilt/bananarchy-coverd/` and the overlay (they were missing from the source tree, so a clean rebuild would have shipped a broken cover display). `bananarchy-cover-msg` now wraps `bananarchy-coverctl NOTIFY`. The DT overlay is deliberately **not** applied to the shipping DTB: gpio13 direction/polarity and the external reset/DC wiring still require hardware validation, and enabling it blindly would risk the working internal panel. The daemon waits for `/dev/fb1` and is inert until then. - `check-rebuild.sh` now guards all of the above (PAM stack, auth drop-in, key files, splash cmdline, keypad rules, cover daemon syntax, DT overlay compilation and mux kernel config). ## Unreleased — mainline kernel console crash and switch-root fixes - A PM8916 hardware watchdog was armed from lk2nd for a 20-second warm reset. This preserved DRAM pstore and produced a clean kernel console plus three compressed kmsg dumps. The watchdog was pre-armed through `oem debug writepmic` and the kernel watchdog driver was blacklisted for the diagnostic boot so it could not reconfigure the PMIC reset type. - The kernel was not hanging at `n_null_init`: it returned normally, then crashed while printing the initcall result. `__msm_console_write` faulted at the earlycon fixmap address `0xffeff008` (`console_flush_all` -> `vprintk_emit` -> `trace_initcall_finish_cb`), followed by `Attempted to kill init`. Removing `earlycon` from the cmdline eliminates this crash; `console=ttyMSM0,115200` remains safe once the real serial driver has initialized. - With `earlycon` removed, the kernel reaches initramfs stage 2, brings up configfs USB gadget/NCM, finds and mounts `pmOS_root`, then fails at `switch_root` with exit code 127 because `/sbin/init` is missing from the ext4 root image. The rootfs has BusyBox and an OpenRC `/etc/inittab`, but no `openrc-init`; `/sbin/init` must point at `/bin/busybox`. - Removed `earlycon` from every `devices/*/kernel-cmdline.conf`, every overlay `50-device-*.conf`, all shipped standalone 2720 boot images and the raw image's `extlinux.conf`. Added `overlay/rootfs/sbin/init -> /bin/busybox`, made `apply-bananarchy-overlay.sh` and `rebuild-image.sh` recreate it, patched the current ext4 image, and added validators to reject stale `earlycon` cmdlines or a missing init symlink. - `check-rebuild.sh`, boot-img validation, bootfs validation, Python/shell syntax and pstore decoders all pass. The fixed image is ready for the next flash/boot test. ## Unreleased — block-safe fastboot read-back and r3 rebuild - Found why boot-slot read-back dropped USB: upstream `oem read-partition` passes the requested byte count directly to `mmc_read()`, whose wrapper asserts on sizes that are not eMMC block multiples. The lk2nd boot images end with a 16-byte `SEANDROIDENFORCE` tail, so their 376848/360464-byte lengths are 16 bytes past a 512-byte boundary. - `lk2nd/fastboot/fetch.c` now rounds the MMC read up to the device block size, rejects unaligned offsets and reads beyond the partition, and stages only the original requested byte count. The source patch has 15 sections; validators and host port tests guard the fix. - Rebuilt normal, diagnostic and display images as `-r3`: `c6092800`, `76936751`, `26b74570`. A clean upstream worktree rebuild reproduced all three byte-for-byte. - Prepared a one-shot scratch mainline boot image with `lk2nd.pass-ramoops=zap maxcpus=1` to clear pstore and test whether SMP secondary-CPU bringup is the remaining kernel hang. - `fastboot reboot-bootloader` writes the `FASTBOOT_MODE` cookie and does not exercise a newly flashed boot slot; use `fastboot reboot` for that test. The separate 512 KiB `lk2nd` partition contains an older lk2nd image, so the r3 persistence probe backs it up and writes r3 to both `boot` and `lk2nd` before a normal reboot. - Live hardware: r3 diagnostic chain-loaded from the older `a1109` normal image, the full 512 KiB `lk2nd` partition was backed up, r3 was written and read back on both `boot` and `lk2nd`, and a normal `fastboot reboot` came back as `bananarchy-beatles-a1109-diag-r3`. This confirms persistence and that `reboot-bootloader` was the earlier trap. - The one-shot `lk2nd.pass-ramoops=zap maxcpus=1` kernel downloaded and booted OKAY but produced no USB within 50 s. SMP secondary-CPU bringup is therefore not the sole cause of the remaining hang. A warm reset with Vol Down + Power is required to read the pstore console. No successful Bananarchy userspace boot has been observed yet. - A follow-up forced-panic one-shot (`panic=3`, `panic_on_warn=1`, `panic_print=31`, `nosmp`, shortened RCU stall timeout, `lk2nd.pass-ramoops=zap`) also produced no USB within 55 s and did not self-reboot. RAM pstore remains inconclusive until a warm reset; if it is all `0xff` again, a block-pstore kernel rebuild is needed. - A warm reset preserved a valid `DBGC` pstore console record (`size=0x10ff6`, cumulative `start=0x110fb6`). lk2nd's `oem ramoops console` rejected the cumulative start value, but `oem ramoops raw` staged the region; host-side rotation decoded kernel logs to about 6.25 s. The last readable initcall is `calling n_null_init`; the ordered table continues with `pty_init`, `sysrq_init`, `msm_serial_init`, `ttynull_init`, IOMMU and DRM initcalls. Three compressed kmsg dumps are present but too DRAM-corrupted to inflate cleanly. - RAM pstore proved too unreliable: a warm reset preserved a valid but bit-rotted `DBGC` console record, while the next warm reset decayed the whole region to `0xff`. The console parser also needs to accept pstore's cumulative `start` pointer. - Rebuilt the 6.12.1-msm8916 kernel with `CONFIG_PSTORE_BLK=y`, `CONFIG_PSTORE_BLK_BLKDEV` set to the GPT `cache` PARTUUID `2c6a1773-df50-2023-26e9-2d678c0ff68d`, a 256 KiB console zone and 64 KiB kmsg zones. The resolved config, `vmlinuz`, modules and boot config were regenerated. The scratch test boot.img forces `pstore.backend=pstore_blk`, `pstore_blk.best_effort=1` and the same `PARTUUID`; it uses the new zImage with the original appended DTB and initramfs. - The pstore_blk one-shot kernel downloaded and booted OKAY but produced no USB within 55 s. A warm reset is required to stage the `cache` partition and decode its on-eMMC console/kmsg zones. ## Unreleased — hardware-verified lk2nd panel and final kernel DTB - Chain-loaded the rebuilt `-diag-r2` image without any cmdline patch. The QCDT fallback published `lk2nd:panel=qcom,mdss_spi_gc9305_v2_qvga_cmd`; `oem display-init` returned OKAY in 1.066 s, `oem display-test` in 0.264 s, and `oem screenshot` staged a 230424-byte 240x320 P6 framebuffer with exactly the three intended RGB stripe colors. The panel stream and full SPI frame flush are confirmed on the phone. - Removed the upstream per-word QUP `SPEW` FIFO log. Earlier `DEBUG=2` builds spent about 40 s per frame and filled the 32 KiB log; the rebuilt diagnostic log has zero FIFO-status lines. `oem ramoops console` now validates the pstore signature/size/offset and reports `No valid pstore console` for decayed DRAM instead of trying to stage `0xffffffff` bytes. - `oem scan-boot` now lets `boot_linux()` apply the final cmdline and DT updates, then returns before the kernel jump. `oem scan-dtb` staged a 41440-byte final DTB with `cpu@2`/`cpu@3` set to `status = "fail"`, `ramoops@9fa80000` with a 256 KiB console, final bootargs, and initrd addresses. The dual-core partial-goods DT fix is confirmed; the remaining Bananarchy boot stall is in the mainline kernel/userspace stage. - Rebuilt normal, diagnostic and display images from the pinned upstream commit plus the 14-section source patch: `ba97912c`, `5f263470`, `6b7b8fff`. A clean upstream worktree rebuild reproduced all three byte-for-byte. Validators now require the final-DTB hook, chain-load panel fallback, bounded pstore console and QUP log fix. - `fastboot flash boot` of the forced-fastboot diagnostic returned OKAY, then USB dropped and did not re-enumerate after 30 s. Power-cycle into fastboot (Vol Down + Power) or EDL, read back `boot`, then boot the ramoops-enabled mainline image and warm-reset to capture `oem ramoops console`. No successful Bananarchy userspace boot has been observed yet. ## Unreleased — safe, probeable lk2nd display and corrected diagnostics - Corrections: the pmOS initramfs jumps straight to stage 2 when `/init_2nd.sh` is present (it is), so a missing `/boot/initramfs-extra` was never the cause of a boot halt. An all-`0xff` ramoops region after a hard power-off is decayed DRAM, not proof the kernel hung before pstore. A live `oem debug readl 0x70000` hit an unmapped register and dropped USB; that was a host-side probe error, not a phone fault. - Root cause of the display wedge: `spi_qup.c` and `clock_lib2.c` spin forever in QUP FIFO / clock register polls when the QUP clock never comes up. Added `QUP_FIFO_TIMEOUT` and `CLK_POLL_TIMEOUT` bounds so a dead SPI bus cannot hang lk2nd before USB init. - `spi-display.c` rewritten: RAM-only 240x320 RGB565 framebuffer by default (`lk2nd.no-display`), plus fastboot commands `oem display-init` (mdss_spi_init + downstream GC9305 v2 `lk2nd,panel-init` stream + striped banner + one frame flush), `oem display-test`, and `oem display-off`. `lk2nd.display=on` enables the same path at boot. All run after USB on the diagnostic image, so failures are reported/logged instead of wedging. - Added `oem scan-dtb` to stage the exact DTB handed to the kernel (after DT updates) for offline inspection; `oem scan-boot`, `oem log`, `oem screenshot` and `oem ramoops console` complete the probe set. - New `images/boot-lk2nd-nokia-beatles-display.img` (`lk2nd.display=on`). Normal/diagnostic/display images rebuilt (sha `aadcb85b`, `bdde06b0`, `6b2b9b5c`), reproducible byte-for-byte from a pristine clone; validator gained `--expect-display`, build script gained the display variant and `--with-display`. Docs and host tests updated. - Confirmed offline: `qcom,msm8909-smp` is valid in mainline 6.12 `platsmp.c`; the 2720 fuse `0x58000` reads `0x30100094` (dual core). `lk2nd_partial_goods_dt_update()` sets `status = "fail"` on `cpu@2`/`cpu@3` for non-downstream boots; `oem scan-dtb` can now prove whether that reached the kernel DTB. extlinux was already proven good by `oem scan-boot`; the remaining hang is in the mainline kernel. ## Unreleased — extlinux confirmed good; kernel console capture via ramoops - `oem scan-boot` run on the live device proved the boot chain: `wrp0p32p0` (pmOS_boot, 256 MiB) enumerated and mounted, `/extlinux/extlinux.conf` parsed, `vmlinuz` / `qcom-msm8905-nokia-beatles.dtb` / `initramfs` all resolved and `lk2nd_boot_label()` reached `boot_linux()` without errors. Log saved to `backup/nokia-beatles-2720/crash-20261109/scan-boot-log.txt`. **The remaining hang is the mainline kernel, not lk2nd or the boot filesystem.** - `oem read-partition` also verified the live `userdata` MBR (`55aa`, two `0x83` partitions) and its ext2 superblock (`53ef` at 1 MiB). `fastboot boot` of the debug boot.img downloaded OKAY then produced no USB, consistent with a kernel that hangs before the initramfs brings up `usb0` RNDIS. - `oem ramoops regions` showed `0x9fa80000` still `0xff`. Patched `lk2nd/ramoops/ramoops.c` to always inject the ramoops reserved-memory node on Linux boots (`lk2nd.pass-ramoops=zap` still clears it), so `CONFIG_PSTORE_RAM`/`CONFIG_PSTORE_CONSOLE` kernel logs survive a warm reset. Added `images/boot-bananarchy-nokia-beatles-ramoops.img` (debug boot.img + `lk2nd.pass-ramoops`). - Rebuilt both images (normal `dab81af0…46`, diagnostic `1825a1a4…bc`), reproducible byte for byte; validator and port tests check `oem scan-boot` and the ramoops patch. `check-rebuild.sh`, bootfs/bootimg checks and syntax checks pass. - Next hardware step: the ramoops-enabled diagnostic lk2nd was chain-loaded with `fastboot boot` and `fastboot continue` ran the real extlinux chain; the kernel hung again. Power-cycle back into fastboot (Vol Down + Power), then `fastboot oem ramoops console && fastboot get_staged console.log` to read the kernel console. ## Unreleased — extlinux/kernel hang diagnostics from live fastboot - Live fastboot confirmed the port works (`lk2nd:compatible=nokia,beatles`, `model=Nokia 2720 Flip`, panel `qcom,mdss_spi_gc9305_v2_qvga_cmd`, `unlocked=yes`). Read back the live `userdata` MBR (valid 0x55aa, two 0x83 partitions at LBA 2048 / 526336) and the ext2 superblock at 1 MiB (`53ef`, dynamic rev, compatible features) with `fastboot oem read-partition`; boot filesystem is intact on-device. - `fastboot boot images/boot-bananarchy-nokia-beatles-debug.img` downloaded and reported OKAY, then no USB appeared. The initramfs brings up `usb0` RNDIS via `setup_usb_network`, so this means the mainline kernel hangs before userspace, or lk2nd never found extlinux and fell into `boot_linux_from_mmc()`. - Added an `oem scan-boot` fastboot command (new `lk2nd/device/2nd/scan-boot.c`): runs `lk2nd_boot()` with `lk2nd_scan_only = true`; `lk2nd_boot_label()` logs the resolved kernel/dtb/initramfs/cmdline and returns before `boot_linux()`, so lk2nd stays in fastboot and `oem log` reveals the whole extlinux scan. Both images rebuilt (normal `902bf422…77`, diagnostic `d3eacccd…82`), reproducible byte for byte; validator and port tests check the command. - Added `images/boot-bananarchy-nokia-beatles-ramoops.img` (debug boot.img plus `lk2nd.pass-ramoops` in the cmdline) so lk2nd injects a ramoops reserved-memory node and the kernel console can be read with `fastboot oem ramoops console` after a warm reset. - Next hardware step: re-enter EDL with a fresh Sahara HELLO, flash the diagnostic image, then `fastboot oem scan-boot` + `fastboot oem log`. If the scan succeeds, boot the ramoops kernel and read its console after rebooting into fastboot. ## Unreleased — lk2nd confirmed over live fastboot; default image boots extlinux headless - Confirmed over live fastboot (`18d1:d00d`, serial `34b39986`): `lk2nd:compatible=nokia,beatles`, `lk2nd:model=Nokia 2720 Flip`, `lk2nd:panel=qcom,mdss_spi_gc9305_v2_qvga_cmd`, `unlocked=yes`. The full lk2nd RLOG log shows `Found valid DTB with 2718 bytes total`, `Detected device: Nokia 2720 Flip` and a clean `fastboot_init()`; saved to `backup/nokia-beatles-2720/crash-20261109/lk2nd-fastboot-log.txt` and `lk2nd-parsed-cmdline.txt`. - The "still hanging on the KaiOS logo" was lk2nd sitting in the forced-fastboot diagnostic menu with a RAM-only framebuffer, not a hang. Two vibrations were aboot's and lk2nd's normal 250 ms boot pulses. - A/B proof: display enabled hangs before USB with the boot vibrator stuck on; `lk2nd.no-display` reaches fastboot. Both shipped images now carry `lk2nd.no-display`; the normal image no longer forces fastboot, so a normal power-on runs `lk2nd_boot()` -> extlinux -> the mainline kernel. `WITH_DISPLAY=1` / `--with-display` re-enables the SPI display. - Rebuilt both (normal `eaa50754…15`, diagnostic `43bb63cb…05`), reproducible byte for byte; all tests pass. - `fastboot continue` was sent to exercise the real extlinux chain; USB then disappeared and the KaiOS logo stayed. Bananarchy has no default USB gadget, so this is ambiguous. Next decisive probe: re-enter EDL (Sahara HELLO is one-shot — do not consume it with a passive read), enter Firehose and `peek` lk2nd's RLOG at `0x8f655430`, or hold Volume Down at power-on to reach fastboot and pull `fastboot oem log`. ## Unreleased — lk2nd confirmed working; default image now boots extlinux headless - Live fastboot (`18d1:d00d`, serial `34b39986`) confirmed the port: `lk2nd:compatible=nokia,beatles`, `lk2nd:model=Nokia 2720 Flip`, `lk2nd:panel=qcom,mdss_spi_gc9305_v2_qvga_cmd`, `unlocked=yes`. The full lk2nd RLOG log shows `Found valid DTB with 2718 bytes total`, `Detected device: Nokia 2720 Flip` and a clean `fastboot_init()`. Saved to `backup/nokia-beatles-2720/crash-20261109/lk2nd-fastboot-log.txt` and `lk2nd-parsed-cmdline.txt`. - A/B proof: with the SPI display enabled lk2nd hangs before USB with the boot vibrator stuck on; with `lk2nd.no-display` it vibrates twice normally (aboot + lk2nd boot pulses) and reaches fastboot. The "still hangs on the KaiOS logo" was lk2nd sitting in the forced-fastboot menu with a RAM-only framebuffer, not a hang. - Both shipped images now carry `lk2nd.no-display`. The normal image no longer forces fastboot, so a normal power-on runs `lk2nd_boot()` -> extlinux -> mainline kernel, which re-initializes the panel itself. `WITH_DISPLAY=1` / `--with-display` re-enables the early SPI display for experimentation. - Rebuilt both (normal `eaa50754…15`, diagnostic `43bb63cb…05`), reproducible byte for byte. Validator requires `lk2nd.no-display` on the diagnostic image; build script gained `--with-display`; `check-rebuild.sh`, port tests, bootfs/bootimg checks and syntax checks all pass. - `fastboot continue` was used to exercise the extlinux chain; USB then disappeared and did not return within two minutes. This is not proof of a hang because Bananarchy has no default USB gadget. Next decisive probe: force EDL and read lk2nd's own RLOG ring buffer at `0x8f655430` (cookie `0x474f4c52`) to see whether `extlinux.conf` was found and `boot_linux()` reached. ## Unreleased — aboot fixed; lk2nd hangs early with the boot vibrator stuck on - With `/cpus` present aboot no longer ASSERTs and lk2nd starts. The phone now hangs on the aboot/KaiOS splash with **permanent vibration and no USB device**. LK turns the vibrator on in `target_init()` (`vib_timed_turn_on(250)`) and off only in `target_uninit()` (`wait_vib_timeout()`), so a hang before USB/fastboot init leaves it buzzing forever. - Prime suspect is the SPI display init, which now executes for the first time: `mdss_spi_init()` re-clocks BLSP1 QUP5 and `paint_boot_banner()` triggers three full 240x320 RGB565 frame writes during `LK2ND_INIT`, before USB comes up. - Added `lk2nd.no-display` to `spi-display.c`: keeps a RAM-only framebuffer (so cont-splash does not read MDP registers) with `update_start = NULL`, and skips `mdss_spi_init()` entirely. The diagnostic image now uses it together with `LK2ND_FORCE_FASTBOOT=1` and `DEBUG=2`, so the only things before USB are DTB parsing, key publishing and partition setup. - Rebuilt both images (normal `9c13e1ba…14`, diagnostic `43bb63cb…05`), still reproducible byte for byte from a pristine clone. Validator accepts and requires `lk2nd.no-display` on the diagnostic variant; `check-rebuild.sh` and the port tests still pass. - Next hardware step: force EDL (hold power ~10-15 s, then Vol Up + Vol Down while plugging USB), flash the diagnostic image with `--lk2nd-image --verify`, then `lsusb`. `18d1:d00d` means the SPI display init was the hang; `fastboot oem log && fastboot get_staged lk2nd.log` gives the rest. If it still hangs with vibration, re-read aboot's RLOG buffer (and lk2nd's own RLOG cookie near its BSS) for the earlier hang. ## Unreleased — real root cause: aboot partial-goods ASSERT on missing /cpus - Pulled aboot's `WITH_DEBUG_LOG_BUF` ring buffer (cookie `0x474f4c52` "RLOG") from the live Sahara memory-debug dump. It contains the exact crash: ``` [580] target_display_init ret=0 [590] Failed to get parent node: /cpus errno:-1 [600] panic (caller 0x8f61aa00): ASSERT FAILED at (platform/msm_shared/partial_goods.c:80): 0 [610] HALT: reboot into dload mode... ``` - The 2720's MSM8905 is a **partial-goods (2-core) part**. Its stock aboot calls `update_partial_goods_dtb_nodes()` on the QCDT-selected DTB and `ASSERT(0)`s when `/cpus`, `/cpus/cpu@2` or `/cpus/cpu@3` (with a 4-byte `device_type`) is missing; it then rewrites `device_type` from `"cpu\0"` to `"nak\0"`. Upstream lk2nd QCDT DTBs have no `/cpus` at all, so **every** lk2nd image — including the untouched `bootloader/lk2nd-msm8909.img` — crashed before lk2nd ran. This, not the QCDT table shape or the panel init, was the "black screen / no fastboot" cause. - Fixed by adding a `/cpus` node with `cpu@0`..`cpu@3` and `device_type = "cpu"` to the common `lk2nd/device/dts/lk2nd.dtsi`, so all eight QCDT DTBs carry it. The mainline `qcom-msm8905-nokia-beatles.dtb` already has `/cpus`, so the Volume Up recovery path is unaffected. - Rebuilt both images (normal `e747ec0d…95`, diagnostic `8ded62f0…4a`); both reproducible byte for byte from a pristine clone. `dt_size` is `22528` and the 2720 DTB is 4096 bytes — aboot demonstrably handled a larger QCDT in earlier dumps, so size was never the problem. - `check-lk2nd-beatles.py` now checks every QCDT DTB for `/cpus/cpu@2` and `cpu@3` with a 4-byte `device_type`, and enforces both `0x14b` entries sharing one DTB; `test-lk2nd-beatles-port.py` checks the `/cpus` patch. Crash log saved as `backup/nokia-beatles-2720/crash-20261109/aboot-log.txt`. - Next hardware step: power-cycle into plain EDL (memory-debug state refuses the Firehose programmer), reflash the diagnostic image with `--verify --dump-diagnostics`, then `lsusb`. `18d1:d00d` means lk2nd runs; `05c6:900e` again means re-read the RLOG buffer for the next ASSERT. ## (Superseded) aboot crashes on the changed QCDT; restore upstream shape - Live diagnosis: after "black screen, no fastboot" the phone was in `05c6:900e` **Sahara MEMORY_DEBUG mode**, i.e. aboot crashed before lk2nd ever ran. A Sahara memory-debug dump showed aboot's BSS held the diagnostic boot.img header (`ANDROID!`, kernel 345048, `dt_size=24576`) and the cached cmdline `lk2nd lk2nd.compatible=nokia,beatles`; aboot had also built `mdss_mdp3.panel=1:spi:0:qcom,mdss_spi_gc9305_v2_qvga_cmd:1:none`. The kernel payload at `0x80008000` was byte-identical to the diagnostic image, while lk2nd's BSS at `0x80080000` was all zeros. - Root cause: the only aboot-parsed thing changed was the **QCDT table**. The dedicated `msm8905-nokia-beatles` DTB made `dt_size` 20480 -> 24576, split the two `0x14b` entries across two different DTBs and put `0x1000b` first in `qcom,board-id`. aboot re-validates the selected DTB's root properties and crashed. Removed that DTB, restored `msm8905-qrd-skub.dts` to the exact upstream `qcom,board-id = <0x0b 0x100>, <0x1000b 0x100>` and injected only a compact `/lk2nd/nokia-beatles` node (DTB 1504 -> 1984 bytes, still one 2048-byte slot). Both `0x14b` QCDT entries again point at the same DTB and `dt_size` is back to `20480`. - Trimmed the port to fit that slot: only the `qcom,mdss_spi_gc9305_v2_qvga_cmd` panel — the one the live aboot reports — carries `lk2nd,panel-init`; the other two are match-only nodes. Dropped the DTB `gpio-keys` and `menu-key-strings` entries. Kept model, compatible, `lk2nd,match-panel` and `lk2nd,dtb-files`. - Rebuilt both images (normal `968ef23c…8d`, diagnostic `5eb75ca8…5ff`), still reproducible byte for byte from a pristine clone. `check-lk2nd-beatles.py` now enforces the upstream QCDT shape and rejects any separate QCDT DTB; the host C test covers the single v2 stream. - Crash evidence saved to `backup/nokia-beatles-2720/crash-20261109/`. `devinfo` from the last dump still has `is_unlocked=1`. Next hardware step: reflash the diagnostic image with `--verify --dump-diagnostics`, then check `lsusb`; if it returns to `900e`, re-read aboot's RLOG buffer; the untouched `bootloader/lk2nd-msm8909.img` lacks `/cpus` too and is only a negative control. ## Unreleased — diagnose the logo-then-blank screen on nokia-beatles - Traced the dark screen: `DISABLE_SPLASH_PARTITION=1` in lk2nd builds means `display_image_on_screen()` never loads the stock splash, and lk2nd's `menu.c` override of `display_default_image_on_screen()` only draws two version lines before `fbcon_flush()` pushes the whole 240x320 RGB565 framebuffer at `MIPI_FB_ADDR`. Upstream's fallback is a tiny 113x124 logo on black; there is no guarantee aboot left its splash at that address. `spi-display.c` now paints a striped `Bananarchy lk2nd / nokia-beatles / 240x320 RGB565` banner before that flush, so the handoff can no longer be mistaken for a hang. - Made the panel-init replay conditional: `lk2nd,panel-init` is only replayed when aboot did not report continuous splash (`mdss_mdp3.panel=0:...`) or when `lk2nd.force-panel-init` is present in the cmdline. Re-initializing a panel aboot already owns risks disturbing the 2720's shared main/cover SPI bus. `scripts/build-lk2nd-beatles.sh --force-panel-init` builds that variant. - Added `images/boot-lk2nd-nokia-beatles-diagnostic.img`: the same port built with `DEBUG=2 DEBUG_FBCON=1 LK2ND_FORCE_FASTBOOT=1`, so it always shows the fastboot menu, draws boot logs on the display and enumerates as USB fastboot. `flash-edl.py` gained `--lk2nd-image` to flash it without changing the default. Pull the decisive log with `fastboot oem log && fastboot get_staged lk2nd.log`. - `scripts/build-lk2nd-beatles.sh` now builds and validates both images (`--only normal|diagnostic`, `--check`), `check-lk2nd-beatles.py` gained `--expect-fastboot` and checks the banner/conditional-replay markers, and `test-lk2nd-beatles-port.py` validates both images plus the flasher override. Both images remain reproducible byte for byte. - No successful Bananarchy boot has been observed yet; the forced-fastboot log or UART (`ttyMSM0,115200`) is required to locate whether the failure is extlinux/`pmOS_boot` or the mainline kernel. ## (Superseded) source-built nokia-beatles lk2nd port - Replaced the binary-patched, headless lk2nd workaround with a real upstream source port. `bootloader/lk2nd/nokia-beatles.patch` applies to `msm8916-mainline/lk2nd` commit `cf45aefd22d744b2bf9b39455afae697ce430063`; `scripts/build-lk2nd-beatles.sh` clones that commit, applies the patch and cross-builds `lk2nd-msm8909` in the rootless Docker toolchain image (`bootloader/lk2nd/Dockerfile`). The result is reproducible byte for byte. - New dedicated QCDT DTB `msm8905-nokia-beatles.dts` with the exact stock 2720 IDs (`qcom,msm-id = <0x14b 0>`, `qcom,board-id = <0x1000b 0x100>`). It contains only `/lk2nd/nokia-beatles`, so aboot's best-match selection is unambiguous. The shared `msm8905-qrd-skub.dtb` keeps the `0xb/0x100` fallback entry and also carries the beatles node. - `nokia-beatles.dtsi` adds a real device node: model `Nokia 2720 Flip`, `compatible = "nokia,beatles"`, `lk2nd,match-panel`, `lk2nd,dtb-files = "msm8905-nokia-beatles"`, menu key labels and `gpio-keys` for volume up (GPIO 90) and power/end (GPIO 98), both active low. - Correct panel initialization: three panel subnodes match every GC9305 name the 2720 aboot can report (`gc9305_qvga_cmd`, `gc9305_v2_qvga_cmd`, `gc9305_3rd_qvga_cmd`), each with the downstream KaiOS 3.10 `qcom,mdss-spi-on-command` byte stream as `lk2nd,panel-init`. `lk2nd/include/lk2nd/spi-panel-init.h` walks the `[wait dlen payload...]` stream; `platform/msm_shared/mdss_spi.c` and `lk2nd/device/2nd/spi-display.c` replay it on BLSP1 QUP5 (DC GPIO 110), setting RGB565, the 240x320 address window, sleep-out, display-on and RAMWR. lk2nd can now bring the panel up even when aboot left no continuous splash. - `images/boot-lk2nd-nokia-beatles.img` is the source-built image (sha256 `1b6386a2e532d52003b6c2b65f00f6860c28d50cd94d9c3b874dd93fa161baa9`), cmdline `lk2nd lk2nd.compatible=nokia,beatles`. Removed the obsolete `scripts/make-beatles-lk2nd-bootimg.py`. - `scripts/check-lk2nd-beatles.py` now validates the boot header, both 2720 QCDT entries, both DTBs, the device node, gpio-keys and every panel init stream with a pure-Python FDT parser. `scripts/test-lk2nd-beatles-port.py` additionally compiles the shared C parser against the streams extracted from the shipped image. `check-rebuild.sh` guards the port files. ## (Superseded) fix lk2nd headless device node and repair pmOS_boot - Root cause of the blank screen: `repack-beatles-bootimg.py` had written an Android `boot.img` at raw offset 1 MiB, which is the **ext2 `pmOS_boot` filesystem** inside the `userdata` MBR image. Its superblock was destroyed, so lk2nd could not mount the boot subpartition, could not find `extlinux.conf`, and reported "Bootable file system not found. Reverting to android boot." The tool no longer accepts `--raw-image`; `scripts/sync-beatles-bootfs.py` updates `/boot.img`, `/qcom-msm8905-nokia-beatles.dtb` and `/extlinux/extlinux.conf` inside the ext2 filesystem instead, with `--check` wired into `check-rebuild.sh`. - Repaired `images/bananarchy-nokia-beatles.img` in both repos: ext2 superblock restored, DTB and boot.img refreshed, `extlinux.conf` now uses `loglevel=8 ignore_loglevel initcall_debug panic=10` instead of `quiet splash`. - Root cause of lk2nd running the wrong hardware: the QCDT DTB only had `cat-b35` / `nokia-argon` device nodes with `lk2nd,match-panel`. `scripts/make-beatles-lk2nd-bootimg.py` now injects `/lk2nd/nokia-beatles` (`model = "Nokia 2720 Flip"`, `compatible = "nokia,beatles"`, `lk2nd,dtb-files = "qcom-msm8905-nokia-beatles"`), removes every `lk2nd,match-panel` property, and sets cmdline `lk2nd lk2nd.compatible=nokia,beatles`. lk2nd identifies the board and skips the 8110 4G panel/keypad init entirely. - `images/boot-lk2nd-nokia-beatles.img` rebuilt in both repos; `check-lk2nd-beatles.py` now validates that only the cmdline field and the exact-2720 QCDT DTB slot differ, that the new node exists, and that no node carries `lk2nd,match-panel`. ## Unreleased — Argon-shaped hybrid and RPMB correction - Correction to the previous entry: `target_get_vb_version()` returns `VB_L=1` when the GPT has no `keymaster` partition (this 2720 has `keystore` only), while `VB_M=2`. The `USE_RPMB_FOR_DEVINFO` branch is therefore not taken; `read_device_info()` uses eMMC `devinfo`. The 21:25 dump shows `is_unlocked=1`, so the eMMC unlock is effective and `fastboot oem unlock-go` is unnecessary. Stock fastboot is not required. - The 900e crash is not a signature rejection. To match the 8110/Argon process exactly, the default `nokia-beatles` path is now a hybrid: `bootloader/lk2nd-msm8909.img` -> `boot`, `images/boot-bananarchy-nokia-beatles.img` -> `recovery`. Normal power-on is `aboot -> lk2nd -> extlinux`; Volume Up is `aboot -> recovery -> mainline boot.img`. - `source_for(name)` gives each target partition its own source; `--verify` compares each slot against the image actually written there. The behavioural test asserts `boot=lk2nd`, `recovery=boot.img`. ## (Superseded) RPMB devinfo is the authoritative unlock - After the dual-slot fix the phone still entered `05c6:900e` (Sahara memory debug). The 21:25 dumps show eMMC `devinfo` is now `is_unlocked=1`, but `diag-aboot.img` contains VERIFIED_BOOT / `USE_RPMB_FOR_DEVINFO` code: `read_device_info()` uses `read_device_info_rpmb()` when secure boot is enabled, so the eMMC patch is ignored. `boot_verifier_init()` therefore still verifies the unsigned lk2nd image and aboot crashes. - `flash-edl.py` now patches the `config` (fallback `frp`) partition allow-unlock byte (LSB of last byte) by default on `nokia-beatles` via `enable_oem_unlock()`, with read-back verification and `backup/config-locked-.img`. - New `--only-unlock` mode patches eMMC devinfo + config/frp, prints the exact `fastboot oem unlock-go` instructions, and exits without flashing. `--enable-oem-unlock` / `--no-enable-oem-unlock` control the config patch. - Added `scripts/make-oem-unlock-config.py`, generated `backup/nokia-beatles-2720/config-oem-unlock.img` (only byte 524287 changes), `check-rebuild.sh` guards and a host test. ## Unreleased — fix lk2nd dual-slot write - `--verify` correctly reported `read-back of 'recovery' differs`: the 2720 dual-slot `target_names = ("boot", "recovery")` was built, but the old `method == "lk2nd"` branch still wrote only `target_parts[0][1]`. `recovery` therefore kept the previous mainline boot.img while `--verify` compared it against lk2nd. - Step 1 now loops over every `target_parts` entry with a single `source` (`bootloader_img` for lk2nd, `boot_img` otherwise), and the verify loop uses the same source. `check-rebuild.sh` guards against the single-slot regression and a host test asserts the multi-target write path. ## Unreleased — unlock locked 2720 aboot via devinfo - `--dump-diagnostics` dumps from the connected 2720 show `diag-devinfo.img` with `ANDROID-BOOT!` magic and `is_unlocked=0`, `is_tampered=0`; `diag-aboot.img` contains `Nokia_beatles ROOT CA0`, secure-boot checks, `ERROR: Image Invalid! signature check failed!` and `Device is unlocked! Skipping verification...`. This is the root cause of the empty screen: aboot signature-checks every custom `boot.img` (lk2nd or mainline) and rejects it. - `flash-edl.py` now defaults to `unlock_devinfo()` on `nokia-beatles`: it backs up the locked `devinfo` to `backup/devinfo-locked-.img`, sets byte 13 (`is_unlocked`) to 1 and clears `is_tampered`, then writes it back before flashing. `--unlock-bootloader` forces it on any target; `--no-unlock-bootloader` skips it. - Added `scripts/make-unlocked-devinfo.py` and generated `backup/nokia-beatles-2720/devinfo-unlocked.img` from the captured dump (only byte 13 changes). `check-rebuild.sh` guards the unlock helper and defaults. - Earlier DTB/QCDT/lk2nd fixes remain valid but were all downstream of this signature check. ## Unreleased — lk2nd boots first on the 2720 Flip - `bootloader/lk2nd-msm8909.img` was re-examined: it is an Android `boot.img` with cmdline `lk2nd`, `dt_size=20480` and a QCDT v2 table after the ramdisk. Entry 13 already has the exact stock 2720 IDs (`platform_id=0x14b`, `variant_id=0x1000b`, `board_hw_subtype=0x100`, `soc_rev=0`) and points at a DTB with `/memory`, `/chosen` and `/lk2nd`. aboot therefore accepts the lk2nd boot.img on this device; the earlier "lk2nd unsupported" conclusion was wrong. - `--method lk2nd` is again the default for every target. On `nokia-beatles` it writes lk2nd to both `boot` and `recovery`; `--verify` reads back both. lk2nd then boots Bananarchy from `userdata` via `extlinux.conf`, which names `qcom-msm8905-nokia-beatles.dtb` explicitly, so lk2nd identifying the board as an 8110 in its own menu does not affect the kernel DTB. - `--method both` remains as a fallback that writes the standalone mainline `boot.img` to both slots, and `--method recovery` for the pmOS Volume Up route. - Added `scripts/check-lk2nd-beatles.py`; `check-rebuild.sh` now enforces the QCDT entry and the dual-slot lk2nd write. ## Unreleased — dual boot/recovery write and EDL diagnostics - (Superseded by the lk2nd-first path above.) `--method both` was the default for `nokia-beatles`: the corrected boot.img is written to both `boot` and `recovery`, because the stock locked fastboot chain may refuse an unsigned `boot` image while the pmOS-tested Volume Up recovery path still works. - `--verify` now reads back every target partition, and `--dump-diagnostics` copies small `devinfo`, `aboot`, `tz`, `config`, `misc` and related partitions into `backup/diag-*.img` for offline secure-boot analysis. - Completion output now tells the user to hold Volume Up if the KaiOS splash persists on a normal power-on. ## Unreleased — 2720 Flip aboot DTB fixes - Replaced the mixed `qcom,board-id = <0xb 0x100 0x1000b 0x100>` with the exact stock MSM8905 QRD SKUB pair `<0x1000b 0x100>`. Older Qualcomm aboot revisions read only the first board-id pair, so the lk2nd 8110 variant prevented DTB selection and left the phone on the KaiOS splash. - Added a 512 MiB `/memory` fallback (`reg = <0x80000000 0x20000000>`) to the beatles DTB. Stock aboot normally rewrites this from SMEM; the fallback avoids a zero-sized memory bank when it does not. - Added `scripts/repack-beatles-bootimg.py` and `scripts/check-beatles-bootimg.py`. `check-rebuild.sh` now enforces the exact qcom IDs, memory fallback, appended-DTB pointer and boot partition size. - Regenerated `qcom-msm8905-nokia-beatles.dtb`, the derivation patch, `images/boot-bananarchy-nokia-beatles.img` and the boot slot in `images/bananarchy-nokia-beatles.img`. ## Unreleased — opt-in read-back verification - `--verify` reads back the `boot`/`recovery` partition after step 1 and compares its leading bytes with the source image. A mismatch aborts the flash before `userdata` is written, so a Sahara/Firehose session that never committed cannot silently leave the phone booting stock KaiOS. ## Unreleased — restore system superblock wipe by default - `resolve_wipe_system()` again zeroes the stock `system` superblock for every flash method, as in the original Bananarchy behavior. `--no-wipe-system` is now the opt-out; `--wipe-system` remains an explicit (redundant) alias. The banner and step 3 report the effective choice. - Recovery-mode completion message now warns that a normal power-on hangs on the KaiOS logo after the wipe and that Volume Up is mandatory. - `check-rebuild.sh` continues to guard the wipe helper. ## Unreleased — do not wipe KaiOS system for boot/recovery methods - The "Powered by KaiOS" hang was the stock KaiOS kernel in `boot` trying to mount a `system` partition whose first 64 sectors we had zeroed. With `--method recovery`, `boot` is intentionally left alone, so a normal power-on boots KaiOS; only Volume Up selects the flashed recovery image. - `system` is now wiped only for the `lk2nd` method. `--wipe-system` forces it and `--no-wipe-system` forbids it; the banner reports the choice. - The target partition is always backed up as `-.img` instead of reusing an existing `.img` from a different device. - Recovery-mode completion message now states that normal power-on boots KaiOS and Volume Up boots Bananarchy. ## Unreleased — 2720 Flip boots from `boot` with a matched DTB - Root cause of the persistent boot failure: the appended device tree had no `qcom,msm-id`, `qcom,board-id` or `qcom,pmic-id`. Qualcomm aboot selects an appended DTB by those IDs, so it found none and fell back to Sahara (`05c6:900e`). The IDs (`0x14b`, `0x0b/0x100 0x1000b/0x100`, `0x1000d`) were read from the `MSM8905 QRD SKUB` DTB inside the stock 2720 recovery image, confirmed against lk2nd's `msm8905-qrd-skub` DTB, and added to the beatles DTS/DTB. The rebuilt `boot.img` now carries them. - (Superseded by the lk2nd-first path above.) `--method boot` was the default for `nokia-beatles`: the standalone `boot.img` was written to `boot`. - (Superseded.) `--method recovery` remains available; `--method lk2nd` is now the default for the 2720 as well. - `check-rebuild.sh` guards the device list and method-to-partition map. ## Unreleased — 2720 Flip recovery boot path - (Superseded by the lk2nd-first path above.) `lk2nd-msm8909.img` contains no `nokia-beatles` device node; the shared `msm8905-qrd-skub` board plus the colliding `qcom,mdss_spi_gc9305_v2_qvga_cmd` panel node make lk2nd identify the 2720 as an 8110 4G in its own menu. The stock aboot does accept the lk2nd boot.img via its QCDT entry. - (Superseded.) `flash-edl.py` auto-selected `--method recovery` for `nokia-beatles`: it flashed the standalone `boot.img` into `recovery`, left `boot` alone, writes the raw image to `userdata` (the pmOS initramfs `mount_subpartitions()` exposes the nested MBR), and tells the user to hold Volume Up at power-on. `--method lk2nd` and `--boot-image` override. - `rebuild-image.sh` exports `images/boot-bananarchy-.img` instead of deleting it. The exported image has the corrected beatles DTB appended and the pmOS 2720 load addresses (`ramdisk 0x81000000`, `tags 0x80000100`). - Flashing backs up `recovery` instead of `boot` in recovery mode. - `check-rebuild.sh` guards the recovery device list and the boot.img export. ## Unreleased — per-device EDL Firehose programmers - `flash-edl.py` now selects the Sahara/Firehose programmer from the target device instead of always using `8110.mbn`: `8110.mbn` (`nokia-argon`), `2720.mbn` (`nokia-beatles`), `800t.mbn` (`nokia-tough`), and `8k.mbn` for **both** `nokia-sparkler` and `nokia-leo`. `--variant us` selects `2720v.mbn` (`Nokia_bts_us`) for the 2720 Flip US variant. - Added `--list-loaders`, which prints every `.mbn` with its size, embedded attestation identity (`Nokia_beatles`, `Nokia_coconut`, `Nokia_bts_us`, `Nokia_leo`) and device mapping. `flash-edl.sh` runs it without `sudo`. - Selection warns when a programmer's embedded identity does not match the expected device identity and fails with an actionable message when the expected file is absent; `--loader PATH` still overrides everything. - `wait_for_edl_usb()` auto-detects `05c6:9008`, `05c6:900e` and `05c6:9006` instead of waiting only for 9008, and prints the PID it found; `--pid` still forces a specific one. `check-rebuild.sh` guards the list. - `check-rebuild.sh` guards the mapping and the presence of all five loaders. - `8k.mbn` is signed `Nokia_leo` but is valid for both MSM8909 targets (`nokia-sparkler`, `nokia-leo`); `2720v.mbn` is signed `Nokia_bts_us` (2720 Flip US). Confirm identities with `--list-loaders` before flashing. ## Build `a1108` — codename `dejavu` (2026-11-08) This build contains all previously unreleased changes below. The image and release metadata are generated by `scripts/version.sh` as `a1108` / `dejavu`. ### Abjects IRC default, status bar charge/time refresh and live device update - **Abjects is now the preconfigured IRC network**: `xirc` / `irc.so` ships `~/.config/sxmo/irc_servers.tsv` (also in `/etc/skel`) with a single `Abjects` entry for `irc.abjects.net`, TLS enabled (`1`), port `6697`, and `#bananarchy` as the auto-join channel, with background mode on. The compiled fallback and the new-server draft in `irc_plugin.cpp` were changed from Libera.Chat to the same Abjects defaults, so a missing or reset config still connects to Abjects and joins `#bananarchy`. `prebuilt/sxmo-x11` was rebuilt for `irc.so` and mirrored into `overlay/rootfs` with `scripts/sync-prebuilt-overlay.sh`; `README.md` and `MANUAL.md` now document the default network. `scripts/check-rebuild.sh` guards the shipped TSV columns, the compiled defaults, and the documentation. - **Charge icon and clock are republished together**: a charger or capacity event now runs `set_time` and forces a root-name refresh in `sxmo_hook_statusbar.sh`, so the charge icon cannot be left on the bar with a stale clock. `state_change` refreshes the charge icon unconditionally instead of only when the panel is already bright, closing the unlock race where `is_screen_dark()` still reported a dark backlight. A forced battery refresh removes the old icon file first, so `sxmo_status.sh` cannot skip the write when the value is unchanged. `bananarchy-time-sync.sh` calls a new lightweight `sxmo_hook_statusbar.sh refresh` action as the X session user after a successful NTP burst, republishing the clock and charge icon immediately when `chronyd` steps the clock instead of waiting for the next 300 s periodic tick. `scripts/check-rebuild.sh` guards all four paths. - **Minute-accurate status bar clock**: the full `statusbar_periodics` loop stays at 300 s (no extra modem or NetworkManager polls), but a lightweight `statusbar_clock` job now runs `sxmo_hook_statusbar.sh time` through `sxmo_run_aligned.sh 60` at minute boundaries. The `time` action refreshes `099-time` even while the panel is dark (only the `xsetroot` publish stays gated), so the clock is current at unlock and dmenu reads the right value; redrawing the root name also refreshes the native desktop clock. All three `sxmo_hook_start.sh` copies were updated and `scripts/check-rebuild.sh` guards the job. - **Live phone updated and verified**: network time was synced on the connected device (the RTC had fallen back to 1970, which also broke TLS certificate validation), all installed packages were refreshed with `apk update` followed by `apk upgrade -a` (165 upgrades, 2 installs, and 9 purges; `951.4 MiB in 888 packages`), and the updated overlay, IRC config, and `irc.so` were deployed to the phone. The resident `xirc` daemon was restarted so it loaded the Abjects config. The status bar was refreshed with the new `refresh` action: `099-time` matches the local clock (`10:33 EET`), and `040-battery-icon-pm8916-bms-vm` was rewritten with the correct charging icon for the reported state and capacity. The `a1108` / `dejavu` image was rebuilt afterwards. --- ### Event-driven network status and no-tradeoff idle A/B sweep - **Removed the `nmcli device monitor` poller**: `sxmo_networkmonitor.sh` kept a long-lived NetworkManager device monitor plus two shell wrappers alive to drive Sxmo network hooks and the status bar. It is replaced by `etc/NetworkManager/dispatcher.d/30-bananarchy-network-status.sh` and `usr/bin/bananarchy-network-event.sh`. The dispatcher reacts to `up`, `down`, `pre-up`, `pre-down`, VPN, connectivity, DHCP and DNS events and double-forks so NetworkManager is never blocked; the helper runs as the X session user so `sxmo_status` files stay user-owned. Both `sxmo_hook_start.sh` copies now disable the `sxmo_networkmonitor` superd unit instead of starting it, and `scripts/check-rebuild.sh` guards the replacement. NetworkManager, wpa_supplicant, dnsmasq, ModemManager and all call/SMS daemons are untouched. Live verification: a Wi-Fi reconnect invoked the user network-up hook, `sxmo_networkmonitor` / `network_monitor_device` / `nmcli device monitor` are gone, and a 60 s screen-off window measured 97.78% CPU idle with no monitor poller in the top context switchers. - **A/B measured and rejected further kernel/VFS tweaks**: 45-60 s screen-off windows showed no consistent win from `vm.stat_interval=120`, `vm.vfs_cache_pressure=50`, `vm.swappiness=100`, `kernel.sched_autogroup_enabled=0` or a `noatime` rootfs remount; several made CPU idle and timer IRQs worse. `kernel.timer_migration` was already `1`. All rejected sysctls and `relatime` were restored. `commit=` and longer dirty writeback were not shipped because they risk data loss on sudden power cut. - `BATTERY-OPTIMIZATION-ANALYSIS.md` section 18 records the full A/B table, the event-driven process change, and the remaining opportunities that were deliberately not shipped because they would delay Wi-Fi/modem state, inbound data, SIM2 reachability, or the on-screen clock. - `scripts/apply-bananarchy-overlay.sh` installs the new helper and dispatcher script root-owned and executable; `AGENTS.md`, `MANUAL.md` and `README.md` were synchronized. Image and live phone were redeployed and verified. --- ### xkopher focus scrolling, fresh unlock clock, battery longevity re-analysis - **xkopher link focus visibility**: `smallweb_plugin.cpp` now builds display rows through a shared `buildRenderRows()` helper and maps the focused link to its first wrapped row via `ensureFocusedLinkVisible()`. Jumping to the previous/next link always scrolls the viewport to the link in both `WRAP` and `NOWRAP` modes; with wrapping off it also resets horizontal scroll so the link label cannot remain off-screen. Toggling wrap re-applies the same scroll, and Page End now uses display-row count rather than logical-line count. `prebuilt/sxmo-x11` and `overlay/rootfs` `smallweb.so` were rebuilt. - **Fresh status bar clock after unlock**: `dmenu.c` had republished the root status from cached `sxmo_status` files whenever a menu opened or T9 mode changed. Because `sxmo_hook_statusbar.sh periodics` is suppressed while the panel is dark, this could show a pre-lock time for up to the 300 s periodic interval. `update_t9_status_indicator()` now refreshes `099-time` with the current local time and writes `sxmo_status_bar_cache` before `XStoreName()`. `sxmo_hook_unlock.sh` additionally calls `sxmo_hook_statusbar.sh time` synchronously after display-on, and `state_change` always refreshes the time file and forces a root-name update. Live reproduction: deliberately setting `099-time` to `00:00` and opening the Config menu rewrote the root name to `00:00`; after the fix the same test shows the current time. - **Battery longevity re-analysis**: `BATTERY-OPTIMIZATION-ANALYSIS.md` section 17 records a fresh 60 s screen-off measurement (97.93% CPU idle, 26.65 timer IRQs/s, 20 cpuidle SPC entries/s, 26 sleeping plugin daemons, runtime-suspended GPU/SDHCI/SPI/DMA/IOMMU, 21 enabled clocks, no PSCI or `/sys/power/state`). It also documents a modem registration anomaly (`not-registered-searching`, `mmcli -L` empty, swapped GW slots) as a measurement caveat; no PIN verification was attempted. - **Two low-risk battery wins implemented**: all deviceinfo files now set `deviceinfo_zram_swap_algo="lz4"` because the active `postmarketos-zram-swap` service uses `/usr/bin/zramstart` (which defaults to `zstd` and ignores `/etc/conf.d/zram-init`); live `/sys/block/zram0/comp_algorithm` had shown `[zstd]`. `vm.compaction_proactiveness=0` is now set in `etc/sysctl.d/99-bananarchy-power.conf` and `etc/local.d/10-power-save.start`: a controlled A/B reduced `kcompactd0` from 1.97 to 0.02 context switches/s and raised CPU idle from 97.93% to 99.22%. DSDS `eco` parking was A/B tested but inconclusive without discharge current; the conservative defaults remain unchanged. - `scripts/check-rebuild.sh` guards wrapped-row focus scrolling, dmenu clock refresh, the synchronous unlock refresh, `lz4` deviceinfo and the compaction sysctl. `prebuilt/sxmo-x11` was rebuilt for the two changed plugins and mirrored with `scripts/sync-prebuilt-overlay.sh`; the image and live phone were redeployed and verified. --- ### manual network time sync from the Config menu - **Config -> Sync net time**: a new menu item in the built-in dmenu Config menu (`src/sxmo-dmenu/dmenu.c`) runs `/usr/bin/bananarchy-sync-net-time.sh`, which forces an immediate NTP burst and shows a desktop notification with the result. It is the manual escape hatch when boot-time autosync is slow, e.g. because Wi-Fi DNS became usable only after `chronyd` had started with an unresolved NTP pool. - **`bananarchy-time-sync.sh sync`**: the helper now reports `Network time synced: ` (or a clear failure) and returns a matching exit status. `resolved()` now requires at least one known source, so a freshly started chronyd with zero sources cannot be mistaken for a resolved pool. DNS resolution runs before the `flock` is taken, so the long boot retry no longer swallows the NetworkManager `up` / `dns-change` events that arrive while it is waiting; network-up events get 8 retries (16 s). - **Measured on the reflashed phone**: the kernel set the clock from the RTC to `1970-01-12 12:39:26 UTC`; NetworkManager, chronyd and the time-sync service started at ~27 s; Wi-Fi got its DHCP lease and `resolv.conf` at ~30 s; the first NTP samples and the clock step to `2026-11-07 20:04:23 UTC` happened only at ~112 s, when the USB RNDIS connection came up and emitted another dispatcher event. The Wi-Fi events at ~30 s produced no burst: the boot helper either held its `flock` for the 60 s DNS retry or had already written its 15 s throttle stamp after treating a zero-source `activity` report as a resolved pool. - Live verification: a simulated DNS-down chronyd start followed by a concurrent `network-up` trigger now syncs while the boot helper is still waiting; the menu command was exercised as the X session user and reported success over the root-only chronyd Unix socket. - `scripts/check-rebuild.sh` guards the menu entry, the menu wrapper, the `sync` mode and the overlay ownership/mode fix; `prebuilt/sxmo-x11` and `overlay/rootfs` dmenu plugin were rebuilt from the C source. --- ### network-up NTP synchronisation - **Fixed the clock never being set over the network**: `chronyd` resolves `pool.ntp.org` only at startup and, with `minpoll 12`, waits up to 4096 s for its first measurement. On this device it starts before NetworkManager has installed a working `resolv.conf`, so `chronyc activity` reported `4 sources with unknown address` and the clock stayed at 1970 even with Wi-Fi connected. `iburst` is back in `etc/chrony/chrony.conf` so a daemon started with DNS already up syncs in seconds; the long `minpoll 12 maxpoll 16` steady-state interval is unchanged. - **New `bananarchy-time-sync.sh`**: on a network-up event it calls `chronyc refresh` (re-resolve the pool), `online` and `burst 2/4` over chronyd's root-only Unix command socket. `cmdport 0` stays in place, so no UDP command port is exposed. The helper waits for chronyd and for the pool to resolve, throttles repeats using monotonic `/proc/uptime` (a 56-year clock step cannot invalidate the stamp), serialises concurrent events with `flock`, and skips bursts once the clock is synchronised. `status` prints `chronyc tracking` / `sources`; `force` triggers a sync on demand. - **Triggers**: `/etc/NetworkManager/dispatcher.d/20-bananarchy-time-sync.sh` handles `up`, `dhcp4-change`, `dhcp6-change`, `dns-change`, `connectivity-change` and `vpn-up`; a new `bananarchy-time-sync` OpenRC service (`need chronyd net`, `after networkmanager`) covers boot ordering when NetworkManager events fire before chronyd is ready. Both are in the default runlevel / dispatcher set and are guarded by `scripts/check-rebuild.sh`. - **Fixed the driftfile**: `/var/lib/chrony` was `root:root 0750`, so the unprivileged `chrony` user could not write `chrony.drift` and its frequency estimate was lost on every reboot. `rebuild-image.sh` and `apply-bananarchy-overlay.sh` now chown it to the `chrony` uid/gid. - Live verification on the connected phone: the shipped config left the clock at `1970-01-12` with no NTP socket; `chronyc refresh` + `burst 2/4` over `/run/chrony/chronyd.sock` resolved all four sources and stepped the clock to `2026-11-07` within seconds. NetworkManager dispatcher events were confirmed to fire (`dns-change`, `dhcp4-change`, `up`, `connectivity-change`) on a Wi-Fi reconnect. --- ### reproducible device initramfs module lists - `scripts/apply-bananarchy-overlay.sh` now installs the tracked `devices//modules-initfs` list into `/usr/share/mkinitfs/modules/00-device-.modules` plus its `initramfs.load` mapping, and removes stale lists from other devices. Without the `device-*` package (not in `scripts/rootfs-packages.txt`), a clean-clone bootstrap previously produced an initramfs missing 7 device modules (panel, keypad and both PMIC drivers, including the new `pm8916_bms_vm`). A clean clone rebuild now produces the same 27-module initramfs as an existing rootfs, with the fixed BMS module byte-identical. - `scripts/check-rebuild.sh` guards the per-device module lists and the overlay installation step. --- ### VM-BMS clamp and runtime power policies - **Kernel fix (patch 0007)**: `pm8916_bms_vm.c` now bounds VADC raw samples to `8000..16000` (~2.34-4.69 V) with a 3.7 V nominal fallback, covering the FIFO IRQ, the probe-time FIFO pre-read and both OCV register reads. An uninitialised `0xffff` sample previously produced `voltage_now=19.2 V`, `health=Over voltage` and `capacity=100` for the first minutes after a hard reset. Source-only change; no config, vermagic or struct layout change. - **Configurable Wi-Fi listen interval**: `wcn36xx` gained a `listen_interval` module parameter (1-10, default 5, was hardcoded 3). `/etc/bananarchy-power-policy.conf` (`WIFI_LISTEN_INTERVAL`) drives `/etc/modprobe.d/10-bananarchy-power.conf` via `bananarchy-power-policy.sh`. Higher values cut idle RX wakeups at the cost of inbound packet latency; changes apply at module load. - **Modem DRX policy**: standard `AT+CPSMS` / `AT+CEDRXS` are unsupported on this modem firmware, but the Qualcomm `AT$QCDRX` DRX mode (0, 6-9) works. `MODEM_DRX_MODE` in the policy config is applied at boot and on screen wake. Default `0` (firmware default) because higher values are undocumented and can delay paging; `6` is the conservative opt-in. - **DSDS secondary-SIM policy**: `DSDS_SECONDARY_MODE=eco` parks the secondary subscription after `DSDS_PARK_DELAY` seconds of a dark panel and restores it on wake, using QMI provisioning-session activate/deactivate (not SIM power-off, which loses PIN verification). Default `active` keeps both SIMs reachable. Hooks in `sxmo_wm.sh display off/on` cover both idle blank and locker screenoff. - **New `bananarchy-power-policy.sh`** plus an OpenRC default-runlevel service and a `doas` rule. `status` reports the effective policy, the `wcn36xx` parameter, and the current modem DRX mode. - **Not implementable here**: DDR self-refresh / `mem` suspend (needs PSCI `SYSTEM_SUSPEND` in lk2nd) and standard LTE PSM/eDRX (not exposed by `MPSS.JO.3.0.c4`). See `BATTERY-OPTIMIZATION-ANALYSIS.md` §15. --- ### kernel power headroom analysis (no runtime change) A second live measurement pass on the connected `nokia-argon` (screen off, Wi-Fi up, both SIMs registered) quantified what is left after the battery pass, and settled the "rebuild the entire kernel module tree" question: - **Idle AP is already quiet**: 98.08% CPU idle, both cores in standalone power collapse, all genpd domains off, SPI/GPU/SDHCI and both remoteprocs runtime-suspended. Remaining activity is ~35.8 timer IRQs/s, ~29.5 SPC entries/s, 8.4 function-call IPIs/s, 2.4 Wi-Fi RX IRQs/s and 2.2 eMMC IRQs/s. With the panel dark, userspace produces only 19.5 context switches/s, mostly kernel threads. - **`mem` suspend is impossible on this firmware**: no PSCI node in the live device tree, `qcom_scm: convention: smc legacy`, cpuidle driver `qcom_spm`, and no `platform_suspend_ops` for MSM8916. `CONFIG_SUSPEND` would give only `freeze` (s2idle) — no RPM power collapse, no DDR self-refresh. - **Full module tree rebuild declined**: pmaports `6.12.1-r5` applies no kernel patches and ships 579 `.ko.zst` files / 11 MB from the same tarball we already build, so the rebuild is mechanically clean. But s2idle would save <1 mA of AP transition overhead against the ~20-55 mA needed for 24 h in DSDS + Wi-Fi, while reintroducing the ABI and untested driver-sleep risks of the unbootable `ad3461b` image. The known-good pmaports module ABI stays. - **Additional ABI-breaking config options documented**: `CONFIG_ENERGY_MODEL` (`struct device`), `CONFIG_PERF_EVENTS` / `CONFIG_FUNCTION_GRAPH_TRACER` (`struct task_struct`), and `CONFIG_HZ` (the `HZ` macro compiled into module inlines). `CONFIG_RCU_LAZY` needs `rcu_nocbs=all`, which is counterproductive on 2 cores. `CONFIG_SCHED_HRTICK` and `CONFIG_CPU_IDLE_GOV_TEO` are safe but no-ops here. - **Where the remaining runtime has to come from**: modem LTE eDRX/PSM via `AT+CEDRXS` / `AT+CPSMS`, DSDS policy, Wi-Fi DTIM/listen interval, and DDR self-refresh (which needs PSCI `SYSTEM_SUSPEND` in lk2nd) — none of which a module tree rebuild unlocks. - **Live-session observations**: the phone needed one hard power-key reset at ~22 min uptime (blank panel, USB RNDIS gone; `pstore` empty, no panic in the post-reset `dmesg`, no kernel/module/cmdline change made in this session), and the VM-BMS briefly reports 19.2 V / `Over voltage` after a hard reset because an uninitialised `0xffff` FIFO sample passes the driver's `> 8000` filter. A source-only sanity clamp is noted as worth fixing in `BATTERY-OPTIMIZATION-ANALYSIS.md` §14.7; it needs no module tree rebuild. See `BATTERY-OPTIMIZATION-ANALYSIS.md` §14 for the full data and verdict. No kernel image, module, DTB or userspace artifact changed in this pass. --- ### configurable 5-minute screen blank, instant lock/wake - **Configurable idle blanking**: added **Config -> Screen blank** (`Off`, 30 s, 1/5/10/30 min) backed by `~/.config/sxmo/idle_blank_timeout` and the new `bananarchy-idle-timeout.sh get|label|set`. Default is now **5 minutes** (was 60 s). `dwm` reads the file live and reloads it on `SIGUSR1`, so a menu change takes effect without a restart; `sxmo.noidle` / `SXMO_UNLOCK_IDLE_TIME` still override it. - **Instant blank on lock/lid**: `Power -> Lock` now uses `@plugin:locker:screenoff` (like `Lock (Screen off)`), and `lock_phone_screenoff()` resets `dwm`'s idle state, so closing the slider or locking blanks the panel immediately instead of waiting for the idle timeout. - **Instant wake on activity**: new `bananarchy-screen-wake.sh` restores the panel via `sxmo_wm.sh display on`, records `/tmp/bananarchy_last_wake` and signals `dwm` (`SIGUSR1`) to reset `idle_blanked` / `last_input_ms`. Called from `sxmo_hook_ring.sh` (incoming call) and `sxmo_hook_notification.sh` (SMS / notifications). `dwm` also self-heals if an external hook turns the panel on without a signal. --- ### idle-blank wake fix and PIN-locked SIM provisioning Two issues reported after the recovery image booted: - **Idle blank turned the screen back off immediately after a wake (U1)**: `sxmo_hook_unlock.sh` used `sxmo_idle.sh` + `xprintidle`, but dwm consumes keypad events at the evdev level before X sees them, so the X idle counter never reliably reset and the blank/resume commands raced. Idle blanking is now driven by dwm's own input timer: `src/sxmo-dwm/dwm.c` tracks `last_input_ms` from evdev and X key events, arms `poll()` with the `SXMO_UNLOCK_IDLE_TIME` deadline (default 60 s), calls `bananarchy-idle-blank.sh off` once, and `wake_phone()` clears the flag and resets the timer on the next real key press. `sxmo.noidle` still disables it. The `idle_locker` job was removed from `sxmo_hook_unlock.sh`. A defensive wake-grace guard was also added to `bananarchy-idle-blank.sh` (and `sxmo_wm.sh display on` records `/tmp/bananarchy_last_wake`) so the legacy path cannot re-blank within 10 s of a wake on an already-flashed device. Verified live: `off -> on -> immediate off` leaves the screen on. - **PIN on one SIM prevented the other SIM from registering (DSDS)**: `msm-modem-uim-selection provision_slot` tried to bind the preferred slot to `primary-gw-provisioning` even when its application was `pin1`/`puk1` (or `PIN1 state: enabled-not-verified`), so no provisioning session came up and neither subscription registered. It now detects a locked preferred slot and falls back to the other *ready* slot for the primary GW; after the PIN is entered `xmodem`/`verify-pin` re-runs `boot` and both slots are provisioned. --- ### recovery: restore the known-good kernel (module ABI) **The previous battery pass produced an unbootable image.** Two independent incompatibilities between a custom-built kernel and the `linux-postmarketos-qcom-msm8916` package module tree were found and are the reason for this revert: - **Vermagic**: switching `CONFIG_PREEMPT=y` -> `CONFIG_PREEMPT_VOLUNTARY=y` removes `CONFIG_PREEMPT_BUILD`, changing module vermagic from `6.12.1-msm8916 SMP preempt mod_unload ARMv7 p2v8` to `6.12.1-msm8916 SMP mod_unload ARMv7 p2v8`. Every module shipped by the pmaports kernel package (`panel-mipi-dbi`, `qrtr`, `bam_dmux`, `rpmsg_wwan_ctrl`, `gpio-keys`, ...) then fails to load, so the display never initialises and the phone stays on the lk2nd logo. - **Struct layout**: `CONFIG_SUSPEND=y` selects `CONFIG_PM_SLEEP`, which adds fields to `struct dev_pm_info` (embedded in `struct device`). Modules built without it have wrong `dev->power.*` offsets, so matching vermagic alone is not enough. Therefore the kernel config, the serial-console cmdline and the DTB `wakeup-source` additions were restored to the known-good `a1105` state. The kernel image is still cross-compiled from `config-bananarchy-msm8909.armv7` by `build-kernel-audio.sh`, but with the original config, so its vermagic and struct layouts match every module in the rootfs. **K1, K6, K7, K8, K13 and K14 (config-level) are reverted**; implementing them properly requires vendoring and rebuilding the *entire* kernel module tree, not just the ~32 modules this repo builds. Kept (verified safe, no kernel-config dependency): - K2 `clock-latency-ns` in all 5 device trees (fixes `CPUFREQ_ETERNAL` at its source). - K3/K4/K5 via `patches/kernel/0006` (wcn36xx keep-alive/listen interval, VM-BMS sample interval and uevent throttling, GPU devfreq polling) — rebuilt with the original config, so module ABI matches. - K10 IPv6 sysctl, K12 deferred, all U1-U14 userspace changes (deployed and tested on the phone before the reflash). - `overlay/rootfs/boot/{vmlinuz,config,System.map}` are regenerated from the known-good config. Deep standby (U2) remains shipped disabled via `/etc/bananarchy-no-deep-standby` and is inert on this kernel because `/sys/power/state` has no sleep states. Verification of the recovery build: - `modinfo` on a rebuilt module, on an untouched package module and on the regenerated kernel all report `6.12.1-msm8916 SMP preempt mod_unload ARMv7 p2v8` (previously the rebuilt kernel reported `SMP mod_unload ARMv7 p2v8`). - Rebuilt `images/bananarchy-nokia-argon.img` (1.6 GiB) with `--mkinitfs`; the regenerated `boot.img` contains the new `zImage` + DTB byte-for-byte and the restored `earlycon console=ttyMSM0,115200` cmdline. `check-rebuild.sh` passes and artifact drift is 0. - Boot-testing over `fastboot boot` was attempted on the connected device (lk2nd fastboot, `18d1:d00d`) but lk2nd stalled during the 18 MB download, so the fix still needs a full reflash to confirm on hardware. --- ### measurement-corrected battery optimization pass Analysis: `BATTERY-OPTIMIZATION-ANALYSIS.md` (corrected against the connected `nokia-argon`, `a1105`, 43 h uptime, DSDS + Wi-Fi on). No sleep state existed at all: `/sys/power/state` was 0 bytes and `cpuinfo_transition_latency` was `4294967295`; the CPU cores were already ~98 % power-collapsed, so the drain came from always-on SoC rails, display and radios, not busy loops. ### Rebuilt and verified image - Rebuilt `images/bananarchy-nokia-argon.img` (1.6 GiB) with `./rebuild-image.sh nokia-argon --mkinitfs`: the regenerated `/boot/boot.img` contains the newly cross-compiled `zImage` plus the updated `qcom-msm8905-nokia-argon.dtb` (verified byte-for-byte), and its cmdline no longer carries `earlycon` or `console=ttyMSM0,115200`. `check-rebuild.sh` and `sync-prebuilt-overlay.sh --check` both pass (0 artifact drift). - Deployed the userspace overlay to the connected `nokia-argon` over SSH and verified: all 39 shell scripts pass `sh -n`, all 5 embedded Python heredocs parse, the U1 idle-blank round trip drives `brightness 10 -> 0 -> 10`, `bl_power 0 -> 4 -> 0`, `DPMS On -> Off -> On` and `schedutil -> powersave -> schedutil`, the statusbar periodic hook returns 0, and deep standby stays correctly gated (the running kernel has no sleep states, so the suspend helper is a no-op). ### Kernel (K1-K14) - Enabled `CONFIG_SUSPEND`, `CONFIG_SUSPEND_FREEZER`, `CONFIG_PM_WAKELOCKS(_LIMIT/GC)` and `CONFIG_PM_AUTOSLEEP`; `build-kernel-audio.sh` now cross-compiles the `zImage` from `config-bananarchy-msm8909.armv7` and ships it as `overlay/rootfs/boot/vmlinuz` together with the resolved `config` and `System.map`, so the tuned config actually reaches the boot image. `wakeup-source` added to the WCNSS/pronto remoteproc in all 5 device trees. - Added `clock-latency-ns = <100000>` to `cpu-opp-table` in all 5 device trees: fixes `CPUFREQ_ETERNAL` at its source instead of overriding `schedutil/rate_limit_us` from userspace. - New `patches/kernel/0006-msm8909-battery-wifi-gpu-power.patch` (applied by `build-kernel-audio.sh`): wcn36xx null-data keep-alive 30 s -> 120 s, `listen_interval = 3`, VM-BMS FIFO sample interval 10 s -> 30 s, `power_supply_changed()` emitted only on a real capacity change, GPU devfreq `polling_ms` 50 -> 100. - Retuned the kernel config for idle: `HZ=100`, `PREEMPT_VOLUNTARY`, `SCHED_HRTICK`, `CPU_FREQ_STAT`, `IRQ_TIME_ACCOUNTING` and `SCHED_SMT` off, `CPU_IDLE_GOV_TEO=y`; disabled ftrace/function tracer/dynamic debug/perf events/profiling/kprobes/uprobes/BPF JIT always-on, firmware-loader debug, thermal emulation, Magic SysRq, printk timestamps, DRM GPU state dump, boot logo and the MSM serial console; `DRM_FBDEV_OVERALLOC=0`; removed unused input classes and LED triggers; `ZRAM_DEF_COMP=lz4`; enabled `ENERGY_MODEL`; `RCU_NOCB_CPU`/`RCU_LAZY` are gated behind `RCU_EXPERT || NO_HZ_FULL` and were dropped by `olddefconfig`. `FRAMEBUFFER_CONSOLE`, `NETFILTER`, `IPV6` and `CGROUPS` are deliberately kept (plymouth, Tor/WireGuard/tethering, elogind). - Removed `earlycon` and `console=ttyMSM0,115200` from every `kernel-cmdline.conf` and from the shipped `usr/lib/kernel-cmdline.d/50-device-*.conf` files. - `net.ipv6.conf.default.disable_ipv6=1` (sysctl.d + `10-power-save.start`) stops ND/MLD multicast on newly created interfaces; `CONFIG_IPV6=m` stays for VPNs and `::1` on `lo`. ### Userspace (U1-U14) - **Idle blanking (U1)**: `bananarchy-idle-blank.sh` blanks/restores the panel without the passcode locker; `sxmo_hook_unlock.sh` starts `idle_locker` at `SXMO_UNLOCK_IDLE_TIME` (default 60 s) with a `resume` hook, and `bananarchy-x11-session.sh` no longer forces `sxmo.noidle`. Create `~/.cache/sxmo/sxmo.noidle` to restore the old "never blank" policy. - **Deep standby (U2)**: `bananarchy-suspend.sh`, `bananarchy-deep-standby.sh`, `sxmo_autosuspend.sh` and `sxmo_suspend.sh` implement a guarded suspend after screen-off; `AllowSuspend=yes`, a doas rule, no infinite `sxmo_not_suspendable` wakelock, no `sxmo.nosuspend`, and cancel hooks on unlock/postwake. `freeze` (s2idle, any-IRQ wake) is preferred; `mem` needs `/etc/bananarchy-allow-mem-suspend`. **Shipped disabled** via `/etc/bananarchy-no-deep-standby` until the new kernel has been boot-tested. - **Statusbar (U3)**: 60 s -> 300 s `statusbar_periodics`; the periodic hook no longer runs `mmcli`/`nmcli`/`rfkill` and only calls `xsetroot` when the status string changes. - **Battery uevents (U4)**: udev rule filtered to the two PM8916 supplies; removed the `(sleep 2; ... recheck)` fork from `sxmo_hook_battery.sh`. - **Bluetooth (U5)**: `AutoEnable=false`, 60 s discoverable/pairable timeouts, `bredr` only, 3 reconnect attempts (latent: BT was already soft-blocked on the device). - **chronyd (U6)**: `minpoll 12 maxpoll 16`, no `iburst`. - **NetworkManager (U8)**: `wifi.scan-interval=600`. - **Modem/DSDS (U9/K11)**: QMI BAM-DMUX data port is now opened on demand (`bananarchy-dpm.sh` + NM dispatcher) instead of unconditionally at boot; `dsds-daemon` stored-SMS poll 600 s -> 1800 s and error backoff 2 s -> 30 s; `sxmo_modemmonitor.sh` 10/120 s -> 30/600 s. `mmcli`'s `drx-cycle`/`mico-mode` are 5G NR fields and were removed from the optimization list as inapplicable to this LTE modem. - **Timers (U11)**: `sip_plugin.cpp` 15 s -> 60 s; `tox_plugin.cpp` clamp 250-1000 ms -> 1000-2000 ms; `sxmo_soundmonitor.sh` restart backoff 2 s -> 10 s. - **Storage (U12/K13)**: `tmpfs` on `/tmp`, zram `lz4` + `noatime`, `size1=256`. - **Zero-log (U13)**: shipped user/skel `sxmo_hook_start.sh` now uses `superd -l /dev/null` with `/dev/null` log symlinks, matching the default hook. - **Xorg (U14)**: skip `xrdb`/`feh`/dunst-theme work on dwm restart while the panel is dark; `sxmo_wm.sh display off/on` also switches the GPU devfreq governor to `powersave`/`simple_ondemand`. - Fixed the cosmetic `yesno "{wpa_supplicant_dbus}"` typo in `etc/init.d/wpa_supplicant` (C1: the running service already had `-u`; OpenRC's `yesno()` dereferences the literal). - Withdrawn as disproven by the live device: duplicate `wpa_supplicant`/respawn storm (U7) and the `sxmo_soundmonitor.sh` 5 s loop (U10). ### Deferred with justification - **K12** (damage/partial-window updates in `panel-mipi-dbi`) needs panel-specific GC9305/GC9307 commands and risks display corruption; U3 delivers the equivalent userspace saving. - **`rcu_nocbs=all`** (K14) was not added to the cmdline: on a 2-core MSM8905 it would add always-running `rcuo` kthreads, trading away the idle saving. - **`msm8905-cam`** stays in `/etc/modules` (K9): its out-of-tree platform driver has no udev autoload path, so removing it would break `xcamera`. --- ### display power, cpufreq, and Bantam agent update ### Updated Bantam agent to upstream `c168955` - Fetched and cross-compiled the latest `bantam-cpp` master (`c168955`, "Scope /clear to the current project's session and drop cross-implementation references") for `armv7` with `scripts/build-bantam.sh`, replacing the `0cd1a67` binary in `prebuilt/bantam/`, `overlay/rootfs/usr/bin/`, `overlay/rootfs/usr/local/bin/`, and the target rootfs. The update brings validated `write` tool edit modes (`find` / `replaceAll`, `append`, `lineOffset`, `byteOffset`), verbatim file content writes, safer `read` and `bash` tool handling, and a project-scoped `/clear`. - Rebuilt `images/bananarchy-nokia-argon.img` (release `a1105`) and verified by SHA-256 that both `/usr/bin/bantam` and `/usr/local/bin/bantam` inside the ext4 root partition match the refreshed binary (`32b93f36…`). ### Display power management and CPU frequency tuning - Enabled the X11 DPMS extension in `10-bananarchy-msm8909.conf`, `bananarchy-x11-session.sh`, and `sxmo_dwminit.sh`, and added explicit `xset dpms force off/on` to `sxmo_wm.sh display off/on`. Before the fix the DRM connector stayed `On` while blanked; it now reports `Off` on blank and `On` on wake for both the `sxmo_wm.sh` path and the direct-sysfs paths used by `dwm` and `locker.so`. DPMS timeouts stay at `0 0 0`, so unlocked auto-blanking remains disabled by design. - Added `bananarchy-display-power-sync` and `86-bananarchy-display-power.rules` to drive DPMS from backlight `change` uevents, covering the lid-close and lockscreen blank paths that write sysfs directly. The helper also re-applies the schedutil rate limit after every wake. - Fixed `rate_limit_us` silently falling back to the 6.44 s default: `10-power-save.start` no longer writes the nonexistent `up_rate_limit_us` / `down_rate_limit_us` files, and the 40 ms value is re-applied after each `powersave` to `schedutil` governor switch. Measured idle average CPU frequency dropped from 582 MHz to 440 MHz (-24%) with 40 ms instead of 6.44 s. - Removed the dead `iw dev wlan0 set power_save on` block from `10-power-save.start`: `iw` is not shipped, and NetworkManager `wifi.powersave=3` plus the wcn36xx `WIPHY_FLAG_PS_ON_BY_DEFAULT` patch already report `Power save: on` on the connected link. --- ## Build `a1105` — codename `vendetta` (2026-11-05) ### Full-length SMS conversation view and Unicode-aware composer - Fixed `xsms` (`sms.so`) cutting long, concatenated, or Unicode messages short in the expanded conversation view: the body was handed to `pango_xft_render_layout()` as one multiline layout, and the target Pango/Xft stack only painted its first line (the example Ukrainian `Мелорінг дарує хіти! …` message stopped right before `є`). Reproduced on the connected phone with an instrumented `sms.so` (full 530-byte body, 13 measured layout lines, only one painted line) and a standalone ARM reproducer; `pango_xft_render_layout_line()` paints all lines. The QMI WMS reassembly and `sms.txt` parser were verified correct and are not the cause. - Message bodies (and long composed text) are now rendered line by line through a shared `renderLayoutLines()` helper with an Xft clip rectangle, so no text overflows its bubble or the softkey bar. The selected message is scrollable with `Up`/`Down` (one line per press, with a right-edge scrollbar); the keys step to the previous/next message only at the top/bottom of an overflowing message. Card measurement now uses the same width as rendering. - Replaced the byte-based `composeText.size()/160` counter with `smsTextMetrics()`, which decodes UTF-8 code points, detects the 3GPP TS 23.038 GSM 7-bit alphabet plus extension table, and reports GSM-7 septets (160 per part, 153 when concatenated) or UCS-2 UTF-16 units (70 per part, 67 when concatenated) with the correct part count. The offline-send fallback log now records units instead of bytes. - `parseSmsHeaderLine()` strips the `[SIM n]` tag written by the QMI WMS daemon (`Received from 5050 [SIM 1] at …:`) and by older local send fallbacks (`Sent at … [SIM 1]:`), so senders and ISO timestamps stay clean; the fallback no longer writes the tag into `sms.txt`. - Added a `scripts/check-rebuild.sh` guard that rejects a bulk `pango_xft_render_layout()` call in `sms_plugin.cpp` and requires the line-by-line renderer, scroll state, encoding metrics, and SIM-tag stripping. - Updated `AGENTS.md` with the multiline Pango/Xft rendering convention, the SMS text-accounting rule, the `sms_plugin.cpp` layout, and the new preflight guard. ### Remove the remaining optional scripting runtimes - Removed `perl`, `perl-io-socket-ssl`, `tcl-lib`, `tcl-tls`, `sqlite-tcl`, `lua5.4`, `lua5.4-dev`, `lua5.5`, `lua5.5-dev`, and `sqlite` (CLI) from `scripts/rootfs-packages.txt` and added them to the prune denylist: 13 packages / 49.45 MiB including dependents. `sqlite-libs`, `tcl`, and all paramount runtimes stay. - Promoted `curl` to an explicit world entry and pinned `curl`, `bc`, `ed`, `rlwrap`, `mandoc`, `nano`, `less`, and `frotz` as core tools in `scripts/check-rebuild.sh`. - Removed the `lua` / `luac` symlink creation and the `lua5.5` critical-binary check from `rebuild-image.sh` and `scripts/bootstrap-rootfs-container.sh`; `scripts/apply-bananarchy-overlay.sh` now deletes any stale symlinks. `scripts/check-rebuild.sh` guards against reintroducing them. - Updated `README.md`, `MANUAL.md`, `AGENTS.md`, and `SDK.md` section 7 (removed runtimes plus deliberately kept core tools). - Dropped four legacy pmbootstrap-era `so:` world constraints (`@` entries in `scripts/rootfs-prune-packages.txt`). `so:libperl.so` was pinning `perl` and prevented its removal; the other three providers (`elogind-common`, `expect`, `libpulse`) remain as hard dependencies. ### Drop the on-device GCC suite and Janet runtime - Removed `gcc`, `g++`, `musl-dev`, `make`, `janet`, `janet-dev`, and `jpm` from `scripts/rootfs-packages.txt` and added them to `scripts/rootfs-prune-packages.txt`; together with their toolchain-only dependencies this frees 143.86 MiB (14 packages). No overlay script or world package depends on them at runtime. - Verified the Yabasic runtime is fully functional by executing the actual `armv7` binaries under `qemu-arm` in a chroot of the target rootfs: `yabasic 2.92.1`, basic `print`, `import neonet` + `neonet_version$()` (libffi -> `libcurl.so.4`), and `import neoui` + `neoui_adjust_rgb()` (libffi -> `libneoui.so`). All `DT_NEEDED` libraries of `yabasic`, `libneoui.so`, and `libcurl.so.4` come from packages that remain. - Updated `README.md`, `MANUAL.md`, and `SDK.md` (on-device compile examples replaced with cross-compilation guidance) and added an on-device scripting runtime inventory to `SDK.md` section 7 classifying paramount versus removable runtimes. - Hardened `scripts/check-rebuild.sh` with `yabasic`/`yabasic-doc` critical-package assertions, forbidden compiler/Janet assertions, and a Yabasic FFI artifact check. ### Updated Bantam agent and install_if prune fix - Cross-compiled and installed the updated `bantam-cpp` upstream (`0cd1a67`, "Send stable x-opencode-session header based on project_id") into `prebuilt/bantam/`, `overlay/rootfs/`, and the target rootfs, then rebuilt `images/bananarchy-nokia-argon.img`. - Fixed a prune regression found during that rebuild: apk re-adds `install_if` packages (`imv-wayland`, `gstreamer-ptp-helper`, `libheif-rav1e`) on every transaction, so `apk del` alone could not remove the Wayland viewer or the two Rust helpers. `scripts/rootfs-prune-packages.txt` now pins them with negative `!pkg` world constraints, and `scripts/prune-rootfs-packages.sh` restores those constraints and runs `apk fix` after each purge. `scripts/check-rebuild.sh` verifies the constraints are present. ### Lean rootfs, Rust and Wayland removal, and dead code cleanup - Replaced the Rust `sudo-rs` (and its `postmarketos-base-sudo-rs` companion) with the C `sudo` implementation in `scripts/rootfs-packages.txt`; the APK index confirms `sudo` provides `sudo-virt` at priority 100 with the same `sudo`, `sudoedit`, and `visudo` commands, so `postmarketos-base`, `sxmo_power.sh`, `gs-warp-simple.sh`, and the overlay setuid handling are unchanged. - Added `scripts/prune-rootfs-packages.sh` with a `world` phase (before `apk add`, so apk atomically replaces `sudo-rs` with C `sudo` instead of failing on the `cmd:sudo` conflict) and a `purge` phase (after `apk add`, so retired packages are removed after the transaction); verified in an `alpine:3.24` container against a real `armv7` pmOS rootfs. - Removed the Wayland-purpose `libwpebackend-fdo` from the runtime package set. `webarchy.so` and `libwebkit2gtk-4.1.so` have no `DT_NEEDED` on `libWPEBackend-fdo-1.0.so.1`, and `libwpe` only loads a backend after an explicit `wpe_loader_init` that WebKitGTK never performs; `libwpebackend-fdo-dev` stays in the ephemeral cross-build sysroot for `pkgconf`. - Added `imv-x11` alongside the `imv` wrapper so a clean bootstrap has a working X11 image viewer without pulling `imv-wayland`; the session unsets `WAYLAND_DISPLAY`, so the wrapper always takes the X11 branch. - Removed unused or superseded packages: `mesa-demos` (Wayland-linked demo binaries and `libdecor`), `postmarketos-artwork-wallpapers` (already deleted by the overlay, which ships its own wallpapers), `ttyescape` (with the disabled Rust `hkdm` daemon and `kbd` data), `clickclack` (virtual-keyboard feedback daemon unused with `SXMO_NO_VIRTUAL_KEYBOARD=1`, plus `sdl3`), and `font-twemoji` (fontconfig uses Noto Color Emoji). `glxinfo`, `eglinfo`, and `glxgears` remain via `mesa-utils`; `README.md` and `MANUAL.md` no longer advertise `glteapot` or `es2gears_x11`. - Added `scripts/rootfs-prune-packages.txt` and wired the pruner into `scripts/bootstrap-rootfs-container.sh` and `rebuild-image.sh` so existing rootfs trees are purged of Wayland-only components (`imv-wayland`, `xwayland`, `sxmo-utils-wayland`, `wofi`, `grim`, `slurp`, `libdecor`), retired packages, and optional Rust `install_if` helpers. `wayland-libs-*` shared libraries stay because GTK3/WebKitGTK link them directly; removing them would break the Webarchy browser. - `rebuild-image.sh` now strips `/var/cache/apk`, `/var/log/apk.log`, and the 200 unused gettext locale trees (the X11 session forces `LANG=LC_ALL=C.UTF-8`) before creating the ext4 image, saving about 100 MiB of storage and boot I/O. - Hardened that cleanup with an idempotent `strip_build_residue()` helper called both after the apk transactions and immediately before `mke2fs`, plus a hard guard that aborts the build if any `APKINDEX.*`, hidden cache entry, or rotated `apk.log*` survives; `scripts/check-rebuild.sh` statically verifies the guard is present. - Removed the unreferenced legacy Sway/Wayland `scripts/configure-rootfs-from-scratch.sh` configurator and `patches/sxmo/0001-bananarchy-sxmo-240x320-keypad-ui.patch` (which set `SXMO_MENU=wofi` and `xwayland disable`); all live Sxmo configuration is already tracked under `overlay/rootfs/`. - Hardened `scripts/check-rebuild.sh` with critical-package assertions, forbidden Rust/Wayland package assertions, and prune-list validation instead of the brittle 100-package count. ### Autonomous rebuild from a clean clone - Added `scripts/rootfs-packages.txt` as the single source of truth for the `armv7` package set, shared by `scripts/bootstrap-rootfs.sh` and `rebuild-image.sh`. - Added `scripts/bootstrap-rootfs.sh` and `scripts/bootstrap-rootfs-container.sh` to create a complete `armv7` rootfs from scratch inside rootless Docker, including system accounts, OpenRC runlevels, base configuration, the overlay, prebuilt kernel modules, and an idempotency marker at `etc/bananarchy/rootfs-bootstrap.done`. - Wired the bootstrap into `rebuild-image.sh` and `chroot-shell.sh`, so a fresh clone builds a flashable image with a single command and no manual `rootfs/` preparation. - Added `scripts/check-rebuild.sh` as an offline preflight (syntax, package list, plugin artifacts, overlay sync, ignored local agent config, Docker, version helper) and `scripts/sync-prebuilt-overlay.sh` to keep `overlay/rootfs/` mirrored from the authoritative `prebuilt/` artifacts. - Vendored the patched EDL client library under `vendor/edl/` (MIT) and made `flash-edl.py` fall back to it, so flashing works from a clean clone without a manual `edl/` checkout; `flash-edl.sh` now installs `pyusb` and `pyserial` into the gitignored `.flash-deps/` directory automatically. - Removed the hardcoded default password from `overlay/rootfs/usr/bin/sxmo_power.sh`; the polkit fallback now delegates authorization to the session's own agent, and the default credentials are configurable via `BANANARCHY_USER_PASSWORD`. - Fixed `mkinitfs` prerequisites for rootfs builds without pmbootstrap: `/usr/sbin/losetup`, `/usr/share/deviceinfo/deviceinfo`, and `/dev/null` are now created by the bootstrap and overlay. - Reconciled the DWM plugin count (26) across `README.md` and corrected the `doas` wording in `MANUAL.md`; documented the clean-clone rebuild and flashing workflow in `README.md`, `MANUAL.md`, and `AGENTS.md`. ### New features and improvements - **Privacy Center (`privacy.so` / `xprivacy` / `privacy`) and tunneling stack (`tor`, `gsocket`, `gs-warp`, `openvpn`, `wireguard-tools`, `bananarchy-privacy-ctl`)**: - Cross-compiled `gsocket` (`gs-netcat`, `gsocket`, `gs-sftp`, `gs-mount`, `blitz`) for `armv7` (`./scripts/build-gsocket.sh`), installed `tor`, `openvpn`, `wireguard-tools` (`wg`, `wg-quick`), `iptables`, `ip6tables`, `iproute2`, and `bash`, enabled `xt_owner.ko.zst` (`CONFIG_NETFILTER_XT_MATCH_OWNER=m`) and `nft_redir.ko.zst` (`CONFIG_NFT_REDIR=m`) in the `6.12.1-msm8916` kernel, and installed the `gs-warp` client (`/usr/bin/gs-warp-simple.sh` and `/usr/bin/gs-warp`). - Added `/usr/bin/bananarchy-privacy-ctl` and the 5-tab NeoUI **Privacy Center (`privacy.so` / `xprivacy` / `privacy`)** DWM plugin (`1:Tor`, `2:Warp`, `3:OVPN`, `4:GS`, `5:WG`) to start/stop and route native phone traffic and/or Wi-Fi hotspot (`10.42.0.0/24`) and USB-tethered (`usb0`) traffic through **Tor** (`TransPort 9040` / `DNSPort 9053`), **GS-Warp** (`tun_gswarp`, `table 210`, custom GSocket secret string), **OpenVPN** (`tun_ovpn`, `table 220`, custom `.ovpn` file picker), **GSocket single TCP port** (`gs-netcat`, custom secret and TCP port `iptables -t nat REDIRECT`), and **WireGuard** (`wg0`, `table 230`, `fwmark 0xca6c`, keypair generator, `.conf` importer, and custom key/endpoint editor). - Added automatic tunneled DNS resolution (`sync_dns_resolv` managing `/etc/resolv.conf` with clean backup/restore, `DNSPort 9053` UDP redirection for Tor, `dhcp-option DNS` extraction and `DNAT` through `tun_gswarp` / `tun_ovpn` / `wg0` for VPN tunnels, and `BP6_DNS_OUT` / `BP6_DNS_FWD` IPv6 port 53 leak blocking). - Disabled all background OpenRC runlevel links for `tor`, `openvpn`, `iptables`, `ip6tables`, and `nftables` so zero background daemons or CPU wakeups occur when tunnels are off, and blocked `xprivacy` and `bananarchy-privacy-ctl` (while automatically running `bananarchy-privacy-ctl stop-all`) in Duress Mode. - **Webarchy Web browser (`webarchy.so` / `webarchy` / `xwebarchy`)**: - Implemented a full-featured `240x320` HTML5/CSS3/JS web browser built on WPE / WebKit (`webkit2gtk-4.1` + `libwpe-1.0` + `libwpebackend-fdo-1.0`) with Adreno 304 hardware acceleration (`WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS` and WebGL) and 512 MB RAM pressure tuning (`160 MB` WebProcess cap and lazy engine startup), `Mozilla/5.0 (Mobile; rv:123.0) Gecko/123.0 Firefox/123.0 KAIOS/4.0` as the default User-Agent with preset and custom User-Agent override (`~/.config/sxmo/webarchy_ua.txt`), `UTF-8` default encoding fallback, default dark browser theme preference (`prefers-color-scheme: dark` and `color-scheme: light dark`), `Noto Sans` / `Noto Serif` (`font-noto` + `font-noto-emoji`) as the default non-monospace web and form control fonts and `Fira Code` with OpenType ligatures as the monospace font, full GStreamer multimedia (`MediaSource` / MSE, WebAudio, inline `