Commit Graph
16 Commits
Author SHA1 Message Date
Luxferre 5d427e39ab Implement 0014 keypad debouncer, Sparkler LRA filter, standby fixes, and stage a1125 (ampere)
- Extend 0012 standby optimizations with removable-SD-only MMC_CAP_AGGRESSIVE_PM | MMC_CAP2_FULL_PWR_CYCLE in sdhci-msm, proxy mem clock and BIMC XO re-parenting + 0x45000 BIT(2) early-vote clear in qcom_q6v5_mss / gcc-msm8909, 100 MHz opp-99999975 floor across qcom-msm8909.dtsi and all 6 device DTS/DTBs, disabled-by-default Bluetooth with bt_enabled persistence, NM ipv6.method=ignore + standby wlan0/disable_ipv6 muting, and post-park DSDS signal hysteresis

- Add ABI-preserving system-core keypad debouncer patch 0014 (drivers/input/input.c key_debounce_ms + pm8941-pwrkey press/release chatter holdoff), replace ignored col-scan-delay-ms with col-scan-delay-us = <0x32> and raise DT debounce intervals across all 6 DTS/DTBs, configure per-target key_debounce_ms at boot and xset r rate 300 25, and add C/DTS verification in scripts/test-keypad-debouncer.py

- Isolate Nokia 8000 4G (nokia-sparkler / nokia-leo) media playback from the shared 157 Hz SPK_DRV vibrator channel via dynamic Speaker-only filtering in music.so, files.so, and ringtones.so, explicit RX3/SPK mixer zeroing on Earpiece/Headphones/Bluetooth routes in sxmo_audio.sh and preview plugins, and Sparkler/Leo-only /etc/mpv/mpv.conf provisioning

- Register upcoming build a1125 (ampere) in scripts/version.sh, scripts/check-rebuild.sh, AGENTS.md, and CHANGELOG.md, fix --for-rebuild pre-rebuild stale output checks in check-rebuild.sh/test-cover-dt.py, rebuild vmlinuz/DTBs/plugins and all 4 --mkinitfs target images stamped a1125 (ampere), and pin their verified SHA-256 checksums
2026-11-23 15:26:56 +02:00
Luxferre 601aaca25c Fix mmc1 microSD initialization with sdhci-msm HPM/LPM regulator_set_load
- Update drivers/mmc/host/sdhci-msm.c in patch 0012 so
  sdhci_msm_register_vreg(), sdhci_msm_set_vmmc(), msm_toggle_vqmmc(),
  and sdhci_msm_runtime_resume() vote 200 mA vmmc / 20 mA vqmmc HPM
  loads during probe, card init, and UHS-I tuning while
  sdhci_msm_runtime_suspend() drops vmmc/vqmmc to 2 mA / 0 mA LPM
- Rebuild vmlinuz/modules/DTBs via scripts/build-kernel-audio.sh and
  sync prebuilt/ and overlay/rootfs/ artifacts
- Guard sdhci-msm regulator_set_load hunks in scripts/check-rebuild.sh,
  document the fix in BATTERY-OPTIMIZATION-ANALYSIS.md, AGENTS.md, and
  Unreleased CHANGELOG.md notes, and update rebuilt --mkinitfs image
  SHA-256 checksums across all four targets (verified live on Nokia 2720)
2026-11-21 12:48:05 +02:00
Luxferre c9eb28b891 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)
2026-11-21 11:05:22 +02:00
Luxferre d7992904bf Bring up nokia-sparkler SMP/cpufreq/lk2nd/cam/haptics, fix timer and EDL USB timeout
- Add 0013 early-SCM 4-core SMP + cpufreq kernel patch and clock-frequency DT nodes
- Complete nokia-sparkler lk2nd port, boot/X11 session startup, 180-deg cached camera, and 157 Hz haptic audio
- Replace root-only timer backend with permissionless sxmo_timer.sh and keypad/hook cancellation
- Fix EDL Firehose rawmode ACK, USB active-config preservation, *+# hint, and 30 s default USB timeout
- Sync a1120 (cocojamboo) prebuilts, docs, tests, and verified checksums in check-rebuild.sh
2026-11-16 11:45:38 +02:00
Luxferre ab53423e33 Port Nokia 800 Tough (nokia-coconut), fix microSD detection, and stage upcoming a1120 (cocojamboo) build
- Migrate nokia-tough to canonical nokia-coconut while keeping CLI aliases, add layered bootloader/lk2nd/nokia-coconut.patch, bootfs/bootimg validators, and offline scripts/inspect-stock-msm8905-dump.py

