Implement 0012 72h standby battery optimizations and initramfs depmod hook

- Add patches/kernel/0012-msm8909-standby-wifi-wcd-panel-ldo-bms.patch, rebuild affected kernel/module artifacts and all six device DTS/DTB files (msm8916-wcd-analog s2/bias gating, wcn36xx offload_sync_work and healthy-RSSI screen_off_offload scan short-circuit, pm8916_bms_vm screen_off FORCE_S3 OCV mode, panel-mipi-dbi dc/reset low on blank, spi-qup runtime PM sleep pinctrl, PM8909 l1/l4 LDO seeding, and sdhci-msm vmmc/vqmmc set_load with regulator-allow-set-load on l8/l12), and switch msm8905-cam from direct APSS SPMI LDO6/LDO17 writes to RPM regulator consumer voting.

- Update standby power policy and compiled C daemons (WIFI_LISTEN_INTERVAL=8, WIFI_STANDBY_RAT=gsm with CS verification and fallback, 10-bananarchy-dpm.sh wifi-up/unpark-rat dispatch, 25 s boot QRTR wait and QMI DMS online recovery, pm8916_bms_vm screen_off sync, bananarchy-run-aligned dark-screen skip, bananarchy-dsds --sig-hysteresis, bananarchy-cover-idle wake_blank_timeout = 8, and scripts/test-standby-power-policy.py).

- Add overlay/rootfs/etc/boot-deploy/hooks/10-initramfs-depmod.sh to run depmod -b per staged initramfs cpio archive and eliminate Stage 2 udevd missing-module boot console errors, enforce .ko.zst-only module installs in apply-bananarchy-overlay.sh, stage Alpine 3.24 /usr/lib/{libz,libcrypto}.so* in rebuild-image.sh chroot with failure cleanup, and add initramfs cpio guards plus verified image hashes in scripts/check-rebuild.sh.

- Document all changes under Unreleased in CHANGELOG.md and synchronize AGENTS.md, MANUAL.md, and BATTERY-OPTIMIZATION-ANALYSIS.md.
This commit is contained in:
Luxferre committed 2026-11-15 14:46:50 +02:00
1 parent 9700949b28
commit fc5c4282f5
67 files changed
+67482 -65598

No files matched your search

