# 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 Work since `a1108` has focused on reliable 2720 Flip hardware support and a reproducible boot/flash path. Earlier incremental and superseded diagnostic entries are consolidated here. ### Live nokia-beatles plugin verification and WebKit GSettings schema fix - **Stale live runtime**: the phone was still running the pre-fix `webarchy.so` (`3e3c3ac7...`) and `networks.so` (`97eaae44...`) from the baseline image, while `prebuilt/`, `overlay/rootfs/` and the local `rootfs/` already carried the rebuilt artifacts (`8eb1b493...` and `e12103ee...`). That is why the earlier repository fixes were not visible on the device. The current binaries were deployed, their hashes verified, and both resident plugins restarted. - **Actual WebKit root cause**: with the current `webarchy.so`, `G_MESSAGES_DEBUG=all` exposed `GLib-GIO-ERROR **: No GSettings schemas are installed on the system` in `WebKitNetworkProcess`, immediately followed by `ERROR: WebKit encountered an internal error ... WebLoaderStrategy.cpp(679)`. The rootfs had the `gsettings-desktop-schemas` XML files but no `gschemas.compiled`, because packages are installed with `--no-scripts` and the apk trigger never ran. The earlier renderer-profile fix was necessary but not sufficient. The package set now explicitly contains `glib` and `gsettings-desktop-schemas`; both image containers install host `glib` tools; and `apply-bananarchy-overlay.sh` calls `compile-gsettings-schemas.sh` to produce `usr/share/glib-2.0/schemas/gschemas.compiled`. `scripts/test-webkit-gsettings.py` guards the wiring and compiles a synthetic schema. Live verification: after compiling the schemas, the WebKit internal error disappeared and an HTTP probe rendered 51,420 green pixels in the 240x217 browser viewport. - **Live Bluetooth verification**: starting from `Powered: no`, the deployed `networks.so` powered the WCNSS controller on, ran `bluetoothctl --timeout 15 scan on`, and merged an injected `[NEW] Device AA:BB:CC:DD:EE:FF BT_PROBE` discovery line even though the persistent `bluetoothctl devices` list was deliberately empty. The plugin reported `Found 1 device(s)` and retained `BT_PROBE` in its device list. The controller ended `Powered: yes`. - **Final live state**: the phone has the current plugin binaries, the compiled `gschemas.compiled` database, normal plugin environments with no Bluetooth stub in `PATH`, and no debug-only WebKit environment. Webarchy and Networks were returned to their normal preloaded state; the Bluetooth controller was powered back off. ### Live 2720 Flip verification and cover DT gating - **Live test performed**: the phone was reachable over root SSH (`keys/phone_id_ed25519`). We backed up `/boot` on the phone and the host, deployed the two-panel DTB, a rebuilt `boot.img`, an initramfs containing the external panel firmware and the `mux-core`/`mux-gpio`/`spi-mux` modules, plus the updated cover daemon/scripts, then rebooted. `/dev/fb1` appeared as 240x240 @ 32bpp (stride 960), `card0` internal / `card1` external / `card2` msm, `bananarchy-coverctl STATUS` reported `backend=fb`, and the real framebuffer passed the whole state machine (open = all black, `LID CLOSED` = still black, `BUTTON` = clock/network/battery lit, `LID OPEN` = black again, `BUTTON` while open ignored, 3 s blank timeout = black with `visible=0`). Keypad, Xorg, dwm, backlight and `sxmo_state.sh` stayed healthy at the software level. Loading the mux modules in the initramfs also moved both panel probes from ~27 s to ~1.1 s and removed the `[pmOS-rd] /dev/fb0 did not appear after waiting 10 seconds` error. - **Regression found**: the user reported **both screens off**. Software state still said the main panel was on (`brightness=10`, `bl_power=0`, `card0-SPI-1 dpms=On`, Xorg `Monitor is On`), so the shared QUP5 SPI bus routing is the suspect: gpio13 mux polarity and/or the external gpio21 D/C / gpio23 reset lines disrupt the 240x320 main panel. This is exactly the physical sign-off that could not be done offline. - **Action**: restored the phone to the original single-panel boot files (`qcom-msm8905-nokia-beatles.dtb` `a536b77c...`, `boot.img` `2b5c61ab...`, `initramfs` `05e3315...`) and verified `/dev/fb0` only, Xorg/dwm up, backlight 10. The shipping DTS/DTB are back on the verified single-panel layout; the two-panel wiring moved to `devices/nokia-beatles/qcom-msm8905-nokia-beatles-cover.dts` and is opt-in via `scripts/build-beatles-cover-panel.py`. `scripts/build-beatles-no-cover-dtb.py` is now the single-panel rollback builder. All renderer, diagnostics, firmware, initramfs-module, guard and boot-artifact work is retained, and the pinned image hashes were restored to the shipping set. - **Next hardware step**: probe gpio13 mux state 0/1 against the main and cover panels, and the external gpio21/gpio23 polarity, before making the opt-in DT the default. `bananarchy-cover-diagnose.sh` on the phone and `scripts/build-beatles-cover-panel.py --install` are the tools for that. ### 2720 Flip external panel (`/dev/fb1`) - **Enabled the external GC9305 in an opt-in DTS (superseded, see the live verification section above)**: `spi@78b9000` now hosts a `spi-mux@0` controlled by a root-level `gpio-mux` (gpio13, `idle-state = 0`). Its `display@0` child is the unchanged 240x320 internal panel (25 MHz, gpio25 reset, gpio110 D/C, pinctrl `0x6e`, `backlight`), and `display@1` is the 240x240 external panel (25 MHz, gpio21 D/C, gpio23 reset, `write-only`, 240x240 timing). dtc registers `display@0` first, so the internal panel stays `/dev/fb0` / `card0` and the second `panel-mipi-dbi-spi` device becomes `/dev/fb1` for `bananarchy-cover-idle`. `spidev@1` is disabled because the mux owns chip select 1. - **Fixed the three causes of the earlier live regression**: both panels keep the verified 25 MHz clock (the experimental overlay restored 50 MHz and reintroduced high-brightness corruption); the external panel uses its own gpio21 D/C line, so the QUP controller stays in supported 8-bit mode instead of 9-bit MIPI DBI Type C Option 1 and gpio110 remains exclusive to the internal panel; gpio13 now has a dedicated pull-down pinctrl group and is no longer part of the external panel's pinctrl state that re-biased the mux during probe. Xorg's `10-bananarchy-msm8909.conf` pins `/dev/dri/card0`, so the new DRM device cannot steal the main display. - **Provisioned the driver path**: `/lib/firmware/nokia,beatles-gc9305-ext-panel.bin` is now listed in `overlay/rootfs/usr/share/mkinitfs/files/00-nokia-argon-display.files` and `devices/nokia-beatles/00-nokia-beatles-display.files`, so `panel-mipi-dbi` (an initramfs module) can load it. `mux-core`, `mux-gpio` and `spi-mux` remain in `modules-load.d`/`local.d`, and `CONFIG_MULTIPLEXER`/`CONFIG_MUX_GPIO`/`CONFIG_SPI_MUX` stay `=m`. - **Rebuilt and revalidated the boot artifacts**: the DTB was recompiled from the DTS and synced to `devices/`, `overlay/rootfs/boot/` and `prebuilt/kernel-6.12.1-msm8916/dtbs/`; `scripts/repack-beatles-bootimg.py` replaced the appended DTB in the standalone boot image and `scripts/sync-beatles-bootfs.py` refreshed `boot.img` and the DTB inside the raw image's `pmOS_boot` ext2 filesystem. The pinned beatles image hashes in `check-rebuild.sh` were updated, and `check-beatles-bootimg.py` plus `sync-beatles-bootfs.py --check` still pass. `devices/nokia-beatles/cover-panel.dtsi` was rewritten to mirror the shipping wiring and remains compile-checked as a reference for older DTBs. - **Guards**: `scripts/test-cover-dt.py` validates the decompiled DTB (two displays, 25 MHz clocks, isolated gpio13, disabled spidev, stock IDs and 512 MiB memory fallback), DTB/DTS/copy consistency, initramfs firmware lists, kernel config, module loading and the Xorg card0 pin. `check-rebuild.sh` now requires the cover wiring instead of rejecting it. - **Renderer "fully off" now uses fbdev blanking**: `bananarchy-cover-idle` calls `FBIOBLANK` with `FB_BLANK_POWERDOWN` after writing the black frame (and `FB_BLANK_UNBLANK` for a lit frame), so a real DRM fbdev powers the external connector down instead of just showing black. `cover_is_lit()` is the single source of truth for the frame, the optional `backlight_path` sysfs node and the blanking ioctl; the host state-machine test also guards these tokens. `/usr/bin/bananarchy-cover-diagnose.sh` reports `/dev/fb1`, its geometry, DRM cards, mux/panel modules, firmware, lid state and `bananarchy-coverctl STATUS` for the physical sign-off. - **Rollback path for the physical sign-off**: `scripts/build-beatles-no-cover-dtb.py` derives a DTB that disables only `display@1` (verified by `test-cover-dt.py`-style checks on the decompiled result) and `--install` builds a separate no-cover boot image and patches the local raw image's `pmOS_boot`. `scripts/sync-beatles-bootfs.py` gained `--dtb`/`--boot-image` overrides so the tracked shipping DTB never has to be swapped. The rollback was validated against a copy of the raw image; the shipping image hash is unchanged. - **Live result**: the physical sign-off failed (both screens dark), so the shipping DT was reverted and the two-panel DT is now opt-in. See the live verification section above. ### 2720 Flip cover display behaviour - **External panel never showed anything useful**: `bananarchy-cover-idle` repainted a clock every 30 s regardless of lid state, ignored its `blank_timeout` setting, had no button input and drew no network indicators. It now implements the full behaviour contract: an **open flip** is fully off (black frame + backlight 0 and `BUTTON` ignored), a **closed flip** waits off until a trusted `BUTTON` datagram arrives, and that button shows the live clock, date, battery and a compact network line. The cover then blanks after exactly the main **Config -> Screen blank** timeout (`~/.config/sxmo/idle_blank_timeout`, default 300 s, `0` = never; `blank_timeout = auto` follows it). While off the daemon blocks in `poll()` with no timer at all, so it stays at 0% CPU. - `bananarchy-volume-keys` now reads `/run/bananarchy/lid-state` and turns external side keys (volume up/down and End/Power) into cover wake buttons while the flip is closed instead of changing the volume. `bananarchy-cover-status.sh` publishes `4G SIG75 WIFI`-style indicators and battery state to the daemon from the NetworkManager dispatcher, the cover service start, and `bananarchy-cover-event.sh network|button`. `bananarchy-coverctl STATUS` now reports `lid`, `visible`, `blank_ms` and `network`. - `scripts/test-cover-idle.py` compiles the daemon on the host and drives its real socket protocol against a fake framebuffer/backlight, verifying open/closed gating, button wake, indicator republishing, the shared blank timeout (including `0` = never) and backlight state. `check-rebuild.sh` guards the rebuilt ARM daemons and the IPC wiring. The shipping beatles DTB intentionally still keeps the single internal panel: gpio13 mux selection and external reset polarity remain hardware-gated, but the compile-tested `cover-panel.dtsi` now uses the verified 25 MHz internal-panel clock so enabling it later cannot reintroduce high-brightness corruption. The follow-up `/dev/fb1` work made the two-panel DT opt-in after live testing (see the live verification section above). ### GPS reception and GPS-only system time - **GPS never produced a fix**: `bananarchy-gps`, `gps.so` and the new helpers all used `mmcli -m any`, which is ambiguous on the dual-SIM QMI stack of the 2720 Flip and can resolve to a modem without a Location interface. `/usr/bin/bananarchy-gps-modem.sh` now lists the modems, prefers the one advertising `gps-nmea`, enables the modem plus `3gpp`, `gps-nmea`, `gps-raw` and a 2 s refresh rate, and falls back to `any` only when nothing is enumerated. `gps.so`, the CLI (`status|nmea|watch|enable|disable|modem`) and the time helper share this resolver, so `nokia-argon` keeps its single-modem behaviour. - **Config -> Time source and Config -> Sync GPS time**: `~/.config/sxmo/time_source` selects `network` (default) or `gps`. With GPS selected, `/usr/bin/bananarchy-gps-time-sync.sh` stops `chronyd`, `bananarchy-time-sync.sh` declines all boot/network-up/force NTP bursts, and the datetime is set solely from a valid GNSS UTC/RMC fix (`date -u -s`, `hwclock -w -u`, status bar refresh), including a boot-time sync. `bananarchy-sync-gps-time.sh` is the user-facing one-shot action with a notification. `scripts/test-gps-time-sync.py` verifies ISO and RMC parsing, chronyd/NTP isolation, source switching, the notification wrapper and CLI modem resolution with stubbed commands; `check-rebuild.sh` guards the rebuilt `gps.so` and `dmenu.so`. ### Charger plug/unplug battery icon - **Charge icon stayed unchanged on VBUS transitions**: `85-bananarchy-battery.rules` treated every PM8916 event as a capacity change, but `sxmo_hook_battery.sh` caches `state:percentage` and the charger `online` / battery `status` sysfs attributes can still hold the old value while the uevent is delivered. The cache therefore swallowed exactly the plug/unplug event the user wanted to see. Charger events now run `/usr/bin/bananarchy-battery-charge-event.sh`, which forces an immediate `sxmo_hook_battery.sh force` republish (the forced path removes the icon file so `sxmo_status.sh` cannot skip an unchanged value), then re-reads sysfs after two seconds; `flock` coalesces the uevent burst. A generic `ENV{POWER_SUPPLY_ONLINE}` rule covers firmware revisions that publish VBUS on a separate USB/Mains supply. `scripts/test-battery-charge-event.py` validates the immediate + delayed refresh with a stubbed hook, and `check-rebuild.sh` guards the rules, helper and overlay installation. `nokia-argon` keeps the same capacity-change path. ### Bluetooth scanning - **Scan found no devices**: the Bluetooth tab ran `bluetoothctl --timeout 15 scan on` with stdout discarded and then queried `bluetoothctl devices` from a second process. BlueZ discovery belongs to the D-Bus client that started it: when the scanning client exits, discovery stops and unpaired devices may be removed before the follow-up query, so a fresh scan legitimately produced an empty list on the 2720 Flip's WCNSS controller. `networks.so` now captures the discovery stream, parses ANSI-coloured `[NEW]`/`[CHG]` device and name/alias lines (`parseBtScanDevices()`), merges them with the persistent `bluetoothctl devices` list, powers the controller on when `bluetoothctl show` reports `Powered: no`, and falls back to a plain `scan on` if `--timeout` is unsupported. `isBtEnabledFast()` no longer depends solely on `/run/bluetoothd.pid`. `scripts/test-bluetooth-scan.py` validates the parser on the host and `check-rebuild.sh` guards the rebuilt `networks.so`. The `nokia-argon` path keeps the same paired-device and OBEX behaviour. ### Screenlock daemon on idle blank - **Screenlock never triggered on blank**: dwm's native idle blanking called `bananarchy-idle-blank.sh off`, which only powered the panel down through `sxmo_wm.sh display off`. It never entered the Sxmo state machine, and the session no longer starts an `idle_locker` job, so `locker.so` received no `LOCK_BLANK` and the phone stayed unlocked after blanking. `bananarchy-idle-lock.sh` now arms a trusted `sxmo_state.sh set screenoff` transition after 30 seconds of dark panel (`xlocker screenoff` -> `LOCK_BLANK`), configurable with `bananarchy-idle-lock.sh get|label|set ` (`~/.config/sxmo/idle_lock_delay`; `0` locks immediately, `off` restores blank-without-passcode). `bananarchy-idle-blank.sh off/on`, `bananarchy-screen-wake.sh` and `sxmo_hook_unlock.sh` cancel the pending lock on every wake, and the transition is skipped if the panel is already back on, so a quick key press still returns to the unlocked desktop on `nokia-argon` as well as the 2720 Flip. `scripts/test-idle-blank-lock.py` exercises arming, cancellation and both wake paths against stubbed Sxmo commands, and `check-rebuild.sh` guards the wiring. ### Webarchy WebKit renderer - **Unexpected WebKit error on the 2720 Flip**: `webarchy.so` used `setenv(..., "0")` for the WebKitGTK presence flags `WEBKIT_DISABLE_COMPOSITING_MODE`, `WEBKIT_DISABLE_DMABUF_RENDERER` and `WEBKIT_SKIA_ENABLE_CPU_RENDERING` while still requesting `WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS`. WebKitGTK treats the presence of those variables as "disable", so the WebProcess started with conflicting renderer state and died on every navigation, which WebKit reported as an "Unexpected WebKit error". `configureWebkitRenderer()` now unsets all three flags first, enables the CPU renderer only where required, and chooses `WEBKIT_HARDWARE_ACCELERATION_POLICY_NEVER` on `nokia,beatles` (and after the first WebProcess crash) while `nokia-argon` keeps `WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS` and WebGL. Create `~/.config/sxmo/webarchy_software_renderer` to force the software profile on any target. Load failures now report the GError domain/code in the browser status line instead of an opaque message. `scripts/check-rebuild.sh` guards the profile and the rebuilt `webarchy.so`. Live testing later showed this renderer fix was necessary but not sufficient: the shipped rootfs also lacked compiled GSettings schemas (see the live WebKit GSettings schema fix above). ### Nokia 2720 Flip hardware - **Wi-Fi, Bluetooth, and modem firmware**: added `msm-firmware-loader` and its OpenRC services so the phone's signed firmware and factory NV data are loaded from the stock `modem` and `persist` partitions before udev. This fixed the missing `wcnss.mdt` failure that prevented both `wlan0` and `hci0` from appearing. Wi-Fi scanning, Bluetooth discovery, and cold-boot enumeration were verified on the phone. - **Camera**: `/dev/video0` now rotates frames 180 degrees only on `nokia-beatles`, correcting the sensor mounting for the viewfinder, saved photos, and other V4L2 consumers. Camera autoloading and the side-volume daemon were also repaired; the daemon prunes stale input descriptors instead of spinning at full CPU. - **High-brightness display corruption**: reduced the internal panel's SPI clock from 50 MHz to 25 MHz. The full brightness range remains available, and the user confirmed that levels above the former 71% threshold no longer distort the image. Other targets and the diagnostic spidev path are unchanged. - **Flip detection**: the compiled lid daemon combines event-driven switch handling with raw gpio36/gpio92 reconciliation every 200 ms and an 80 ms debounce. Close/open actions were verified on the phone with controlled GPIO transitions: closing blanks and locks the screen; opening restores and unlocks it. - **Input and audio startup**: restored the complete BusyBox applet set, udev input tagging, and Xorg keypad rules so the keypad and power controls work after a clean flash. Replaced Python idle daemons with compiled ARM services, retained the known-good 350 ms wake guard, and added one-shot cleanup for stale startup keyboard grabs. - **SSH and display startup**: fixed PAM/password/key login, retained the USB-only fallback listener, restored the release boot splash, enabled parallel OpenRC startup with bounded udev settling, and made a boot-open flip start unlocked. ### Bootloader and recovery - **Reliable lk2nd port**: preserved the stock QCDT shape and exact 2720 identifiers, added the `/cpus` nodes required by the partial-goods dual-core aboot, and added the GC9305 panel init path and branded splash. The source-built normal, diagnostic, and display images are reproducible from the pinned upstream commit. - **Visible Fastboot and safe diagnostics**: added bounded QUP/clock polling, display and DTB probes, block-safe partition reads, and the low-bit reboot cookie used by **Reboot to bootloader**. The display-enabled lk2nd image is the default; diagnostic images remain available separately. - **Mainline boot fixes**: removed the crashing `earlycon` option, restored `/sbin/init`, preserved the exact stock DTB identifiers and 512 MiB memory fallback, and repaired the nested `pmOS_boot` ext2 filesystem and `extlinux.conf` handling. - **Consistent boot slots**: normal startup uses lk2nd from `boot` and the mainline system from `userdata`; `recovery` holds the standalone mainline boot image for the Volume Up path. ### Flashing and external display status - **Device-aware EDL flashing**: added the correct signed Firehose programmer for every target, including the 2720 US variant, plus loader identity listing and EDL PID detection. The 2720 flow unlocks eMMC `devinfo`, supports config/FRP preparation, verifies boot-slot reads, writes each slot from the correct image, and wipes the stock system superblock by default with `--no-wipe-system` as the opt-out. - **External cover was hardware-gated (superseded)**: the experimental spi-mux cover overlay was rolled back after it broke the main panel/keypad path; the follow-up `/dev/fb1` work kept the corrected wiring opt-in after a live test darkened the main panel (see the live verification section above). ### Build and release hygiene - Added target-specific hostnames, canonical package/prebuilt synchronization, clean-clone bootstrap checks, and guards for the radio loader, camera orientation, panel timing, and lid fallback. - Image blobs remain local build outputs rather than tracked release history. `prepare-release.sh` rebuilds missing artifacts, while `check-rebuild.sh` validates available images and their boot filesystems. - The final beatles image set passed rebuild preflight, DTB/boot-image/lk2nd checks, artifact-drift checks, and ext4 integrity checks. Live testing covered EDL read-back, Wi-Fi, Bluetooth, camera capture, high-brightness operation, and lid actions. ## 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 `