2026-11-10 18:50:56 +02:00
# Bananarchy Linux — agent guide
2026-10-22 09:27:26 +03:00
2026-11-10 18:50:56 +02:00
Keep this file short. Full details live in `README.md` , `MANUAL.md` , `SDK.md` , `CHANGELOG.md` ,
`BATTERY-OPTIMIZATION-ANALYSIS.md` , `bootloader/lk2nd/README.md` , and `scripts/check-rebuild.sh` .
2026-10-22 09:27:26 +03:00
2026-11-10 18:50:56 +02:00
## Project scope
2026-10-22 09:27:26 +03:00
2026-11-10 18:50:56 +02:00
- Bananarchy is an `armv7` Alpine/postmarketOS hardfork for MSM8905/MSM8909 keypad feature phones with 240x320 non-touch
2026-11-15 18:00:10 +02:00
SPI displays: `nokia-argon` , `nokia-beatles` , `nokia-coconut` , `nokia-sparkler` , and `nokia-leo` .
2026-11-10 18:50:56 +02:00
- The stack is X11-only: Xlibre, patched `sxmo-de-dwm` , preloaded C/C++ DWM plugins, NeoUI, `fcitx5-t9` , and Adreno 304
Glamor/DRI3/GLX over `panel-mipi-dbi` . No Wayland compositor, backend, or viewer is shipped.
2026-11-12 12:09:46 +02:00
- Design targets are keypad-first 240x320 UI, <2 ms wake latency, and <95 MB idle RAM on 512 MB devices. The current
2026-11-23 15:26:56 +02:00
public release is `a1120` / `cocojamboo` and the upcoming target build is `a1125` / `ampere` ; `scripts/version.sh` and
`scripts/check-rebuild.sh` are authoritative.
2026-10-22 09:27:26 +03:00
2026-11-10 18:50:56 +02:00
## Source of truth and workflow
2026-11-09 22:50:51 +02:00
2026-11-10 18:50:56 +02:00
- Treat `prebuilt/` as the single source of truth for compiled artifacts and `scripts/rootfs-packages.txt` as the single
source of truth for packages. `overlay/rootfs/` is a generated mirror; never hand-edit binaries there. Run
`./scripts/sync-prebuilt-overlay.sh` after artifact changes.
- Treat `images/` , `rootfs/` , and build caches as local, gitignored outputs. Clean clones rebuild them from source;
`scripts/check-rebuild.sh` pins physically verified hashes only when those local artifacts exist.
- Run `./scripts/check-rebuild.sh` , relevant `scripts/test-*.py` tests, `./scripts/sync-prebuilt-overlay.sh --check` ,
and `git diff --check` before claiming a source, artifact, docs, or release change is complete.
- Cross-compile inside rootless Docker. Main builders are `scripts/build-sxmo-x11.sh` , `build-dmenu.sh` ,
2026-11-16 11:45:38 +02:00
`build-dwm-plugins.sh` , `build-bananarchy-daemons.sh` , `build-kernel-audio.sh` , `build-lk2nd-beatles.sh` , `build-lk2nd-coconut.sh` , `build-lk2nd-sparkler.sh` , `build-games.sh` ,
2026-11-10 18:50:56 +02:00
`build-fcitx5-t9.sh` , and `build-xlibre.sh` .
2026-11-14 10:57:29 +02:00
- Use `scripts/build-dmenu.sh` for dmenu-only changes and `scripts/build-dwm-plugins.sh` for NeoUI/plugin rebuilds. Do
not run a full `build-sxmo-x11.sh` casually: the shipped `dwm` binary contains cover IPC strings absent from source,
so a full rebuild drifts `dwm` ; restore or reconcile it.
2026-11-10 18:50:56 +02:00
- Rootfs/image tools are `scripts/bootstrap-rootfs.sh` , `scripts/apply-bananarchy-overlay.sh` ,
`scripts/compile-gsettings-schemas.sh` , `rebuild-image.sh` , `scripts/sync-beatles-bootfs.py --check` ,
`prepare-release.sh` , and `flash-edl.sh` .
2026-11-23 15:26:56 +02:00
- Rebuild the target images for upcoming build `a1125` / `ampere` with
`BANANARCHY_VERSION=a1125 BANANARCHY_CODENAME=ampere ./rebuild-image.sh nokia-argon --mkinitfs` ,
`BANANARCHY_VERSION=a1125 BANANARCHY_CODENAME=ampere ./rebuild-image.sh nokia-beatles --mkinitfs` ,
`BANANARCHY_VERSION=a1125 BANANARCHY_CODENAME=ampere ./rebuild-image.sh nokia-coconut --mkinitfs` , and
`BANANARCHY_VERSION=a1125 BANANARCHY_CODENAME=ampere ./rebuild-image.sh nokia-sparkler --mkinitfs` , and package
release archives with `BANANARCHY_VERSION=a1125 BANANARCHY_CODENAME=ampere ./prepare-release.sh <target>` . After a
2026-11-15 18:00:10 +02:00
verified rebuild, update the pinned hashes in `scripts/check-rebuild.sh` and `CHANGELOG.md` ; verify with `e2fsck -fn` ,
`debugfs` , bootfs sync, artifact sync, and `check-rebuild.sh` .
2026-11-10 18:50:56 +02:00
- Do not push to `origin` unless explicitly requested. Do not update pinned hashes or release claims without actual
verification.
2026-10-22 09:27:26 +03:00
2026-11-10 18:50:56 +02:00
## Critical invariants
2026-11-09 22:50:51 +02:00
2026-11-17 11:30:42 +02:00
- Bluetooth requires `ControllerMode = dual` , `PairableTimeout = 0` , and `Class = 0x5a020c` (`btmgmt -i hci0 class 2 3` ,
`bredr on` , `ssp on` , `linksec on` , `bondable on` , `advertising off` , `le on` ) in `etc/bluetooth/main.conf` and
`bananarchy-bt-le-enable.sh` ; BlueZ 5.87 rejects LE-only HOGP in `bredr` mode, and `a2dp_source` must stay out of
`50-bluetooth.conf` so paired Android phones recognize Object Push rather than an audio sink. Keep `UserspaceHID=true` ,
`LEAutoSecurity=true` , `ClassicBondedOnly=false` , and `IdleTimeout=0` in `input.conf` . `bananarchy-bt-obex` must register
a persistent `"KeyboardDisplay"` `Agent1` (never `"NoInputNoOutput"` ) with `/run/bananarchy/bt-obex/pair_{prompt,decision}.tsv`
and `xnetworks` `BtPairingPrompt` UI (auto-confirming Classic Audio headsets, prompting user confirmation/PIN/passkey
for phones/keyboards, `50 s` `Pair` timeout, `--async-ui` non-blocking operations, phone `is_phone_or_computer_props` vs
audio separation), power on, enable LE/SSP, select the LE bearer (`PreferredBearer = "le"` ) for HID-over-GATT devices,
select the BR/EDR bearer (`PreferredBearer = "bredr"` , public address preference, `ConnectProfile` fallback) for
Classic Audio / dual-mode BT 5.x/6.x headsets, pair unbonded devices, forward `(AVRCP)` media keys to `xmusic` ,
handle both L2CAP `SOCK_SEQPACKET` and RFCOMM via `ObexPacketReader` with `xnetworks` incoming confirmation / target
folder (`~/.config/sxmo/bt_obex_dir` ) IPC, and keep discoverability hidden-by-default with a 60 s timeout
(`bt_discoverable=0` , never `discoverable-timeout 0` ). Keep all four `50-bluetooth.conf` copies synced with
`bluez5.roles = [ a2dp_sink hsp_hs hfp_hf ]` , `bluez5.enable-msbc = false` , `bluez5.enable-lc3-a127 = false` ,
`bluez5.dummy-avrcp-player = true` , and `bluez5.a2dp.ldac.quality = "auto"` (no `a2dp_source` , `bap_*` , `hsp_ag` ,
`hfp_ag` , or `lc3` — WCN3620 SCO routes internally at 8 kHz CVSD to QDSP6 `INTERNAL_BT_SCO_RX` /`TX` ).
2026-11-18 06:34:13 +02:00
Keep `etc/conf.d/bluetooth` (`supervisor=supervise-daemon` , `retry="TERM/3/KILL/1"` ,
`--noplugin=hfp,bap,bass,mcp,vcp,micp,csip,ccp,tmap,gmap,asha,midi,neard` ), exclude gateway UUIDs
(`0000111f-` /`00001112-` /`0000110a-` ) from `ReconnectUUIDs` , keep `duplicate-data off` in `bananarchy-bt-scan.sh` ,
cleanly disconnect/`btmgmt power off` in `sxmo_bluetoothtoggle.sh off` , and use `bananarchy-bt-obex` 's single-shot
`ObjectManager` cache (`/run/bananarchy/bt-obex/bt_state.tsv` + `dump-state` , filtering `EPHEMERAL_DEV_PROPS` ) in
`networks.so` instead of per-device `bluetoothctl` storms so `bluetoothd` never enters EOF/dual-bearer busy loops.
2026-11-17 11:30:42 +02:00
`util-linux-misc` and `bluez-btmgmt` support the live PTY scan wrapper; guard `scripts/test-bluetooth-{hid,scan,live-scan,headset,obex}.py` .
2026-11-10 18:50:56 +02:00
- WebKit requires explicit `glib` and `gsettings-desktop-schemas` packages. Because apk uses `--no-scripts` ,
`apply-bananarchy-overlay.sh` must run `compile-gsettings-schemas.sh` ; without `gschemas.compiled` , the WebKit network
process aborts. Keep the Webarchy renderer fallback.
- Do not change `CONFIG_PREEMPT*` , `CONFIG_PM_SLEEP` /`CONFIG_SUSPEND` , `CONFIG_SMP` , `CONFIG_MODVERSIONS` ,
`CONFIG_MODULE_UNLOAD` , `CONFIG_ENERGY_MODEL` , `CONFIG_PERF_EVENTS` , `CONFIG_FUNCTION_GRAPH_TRACER` , or `CONFIG_HZ`
without rebuilding every pmaports module. `CONFIG_SUSPEND` stays off; deep suspend and long-lived pollers are
intentionally not planned.
- Keep package and image hygiene: no top-level Rust packages such as `sudo-rs` , no Wayland UI, no on-device compiler
(`gcc` , `g++` , `musl-dev` , `make` ), no Janet runtime, no target `pkill` dependency, no `apk` call after
`rebuild-image.sh` strips caches, and no `__pycache__` under `overlay/rootfs/` .
- Keep the core tools and runtime dependencies guarded by `check-rebuild.sh` . On-device scripting uses the Yabasic FFI
SDK, so `yabasic` , `libffi` , `libneoui.so` , and `libcurl.so.4` must remain; Perl, Lua, optional Tcl extensions, and
the sqlite CLI stay excluded.
- Keep power/network behaviour event-driven: `superctl disable sxmo_networkmonitor` , no long `nmcli device monitor` , no
infinite wakelocks, no forced `sxmo.noidle` /`sxmo.nosuspend` , lz4 zram via `/usr/bin/zramstart` , and
2026-11-18 13:12:11 +02:00
`vm.compaction_proactiveness=0` . Keep `rc-manager=file` + `dns=dnsmasq` in `20-bananarchy-dns.conf` , baseline
`overlay/rootfs/etc/resolv.conf` , `0600` `USB_Networking.nmconnection` (`never-default=true` , `ignore-auto-dns=true` ),
`loopback` in `boot` , non-blocking `50-dns-filter.sh` (`dhcp4-change` /`dhcp6-change` /`dns-change` , no `logger -i` or
`sleep` loops), non-leaking VPN `/etc/resolv.conf` pinning (`bananarchy-privacy-ctl sync-dns` without `127.0.0.1` ), and
`scripts/test-dns-resolution.py` . GPS resolves through `bananarchy-gps-modem.sh` , never `mmcli -m any` .
2026-11-13 18:23:14 +02:00
- Keep idle and autostart daemons as compiled C ARM ELF binaries (`bananarchy-lid` , `bananarchy-cover-idle` ,
`bananarchy-volume-keys` , `bananarchy-dsds` , `bananarchy-modemmonitor` , `bananarchy-soundmonitor` ,
2026-11-20 19:18:58 +02:00
`bananarchy-notifmonitor` , `bananarchy-run-aligned` , `bananarchy-session-loop` , `bananarchy-imsctl` ,
`bananarchy-imsd` ) alongside `bananarchy-vowifi` , not Python or `/bin/sh` loops.
2026-11-13 18:23:14 +02:00
Preserve `/run/bananarchy/lid-state` , the cover socket protocol, `FBIOBLANK` , cover diagnostics,
2026-11-21 11:05:22 +02:00
`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` ,
2026-11-15 14:46:50 +02:00
`scripts/test-dsds-daemon.py` , and `scripts/test-standby-power-policy.py` .
2026-11-20 19:18:58 +02:00
- Keep IMS, VoLTE, VoWiFi, and mobile data (`wwan0` ) invariants: `/etc/bananarchy/ims.conf` must ship with `volte_mode=auto` and
2026-11-21 11:05:22 +02:00
`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` .
2026-11-15 14:46:50 +02:00
- 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`
2026-11-23 17:04:25 +02:00
`vmmc` /`vqmmc` `set_load` (`200 mA` / `20 mA` HPM in `sdhci_msm_register_vreg()` , `sdhci_msm_set_vmmc()` , `msm_toggle_vqmmc()` , and `sdhci_msm_runtime_resume()` ; `2 mA` / `0 mA` LPM in `sdhci_msm_runtime_suspend()` , paired with `regulator-allow-set-load;` on `l8` /`l11` /`l12` and `2.95 V` min/max `<0x2d0370>` on `l11` across DTS/DTBs with no static `regulator-system-load` on `l11` ), removable-SD-only `MMC_CAP_AGGRESSIVE_PM` (without `MMC_CAP2_FULL_PWR_CYCLE` ) + `pm_runtime_get_sync()` before `sdhci_remove_host()` in `sdhci-msm` , `qcom_q6v5_mss` `"mem"` in `proxy_clk_names` , `gcc_mss_q6_bimc_axi_clk` on `gcc_xo_data` with bootloader `0x45000 BIT(2)` cleared in `gcc_msm8909_probe()` , `opp-99999975` (`100 MHz` dark floor) across `qcom-msm8909.dtsi` and all 6 DTS files, and `msm8905-cam.c` RPM `l6` /`l17`
2026-11-15 14:46:50 +02:00
regulator consumer voting (`regulator_get_optional` , never raw APSS SPMI writes on RPM LDOs).
2026-11-10 18:50:56 +02:00
- 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
startup keyboard-grab cleanup without a background poller.
- Draw Pango/Xft wrapped text line by line with clipping and matching render rows for link focus. Use `smsTextMetrics()`
for GSM-7/UCS-2 accounting; strip `[SIM n]` tags with `parseSmsHeaderLine()` and never write them back to `sms.txt` .
2026-11-09 22:50:51 +02:00
2026-11-10 18:50:56 +02:00
## Hardware and release caveats
- The shipping 2720 Flip DTS/DTB is single-panel. The two-panel `/dev/fb1` layout is opt-in via
`scripts/build-beatles-cover-panel.py` ; rollback is `scripts/build-beatles-no-cover-dtb.py` . Do not make it default
2026-11-10 23:20:13 +02:00
until gpio13 mux polarity and gpio21/gpio23 routing are physically probed: a live test darkened both screens.
gpio13 polarity is now TE-probed (high = cover, low = internal), but the two-panel DT remains opt-in.
The shipping image drives the external GC9305 through the kernel `panel-mipi-dbi-spi` driver while the flip is
**closed only** (`bananarchy-cover-idle` ); never claim gpio13/23 or send cover SPI traffic while the flip is open,
gate initial activation on the main panel being DPMS-off, and always restore the mux on `LID OPEN` .
2026-11-11 14:20:42 +02:00
- The KaiOS 3.10 DTS and kernel driver give both panels shared CS0, gpio110 D/C and one active-high PMIC MPP2 PWM
backlight (`kernel_backlight_invert = 0` , `kernel_backlight_level = 14` ); gpio21 is TE and gpio23 is the external
reset. Because the internal 240x320 TN panel is normally-white while the external 240x240 panel is normally-black,
`cover_kernel_draw` wakes DRM with gpio13 low, paints the internal panel solid black via an X11 `override_redirect`
cover window plus `/dev/fb0` , and leaves the internal GC9305 scanning black GRAM (`kernel_internal_sleep = 0` )
behind gpio13 high so it blocks the shared backlight while the cover is lit. Keep the exact vendor external init
firmware, the debugfs command replay, the gpio23 reset pulse, `/run/bananarchy/cover-backlight` (`0` = GRAM prep
dark, `1` = cover lit, absent = dark/DPMS Off), `kernel_power_sync_helper` and `/run/bananarchy/cover-bl-force` .
Plain udev events must stay idempotent; only the daemon's `force` mode may do the two-step PWM update, and every
`xset dpms force` call must be bounded with `timeout 1` or a hung X client will flicker the active panel. On open,
restore gpio13 low, duty 14, `bl_power=0` , DPMS On and re-init the internal panel. The legacy 8-bit/9-bit userspace
paths, `PROBE` and `bananarchy-cover-probe.sh` remain rollback/sign-off tooling. `SET mux_closed_level 0` selects the
internal panel, not the cover; `SET kernel_backlight_invert 0|1` and `SET kernel_internal_sleep 0|1` remain runtime
knobs.
2026-11-10 18:50:56 +02:00
- Keep the internal beatles panel at 25 MHz, `dc_gpio = -1` for the spidev fallback, external-panel firmware and
2026-11-15 14:46:50 +02:00
initramfs module lists, `/etc/boot-deploy/hooks/10-initramfs-depmod.sh` (per-initramfs `depmod -b` ), `.ko.zst` -only
module installs, the Xorg `card0` pin, `bananarchy-cover-diagnose.sh` , and the
2026-11-10 19:41:57 +02:00
`scripts/test-cover-dt.py` / `scripts/test-cover-spidev.py` guards.
2026-11-10 23:20:13 +02:00
- The shipping cover backend is `backend = kernel` : keep `bananarchy-cover-dpms.sh reinit` , the gpio13 mux claim,
2026-11-11 14:20:42 +02:00
the centered 240x240 X11/`/dev/fb0` cover frame, the 1 s repaint against Xorg, `kernel_backlight_invert = 0` ,
2026-11-15 14:46:50 +02:00
`kernel_internal_sleep = 0` , `kernel_backlight_level = 14` , shared **Config -> Screen blank** timeout reload (`wake_blank_timeout = 8` for passive wakes),
2026-11-14 10:57:29 +02:00
closed-flip `CALL` cover UI (`cover_hold_awake` , `BUTTON VOLUP` /`VOLDOWN` -> `mute-ring` , `BUTTON POWER` -> `hangup-call` ,
delayed `CALL muted` guard), clean `SIGTERM` cover blanking, live timezone refresh (`ba_refresh_tz` / `REFRESH` ),
`scripts/test-cover-kernel.py` , `scripts/test-time-timezone-sync.py` , and the `spidev` /`fb` /`none` rollback backends.
2026-11-11 07:57:38 +02:00
The daemon must restore the internal panel on `LID OPEN` even after a stale high gpio13 survives a restart.
2026-11-10 20:23:06 +02:00
- Keep the 2720 Flip lid handling event-driven and instant: sticky hall state, immediate hall re-read on `EV_SW`
2026-11-11 14:20:42 +02:00
edges, 20 ms debounce, `SW_LID` mirroring (`sync_sw_lid` ) so `dwm` tracks the hall sensor, and synchronous
lid-state/lock/backlight/DPMS writes in `bananarchy-lid.c` . Closing locks
2026-11-14 10:57:29 +02:00
the desktop; opening must keep the lock flag and wake to the passcode lockscreen (never auto-unlock) while sending
`RAISE` to `callscreen` and keeping `sxmo_hook_lock.sh` / `locker.so` from hanging up incoming/active calls (`UNGRAB` ).
Every main-panel wake path must call `bananarchy-lid-gate.sh` ; a closed flip may only light the cover.
2026-11-11 14:20:42 +02:00
`sxmo_state.sh set unlock` is gated too because `dwm` calls it directly. `apply-bananarchy-overlay.sh` writes
`/usr/share/bananarchy/lid-profile` per target (`slider` on `nokia-argon` , `flip` on `nokia-beatles` , `none`
elsewhere) and disables `bananarchy-{lid,cover-display,volume-keys}` , cover udev/config, and mux modprobes on
non-flip builds so `nokia-argon` keeps pure sliding-lid behaviour. Guard `scripts/test-lid-gate.py` .
2026-11-10 18:50:56 +02:00
- Build the lk2nd display image from pinned `bootloader/lk2nd/nokia-beatles.patch` . Exact stock IDs, 512 MiB memory
2026-11-18 08:55:44 +02:00
fallback, appended DTB, `quiet splash` , and the low-bit reboot cookie matter; keep `lk2nd/device/menu/menu.c` free of
`LK2ND_VERSION` boot/Fastboot screen text and keep `LK2ND_VERSION` OS-version-neutral across
`scripts/build-lk2nd-{beatles,coconut,sparkler}.sh` . `check-lk2nd-{beatles,coconut,sparkler}.py` ,
`test-lk2nd-{beatles,coconut,sparkler}-port.py` , `check-beatles-bootimg.py` , `sync-beatles-bootfs.py --check` , and
`check-rebuild.sh` guard the boot chain.
2026-11-10 18:50:56 +02:00
- Flash with `flash-edl.py` 's default `--method lk2nd` ; stock `system` is wiped by default, so
recovery-mode 2720 boots need Volume Up. Keep the signed per-device Firehose programmers and do not mix them.
- Keep first-boot access intact: `keys/phone_id_ed25519.pub` for `user` /`root` , PAM/sshd configs, USB-only SSH fallback,
keypad udev/Xorg rules, BusyBox applet lists, and `scripts/set-bananarchy-hostname.sh` .
2026-11-14 10:57:29 +02:00
- The Power menu label is **Reboot to loader** and still calls `sxmo_power.sh bootloader` ; `Logout` is removed from
`dmenu.c` , `dmenu.so` , `sxmo_appmenu.sh` , and `sxmo_hook_contextmenu.sh` . Keep the compact Power menu layout synchronized.
2026-11-24 11:00:06 +02:00
- Keep `quagr` (`quagr.so` / `xquagr` ) receiver autostart strictly gated on `autostart_rx=1` plus a valid Rx passphrase or 64-char hex key, closed-flip `QUAGR` cover alerts dismissing on any side button (`scripts/test-quagr.py` ), `msm8905-cam.c` 180-degree rotation enabled for `nokia,beatles` , `nokia,sparkler` , and `nokia,leo` alongside cached `row_buf` RAW10 demosaic; keep `patches/kernel/0013-msm8909-early-scm-smp-cpufreq.patch` (4-core SMP + `cpufreq` up to `1.267 GHz` ), `patches/kernel/0014-input-core-keypad-debouncer.patch` (ABI-preserving `input_core` `/sys/module/input_core/parameters/key_debounce_ms` debouncer without editing `include/linux/input.h` , `pm8941-pwrkey` chatter holdoff, `col-scan-delay-us = <0x32>` across all 6 DTS/DTBs, `xset r rate 300 25` , `scripts/test-keypad-debouncer.py` ), `patches/kernel/0015-msm8909-wcd-digital-interpolator-cajon-analog.patch` (`REGCACHE_FLAT` 97-register `0x00` `.reg_defaults` without `.volatile_reg` + unconditional `regmap_write_bits` in `probe` /`hw_params` /`enable_interpolator` /`enable_dec` + `msm8916_wcd_digital_force_sync_ctl()` `.use_pmdown_time = 0` `48 kHz` programming in `msm8916-wcd-digital.c` , ADSP `< 2.7` `AFE_PORT_ID_PRIMARY_MI2S_RX` `INT_DIGITAL_CDC_CLK` retention in `q6afe.c` + `q6core_query_versions_locked()` in `q6core.c` , PM8909 `CAJON_2_0` `CDC_A_PERPH_SUBTYPE == 0x0a` non-boost Class-D `0x69` /`0xE9` PA, HPH DAC/PA sequencing, `NCP_FBCTRL = 0xA8` , `NCP_VCTRL = 0xA4` /`0xA7` , `RX_HPH_BIAS_PA = 0xFA` , `SPKR_ANA_BIAS_SET = 0x41` , `s2` wakeup restore without clobbering `SPK DAC Switch` , MBHC `DIG_CLK_CTL_D_MBHC_CLK_EN` + `CDC_A_MASTER_BIAS_CTL = 0x30` idle retention, and `CDC_A_MBHC_RESULT_2` 3/4-pole detection in `msm8916-wcd-analog.c` ), WirePlumber `create-item.lua` + `msm8916-s16le.conf` `item.features.mono = true` (`[ MONO ]` `PortConfig` with `channelmix.normalize = true` ) Speaker/Earpiece stereo-to-mono downmix and `/etc/pipewire/{client,pipewire-pulse}.conf.d/10-bananarchy-audio.conf` (`channelmix.normalize = true` , `dither.method = "triangular"` ), `<= 84` (`0 dB` ) ALSA digital output ceiling with `card0` PipeWire unity sync + `bananarchy-soundmonitor` initial internal sink sync & `iface=CARD` / `drain_jack_events()` coalescing (`scripts/test-audio-quality.py` ), disabled `vibrator@c000` + volume-independent calibrated `157.0 Hz` haptic audio (`sxmo_vibrate.c` , `libpulse` + `SND_PCM_FORMAT_FLOAT_LE` , `HAPTIC_REF_RX3_VOL = 84` ), Sparkler/Leo `157 Hz` LRA media filtering (`highpass=f=260` + `bandreject=f=157` on Speaker + non-speaker `RX3` zeroing in `music.so` , `files.so` , `ringtones.so` , `sxmo_audio.sh` , and Sparkler-only `/etc/mpv/mpv.conf` via `apply-bananarchy-overlay.sh` ), `DEFAULT_USB_TIMEOUT_MS = 30000` (`--usb-timeout` ), and `sxmo_timer.sh` / `dmenu.c` keypad cancellation (`scripts/test-timer.py` , `scripts/test-sparkler-port.py` , `scripts/test-edl-firehose-read.py` , `scripts/test-quagr.py` ).
2026-11-10 18:50:56 +02:00
- Bluetooth HOGP config and plugin load are verified, but full hardware sign-off still needs a wake-up paired keyboard
and **Connect Device** to confirm real HID key events.
## Coding and documentation rules
- Use 2-space indentation in C, C++, Python, Yabasic, and shell; tabs only in Makefiles and TSV. No emojis in code, UI
strings, logs, or commit messages; use Nerd Font PUA icons. Use sentence case in all docs.
- Keep `README.md` , `MANUAL.md` , `SDK.md` for API/SDK changes, `CHANGELOG.md` , and this guide synchronized with
user-facing features, keybindings, build changes, and verified image changes. Do not leave third-party `.md` files in
`src/` or `edl/` .
- Treat `.bantam.cfg` as local, gitignored credential data: never read, edit, commit, or unignore it. Keep other
agent scratch files outside the repo.
- Consult `SDK.md` , `MANUAL.md` , `X_KEYPAD_MAPPING.md` , `BATTERY-OPTIMIZATION-ANALYSIS.md` ,
`bootloader/lk2nd/README.md` , and `CHANGELOG.md` for APIs, keymaps, flashing details, power tradeoffs, bootloader
history, and release rationale.