+19
View File
@@ -10,6 +10,25 @@ Release versions follow the `<year-letter><MM><DD>` format (where `2026` is `a`,
---
## Unreleased
### 72-hour DSDS and Wi-Fi standby battery optimizations (`0012`)
- **Kernel standby patch (`patches/kernel/0012-msm8909-standby-wifi-wcd-panel-ldo-bms.patch`)**:
- **Analog audio codec (`msm8916-wcd-analog.c` / `snd-soc-msm8916-analog.ko.zst`)**: set `.idle_bias_on = 0` with `.set_bias_level` and `pm8916_wcd_analog_update_power_locked()` (`power_lock`, `audio_active`, `jack_inserted`, `s2_enabled`), gating `s2` (`vdd-cdc-tx-rx-cx`, `1.85 V`) and master bias off whenever playback/capture and headset insertion are both idle, and masking `MBHC_BUTTON_PRESS_DET | MBHC_BUTTON_RELEASE_DET` while no jack is inserted.
- **WCN3620 Wi-Fi (`wcn36xx`)**: added `offload_sync_work` (`wcn36xx_schedule_offload_sync()`) to re-assert `HOST_SUSPEND_IND` and IPv6 NS offload after scans and IPv6 address changes, and short-circuited associated multi-channel `wcn36xx_hw_scan()` requests when `screen_off_offload` is active and operating RSSI is `>= -75 dBm`.
- **PM8916 BMS fuel gauge (`pm8916_bms_vm.c`)**: added the `screen_off` module parameter (`pm8916_bms_vm_sync_mode()`) so the BMS enters `PM8916_BMS_VM_MODE_FORCE_S3` while dark and discharging and samples `PM8916_BMS_VM_S3_S7_OCV_DATA0` on return to `PM8916_BMS_VM_MODE_NORMAL`, driven by `bananarchy-display-power-sync`.
- **MIPI DBI panel, SPI QUP, RPM LDO seeding, and microSD LPM (`panel-mipi-dbi.c`, `spi-qup.c`, `qcom_smd-regulator.c`, `sdhci-msm.c`, device DTS)**: drove `dc` and `reset` GPIOs low in `panel_mipi_dbi_disable()`, selected sleep/default pinctrl around `spi-qup` runtime PM, seeded `vreg->is_enabled = 1` on PM8909 `l1` and `l4` so unreferenced boot rails power down cleanly, and added `vmmc`/`vqmmc` `regulator_set_load()` in `sdhci-msm` runtime suspend/resume paired with `regulator-allow-set-load;` on `l8`/`l12` across all six device DTS files.
- **Camera driver RPM regulator consumer voting (`src/msm8905-cam/msm8905-cam.c`)**: replaced direct APSS SPMI writes to RPM-owned `LDO6`/`LDO17` (`0x4546`/`0x5046`, which caused a `pmic_arb_write_cmd()` Oops during `DPMS Off` captures when `display@0` was powered off) with `regulator_get_optional()` consumer voting on `"l6"` and `"l17"`, keeping SPMI restore solely for codec analog `PPID 0xf1`.
- **Userspace standby policy, boot QRTR readiness, and C daemon wakeup reductions**: updated `/etc/bananarchy-power-policy.conf` and `/etc/modprobe.d/10-bananarchy-power.conf` defaults to `WIFI_LISTEN_INTERVAL=8` and `WIFI_STANDBY_RAT=gsm` (45 s dark Wi-Fi GSM parking with CS registration verification and auto-fallback on 2G-sunset networks, wired to `10-bananarchy-dpm.sh` `wifi-up`/`unpark-rat`), kept `wifi.powersave=3` and `[connectivity] enabled=false` without an overriding `wifi.scan-interval` in `/etc/NetworkManager/conf.d/10-power.conf`, raised boot QRTR waits to `25 s` and recovered QMI DMS to `online` in `msm8909-modem-wwan-port` / `msm-modem-uim-selection` / `bananarchy-power-policy.sh`, skipped dark periodic statusbar ticks in `bananarchy-run-aligned` (`should_skip_while_dark()`), added `--sig-hysteresis` in `bananarchy-dsds`, capped passive closed-flip cover wakes to `wake_blank_timeout = 8` in `bananarchy-cover-idle` / `cover-display.conf`, and added `scripts/test-standby-power-policy.py`.
### Initramfs per-archive `depmod` hook and `.ko.zst`-only module hygiene
- **Eliminate Stage 2 `udevd` missing-module console errors**: added executable hook `overlay/rootfs/etc/boot-deploy/hooks/10-initramfs-depmod.sh` so `boot-deploy` unpacks each staged `initramfs` cpio archive, runs `depmod -b` against its `6.12.1-msm8916` module subset (`27` modules on `nokia-argon`, `30` on `nokia-beatles`), verifies every `modules.dep` entry exists in the archive, and repacks it before creating `boot.img` or copying `/boot/initramfs`. This eliminates the `<27>` `udevd` `No such file or directory` boot console errors on `qcom_pil_info.ko.zst` and `snd-soc-qcom-common.ko.zst`.
- **Module install hygiene, Alpine 3.24 chroot `depmod` libs, and image verification**: updated `scripts/apply-bananarchy-overlay.sh` to remove stale uncompressed `.ko` files and copy only `*.ko.zst` across all prebuilt module directories; updated `rebuild-image.sh` to stage `libz.so*` and `libcrypto.so*` from both `/lib/` and `/usr/lib/` (`-aL`) into `/tmp/hostbin/` with guaranteed chroot failure cleanup; added initramfs cpio `modules.dep`/`modules.alias` and `.ko*` guards in `scripts/check-rebuild.sh`; and rebuilt and verified local `a1114` / `carbonara` images (`images/bananarchy-nokia-argon.img` SHA-256 `753c186db1fa5e7d58f3252ad344004bcb0d6fb26eb810ae9427d572cd7d94ca`, `images/bananarchy-nokia-beatles.img` SHA-256 `12eb7e589a40c3935fcf283f3771b1e7e65d04b08b6d632c23b0f290304dd673`, and `images/boot-bananarchy-nokia-beatles.img` SHA-256 `d6b82239f80038c1bd916c36d4c674dc1e36996b3d52c65efdd545ff320a08d8`).
---
## Build `a1114` — codename `carbonara` (2026-11-14)
This build ships MSM8909 interconnect/Wi-Fi/USB/panel deep-standby power optimizations (`0008`–`0011`), compiled C11 zero-CPU autostart and idle daemons, 2720 Flip closed-flip call wakeups, call preservation on flip-open, and external cover call controls, live network/manual timezone propagation without reboot, and fresh `a1114` / `carbonara` images for both **Nokia 8110 4G (`nokia-argon`)** and **Nokia 2720 Flip (`nokia-beatles`)**.