Restore 72h DSDS + Wi-Fi standby battery optimizations across all targets

- Fix Combined EPS/IMSI (cs_attach=1) false 4G-only IMS activation in
  ims_qrtr.h, close idle QRTR sockets, bound child/baseband retries, and
  deduplicate state.env writes in bananarchy-imsd.c
- Skip inactive DHCP/connectivity IMS notifications in 40-bananarchy-ims.sh
  and add capped exponential registration backoff (5s-300s) plus
  openCtlSocket() rebind guard in bananarchy-vowifi
- Sync CPU scaling_governor and idempotent screenoff/screenon policy across
  bananarchy-display-power-sync, locker.so, and bananarchy-power-policy.sh
  (standby.mode + rat_timer.pid), and gate noisy change events when dark in
  30-bananarchy-network-status.sh
- Fix bananarchy-dsds --sig-hysteresis QMI NAS wire opcodes to 0x0045
  (1-byte sub bind) and 0x0050 (RSSI/RSCP/RSRP/LTE report threshold config)
- Remove static 200 mA regulator-system-load on PM8909 l11 across all 6
  DTS files and recompile all 5 shipping DTBs
- Extend test-imsd-volte.py, test-standby-power-policy.py, check-rebuild.sh,
  BATTERY-OPTIMIZATION-ANALYSIS.md (Section 24), AGENTS.md, and Unreleased
  CHANGELOG.md notes + rebuilt image SHA-256 checksums (--mkinitfs)
This commit is contained in:
Luxferre committed 2026-11-21 11:05:22 +02:00
1 parent c40ec932de
commit c9eb28b891
42 files changed
+751 -91

No files matched your search

+15 -7
View File
@@ -92,18 +92,26 @@ Keep this file short. Full details live in `README.md`, `MANUAL.md`, `SDK.md`, `
`bananarchy-notifmonitor`, `bananarchy-run-aligned`, `bananarchy-session-loop`, `bananarchy-imsctl`,
`bananarchy-imsd`) alongside `bananarchy-vowifi`, not Python or `/bin/sh` loops.
Preserve `/run/bananarchy/lid-state`, the cover socket protocol, `FBIOBLANK`, cover diagnostics,
`should_skip_while_dark()`, `bananarchy-dsds --sig-hysteresis`, `scripts/test-cover-idle.py`,
`should_skip_while_dark()`, `bananarchy-dsds --sig-hysteresis` (`QMI_NAS 0x0045` + `0x0050` RSSI/RSCP/RSRP/LTE report),
`bananarchy-display-power-sync` (`CPU_GOV_PATH` + `sync_standby_policy` `screenoff`/`screenon` across dark/cover-lit/open),
idempotent `standby.mode` + `rat_timer.pid` in `bananarchy-power-policy.sh`, `locker.so` `blankScreenBacklight`/`wakeScreenBacklight`
power-policy sync, `30-bananarchy-network-status.sh` dark-screen dispatcher gating, `scripts/test-cover-idle.py`,
`scripts/test-dsds-daemon.py`, and `scripts/test-standby-power-policy.py`.
- Keep IMS, VoLTE, VoWiFi, and mobile data (`wwan0`) invariants: `/etc/bananarchy/ims.conf` must ship with `volte_mode=auto` and
`vowifi_mode=auto` (disabled at 0% idle CPU unless connected to a strictly **4G-only** network or explicitly
enabled by the user), `QMI_IMSDCM` (`0x0302`) must stay closed at idle (`close_imsdcm()` / `ensure_imsdcm()`) alongside dedicated QRTR socket isolation + `g_pdc_loaded_id` deduplication in
`bananarchy-imsd`, `bananarchy-ims-bearer.sh` must remain isolated from `wwan0`, `QMI_UIM` APDU lock serialization in `bananarchy-vowifi`, emergency calls (`112`/`911`) prioritizing
cellular CS/VoLTE before VoWiFi fallback, Duress Mode gating in `bananarchy-imsctl`/`modem.so`/`files.so`, `/etc/init.d/modemmanager` and `msm-modem-uim-selection` preloading `libmm-wds-bind.so` (`PRIMARY` `QMI_WDS` binding without calling `QMI_DSD 0x004E`), `mobile-data-prep` / `10-bananarchy-dpm.sh` `restore-dsds` handling sticky `cs-only` Dual-SIM pausing, and
`scripts/test-{lte-mobile-data,ims-mbn,imsd-volte,vowifi-swu-ims}.py` passing under `scripts/check-rebuild.sh`.
`vowifi_mode=auto` (disabled at 0% idle CPU unless connected to a strictly PS-only **4G-only** network excluding Combined
EPS/IMSI `cs_attach == 1`, or explicitly enabled by the user), `QMI_IMSDCM` (`0x0302`) and QRTR (`close_qrtr()`, bounded child
sync/check retries, parked/inactive Wi-Fi event skip, and `40-bananarchy-ims.sh` inactive DHCP/connectivity early exit) must
stay closed/idle at 0% CPU alongside dedicated QRTR socket isolation + `g_pdc_loaded_id` deduplication in `bananarchy-imsd`,
`bananarchy-ims-bearer.sh` must remain isolated from `wwan0`, `QMI_UIM` APDU lock serialization + exponential registration backoff in
`bananarchy-vowifi`, emergency calls (`112`/`911`) prioritizing cellular CS/VoLTE before VoWiFi fallback, Duress Mode gating in
`bananarchy-imsctl`/`modem.so`/`files.so`, `/etc/init.d/modemmanager` and `msm-modem-uim-selection` preloading `libmm-wds-bind.so`
(`PRIMARY` `QMI_WDS` binding without calling `QMI_DSD 0x004E`), `mobile-data-prep` / `10-bananarchy-dpm.sh` `restore-dsds` handling
sticky `cs-only` Dual-SIM pausing, and `scripts/test-{lte-mobile-data,ims-mbn,imsd-volte,vowifi-swu-ims}.py` passing under
`scripts/check-rebuild.sh`.
- Keep standby battery invariants from `0012-msm8909-standby-wifi-wcd-panel-ldo-bms.patch` and
`bananarchy-power-policy.conf`: `CPU_RPM_SLEEP=0`, `CPU_L2_SLEEP=0`, `MODEM_DRX_MODE=0`, `WIFI_LISTEN_INTERVAL=8`,
`WIFI_STANDBY_RAT=gsm`, `msm8916-wcd-analog` `s2` gating, `pm8916_bms_vm` `screen_off` S3 OCV mode, `sdhci-msm`
`vmmc`/`vqmmc` `set_load` (`regulator-allow-set-load;` on `l8`/`l12` across DTS), and `msm8905-cam.c` RPM `l6`/`l17`
`vmmc`/`vqmmc` `set_load` (`regulator-allow-set-load;` on `l8`/`l11`/`l12` across DTS/DTBs with no static `regulator-system-load` on `l11`), and `msm8905-cam.c` RPM `l6`/`l17`
regulator consumer voting (`regulator_get_optional`, never raw APSS SPMI writes on RPM LDOs).
- Keep the zero-lag plugin model: preloaded resident daemons guarded by lock/FIFO, `poll()` at 0% CPU, offscreen
`240x296` Pixmaps at `Y=24`, `PluginTheme`, `RELOAD_THEME`, idle blank/lock helpers, the 350 ms `dwm` wake guard, and