Two issues reported after the recovery image booted:
1. Pressing the power key turned the screen on and immediately back off.
Root cause: U1 used sxmo_idle.sh + xprintidle, but dwm consumes keypad
events at the evdev level before X sees them, so the X idle counter never
reliably reset and the blank/resume commands raced. Replaced it with a
dwm-native idle timer (src/sxmo-dwm/dwm.c): last_input_ms is updated from
evdev and X key events, poll() is armed with the SXMO_UNLOCK_IDLE_TIME
deadline (default 60 s), bananarchy-idle-blank.sh off fires once, and
wake_phone() clears idle_blanked and resets the timer on the next real key.
sxmo.noidle still disables it; idle_locker was removed from
sxmo_hook_unlock.sh. Added a defensive wake-grace guard to
bananarchy-idle-blank.sh and a /tmp/bananarchy_last_wake timestamp in
sxmo_wm.sh display on so an already-flashed device is fixed too.
2. A PIN on one SIM prevented the other SIM from registering. provision_slot()
tried to bind the preferred slot to primary-gw-provisioning even when its
app was pin1/puk1 or PIN1 state enabled-not-verified, so no session came up
and neither subscription registered. It now detects a locked preferred slot
and falls back to the other ready slot for the primary GW; verify-pin/xmodem
re-run boot after unlock and provision both slots normally.
Verified on the connected phone: all three deployed scripts pass sh -n, all
5 embedded Python heredocs parse, SIM status still reports both slots
registered, and off -> on -> immediate off leaves the screen on (grace guard).
Rebuilt dwm/plugins and images/bananarchy-nokia-argon.img with --mkinitfs;
boot.img still contains the known-good zImage + DTB byte-for-byte.
check-rebuild.sh passes and artifact drift is 0.
Docs: CHANGELOG.md, MANUAL.md, BATTERY-OPTIMIZATION-ANALYSIS.md (section 12).
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.
The expanded xsms conversation view handed the whole message body to
pango_xft_render_layout() as one multiline layout; on the target Pango/Xft
stack that call only paints the first line, so long concatenated/UCS-2
messages (e.g. the Ukrainian 'Мелорінг дарує хіти!' example) stopped right
before the first non-ASCII character. Verified on the connected phone with an
instrumented sms.so (530-byte body, 13 measured lines, one painted line) and
a standalone ARM reproducer; the QMI WMS reassembly and sms.txt parser are
correct.
- Draw message bodies and long drafts line by line via a shared
renderLayoutLines() helper with an Xft clip, so nothing overflows the
bubble or softkey bar; use the same layout width for measuring and drawing.
- Make the selected message scrollable with Up/Down (one line per press plus
a right-edge scrollbar), stepping to the previous/next message only at the
top/bottom of an overflowing message.
- Replace the byte-based compose counter with smsTextMetrics(), which decodes
UTF-8, detects the GSM 7-bit alphabet/extension table and reports GSM-7
septets (160/153) or UCS-2 UTF-16 units (70/67) with the right part count.
- Strip [SIM n] tags from QMI/local SMS log headers and stop writing them in
the offline-send fallback; log units instead of bytes.
- Add a check-rebuild.sh guard against reintroducing the bulk layout render.
- Rebuild prebuilt/overlay sms.so and engmenu.so, sync docs, and regenerate
images/bananarchy-nokia-argon.img.
- Enable GPIO 38 active-low card detect (cd-gpios) with bias-pull-up on
sdhci@7864000 across all MSM8905/MSM8909 device trees and DTBs
- Add sxmo_sdcard.sh and 88-bananarchy-sdcard.rules udev rules for
automatic mounting at /media/sdcard on insertion and cleanup on
removal
- Integrate SD card mount, unmount/eject, and navigation into the GUI
File Manager (files.so) and built-in dmenu SD Card menu (@menu:sdcard)
- Fix msm8916-wcd ALSA UCM2 configs (Earpiece.conf, Speaker.conf,
Headphones.conf, PrimaryMic.conf, HeadsetMic.conf) so Speaker,
Earpiece, and Headphones outputs and Mic1/Headset inputs are always
available and mutually exclusive without invalid mixer controls
- Add event-driven wired headphone/headset jack detection and automatic
audio routing in sxmo_soundmonitor.sh via evtest on the msm8916
Headset Jack input device
- Make Earpiece, Speaker, and Headphones first-class routable output
devices across sxmo_audio.sh, sxmo_modemaudio.sh, xdrawer, dmenu, and
callscreen
- Make volume controls strictly linear across all channels by keeping
PipeWire software gain at unity (100%) when unmuted and linearly
mapping 0-100% to hardware digital volume registers (RX3 for Speaker,
RX1 for Earpiece, RX1+RX2 for Headphones, TX1+ADC for Microphone)