VM-BMS sanity fix and configurable runtime power policies
Kernel (source-only, ABI-preserving, patch 0007): - pm8916_bms_vm.c: bound VADC raw samples to 8000..16000 (~2.34-4.69 V) with a 3.7 V nominal fallback in raw_to_uv(); reject out-of-window FIFO samples in the IRQ handler and probe pre-read. Fixes the 19.2 V / "Over voltage" / 100% misreport from an uninitialised 0xffff sample after a hard reset (also covers the OCV register reads on probe/resume). - wcn36xx: listen_interval becomes a module parameter (1-10, default 5, was hardcoded 3) so the beacon skip is configurable at module load. Runtime power policy (/etc/bananarchy-power-policy.conf): - WIFI_LISTEN_INTERVAL drives /etc/modprobe.d/10-bananarchy-power.conf. - MODEM_DRX_MODE (0 or 6-9) applies Qualcomm AT$QCDRX at boot and on wake. Standard AT+CPSMS / AT+CEDRXS are unsupported on this modem firmware. - DSDS_SECONDARY_MODE=eco parks the secondary GW provisioning session after DSDS_PARK_DELAY seconds of a dark panel and restores it on wake, capturing the actual slot and AID. Uses QMI provisioning sessions, not SIM power-off (which clears PIN verification). Default active keeps both SIMs reachable. - New bananarchy-power-policy.sh, OpenRC default-runlevel service, doas rule, and hooks in sxmo_wm.sh display off/on. Live-verified on nokia-argon: DRX 6 readback, eco park/unpark round-trip, Wi-Fi param 5, status output, module vermagic match, both SIMs registered. Rebuilt image with --mkinitfs: initramfs and rootfs carry the new modules (SHA-256 match), boot.img keeps the byte-identical known-good zImage + DTB. Docs updated (BATTERY-OPTIMIZATION-ANALYSIS.md section 15, CHANGELOG, MANUAL, README, AGENTS).
This commit is contained in:
1 parent
b5a1e0c5f9
commit
bc1c19a483
20 files changed
+470
-2
No files matched your search
@@ -62,7 +62,12 @@ All cross-compilation scripts run inside rootless Docker (`alpine:3.24` `armv7`
|
||||
- **Documentation**: keep `README.md`, `MANUAL.md`, `SDK.md`, and `CHANGELOG.md` synchronized with any new user-facing features, SDK functions, or keybindings, and do not leave third-party `.md` files inside `src/` or `edl/`.
|
||||
- **Artifact sources**: `prebuilt/` is the single source of truth for compiled artifacts and `scripts/rootfs-packages.txt` for the `armv7` package set. Never edit `overlay/rootfs/` copies of binaries by hand; run `./scripts/sync-prebuilt-overlay.sh` after changing `prebuilt/`.
|
||||
- **Package hygiene**: keep `scripts/rootfs-packages.txt` free of Rust-based top-level packages (use C `sudo`, never `sudo-rs`) and Wayland-purpose packages; `libwpe` and the `wayland-libs-*` shared libraries stay because GTK3/WebKitGTK link them directly, but no Wayland compositor, backend, or viewer is shipped. `scripts/check-rebuild.sh` enforces this.
|
||||
- **Power management**: idle blanking is `dwm`'s native evdev timer (`src/sxmo-dwm/dwm.c`) plus `bananarchy-idle-blank.sh`; the timeout lives in `~/.config/sxmo/idle_blank_timeout` (default 300 s, `0` = off), is edited via **Config -> Screen blank** / `bananarchy-idle-timeout.sh`, and is reloaded on `SIGUSR1`. `~/.cache/sxmo/sxmo.noidle` and `SXMO_UNLOCK_IDLE_TIME` still override it. `bananarchy-screen-wake.sh` (called from the ring and notification hooks) wakes the panel for calls/SMS and resets the timer; locking or closing the lid blanks immediately. Deep standby is `bananarchy-suspend.sh` / `bananarchy-deep-standby.sh` / `sxmo_autosuspend.sh` / `sxmo_suspend.sh`, gated by `/etc/bananarchy-no-deep-standby` (shipped present = disabled) and inert because `CONFIG_SUSPEND` is off. A full custom module tree rebuild is deliberately **not** planned: this firmware has no PSCI `SYSTEM_SUSPEND`, so `CONFIG_SUSPEND` would only give s2idle (`freeze`), not `mem` / DDR self-refresh, for <1 mA of saving (see `BATTERY-OPTIMIZATION-ANALYSIS.md` §14). Never force `sxmo.noidle`/`sxmo.nosuspend` from the session scripts and never reintroduce the infinite `sxmo_not_suspendable` wakelock. `/etc/bananarchy/` is root-only.
|
||||
- **Power management**: idle blanking is `dwm`'s native evdev timer (`src/sxmo-dwm/dwm.c`) plus `bananarchy-idle-blank.sh`; the timeout lives in `~/.config/sxmo/idle_blank_timeout` (default 300 s, `0` = off), is edited via **Config -> Screen blank** / `bananarchy-idle-timeout.sh`, and is reloaded on `SIGUSR1`. `~/.cache/sxmo/sxmo.noidle` and `SXMO_UNLOCK_IDLE_TIME` still override it. `bananarchy-screen-wake.sh` (called from the ring and notification hooks) wakes the panel for calls/SMS and resets the timer; locking or closing the lid blanks immediately. Runtime power policy: `/etc/bananarchy-power-policy.conf` +
|
||||
`/usr/bin/bananarchy-power-policy.sh` (OpenRC default runlevel, `doas` rule)
|
||||
drive `WIFI_LISTEN_INTERVAL` (wcn36xx module option), `MODEM_DRX_MODE`
|
||||
(`AT$QCDRX`) and `DSDS_SECONDARY_MODE=eco` (QMI secondary GW provisioning
|
||||
session park on `sxmo_wm.sh display off/on`). Never park a SIM with
|
||||
`--uim-sim-power-off`: it clears PIN verification. Deep standby is `bananarchy-suspend.sh` / `bananarchy-deep-standby.sh` / `sxmo_autosuspend.sh` / `sxmo_suspend.sh`, gated by `/etc/bananarchy-no-deep-standby` (shipped present = disabled) and inert because `CONFIG_SUSPEND` is off. A full custom module tree rebuild is deliberately **not** planned: this firmware has no PSCI `SYSTEM_SUSPEND`, so `CONFIG_SUSPEND` would only give s2idle (`freeze`), not `mem` / DDR self-refresh, for <1 mA of saving (see `BATTERY-OPTIMIZATION-ANALYSIS.md` §14). Never force `sxmo.noidle`/`sxmo.nosuspend` from the session scripts and never reintroduce the infinite `sxmo_not_suspendable` wakelock. `/etc/bananarchy/` is root-only.
|
||||
- **Image residue**: `rebuild-image.sh` strips `/var/cache/apk`, all `apk.log*` files, and unused gettext locale trees before `mke2fs` and aborts the build if any apk cache/log remains; never add an `apk` call after that guard.
|
||||
- **No on-device compiler**: `scripts/rootfs-packages.txt` ships no `gcc`/`g++`/`musl-dev`/`make` and no Janet runtime (`janet`, `janet-dev`, `jpm`); cross-compile native code with `scripts/build-*.sh`. On-device development uses the Yabasic FFI SDK (`neoui.yab` / `neonet.yab`), which requires `yabasic`, `libffi`, `libneoui.so`, and `libcurl.so.4` — never remove those. `scripts/check-rebuild.sh` guards both sides.
|
||||
- **Core tools**: `curl`, `bc`, `ed`, `rlwrap`, `mandoc`, `nano`, `less`, and `frotz` are pinned core tools asserted by `scripts/check-rebuild.sh`. Perl, Lua, optional Tcl extensions, and the `sqlite` CLI are excluded, while `tcl`, `python3`, `bash`, `luajit`, `gawk`, `jq`, `gojq`, and `quickjs` remain as hard runtime dependencies.
|
||||
|
||||
Reference in new issue
Block a user