- Complete nokia-coconut Stage 2 hardware bring-up: wire 6-column 22-key keypad (gpio0, gpio3, gpio7, gpio99, gpio6, gpio1), gpio98 KEY_POWER, and pon@800:resin KEY_DOWN (0x6c); split leds-msm8905-torch into GPIO_13 white:torch (dedicated top-edge flashlight) and GPIO_32 camera:flash (rear camera flash for camera.so and bananarchy-photo)

- Restore sdhci@7864000 non-removable across all six DTS/DTB targets, remove unwired gpio38 cd-gpios/sdc2-cd-* states, and harden sxmo_sdcard.sh under flock

- Register upcoming build a1120 (cocojamboo) in scripts/version.sh, scripts/check-rebuild.sh, CHANGELOG.md, AGENTS.md, README.md, and MANUAL.md with verified hashes across nokia-argon, nokia-beatles, and nokia-coconut
2026-11-15 18:00:10 +02:00
Luxferre fc5c4282f5 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.
2026-11-15 14:46:50 +02:00
Luxferre 786480a08f Implement 0011 boot ICC, OPP latency, USB PHY, Q6ASM/ALSA, and ZRAM fixes
- Add patches/kernel/0011-msm8909-boot-icc-opp-usb-audio-fixes.patch and update all six standalone device DTS files: mark XPU-restricted MSM8909 PCNOC interconnect nodes ap_owned with NOC_QOS_MODE_INVALID to clear -ENXIO errors, move clock-latency-ns onto each CPU opp child node so cpuinfo_transition_latency reports 100 us instead of CPUFREQ_ETERNAL (6.44 s schedutil rate limit), convert qcom-cpufreq-nvmem OPP deferrals to dev_err_probe, guard fixed 3.075 V pm8909_l13 in phy-qcom-usb-hs, handle async WRITE_V2/READ_V2 and synchronous EOS APR responses in q6asm, and disable unrouted dai-link-multimedia3 while setting q6voice_device=3 for shifted VoiceMMode1 (hw:0,3).
- Restore /bin, /usr/bin, and /usr/sbin BusyBox applet symlinks (excluding pkill) in apply-bananarchy-overlay.sh, size /dev/zram0 from /proc/meminfo in zramstart, guard "/" D-Bus object paths in NetworkManager 50-dns-filter.sh, sync schedutil rate_limit_us in bananarchy-display-power-sync, replace remaining pkill/pgrep -f uses in X11/hook/modem scripts, and clean temporary AT response files via trap in msm-modem-uim-selection.
- Verify live after reboot on nokia-argon, rebuild a1114 (carbonara) images/archives for nokia-argon and nokia-beatles with e2fsck/debugfs and check-rebuild.sh guards, and update pinned hashes in scripts/check-rebuild.sh and CHANGELOG.md.
2026-11-13 21:27:41 +02:00
Luxferre 2ae4ef34a2 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.
2026-11-13 18:23:14 +02:00
Luxferre 96c66bf0c6 Implement 0009 deep-standby SoC rail, RPM handoff, USB PHY, Wi-Fi BET, and drm_mipi_dbi fixes
- Enable CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT=y and lower 200 MHz CPU OPP opp-peak-kBps to 0x25800 (19.2 MHz BIMC XO floor) across all six MSM8905/MSM8909 DTS files so rpmpd_sync_state and icc_sync_state complete despite driverless /cpus nodes.
- Add patches/kernel/0009-msm8909-deep-standby-rpm-usb-wifi-ddr.patch: late_initcall_sync(rpm_smd_clk_late_cleanup) to drop active votes on unclaimed QDSS/QPIC clocks and clear RPM SLEEP_STATE boot handoff votes, ChipIdea ci_hdrc_msm/core unplugged USB HS PHY shutdown + 200 ms autosuspend, and wcn36xx BET + multicast filter + HOST_SUSPEND_IND/HOST_RESUME_REQ in screen_off_offload.
- Build and export drivers/gpu/drm/drm_mipi_dbi.ko.zst alongside panel-mipi-dbi.ko.zst in build-kernel-audio.sh, rebuild-image.sh, apply-bananarchy-overlay.sh, and check-rebuild.sh.
- Rebuild and verify a1114 (carbonara) images/archives for nokia-argon and nokia-beatles and update BATTERY-OPTIMIZATION-ANALYSIS.md, CHANGELOG.md, and pinned hashes in check-rebuild.sh.
2026-11-13 09:08:24 +02:00
Luxferre c95a84c69c Implement deep-standby RPM interconnect, Wi-Fi, USB, DSDS, and panel power savings for a1114
- Enable MSM8909 SMD RPM interconnect scaling (BIMC, PCNOC, SNOC) with 19.2 MHz active floor, zero sleep-set vote clearing clk_smd_rpm_handoff, and CPU OPP bandwidth tables across all six MSM8905/MSM8909 device trees while preserving module vermagic

