Implement 0010 RPM/L2/WCD/UART deep-standby, Adreno 304 ICC/SMMU fixes, and C11 autostart daemons

- patches/kernel/0010-msm8909-rpm-lpm-bimc-wcd-ldo-uart.patch and device DTS/DTB files (nokia-{argon,beatles,beatles-cover,coconut,sparkler,leo}): vMPM APSS RPM sleep, L2 SAW2 collapse, WCD-digital runtime PM, PM8909 LDO seeding, ttyMSM0 disable, dynamic msm_gpu gfx-mem BIMC interconnect scaling (mas_oxili), and qcom_iommu context restore + atomic TLB flush on resume.
- Replace Python/shell autostart loops with compiled C11 ARM ELF daemons (bananarchy-dsds, bananarchy-modemmonitor, bananarchy-soundmonitor, bananarchy-notifmonitor, bananarchy-run-aligned, bananarchy-session-loop) plus scripts/test-dsds-daemon.py.
- Update scripts/check-rebuild.sh, CHANGELOG.md, BATTERY-OPTIMIZATION-ANALYSIS.md, MANUAL.md, README.md, and AGENTS.md with verified a1114 (carbonara) image/archive pins and guards.
This commit is contained in:
Luxferre committed 2026-11-13 18:23:14 +02:00
1 parent 96c66bf0c6
commit 2ae4ef34a2
86 files changed
+99754 -94563

No files matched your search

