`health`, `charge_full_design`). So even on battery there is no direct mA readout from sysfs.
`capacity` moved 56 → 54 → 54 and `voltage_now` rose 3,998,440 → 4,000,051 µV during the
session, i.e. the BMS EMA is noisy and the device is on external power.
- **`iw` and `powertop` are not installed** (confirmed). Wi-Fi power save was verified
indirectly through `/proc/interrupts`, `/proc/net/dev` and the deployed NM config.
-`/proc/timer_list`, `/sys/kernel/debug/pm_genpd/pm_genpd_summary` and
`/sys/kernel/debug/wakeup_sources` are unavailable, so no per-timer/genpd attribution.
- **Consequence:** every mA figure below is an architectural estimate, not a measurement.
The 24 h budget is derived from the DT: `charge-full-design-microamp-hours = 1500000`
(1500 mAh) → **≤ 62.5 mA average** to reach 24 h.
---
## 2. Measured state
### 2.1 Suspend / PM core — the headline finding
| Item | Measured value |
|---|---|
| `/proc/config.gz` | `# CONFIG_SUSPEND is not set`, `# CONFIG_HIBERNATION is not set`; no `CONFIG_PM_SLEEP`, `CONFIG_PM_WAKELOCKS`, `CONFIG_PM_AUTOSLEEP` |
| `/sys/power/state` | **0 bytes (empty)** — no sleep states exist |
| `/sys/power/wake_lock`, `wake_unlock`, `autosleep` | absent → `sxmo_wakelock.sh isenabled` is false, all wakelock calls are no-ops |
| Prerequisites already present | `CONFIG_ARCH_SUSPEND_POSSIBLE=y`, `CONFIG_ARM_CPU_SUSPEND=y`, `CONFIG_CPU_PM=y`, `CONFIG_FREEZER=y`, `CONFIG_QCOM_SPM=y`, `CONFIG_ARM_QCOM_SPM_CPUIDLE=y`, `wakeup-source` on gpio-keys in the DTS |
| C1 | Duplicate `wpa_supplicant` service with a missing `$` in `yesno "{wpa_supplicant_dbus}"` causes a no-`-u` instance / respawn storm | **Wrong.** Exactly one stable instance with `-u`. OpenRC's `yesno()` has a fallback that `eval`s the literal string as a variable name → `yes` → true, so `-u` is added. The typo is cosmetic. Remove this item. |
| C2 | `bluetoothd``AutoEnable=true` + `DiscoverableTimeout=0` keeps BT in inquiry/page scan | **Wrong for the current state.** BT is soft-blocked, `bluetoothd` not running, service not in any runlevel. Downgrade to a latent/conditional risk only. |
| C3 | `sxmo_soundmonitor.sh` runs a `sleep 5` loop forever | **Wrong.**`/dev/input/event5` jack evdev exists; `evtest` blocks and `pactl subscribe` is event-driven. Remove the 5 s claim. |
| C4 | `/tmp` is a 2 GB ext4-on-zram with `strictatime`, costing compression/atime writes | **Wrong.**`zram-init` is not enabled; only `zram0` swap exists; `/tmp` is on rootfs/eMMC. Replace with: mount `tmpfs` on `/tmp` to avoid eMMC writes, and optionally switch `zram0` zstd→lz4 (low impact, only 2.5 MB used). |
| C5 | BMS FIFO IRQs ≈ every 20 s → ~3 uevents/min shell storm | **Overstated.** Measured 1 BMS IRQ / ~30 s → 2 uevents/min. Keep the fix but lower its priority. |
| C6 | "schedutil rate-limit fix not in effect at runtime" (older session) | **Resolved.**`rate_limit_us=40000` confirmed live. |
| C7 | Idle average CPU ~440–582 MHz indicates constant wakeups / CPU never truly idles | **Wrong.**`time_in_state` shows ~99 % of 43 h at 200 MHz; cpuidle SPC ~98 % of uptime; 60 s window CPU idle 98.15 %. Cores *are* power-collapsed. Reframe the problem as "no system-wide suspend", not "CPU busy loops". |
| C8 | GPU devfreq `.polling_ms=50` runs a 20 Hz poll continuously | **Overstated.**`1c00000.gpu` is runtime-`suspended`, so devfreq polling is stopped. Real issue: `cur_freq=409600000` (max OPP) on resume. |
| C9 | `chronyd` polls NTP every 64 s | **Overstated.** After 43 h uptime chronyd is at `maxpoll` ≈ 1024 s. Low priority. |
| C10 | "Only per-core SPC idle is available" | **True but incomplete.** It is available *and heavily used* (~98 %). The missing piece is system-wide suspend, now hard-confirmed by a 0-byte `/sys/power/state`. |
| C11 | `CONFIG_SUSPEND` off and `CPUFREQ_ETERNAL` inferred from the repo config | **Confirmed with hard measurements:**`# CONFIG_SUSPEND is not set` in `/proc/config.gz`, 0-byte `/sys/power/state`, `cpuinfo_transition_latency=4294967295`. These become the top two evidence-backed items. |
| C12 | Average mA can be measured via `current_now` | **Not possible.** No `current_now` attribute, and the device is charging. All mA numbers remain estimates. |
| C13 | 4 CPU cores | **2 cores** (`0-1`) — MSM8905 is dual-core; expected, not a bug. |
| C14 | `iw`/`powertop` available for verification | **Both missing.** Wi-Fi PS verified indirectly via IRQ/packet rates and NM config. |
| C15 | (new) | `mmcli` reports `drx-cycle: "--"`, `mico-mode: "--"` → no LTE DRX/MICO power saving configured. New concrete modem-side item. |
| C16 | (new) | `superd` runs without `-l /dev/null` because the user `sxmo_hook_start.sh` wins; zero-log default not fully applied. |
| C17 | (new) | `mmcli`'s `drx-cycle` / `mico-mode` are 5G NR registration settings, not LTE DRX knobs. The "configure QMI NAS long DRX / MICO" sub-item of K11/U9 is **withdrawn** as inapplicable; the on-demand DPM port and DSDS timer backoff remain. |
---
## 4. Corrected kernel-side optimizations
Ordered by expected impact, with measured evidence. Regression risks are stated.
| **K1** | **Enable `CONFIG_SUSPEND=y`** (+ `CONFIG_PM_SLEEP`, `CONFIG_PM_WAKELOCKS=y`, `CONFIG_SUSPEND_FREEZER=y`) in `patches/kernel/config-bananarchy-msm8909.armv7`; add `wakeup-source` to the WCNSS/pronto and modem/SMP2P DT nodes so Wi-Fi WoWLAN and QMI/QRTR calls can resume the AP. | `/sys/power/state` is 0 bytes; all prerequisites are already `y`. Unlocks `wcn36xx_suspend()` (ARP/NS/GTK offload + `set_power_params(ignore_dtim=true)`), BMS `suspend()` forcing S3, DDR self-refresh and RPM power collapse. Only change that can plausibly push DSDS+Wi-Fi past 24 h. | `echo mem` freezes userspace → resume ~100–500 ms, conflicting with the "<2 ms wake" design. Ship as an opt-in/configurable "deep standby" with timed wakelocks around calls, SMS, alarms, SSH/VPN/tethering. |
| **K2** | **Add `clock-latency-ns` to `cpu-opp-table`** in all 5 DTS files (or override `policy->cpuinfo.transition_latency` in `qcom-cpufreq-nvmem.c`). | `cpuinfo_transition_latency=4294967295` measured. Fixes the 6.44 s schedutil default at its source; makes the `rate_limit_us=40000` userspace hack and the `bananarchy-display-power-sync` re-apply unnecessary and immune to governor-switch kobject recreation. | Low. Re-measure `time_in_state` after. |
| **K3** | **wcn36xx tuning**: raise `WCN36XX_KEEP_ALIVE_TIME_PERIOD` (30 s) to 120–300 s; set an actual `listen_interval` > 1 (`max_listen_interval=200` is only a ceiling); expose `set_power_params(ignore_dtim=true)` + ARP/NS/GTK offload on screen-blank even without full suspend (today only in `wcn36xx_suspend()`). | Measured 1.78 `wcn36xx_rx` IRQs/s and 111 RX packets/min with 0 TX at idle. Beacon filtering works, but a residual ~1.8/s RX floor remains. No runtime module params exist → needs a kernel patch. | Too-long keep-alive/listen interval can cause AP deauth or delayed inbound traffic; incoming calls are on cellular so Wi-Fi latency is not critical here. |
| **K4** | **Throttle the fuel gauge**: `pm8916_bms_vm.c` emits `power_supply_changed()` on every FIFO IRQ; `S1/S2_SAMPLE_INTERVAL=10`. Increase intervals and emit only on real capacity/status change. | Measured 2 BMS IRQs/min → 2 uevents/min → 2 `su`+`sleep 2` forks/min (U4). Lower priority than previously stated, but free to fix. | Slower % updates; keep `force` on wake/unlock. |
| **K5** | **GPU devfreq**: `msm_gpu_devfreq.c` sets `initial_freq = gpu->fast_rate` and `.polling_ms=50`. Use `DEVFREQ_GOV_POWERSAVE` or a lower `initial_freq`; keep `devfreq_suspend_device()` on screen-off. | GPU is runtime-suspended at idle (measured), so the 50 ms poll is not running; but `cur_freq=409600000` (max) means every resume jumps to the top OPP. | UI smoothness. Glamor/DRI3 is enabled in `xorg.conf`; consider `AccelMethod "none"` for a 240×320 panel (conflicts with the GPU-acceleration design goal). |
| **K6** | **Timer/scheduler config**: `CONFIG_HZ=300`→`100`; `CONFIG_PREEMPT=y`→`CONFIG_PREEMPT_VOLUNTARY`; disable `CONFIG_SCHED_HRTICK`, `CONFIG_CPU_FREQ_STAT`, `CONFIG_IRQ_TIME_ACCOUNTING`, `CONFIG_SCHED_SMT`; enable `CONFIG_CPU_IDLE_GOV_TEO`. | Measured ~36 timer IRQs/s + ~27 IPIs/s → ~50 wakeups/s and 29.6 SPC entries/s. Reduces the wakeup floor. | Voluntary preempt may hurt <2 ms UI wake — A/B measure. |
| **K8** | **Remove `earlycon` + `console=ttyMSM0,115200`** from `devices/*/kernel-cmdline.conf` (use `console=null`/`quiet`). | Confirmed in `/proc/cmdline`; `78af000.serial` has `runtime_status=unsupported` → UART clock stays on. | No serial debugging. |
| **K9** | **Trim built-in subsystems**: `INPUT_MOUSE/JOYSTICK/TOUCHSCREEN`, `MAC80211_LEDS`, `INPUT_LEDS`, `LEDS_QCOM_LPG`, `NETFILTER` (if no VPN/tether/NAT), `CGROUPS`/`MEMCG` (if elogind/OpenRC don't need them), unused `USB_NET_*`/`DRM_PANEL_*`/`VIDEO_QCOM_VENUS/CAMSS` modules; defer `msm8905-cam` load from `/etc/modules`. | All confirmed built-in/loaded. Less probe/IRQ/timer and memory overhead. | VPN/Tor/WireGuard/tethering need netfilter; GTK/WebKit may need IPv6 loopback; camera app must trigger the load. |
| **K10** | **IPv6 on wlan0**: `CONFIG_IPV6=m` + `ipv6` in `/etc/modules`; measured link-local address and 36,977 `Ip6InReceives`. Set NM `ipv6.method=ignore` for Wi-Fi profiles (or `sysctl net.ipv6.conf.wlan0.disable_ipv6=1`). | Removes ND/MLD multicast that keeps Wi-Fi awake. | IPv6-only networks. |
| **K11** | **Modem/DSDS power collapse**: make `--dpm-open-port` conditional on an actual cellular data connection and `--dpm-close-port` when Wi-Fi is the default route; add DT `wakeup-source` for the WCNSS/modem remoteprocs; ensure `rpmsg_wwan_ctrl`/`qcom_bam_dmux` runtime PM. (QMI NAS DRX/MICO withdrawn — C17.) | Measured: DSDS active (LTE + GSM), `bearers: []`, no GSM profiles, yet DPM port open at boot. Directly targets the reported scenario. | Must preserve incoming calls/SMS on both SIMs; verify `dsds-daemon` still receives QRTR indications. |
| **K12** | **Display transport**: damage/partial-update support in `panel-mipi-dbi` so a statusbar change does not push a full 240×320×2 SPI frame; `78b9000.spi` measured 0.17 IRQs/s. | Less SPI/GPU work per redraw. | Driver work; per-device panel init sequences. |
| **K13** | **zram**: switch `zram0` from `zstd` to `lz4` (`CONFIG_ZRAM_DEF_COMP_LZ4`), and mount `tmpfs` on `/tmp` (currently on rootfs/eMMC → `mmc0` 0.75 IRQs/s). | Lower CPU per swap I/O and fewer eMMC writes. Measured only 2.5 MB swap used → **low impact**. | Slightly worse compression; `/tmp` size must be bounded on a 512 MB device. |
| **K14** | **Optional advanced**: `CONFIG_RCU_LAZY=y` + `rcu_nocbs=all` (batches RCU callbacks), `CONFIG_ENERGY_MODEL` + EAS, `CONFIG_PM_AUTOSLEEP` for opportunistic suspend. | Further idle savings. | EAS needs OPP energy data; autosleep needs a correct wakelock policy. |
| **U1** | **Re-enable idle blanking while unlocked**: stop touching `sxmo.noidle` in `bananarchy-x11-session.sh`/`sxmo_hook_start.sh`; provide a *blank-without-lock* path (today `sxmo_state.sh set screenoff` → `sxmo_hook_screenoff.sh` → `xlocker screenoff` also locks). | Measured: screen unlocked, brightness 10/14, DPMS On, `idle_locker` not running → backlight/panel/GPU live 24/7. Largest userspace win. | Changes the earlier "unlocked screen never blanks" design; make it a configurable timeout. |
| **U2** | **Implement real suspend**: replace no-op `sxmo_autosuspend.sh`/`sxmo_suspend.sh`, set `AllowSuspend=yes`, remove the infinite `sxmo_not_suspendable` wakelock and `sxmo.nosuspend`, and use the existing timed wakelocks (`sxmo_modem.sh`, `sxmo_hook_postwake.sh`) once `CONFIG_PM_WAKELOCKS` exists. `sxmo_hook_block_suspend.sh` already lists the blockers. | Enables K1. `/sys/power/wake_lock` is absent today, so all current wakelocks are no-ops. | Resume latency; must not suspend during calls, SMS, ringtone, active SSH/VPN/tethering. |
| **U3** | **`statusbar_periodics`**: `sxmo_run_aligned.sh 60 sxmo_hook_statusbar.sh periodics` is running and its guard passes. Replace `mmcli -m any -J`, `nmcli -t con show --active`, `nmcli ... device wifi list`, `rfkill list wifi`, `xsetroot -name` with D-Bus `PropertiesChanged` signals, or raise to ≥300 s and only `xsetroot` on change. | Removes a 60 s QMI/D-Bus/process burst and a full dwm bar redraw (SPI frame). | Statusbar icons lag up to the new interval. |
| **U4** | **Battery udev path**: filter `85-bananarchy-battery.rules` to `KERNEL=="pm8916-bms-vm"`/`ENV{POWER_SUPPLY_NAME}`, drop the `(sleep 2; ... recheck)` fork, avoid `su` per event. | Measured 2 uevents/min; removes the `su`/`sleep` forks. Lower priority than previously stated. | Charging icon must still update instantly on plug/unplug (keep the charger event). |
| **U5** | **Bluetooth (latent)**: set `AutoEnable=false`, finite `DiscoverableTimeout`/`PairableTimeout`, `ControllerMode=dual`, and keep BT out of the default runlevel. | BT is already off (soft-blocked, daemon not running) — **no current saving today**; this prevents a future drain when a user enables BT. | BT must still auto-reconnect when explicitly enabled; dual mode is required for LE HID profiles. |
| **U6** | **chronyd**: remove from the default runlevel or set `minpoll 12 maxpoll 16`; rely on `rtcsync`/RTC (`osclock`, `swclock-offset-boot` are already in the boot runlevel). | Measured running with `pool pool.ntp.org iburst`, but after 43 h uptime it is at ~1024 s polls → **low priority**. Removes a daemon and occasional DNS/NTP Wi-Fi wakeups. | Clock drift without NTP. **Refined in section 16**: removing `iburst` broke the initial sync entirely, so `iburst` was restored and a network-up hook was added; the long steady-state polls are unchanged. |
| **U7** | ~~Duplicate `wpa_supplicant` / respawn storm~~ | **Removed — see C1.** One stable `-u` instance; the `yesno` typo is harmless. Optionally fix the cosmetic typo. | None. |
| **U8** | **NetworkManager**: add `[device] wifi.scan-interval=600` (no override exists today), `ipv6.method=ignore` for Wi-Fi profiles, keep `wifi.powersave=3` and `connectivity.enabled=false`. | Fewer roaming scans and IPv6 ND/MLD wakeups (measured IPv6 active on wlan0). | Roaming responsiveness; IPv6-only networks. |
| **U9** | **DSDS/modem userspace**: make `dsds-daemon``poll_stored_sms` (600 s when unlocked) purely event-driven (WMS `NEW_MESSAGE` indications), add backoff on its `time.sleep(2)` exception loop, make `--dpm-open-port` on-demand, and add a "DSDS power-save" toggle (disable secondary subscription / prefer 2G / single-standby while Wi-Fi is the default route). | Measured DSDS active with LTE+GSM, no data bearer, DPM port open, `drx-cycle`/`mico-mode` unset. Directly reduces baseband wakeups. | Must not lose SIM2 calls/SMS; gate on user preference. |
| **U10** | ~~`sxmo_soundmonitor.sh` 5 s loop~~ | **Removed — see C3.**`evtest /dev/input/event5` blocks; `pactl subscribe` is event-driven. Optional: replace the `sleep 2` outer restart loop with a longer backoff. | None. |
| **U11** | **Plugin timers** (conditional, not active now): `sip_plugin.cpp` 15 s poll with enabled accounts, `tox_plugin.cpp` 250–1000 ms iterate, `locker_plugin.cpp` 1-min clock timer, `gps_plugin.cpp``usleep(300000)`. Move to `timerfd`/event-driven and freeze when the screen is blanked. | Removes periodic wakeups when those apps are configured. | SIP REGISTER expiry / Tox presence. |
| **U12** | **zram / `/tmp`** (corrected): mount `tmpfs` on `/tmp` (currently on rootfs/eMMC); optionally switch `zram0` zstd→lz4. `zram-init` is not enabled, so its `type1=/tmp`/`strictatime` config is dead. | Fewer eMMC writes (`mmc0` 0.75 IRQs/s) and cheaper compression. Measured only 2.5 MB swap used → low impact. | Bound `/tmp` size on 512 MB RAM. |
| **U13** | **Align the shipped user hook**: `~/.config/sxmo/hooks/sxmo_hook_start.sh` starts `superd` without `-l /dev/null`; the default hook has it. The user hook wins via `PATH`. | Restores the intended zero-log default (measured `superd` without `-l /dev/null`). | None. |
| **U14** | **Xorg**: `AccelMethod "glamor"` + DRI3 keeps the GPU path live; `bananarchy-x11-session.sh` re-runs `xrdb`, `feh`, `bananarchy-sync-dunst-theme` on every dwm restart. Consider software rendering for QVGA and skip wallpaper/theme work when the screen is off. | Pairs with K5. | UI smoothness / <2 ms wake. |
---
## 6. DSDS + Wi-Fi specific combined measures
- **Close the cellular data plane when Wi-Fi carries traffic.** No GSM profiles exist and
`bearers: []`, yet `msm8909-modem-wwan-port` opens the DPM BAM-DMUX port at every boot —
pure overhead in this scenario (K11/U9).
- **Reduce tune-away.** `DUAL_SIM_ACTIVE=1` with `PRIMARY_GW_SLOT=2` (LTE) and
`SECONDARY_GW_SLOT=1` (GSM). A screen-off policy that drops the secondary subscription to
single-standby (keeping SIM2 reachable via paging) is the remaining modem-side lever; the
`drx-cycle`/`mico-mode` fields are 5G-only and not applicable here (C17).
- **Let Wi-Fi sleep deeply.** WoWLAN + ARP/NS/GTK offload + `ignore_dtim` are implemented in
`wcn36xx_suspend()` but unreachable without K1/U2. Today the residual floor is ~1.8 RX IRQs/s
and 111 RX packets/min with zero TX (K3/U8).
- **Silence the remaining periodic noise**: 60 s statusbar (U3), 2/min BMS uevents (U4),
chronyd NTP (U6, low), 600 s DSDS SMS poll (U9), SIP/Tox timers when configured (U11).
- **The screen is the biggest single controllable load**: unlocked, brightness 10/14, DPMS On,
no idle blank (U1). No combination of kernel tweaks will reach 24 h while the panel and
backlight stay on continuously.
---
## 7. Re-prioritized shortlist
1.**K1 + U2** — enable suspend (0-byte `/sys/power/state` confirmed) with wake sources and
timed wakelocks. Biggest absolute win; conflicts with <2 ms wake, so ship as opt-in deep standby.
2.**U1** — configurable idle blank while unlocked (screen measured on 24/7). Largest userspace win.
3.**K2** — `clock-latency-ns` in the OPP table (`4294967295` measured); removes the userspace
- Compare 1 h idle drain (screen off, DSDS, Wi-Fi on) before/after each change; target
**< 62.5 mA average** for > 24 h on the 1500 mAh pack.
---
## 9. Summary
The live device confirms the two structural root causes: **there is no suspend state at all**
(`/sys/power/state` is empty, `CONFIG_SUSPEND` off) and **the unlocked screen never blanks**
(`sxmo.noidle`, brightness 10/14, DPMS On, `idle_locker` absent), with DSDS (LTE+GSM) and Wi-Fi
both fully associated. It also confirms `cpuinfo_transition_latency=4294967295` and that the
`schedutil` rate-limit fix is working. Conversely, it disproves four earlier claims (duplicate
`wpa_supplicant`, BT always on, soundmonitor 5 s loop, `/tmp` on zram) and shows that the CPU
cores are already ~98 % power-collapsed — so the remaining drain is **always-on SoC rails, DDR,
display and radios**, not CPU busy loops. K1/U2 plus U1 are the only changes that can plausibly
deliver > 24 h; the rest are incremental but cumulatively significant.
---
## 10. Implementation status (applied in this change set)
Every item in sections 4 and 5 was addressed; the table below records how, and flags the
few places where the regression checks mandated by the analysis changed the implementation.
| Item | Implementation |
|---|---|
| K1 | `CONFIG_SUSPEND`, `CONFIG_SUSPEND_FREEZER`, `CONFIG_PM_WAKELOCKS`, `CONFIG_PM_WAKELOCKS_LIMIT/GC`, `CONFIG_PM_AUTOSLEEP` enabled; `wakeup-source` added to the WCNSS/pronto remoteproc in all 5 DTS files; `build-kernel-audio.sh` now builds the `zImage` from the tuned config and ships it as `overlay/rootfs/boot/vmlinuz` (+ `config`, `System.map`). |
| K2 | `clock-latency-ns = <100000>` added to `cpu-opp-table` in all 5 DTS files. |
| K3 | New `patches/kernel/0006-...patch`: keep-alive 30 s -> 120 s, `listen_interval = 3`, BMS sample interval 10 -> 30, `power_supply_changed()` throttled to real capacity changes, GPU devfreq `polling_ms` 50 -> 100. WoWLAN/ARP/NS/GTK offload + `ignore_dtim` come from `wcn36xx_suspend()` once K1 is active. |
| K7 | Ftrace/function tracer/dynamic debug/perf/profiling/kprobes/uprobes/BPF-JIT-always-on/fw-loader-debug/thermal-emulation/Magic SysRq/printk-time/DRM GPU state/logo/serial console disabled; `DRM_FBDEV_OVERALLOC=0`; LED triggers and unused input classes disabled. `FRAMEBUFFER_CONSOLE` kept (plymouth boot splash) and `NETFILTER`/`IPV6`/`CGROUPS` kept (Tor/WireGuard/tethering and elogind) — these are the regression checks from the risk column, not skipped items. |
| K8 | `earlycon` and `console=ttyMSM0,115200` removed from all `devices/*/kernel-cmdline.conf` and from `usr/lib/kernel-cmdline.d/50-device-*.conf` in the overlay. |
| K9 | Unused built-in input classes and LED triggers disabled; netfilter/IPv6/cgroups deliberately retained (see K7); `msm8905-cam` retained in `/etc/modules` because its out-of-tree platform driver has no udev autoload path — removing it would break `xcamera`. |
| K10 | `net.ipv6.conf.default.disable_ipv6=1` in `etc/sysctl.d/99-bananarchy-power.conf` and `10-power-save.start`; the `ipv6` module stays loaded for WireGuard/Tor and `::1` on `lo`. |
| K12 | **Deferred with justification**: damage/partial-window updates in `panel-mipi-dbi` need panel-specific GC9305/GC9307 commands and risk display corruption. The equivalent userspace win (no full-frame redraw on every statusbar tick) is delivered by U3. |
| K13 | `CONFIG_ZRAM_DEF_COMP_LZ4=y`, `zram-init``algo*=lz4`, `/tmp` mounted as `tmpfs` via `etc/fstab`. |
| K14 | `CONFIG_ENERGY_MODEL` enabled; `CONFIG_RCU_NOCB_CPU`/`CONFIG_RCU_LAZY` are dependency-gated (`RCU_EXPERT || NO_HZ_FULL`) and were dropped by `olddefconfig`, so they are not active. `rcu_nocbs=all` deliberately **not** added to the cmdline: on a 2-core MSM8905 it would add always-running `rcuo` kthreads, trading away the idle saving. |
| U1 | `bananarchy-idle-blank.sh` + `sxmo_hook_unlock.sh` starts `idle_locker` at `SXMO_UNLOCK_IDLE_TIME` (default 60 s) with a blank-without-lock `resume` hook; `bananarchy-x11-session.sh` no longer forces `sxmo.noidle`. |
| U2 | `bananarchy-suspend.sh` / `bananarchy-deep-standby.sh` / `sxmo_autosuspend.sh` / `sxmo_suspend.sh`, `AllowSuspend=yes`, doas rule, infinite wakelock removed, `sxmo.nosuspend` removed, `sxmo_hook_screenoff.sh` starts the grace timer, `sxmo_hook_unlock.sh`/`postwake.sh` cancel it. **Shipped disabled** via `/etc/bananarchy-no-deep-standby` until the new kernel has been boot-tested: a broken driver suspend callback must never leave a flashed phone unwakeable. `freeze` (s2idle, any-IRQ wake) is preferred; `mem` requires `/etc/bananarchy-allow-mem-suspend`. |
| U3 | `statusbar_periodics` interval 60 -> 300 s; `sxmo_hook_statusbar.sh periodics` drops `mmcli`/`nmcli`/`rfkill` polls and only calls `xsetroot` when the status string changes. |
| U4 | udev rule filtered to the two PM8916 supplies; `(sleep 2; ... recheck)` fork removed from `sxmo_hook_battery.sh`. |
| U5 | `AutoEnable=false`, finite discoverable/pairable timeouts, `ControllerMode=dual`, fewer reconnect attempts. BT was already off on the device, so this is a latent fix. |
| U9 | `dsds-daemon` 600 s -> 1800 s poll (and `poll_timeout = None` while dark in section 20) plus 2 s -> 30 s error backoff; `sxmo_modemmonitor.sh` 10/120 s -> 30/600 s. Conditional DPM port gating reverted in section 20.3 (`bam-dmux` already runtime-suspends in `1000 ms` when idle, whereas omitting `net/wwan0` broke `ModemManager` on Wi-Fi-only setups). |
| U10 | Withdrawn (C3); the outer `pactl subscribe` restart backoff raised 2 s -> 10 s. |
| U11 | `sip_plugin.cpp` 15 s -> 60 s poll; `tox_plugin.cpp` iteration clamp 250-1000 ms -> 1000-2000 ms. `locker_plugin.cpp` already blocks indefinitely when blanked; `gps_plugin.cpp`'s `usleep(300000)` is in the `--test` CLI path only. |
| New: `commit=` on the rootfs mount | cuts ~2 eMMC IRQs/s | userspace, not kernel; risks data loss on sudden power cut | Out of scope, noted |
| New: VM-BMS FIFO sanity clamp | 0 power, fixes a 19.2 V / `Over voltage` misreport for ~3.5 min after hard reset | none (source-only patch to `pm8916_bms_vm.c`) | Worth fixing; no rebuild needed |
### 14.8 Where the 24 h actually has to come from
With the display now dark after 5 minutes and userspace quiet, the kernel is
no longer the bottleneck. The remaining budget has to be attacked at the modem
and Wi-Fi layers:
1.**Modem idle power**: LTE eDRX / PSM via `AT+CEDRXS` / `AT+CPSMS` on
`/dev/wwan0at0` (or the QMI NAS equivalents). Two continuously registered
SIMs on LTE + GSM are the largest single drain; PSM/eDRX is the standard
way to cut it by an order of magnitude while staying reachable. This is a
modem-firmware configuration, not a kernel config option.
2.**DSDS policy**: parking the second SIM (or reducing its polling) when idle
trades DSDS availability for a large RF saving.
3.**Wi-Fi DTIM / listen interval**: AP-side DTIM and `wcn36xx`
`listen_interval` tuning can cut the 2.43 RX IRQs/s, at the cost of inbound
data latency.
4.**DDR self-refresh**: requires `mem` suspend, which needs PSCI
`SYSTEM_SUSPEND` in lk2nd. Until then `bimc_ddr_clk_src` stays at 768 MHz
and no kernel-side change can fix it.
None of these four are unlocked by rebuilding the module tree.
`chronyc sources` and the helper's `/run/bananarchy-time-sync/last` stamp.
The RTC held `1970-01-12 12:39:26 UTC` (epoch 995966), so all boot file
timestamps are on that fake date and map to uptime by subtracting 995966:
| Uptime | Event |
| --- | --- |
| 0 s | kernel sets the clock from `rtc-pm8xxx` to 1970-01-12 12:39:26 UTC |
| ~27 s | NetworkManager, `chronyd`, `bananarchy-time-sync` started; chronyd resolves the pool before DNS exists, so all 8 sources stay `unknown address` |