- Sync wcn36xx conf.listen_interval and expose live screen_off_offload (ARP, IPv6 NS, GTK, ignore_dtim, 40 ms dynamic PS) toggled by bananarchy-display-power-sync without wlan_host_suspend_ind

- Add runtime PM clock gating to ci_hdrc_msm when USB is unplugged while skipping viewport ULPI_SYNC_STATE polling under CI_HDRC_OVERRIDE_PHY_CONTROL

- Default MODEM_DRX_MODE=6 across all /dev/wwan0at* channels with flock serialization, post-probe boot retry, and modem-ready registration hooks, and quiesce dsds-daemon polling whenever the screen is dark

- Issue MIPI DCS DISPLAY_OFF and SLEEP_IN in panel-mipi-dbi on DPMS off while preserving the 2720 Flip closed-only kernel cover backend, and update pinned a1114 (carbonara) hashes and docs
2026-11-12 19:06:28 +02:00
Luxferre a7b1a75465 Gate the two-panel DT behind an opt-in build after live phone regression 2026-11-10 14:53:47 +02:00
Luxferre 7c52d616e7 Enable the 2720 Flip external panel and rebuild its DTB 2026-11-10 14:05:23 +02:00
Luxferre a4f2051d50 Fix 2720 hardware support and streamline changelog 2026-11-10 08:38:40 +02:00
Luxferre 1c011b360a Finalize verified 2720 Flip release source and untrack image outputs 2026-11-09 23:04:13 +02:00
Bantam 0dbb37fba3 Fix unbootable image: restore kernel/module ABI compatibility
The previous battery pass rebuilt the kernel image from a retuned config and
produced an image stuck on the lk2nd logo. Two incompatibilities with the
linux-postmarketos-qcom-msm8916 module tree (which this repo does not rebuild)
were identified:

1. Vermagic: CONFIG_PREEMPT_VOLUNTARY removes CONFIG_PREEMPT_BUILD, so the
   rebuilt kernel reported "6.12.1-msm8916 SMP mod_unload ARMv7 p2v8" while
   every package module reports "6.12.1-msm8916 SMP preempt mod_unload ARMv7
   p2v8". modprobe refuses all of them, including panel-mipi-dbi, so the
   display never initialises.
2. Struct layout: CONFIG_SUSPEND selects CONFIG_PM_SLEEP, which adds fields to
   struct dev_pm_info. Modules built without it use wrong dev->power offsets,
   so matching vermagic alone is not enough.

Restored the known-good kernel config, the serial-console cmdline and the DTB
wakeup-source additions. The kernel image is still cross-compiled by
build-kernel-audio.sh but from the original config, so vermagic and struct
layouts match every module in the rootfs. Reverted the config-level items K1,
K6, K7, K8, K13 and K14; implementing them requires vendoring and rebuilding
the entire pmaports kernel module tree.

Kept: K2 clock-latency-ns, K3/K4/K5 via patch 0006 (rebuilt with the original
config), K10 IPv6 sysctl, and all U1-U14 userspace changes.

