# 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 (`a1105` — codename `vendetta`)**: - **Nokia 8110 4G (`nokia-argon`)**: https://bananarchy.top/builds/bananarchy-nokia-argon-a1105.zip --- ## Unreleased — 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. --- ## Unreleased — 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. --- ## Unreleased — 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. --- ## Unreleased — 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. --- ## Unreleased — 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. --- ## Unreleased — 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. --- ## Unreleased — 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. --- ## Unreleased — 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`. --- ## Unreleased — 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 `