+8 -2
View File
@@ -14,7 +14,13 @@ Release versions follow the `<year-letter><MM><DD>` format (where `2026` is `a`,
Upcoming release build (`a1114` / `carbonara` via `scripts/version.sh`) targeting both **Nokia 8110 4G (`nokia-argon`)** and **Nokia 2720 Flip (`nokia-beatles`)** while keeping `a1111` (`lennon`) as the current published release.
### Hardware, kernel, and firmware deep-standby fixes (`0008` and `0009`)
### Hardware, kernel, and firmware deep-standby fixes (`0008`, `0009`, and `0010`)
- **Pass 1 + Pass 2 RPM sleep (`vMPM` + L2 SAW2), BIMC PLL / WCD-digital / LDO cleanup, Adreno 304 active-display guard, and UART disable (`0010`)**:
- **Last-man APSS RPM (`vMPM`) and L2 SAW2 standby collapse (`0010`)**: enabled `CONFIG_QCOM_RPM_MASTER_STATS=y`, wired `qcom,mpm` (`sram@60000` sub-slices `0x150`/`0x1d0`/`0x1150`/`0x2150`, TLMM `wakeup-parent`, `qcom,msm8916-rpm-stats`, `rpm-master-stats`) and L2 SAW2 (`power-manager@b012000`, `qcom,msm8909-saw2-v3.0-scu` linked via `l2-cache` `qcom,saw`) across kernel and all six device DTS files; fixed SAW2 v3.0 `0x3B` / `PC_MODE` / `SLP_CMD_MODE` indexing and XPU-locked L2 readback guards; guarded `qcom_mpm_handler()` against `NULL` `irq_desc` mappings on pre-enabled MPM pins (`49`, `58`, `62`); gated `cpuidle-qcom-spm` last-man APSS RPM (`rpm_sleep=1`, `rpm_min_residency_us=3000`) and L2 collapse (`l2_sleep=1`, `QCOM_SCM_CPU_PWR_DOWN_L2_OFF`) on both `qcom_msm8909_gdsc_is_active()` (`oxili_gdsc`/`mdss_gdsc`/`venus_gdsc`/`vfe_gdsc`) and `cpuidle_qcom_spm/parameters/screen_off` (toggled by `bananarchy-display-power-sync` and `bananarchy-power-policy.sh`) so active displays/GPUs never suffer L2/shared-clock collapse; and switched the next-timer check to `ktime_sub(tick_nohz_get_next_hrtimer(), ktime_get())` (`tick_nohz` warning fixed) with `# CONFIG_SUSPEND is not set` and module `vermagic` unchanged.
- **Adreno 304 `gfx-mem` interconnect scaling, `qcom_iommu` non-genpd resume/TLB fix, GDSC recovery cycle, WCD-digital runtime PM, and PM8909 LDO seeding (`0010`)**: wired `bimc`/`pcnoc`/`snoc` nodes and Adreno 304 `gfx-mem` interconnect (`MAS_OXILI -> SLV_EBI`) in `qcom-msm8909.dtsi` and all six device DTS files, moved `a3xx_gpu_init()`'s static `icc_set_bw()` into `msm_gpu_pm_resume()` / `msm_gpu_pm_suspend()` (`Bps_to_icc(gpu->fast_rate) * 8` while active, `0` when runtime-suspended so BIMC still drops to `19.2 MHz` XO when idle without starving Adreno 304 during `powersave`/DPMS transitions), guarded blocking `qcom_iommu_map()` calls with runtime PM, saved/restored non-secure context bank registers + `ARM_SMMU_CB_S1_TLBIASID` in `qcom_iommu_resume()` for non-genpd `VDD_CX` SMMUs (`1f08000.iommu`), exposed `qcom_msm8909_gdsc_is_active()` in `gcc-msm8909.c`, added `dev_pm_genpd_synced_poweroff()` + `pm_runtime_put_sync()`/`pm_runtime_get_sync()` in `adreno_recover()` so `oxili_gdsc` resets cleanly on ringbuffer lockups, added `.idle_bias_on = 0` + `REGCACHE_FLAT` + `200 ms` runtime autosuspend (`RUNTIME_PM_OPS`) in `msm8916-wcd-digital.c`, and seeded `vreg->is_enabled = 1` for PM8909 `l14`, `l15`, and `l18` in `qcom_smd-regulator.c`.
- **Disable `ttyMSM0` (`serial@78af000`) and extend runtime power policy**: disabled `serial@78af000` + cleared `chosen/stdout-path` in all DTS files and removed `console=ttyMSM0,115200` from all `kernel-cmdline.conf` and `50-device-*.conf` fragments; added `CPU_RPM_SLEEP=1`, `CPU_L2_SLEEP=1`, `WIFI_SCREEN_OFF_IPV6_MUTE=1` (mutes unsolicited `wlan0` IPv6 RAs while dark on IPv4 networks, restored on wake), opt-in `WIFI_STANDBY_RAT=keep|gsm`, and `cpuidle_qcom_spm` / `qcom_stats` / `qcom_rpm_master_stats` telemetry to `bananarchy-power-policy.conf` and `bananarchy-power-policy.sh`.
- **Compiled C11 autostart daemons (`bananarchy-dsds` and monitors)**: replaced `python3 - dsds-daemon`, `sxmo_modemmonitor.sh`, `sxmo_soundmonitor.sh` (`evtest`), `sxmo_notifs.sh monitor` (`inotifywait`), `sxmo_run_aligned.sh` (`sxmo_aligned_sleep`), and the `bananarchy-x11-session.sh` tail loop with 0%-CPU compiled C11 ARM ELF binaries (`bananarchy-dsds`, `bananarchy-modemmonitor`, `bananarchy-soundmonitor`, `bananarchy-notifmonitor`, `bananarchy-run-aligned`, `bananarchy-session-loop`) plus thin `exec` compatibility shims, `doas` rule, and `superd` service units, leaving zero Python or `/bin/sh` daemons on autostart; guarded by `scripts/test-dsds-daemon.py` and `scripts/check-rebuild.sh`.
- **MSM8909 RPM interconnect bus scaling (`CONFIG_INTERCONNECT_QCOM_MSM8909=y`)**: enabled `CONFIG_INTERCONNECT_QCOM=y`, `CONFIG_INTERCONNECT_QCOM_MSM8909=y`, and `CONFIG_INTERCONNECT_QCOM_SMD_RPM=y`, marked `msm8909_bimc`, `msm8909_pcnoc`, and `msm8909_snoc` `.keep_alive = true` (`19.2 MHz` active floor, `0` in `QCOM_SMD_RPM_SLEEP_STATE`), initialized `qp->bus_clk_rate[*]` to `U32_MAX` in `qnoc_probe()` so `icc_sync_state` clears `clk_smd_rpm_handoff()`'s `INT_MAX` sleep-set vote in RPM, wired `interconnect@400000`, `interconnect@500000`, `interconnect@580000`, `cpus` `interconnects`, and `cpu-opp-table` `opp-peak-kBps` across all six MSM8905/MSM8909 DTS files, and lowered the `199999951 Hz` idle CPU OPP `opp-peak-kBps` floor from `<0xc3500>` (`100 MHz` BIMC) to `<0x25800>` (`153,600 kBps` = `19.2 MHz` XO floor) (`0009`) while preserving `vermagic` across all 580 `.ko.zst` modules.
- **Unblock `fw_devlink` `sync_state` (`CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT=y`) and release unclaimed `clk-smd-rpm` votes (`0009`)**: enabled `CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT=y` with `fw_devlink` post-init relaxation in `drivers/base/core.c` so driverless `/cpus/cpu@0..3` no longer deadlock `rpmpd_sync_state()` (`VDD_CX`/`VDD_MX` stuck at `SUPER_TURBO`) or `icc_sync_state()`, and added `late_initcall_sync(rpm_smd_clk_late_cleanup)` in `drivers/clk/qcom/clk-smd-rpm.c` to drop active votes on unclaimed `QDSS`/`QPIC` clocks and clear RPM `SLEEP_STATE` boot-handoff votes on all unclaimed clocks without altering `BB_CLK1`/`RF_CLK1` active votes.
@@ -28,7 +34,7 @@ Upcoming release build (`a1114` / `carbonara` via `scripts/version.sh`) targetin
- **2720 Flip event-driven idle daemons (`nokia-beatles`)**: replaced `bananarchy-lid`'s continuous `20 ms` (`50 Hz`) `poll()` loop, `10 Hz` `/sys/kernel/debug/gpio` full SoC GPIO register dump, and `2 s` `/dev/input` `glob` + `/run/bananarchy/cover.sock` broadcast with `/dev/input` `inotify` watching plus hardware `EV_SW` IRQ sleep (`poll(..., -1)` at `0` steady-state wakeups/s after the `20 ms` edge debounce and one `+2 s` post-transition confirmation check), and synchronized CPU `scaling_governor`, `schedutil/rate_limit_us` (`40000`), and Adreno 304 `governor` directly in `on_transition()`. Replaced `bananarchy-volume-keys`'s `1 s` `poll()` + `2 s` `/dev/input` `glob` loop with `/dev/input` `inotify` + `poll(..., -1)`.
- **Shared GPU `devfreq`, `schedutil`, statusbar, eMMC, and Bluetooth idle fixes (`nokia-argon` and `nokia-beatles`)**: granted `video`-group `0664` permissions to `/sys/class/devfreq/1c00000.gpu/governor` in `10-power-save.start`, synced `1c00000.gpu/governor` (`powersave` while dark or cover-lit, `simple_ondemand` when the main panel wakes) in `bananarchy-display-power-sync` and `locker.so`, and restored `schedutil/rate_limit_us = 40000` on `FORCE=1` transitions as well as normal udev events. `sxmo_hook_statusbar.sh` skips `sxmo_hook_icons.sh` on `time` ticks and updates `099-time` directly in-shell without spawning `sxmo_status.sh` and duplicate `mkdir -p` forks every minute; `sxmo_wm.sh display off` skips rewriting `~/.config/sxmo/brightness` on ext4 when unchanged; `sxmo_hook_screenoff.sh` skips spawning `sxmo_autosuspend.sh` when `/etc/bananarchy-no-deep-standby` is present; and `bananarchy-bt-obex` replaces its `1.0 s` D-Bus/RFCOMM poll and `1.5-2.0 s` `/dev/input` gamepad scan with a signal self-pipe, `ctypes` `inotify`, and blocking `select.select(..., None)` (`0` idle wakeups/s when Bluetooth is enabled, `<5 ms` gamepad hotplug).
- **Image persistence and upcoming release archives**: rebuilt both `images/bananarchy-nokia-argon.img` (SHA-256 `f4c8921a674944b2687b2d7bcb52e6f3cb81ad5997fddac969949305c0479c60`) and `images/bananarchy-nokia-beatles.img` (SHA-256 `fd29593b30008b65b7b30b867824ce3f3f4e1f70cda4f012dde1a2c14dd316ba`, with standalone `images/boot-bananarchy-nokia-beatles.img` SHA-256 `d6cb9d5f13bc00815c4fcde5cf32b92ce9d7873683d3cec8b1346a53801ea08a` and unchanged display lk2nd `b5549698c20f4de7603fc746d32bb5baa96ec377e41e74407823c98506fc185d`) stamped as `a1114` / `carbonara` with `--mkinitfs`, pinned in `scripts/check-rebuild.sh`, and packaged into `bananarchy-nokia-argon-a1114-carbonara.zip` (`a42ae7a6484a35b92580d8b9a6cbc58ba605e99d29cc5a353b423a69aa51febb`) and `bananarchy-nokia-beatles-a1114-carbonara.zip` (`463332fa4aeb78349a608d9a15f27c62dbe736129bdd2291b58f3ff1038a0a9f`).
- **Image persistence and upcoming release archives**: rebuilt both `images/bananarchy-nokia-argon.img` (SHA-256 `77a1201a2a93a076a8dd9a6f11c8ceb5f69b94b2ca7abb3dfeba5354b83c034c`) and `images/bananarchy-nokia-beatles.img` (SHA-256 `c027c3151f3cf45e7a067beed77d77ff4a1954ababda6f1a2eba5a02b2414b24`, with standalone `images/boot-bananarchy-nokia-beatles.img` SHA-256 `5a7a391aff3fc8fc95b07b532eedce1ee17991574fb45ca4359c0504aeb82324` and unchanged display lk2nd `b5549698c20f4de7603fc746d32bb5baa96ec377e41e74407823c98506fc185d`) stamped as `a1114` / `carbonara` with `--mkinitfs`, pinned in `scripts/check-rebuild.sh`, and packaged into `bananarchy-nokia-argon-a1114-carbonara.zip` (`a721506d9fd5d50a4f47afa6dc2d24c8bc2335e39bfd6d0873c6d30f4892a8f7`) and `bananarchy-nokia-beatles-a1114-carbonara.zip` (`5bb987e264b684c2afdb2f6d60c4d47864aa772c763ad7527dc6f3fb51b5eb85`).
---