Rebuilt the kernel image/modules/DTBs and images/bananarchy-nokia-argon.img
with --mkinitfs. Verified: all modules (package + rebuilt) now report identical
vermagic, boot.img contains the new zImage + DTB byte-for-byte, the console
cmdline is restored, check-rebuild.sh passes and artifact drift is 0.

Docs: CHANGELOG.md (recovery section), MANUAL.md, README.md, AGENTS.md,
BATTERY-OPTIMIZATION-ANALYSIS.md (section 11).
2026-11-07 17:32:03 +02:00
Bantam ad3461babf Measurement-corrected battery optimization pass (DSDS + Wi-Fi)
Re-analyzed the running nokia-argon (a1105, 43 h uptime, DSDS + Wi-Fi on) and
implemented the corrected kernel/userspace optimization list. No sleep state
existed at all (/sys/power/state was 0 bytes) and cpuinfo_transition_latency
was UINT_MAX, while the CPU cores were already ~98% power-collapsed.

Kernel (K1-K14)
- Enable CONFIG_SUSPEND / SUSPEND_FREEZER / PM_WAKELOCKS / PM_AUTOSLEEP and
  build the zImage from the tuned config; ship it as overlay/rootfs/boot/vmlinuz
  plus config and System.map. Add wakeup-source to the WCNSS pronto remoteproc.
- Add clock-latency-ns to cpu-opp-table in all 5 device trees (fixes
  CPUFREQ_ETERNAL at its source instead of a userspace rate_limit_us override).
- New patch 0006: wcn36xx keep-alive 30s->120s, listen_interval=3, VM-BMS
  sample interval 10s->30s, power_supply_changed() only on real capacity
  changes, GPU devfreq polling_ms 50->100.
- Retune the config for idle (HZ=100, PREEMPT_VOLUNTARY, TEO cpuidle governor,
  no ftrace/perf/kprobes/BPF-JIT-always-on/debug options, no serial console,
  DRM_FBDEV_OVERALLOC=0, lz4 zram, ENERGY_MODEL) and drop earlycon /
  console=ttyMSM0 from every kernel cmdline.
- net.ipv6.conf.default.disable_ipv6=1 to stop ND/MLD multicast on new
  interfaces; keep NETFILTER/IPV6/CGROUPS and FRAMEBUFFER_CONSOLE for
  VPN/tethering, elogind and plymouth.

Userspace (U1-U14)
- Idle blanking without the passcode locker (bananarchy-idle-blank.sh +
  idle_locker resume hook, SXMO_UNLOCK_IDLE_TIME=60, sxmo.noidle opts out).
- Guarded deep standby (bananarchy-suspend.sh / -deep-standby.sh /
  sxmo_autosuspend.sh / sxmo_suspend.sh), AllowSuspend=yes, doas rule, no
  infinite wakelock, no sxmo.nosuspend. Shipped disabled via
  /etc/bananarchy-no-deep-standby until the new kernel is boot-tested; freeze
  is preferred, mem is opt-in.
- statusbar_periodics 60s->300s, no mmcli/nmcli/rfkill polls, xsetroot only on
  change; battery udev rule filtered and no 2 s recheck fork.
- On-demand QMI DPM port, longer DSDS/modemmonitor backoffs, chrony long polls,
  NM wifi.scan-interval=600, bluetooth AutoEnable=false, tmpfs on /tmp,
  zero-log superd, GPU devfreq governor on screen-off, longer SIP/Tox timers.
- Fix the cosmetic wpa_supplicant yesno typo; withdraw the disproven duplicate
  wpa_supplicant and soundmonitor 5 s loop items.

Rebuilt images/bananarchy-nokia-argon.img with --mkinitfs: boot.img contains
the new zImage + DTB byte-for-byte and no serial-console cmdline. Deployed the
userspace overlay to the connected phone and verified shell/Python syntax, the
idle-blank round trip, the statusbar hook and the deep-standby guard.
check-rebuild.sh and sync-prebuilt-overlay.sh --check both pass.

Docs: BATTERY-OPTIMIZATION-ANALYSIS.md (measurement-corrected, with
implementation status), CHANGELOG.md, MANUAL.md, README.md, AGENTS.md.
2026-11-07 17:03:12 +02:00