diff --git a/AGENTS.md b/AGENTS.md index 1bd78d5..47bbd81 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,7 +10,7 @@ Keep this file short. Full details live in `README.md`, `MANUAL.md`, `SDK.md`, ` - 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. - Design targets are keypad-first 240x320 UI, <2 ms wake latency, and <95 MB idle RAM on 512 MB devices. The pinned - release is `a1108` / `dejavu`; `scripts/version.sh` and `scripts/check-rebuild.sh` are authoritative. + release is `a1111` / `lennon`; `scripts/version.sh` and `scripts/check-rebuild.sh` are authoritative. ## Source of truth and workflow @@ -30,7 +30,7 @@ Keep this file short. Full details live in `README.md`, `MANUAL.md`, `SDK.md`, ` `scripts/compile-gsettings-schemas.sh`, `rebuild-image.sh`, `scripts/sync-beatles-bootfs.py --check`, `prepare-release.sh`, and `flash-edl.sh`. - Rebuild the verified 2720 image with - `BANANARCHY_VERSION=a1108 BANANARCHY_CODENAME=dejavu ./rebuild-image.sh nokia-beatles`. After a verified rebuild, + `BANANARCHY_VERSION=a1111 BANANARCHY_CODENAME=lennon ./rebuild-image.sh nokia-beatles`. After a verified rebuild, update the raw hash in `scripts/check-rebuild.sh` and `CHANGELOG.md`; verify with `e2fsck -fn`, `debugfs`, bootfs sync, artifact sync, and `check-rebuild.sh`. - Do not push to `origin` unless explicitly requested. Do not update pinned hashes or release claims without actual @@ -76,28 +76,37 @@ Keep this file short. Full details live in `README.md`, `MANUAL.md`, `SDK.md`, ` 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`. -- The KaiOS 3.10 DTS gives both panels shared CS0, gpio110 D/C and one PWM backlight; gpio21 is TE and gpio23 is the - external reset. The shared PWM is active-low for the cover and active-high for the main panel: duty 0 lights the - cover, duty 14 lights the internal panel. Keep the exact vendor external init firmware, the debugfs command replay, - the gpio23 reset pulse, `/run/bananarchy/cover-backlight` (`1` = cover lit, `0` = cover dark), - `kernel_power_sync_helper` and the `/run/bananarchy/cover-bl-force` nested-udev guard. 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; use - `SET kernel_backlight_invert 0|1` only if a unit's backlight polarity differs. +- 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. - Keep the internal beatles panel at 25 MHz, `dc_gpio = -1` for the spidev fallback, external-panel firmware and initramfs module lists, the Xorg `card0` pin, `bananarchy-cover-diagnose.sh`, and the `scripts/test-cover-dt.py` / `scripts/test-cover-spidev.py` guards. - The shipping cover backend is `backend = kernel`: keep `bananarchy-cover-dpms.sh reinit`, the gpio13 mux claim, - the 240x240 `/dev/fb0` damage rect, the 1 s repaint against Xorg, `kernel_backlight_invert = 1`, - `kernel_backlight_level = 14`, `scripts/test-cover-kernel.py`, and the `spidev`/`fb`/`none` rollback backends. + the centered 240x240 X11/`/dev/fb0` cover frame, the 1 s repaint against Xorg, `kernel_backlight_invert = 0`, + `kernel_internal_sleep = 0`, `kernel_backlight_level = 14`, shared **Config -> Screen blank** timeout reload, + `scripts/test-cover-kernel.py`, and the `spidev`/`fb`/`none` rollback backends. The daemon must restore the internal panel on `LID OPEN` even after a stale high gpio13 survives a restart. - Keep the 2720 Flip lid handling event-driven and instant: sticky hall state, immediate hall re-read on `EV_SW` - edges, 20 ms debounce, and synchronous lid-state/lock/backlight/DPMS writes in `bananarchy-lid.c`. Closing locks + 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 the desktop; opening must keep the lock flag and wake to the passcode lockscreen, never auto-unlock. Every main-panel wake path must call `bananarchy-lid-gate.sh`; a closed flip may only light the cover. - `sxmo_state.sh set unlock` is gated too because `dwm` calls it directly. Guard `scripts/test-lid-gate.py`. + `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`. - Build the lk2nd display image from pinned `bootloader/lk2nd/nokia-beatles.patch`. Exact stock IDs, 512 MiB memory fallback, appended DTB, `quiet splash`, and the low-bit reboot cookie matter. `check-lk2nd-beatles.py`, `test-lk2nd-beatles-port.py`, `check-beatles-bootimg.py`, `sync-beatles-bootfs.py --check`, and `check-rebuild.sh` diff --git a/BATTERY-OPTIMIZATION-ANALYSIS.md b/BATTERY-OPTIMIZATION-ANALYSIS.md index 99782d2..fff0640 100644 --- a/BATTERY-OPTIMIZATION-ANALYSIS.md +++ b/BATTERY-OPTIMIZATION-ANALYSIS.md @@ -1,12 +1,12 @@ # Bananarchy battery-usage optimization analysis (measurement-corrected) **Status:** analysis plus implemented changes (sections 15-18). -**Project:** `/home/lux/proj/bananarchy`, current release `a1108` / `dejavu`. +**Project:** `/home/lux/proj/bananarchy`, current release `a1111` / `lennon`. **Device:** Nokia 8110 4G (`nokia-argon`, MSM8905), connected over USB RNDIS at `172.16.42.1`, `Linux nokia-argon 6.12.1-msm8916 #6 SMP PREEMPT Sat May 30 08:38:37 UTC 2026 armv7l`, `Bananarchy Linux a1108` (codename `dejavu`, `msm8909`). Historical sections below retain the build labels from their original measurement sessions; the -current shipped build is `a1108` / `dejavu`. +current shipped build is `a1111` / `lennon`. **Measurement session:** 2026-11-07 16:07–16:12 EET, uptime ~43 h at first snapshot. Read-only SSH commands plus two 60-second delta windows. Temporary `/tmp/bantam-*` files on the phone were removed; `NO_RESIDUE` confirmed. @@ -193,7 +193,7 @@ rfkill rmtfs sshd tinydm udev-postmount wpa_supplicant` (no `bluetooth`, no `zra `10-power-save.start`, `bananarchy-display-power-sync`, `sxmo_wm.sh`, `sxmo_hook_statusbar.sh`, `sxmo_hook_battery.sh`, `msm-modem-uim-selection`, `sxmo_modemmonitor.sh`, `xorg.conf.d/10-bananarchy-msm8909.conf` all match the repo copies. -The deployed image at the time was `a1105`; the power-relevant code is identical to HEAD `2ea2db4`. The current build is `a1108` / `dejavu`. +The deployed image at the time was `a1105`; the power-relevant code is identical to HEAD `2ea2db4`. The current build is `a1111` / `lennon`. --- @@ -446,7 +446,7 @@ worth doing to unlock them. ### 14.1 Session, limits, and state - Host clock 2026-11-07 18:03-18:46 EET; phone `Bananarchy Linux a1107` - (historical measurement; current build `a1108` / `dejavu`), + (historical measurement; current build `a1111` / `lennon`), `Linux nokia-argon 6.12.1-msm8916 #1 SMP PREEMPT`, freshly rebooted (uptime 12-22 min during the windows), reachable at `172.16.42.1` over USB RNDIS. - **Charging throughout**: `pm8916-lbc-chgr/online=1`, diff --git a/CHANGELOG.md b/CHANGELOG.md index c9bca89..36449ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,28 @@ This file tracks public release builds of **Bananarchy Linux**. Release versions follow the `
` format (where `2026` is `a`, followed by the two-digit month and day). -**Current device builds (`a1108` — codename `dejavu`)**: -- **Nokia 8110 4G (`nokia-argon`)**: https://bananarchy.top/builds/bananarchy-nokia-argon-a1108-dejavu.zip +**Current device builds (`a1111` — codename `lennon`)**: +- **Nokia 8110 4G (`nokia-argon`)**: https://bananarchy.top/builds/bananarchy-nokia-argon-a1111-lennon.zip +- **Nokia 2720 Flip (`nokia-beatles`)**: https://bananarchy.top/builds/bananarchy-nokia-beatles-a1111-lennon.zip --- -## Unreleased +## Build `a1111` — codename `lennon` (2026-11-11) -Work since `a1108` has focused on reliable 2720 Flip hardware support and a reproducible boot/flash path. Earlier incremental and superseded diagnostic entries are consolidated here. +This build contains all previously unreleased 2720 Flip (`nokia-beatles`) changes since `a1108`, strict per-device `lid-profile` isolation keeping `nokia-argon` on its pure `a1108` sliding-lid path, and fresh `a1111` / `lennon` images for both `nokia-argon` and `nokia-beatles`. The image and release metadata are generated by `scripts/version.sh` as `a1111` / `lennon`. + +### Per-target `lid-profile` isolation for `nokia-argon` (`slider`) vs `nokia-beatles` (`flip`) + +- **Audit findings**: auditing every change since `a1108` (`8448b6465f7f`) showed that `dwm` already isolates flip vs slider behaviour through `/usr/share/bananarchy/lid-profile` (`is_flip_profile()`), keeping exposed top-row keypad input, 60 ms `SW_LID` close locking (`HANGUP_CLOSE` + `locker screenoff`), and `SW_LID=0` / `SW_KEYPAD_SLIDE=1` wake-to-lockscreen identical to `a1108` when `lid-profile` is `slider`. However, `overlay/rootfs/usr/share/bananarchy/lid-profile` was hardcoded to `flip`, `etc/runlevels/default/bananarchy-{lid,cover-display,volume-keys}` and mux `modules-load.d` entries were left enabled on non-flip builds, `bananarchy-x11-session.sh` sent `Escape` 3 s after boot even when `/tmp/bananarchy_screen_locked` was set (which blanks an active `xlocker` on `nokia-argon`), and `bananarchy-display-power-sync`, `locker.so`, and `callscreen.so` checked `/run/bananarchy/lid-state` without checking `lid-profile`. +- **Switch**: `scripts/apply-bananarchy-overlay.sh` now writes `/usr/share/bananarchy/lid-profile` per target (`slider` on `nokia-argon`, `flip` on `nokia-beatles`, `none` on `nokia-tough`/`nokia-sparkler`/`nokia-leo`), removes stale top-level `/boot/qcom-*.dtb` files when switching targets, and strips `etc/runlevels/default/bananarchy-{lid,cover-display,volume-keys}`, `72-nokia-beatles-cover.rules`, `cover-display.conf`, and `spidev`/`mux-*`/`spi-mux` module loads on non-flip targets. `10-bananarchy-hardware.start`, the `bananarchy-lid` / `bananarchy-volume-keys` / `bananarchy-cover-display` init scripts, and the compiled `bananarchy-lid`, `bananarchy-volume-keys`, and `bananarchy-cover-idle` C daemons (`is_non_flip_profile()`) exit `0` immediately on `slider`/`none` profiles. `bananarchy-x11-session.sh` skips its 3 s stale-grab `Escape` cleanup while `/tmp/bananarchy_screen_locked` exists, `bananarchy-display-power-sync` fast-paths non-flip devices to pure single-panel DPMS + `schedutil` sync, and `locker.so` / `callscreen.so` gate `/run/bananarchy/lid-state` checks on `lid-profile == "flip"`. +- **Image persistence**: rebuilt both `images/bananarchy-nokia-argon.img` (SHA-256 `a93f0dc5a87d30b9084fcc8df97c78e7496ca1564e4855efe12e4696387a7d4d`) and `images/bananarchy-nokia-beatles.img` (SHA-256 `7e1a24270e25beedcbc92b3fc8b7f2b314e3c7a9bf7a8e2dbffae1754d1b74c7`, with standalone `images/boot-bananarchy-nokia-beatles.img` SHA-256 `4b190404e8e9b53955a87ff211e0f706e51d08e4df11689cfa5586422e65763d` and unchanged display lk2nd `b5549698c20f4de7603fc746d32bb5baa96ec377e41e74407823c98506fc185d`) at `a1111` / `lennon` with `--mkinitfs`, pinned in `scripts/check-rebuild.sh`. `e2fsck -fn` and `debugfs` verified both partitions of both images (`lid-profile = slider` with zero flip services/rules/configs on `nokia-argon`; `lid-profile = flip` with full cover/lid stack on `nokia-beatles`). + +### Active-high shared cover backlight, active-black internal isolation and shared blank timeout + +- **Root cause**: disassembling the stock KaiOS 3.10 `nokia-beatles` kernel (`mdss_spi_panel_pwm_cfg`, `mdss_spi_panel_bl_ctrl_update`) and `mpp@a100` DT node confirmed that both GC9305 controllers share one active-high PMIC `MPP2` PWM channel (`qcom,invert = <0>`). Setting `kernel_backlight_invert = 1` held `brightness = 0` (`duty = 0 ns`) when `visible = 1`, keeping the cover dark once `dwm` stopped pulsing brightness on side-button wakes. Meanwhile, because the internal `240x320` TN panel is normally-white (`0V` pixel drive = transmissive white) while the external `240x240` panel is normally-black, resetting the internal controller behind `gpio13 = 1` or sending `DISPOFF`/`SLPIN` (`0x28`/`0x10`) stopped `int_te` scanning and made the internal screen glow white whenever the shared backlight turned on. In addition, Xorg/Glamor (`framebuffer[40]`) could overwrite raw `/dev/fb0` cover pixels, `dwm` lacked `SW_LID` synchronization with the hall sensor, `sxmo_state.sh` leaked `flock` FD `3` into background children, and `render_frame()` used fixed X offsets instead of true pixel centering on `240x240`. +- **Switch**: `cover-display.conf` and `bananarchy-cover-idle` now ship `kernel_backlight_invert = 0` and `kernel_internal_sleep = 0`. On a closed-flip `BUTTON`/`WAKE`, `bananarchy-cover-idle` publishes `/run/bananarchy/cover-backlight` = `0` (holding `DPMS On` with `brightness = 0, bl_power = 4` in `bananarchy-display-power-sync` so udev never flashes the backlight during GRAM prep), maps a `240x320` `override_redirect` black X11 window (`cover_win`) with a keyboard grab, clears `/dev/fb0` while `gpio13 = 0` so the internal GC9305 stays in `DISPON` actively scanning opaque `0x0000` black from its SRAM, switches `gpio13 = 1`, resets and initializes the external GC9305, presents pixel-centered `240x240` header/clock/date text (`frame_text_centered`), and writes `marker = 1` with `brightness = 14, bl_power = 0`. When `BLANK` fires after the dynamically reloaded **Config -> Screen blank** timeout (`~/.config/sxmo/idle_blank_timeout` and `sxmo.noidle`, shared with `dwm` via `bananarchy-idle-timeout.sh`), both panels receive `0x28` + `120 ms` + `0x10`, `marker` is removed, `gpio13` parks low, and `DPMS Off` disables `l17`/`l6`. `bananarchy-lid` mirrors the hall state onto `SW_LID` (`sync_sw_lid`) and self-heals closed dark state (`enforce_closed_dark`); `bananarchy-cover-idle` cross-checks `/run/bananarchy/lid-state` (`authoritative_lid_closed`), filters spurious `WAKE` within `450 ms` of close, and writes `/run/bananarchy/cover-runtime.conf` for runtime `SET` overrides; `locker.so`, `callscreen.so`, `sxmo_wm.sh`, `sxmo_state.sh` (closing FD `3` via `3<&-`), and `sxmo_hook_inputhandler.sh` respect closed-lid cover ownership. +- **Live verification**: dual-TE probing on `172.16.42.1` confirmed concurrent self-refresh (`ext_te` and `int_te` both active while `gpio13 = high, br = 14, bl_power = 0, dpms = On, duty = 100000 ns`) across `LID CLOSED` rebroadcasts and 1 s Xorg repaints, returning cleanly to `br = 0, bl_power = 4, dpms = Off, ext_te = 0, int_te = 0` on `BLANK`. Physical eyes-on testing on the Nokia 2720 Flip confirmed closed dark idle, outer side-button wake with centered `240x240` UI and a completely dark internal panel, shared **Config -> Screen blank** timeout, and clean open/close transitions to the passcode lockscreen. +- **Image persistence**: initially verified in `images/bananarchy-nokia-beatles.img` (`f713fa4c79f18b0a7414222c4fc47acbacff1f84b94957c14eec43a52264d1d7`), superseded by the dual-target `a1111` / `lennon` rebuild above. ### Bounded DPMS helper and final flicker fix diff --git a/MANUAL.md b/MANUAL.md index c9d007d..6ca565e 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -2,7 +2,7 @@ ![Bananarchy Banner](artwork/banner-800x240.png) -This manual covers flashing, operating, and customizing **Bananarchy Linux** (`240x320` native edition) on **Qualcomm MSM8905 and MSM8909** Nokia feature phones. Current release: `a1108` (codename `dejavu`); see the [changelog](./CHANGELOG.md) for release notes. +This manual covers flashing, operating, and customizing **Bananarchy Linux** (`240x320` native edition) on **Qualcomm MSM8905 and MSM8909** Nokia feature phones. Current release: `a1111` (codename `lennon`); see the [changelog](./CHANGELOG.md) for release notes. - **Nokia 8110 4G (`nokia-argon`)** - **Nokia 2720 Flip (`nokia-beatles`)** - **Nokia 800 Tough (`nokia-tough` / `nokia-coconut`)** @@ -456,7 +456,7 @@ Three native X11 games (`/usr/bin/snake`, `/usr/bin/tetris`, and `/usr/bin/scoun - **X startup and keypad**: OpenRC starts independent services in parallel; `etc/init.d/local` replaces its stock `after *` dependency, which deadlocked with parallel startup on this image. `udev_settle_timeout=2` stops missing modem firmware from holding the display manager behind a long `udevadm settle`, and `bananarchy-sshd-debug` starts independently of `local.d`. A boot-open flip reads `/run/bananarchy/lid-state` and starts in `state=unlock` with no passcode screen, so the keypad is live as soon as `dwm` starts. If the keypad is dead, check `rc-service bananarchy-lid status`, `cat /run/bananarchy/lid-state`, `sxmo_state.sh get`, `/tmp/bananarchy_screen_locked`, `DISPLAY=:0 xwininfo -id 0xa00001` and `DISPLAY=:0 xinput list`. - **Display distortion above 71% brightness**: the internal panel uses 25 MHz SPI on `nokia-beatles`, rather than the 50 MHz timing used by the other targets. This keeps the link stable when the MPP2 backlight PWM duty rises above the level-10/14 operating point. The brightness range remains 1–14 with no artificial cap, and panel offsets/init registers are unchanged. The timing can be checked with `dtc -I dtb -O dts /boot/qcom-msm8905-nokia-beatles.dtb | grep -A8 'display@0'`. - **Closing the flip**: `bananarchy-lid` keeps a sticky hall reading, re-reads gpio36/gpio92 immediately on every `EV_SW` edge, and uses a 20 ms debounce/loop. On close it writes `/run/bananarchy/lid-state`, `/tmp/bananarchy_screen_locked`, `sxmo.state`, both backlights and DPMS synchronously before spawning any hook, then runs `sxmo_state.sh set screenoff` through a generation-guarded wrapper. On open it releases the cover's shared SPI bus, restores the main panel and **keeps the desktop locked**: it writes state `lock`, sends `LOCK` to `locker.so` and runs `sxmo_state.sh set lock`, so the passcode lockscreen appears instead of an auto-unlocked desktop. A close is ~45-90 ms and an open ~10-130 ms. `bananarchy-lid-state.sh` drops stale hook spawns by lid state and generation. Check `rc-service bananarchy-lid status`, `sxmo_state.sh get`, `/tmp/bananarchy_screen_locked` and `grep -E " gpio(36|92) " /sys/kernel/debug/gpio`. If the hall polarity is inverted, set `BANANARCHY_LID_GPIO_FILE` to a different debugfs GPIO file. -- **Cover display status and behaviour**: `bananarchy-cover-idle` is the compiled 0%-CPU default daemon and answers `bananarchy-coverctl` (`PING`, `STATUS`, `LID CLOSED|OPEN`, `BUTTON`, `NETWORK`, `BATTERY`, `NOTIFY`, `BLANK`/`UNBLANK`, `TEST`, `SET`, `PROBE`); the native `bananarchy-coverd` is retained only for diagnostics. With the flip open the daemon does not touch the shared QUP5 SPI bus; initial closed-flip activation still requires `card0-SPI-1/dpms = Off`. The shipping single-panel DTB uses `backend = kernel`: the KaiOS 3.10 DTS shows that the two GC9305s share CS0, gpio110 D/C and one PWM backlight, while gpio13 selects the panel, gpio23 is the external reset and gpio21 is TE. A live TE scan proved gpio13 high = cover and low = internal. On a closed-flip button event the daemon claims gpio13/gpio23, pulses reset, replays the exact vendor 240x240 init through `/sys/kernel/debug/dri/0/command`, and flushes a 240x240 `/dev/fb0` damage rect once per second. The shared PWM is active-low for the cover and active-high for the main panel: duty 0 lights the cover, duty 14 lights the internal panel. `/run/bananarchy/cover-backlight` contains `1` while the cover is lit and `0` while the cover owns the bus but is dark; `bananarchy-display-power-sync` holds the matching brightness, `bl_power` and DPMS state. `STATUS` reports `backend=kernel`, `mux=cover`; `BLANK` sends display-off and returns the external backlight to its OFF duty; `LID OPEN` restores gpio13 low, duty 14, `bl_power=0`, DPMS On and re-initialises the internal panel. The outer panel stays off until a trusted side-key `BUTTON` / `WAKE` arrives; it blanks after the same **Config -> Screen blank** timeout (`blank_timeout = auto`). The legacy `spidev`, 8/9-bit, `PROBE`, `SET mux_closed_level 0|1`, `SET kernel_backlight_invert 0|1` and `SET backend none` paths remain for rollback. `bananarchy-cover-diagnose.sh` reports the debugfs hook, backlight marker, GPIO lines, DPMS, firmware and daemon state. `scripts/test-cover-idle.py`, `scripts/test-cover-spidev.py`, `scripts/test-cover-kernel.py`, `scripts/test-cover-dt.py` and `scripts/test-lid-gate.py` guard the state machine, both backends, DT layouts and lid gate on the host. The opt-in two-panel `spi-mux` DT remains experimental because its separate gpio21 D/C wiring contradicts the vendor DTS and a live test darkened the main panel; `scripts/build-beatles-no-cover-dtb.py` builds the shipping rollback DTB. +- **Cover display status and behaviour**: `bananarchy-cover-idle` is the compiled 0%-CPU default daemon and answers `bananarchy-coverctl` (`PING`, `STATUS`, `LID CLOSED|OPEN`, `BUTTON`, `NETWORK`, `BATTERY`, `NOTIFY`, `BLANK`/`UNBLANK`, `TEST`, `SET`, `PROBE`); the native `bananarchy-coverd` is retained only for diagnostics. With the flip open the daemon does not touch the shared QUP5 SPI bus; initial closed-flip activation requires `card0-SPI-1/dpms = Off`. The shipping single-panel DTB uses `backend = kernel`: the KaiOS 3.10 DTS and kernel driver show that the two GC9305s share CS0, gpio110 D/C and one active-high PMIC MPP2 PWM backlight (`kernel_backlight_invert = 0`, `kernel_backlight_level = 14`), while gpio13 selects the panel (high = cover, low = internal), gpio23 is the external reset and gpio21 is TE. Because the internal 240x320 TN panel is normally-white while the external 240x240 panel is normally-black, a closed-flip button event wakes DRM with gpio13 low, paints an X11 `override_redirect` cover window and `/dev/fb0` solid black while leaving the internal GC9305 scanning black GRAM (`kernel_internal_sleep = 0`) so it blocks the shared backlight, switches gpio13 high, pulses gpio23, replays the exact vendor 240x240 init through `/sys/kernel/debug/dri/0/command`, and presents a centered 240x240 clock/date/status frame once per second. `/run/bananarchy/cover-backlight` contains `0` during dark GRAM preparation, `1` while the cover is lit, and is unlinked when dark; `bananarchy-display-power-sync` holds the matching brightness, `bl_power` and DPMS state (honouring `/run/bananarchy/cover-runtime.conf` for runtime `SET` overrides). `STATUS` reports `backend=kernel`, `mux=cover`; `BLANK` turns the shared backlight off, sleeps both controllers, parks gpio13 low and forces DPMS Off; `LID OPEN` sleeps the external panel, restores gpio13 low, brightness 14, `bl_power=0`, DPMS On and re-initialises the internal panel to the passcode lockscreen. The outer panel stays off until a trusted side-key `BUTTON` / `WAKE` arrives, and blanks dynamically after the same **Config -> Screen blank** timeout (`blank_timeout = auto`, reading `~/.config/sxmo/idle_blank_timeout` and `sxmo.noidle`). The legacy `spidev`, 8/9-bit, `PROBE`, `SET mux_closed_level 0|1`, `SET kernel_backlight_invert 0|1`, `SET kernel_internal_sleep 0|1` and `SET backend none` paths remain for rollback. `bananarchy-cover-diagnose.sh` reports the debugfs hook, backlight marker, GPIO lines, DPMS, firmware and daemon state. `scripts/test-cover-idle.py`, `scripts/test-cover-spidev.py`, `scripts/test-cover-kernel.py`, `scripts/test-cover-dt.py` and `scripts/test-lid-gate.py` guard the state machine, both backends, DT layouts and lid gate on the host. The opt-in two-panel `spi-mux` DT remains experimental because its separate gpio21 D/C wiring contradicts the vendor DTS and a live test darkened the main panel; `scripts/build-beatles-no-cover-dtb.py` builds the shipping rollback DTB. - **Camera app frozen / UI unresponsive**: check `top` for `bananarchy-volume-keys`. The daemon must be a single instance at 0% CPU; stale evdev fds are pruned by `prune_devices()`/`drop_device()` and guarded by `flock`. `rc-service bananarchy-volume-keys status` and `bananarchy-keypad-diagnose.sh` report its state. `xcamera` should return immediately and `bananarchy-photo ` should write a 600x800 JPEG. - **Camera**: `/dev/video0` is provided by the out-of-tree `msm8905-cam` module, loaded at boot by `/etc/modules-load.d/bananarchy-hardware.conf` and `etc/local.d/10-bananarchy-hardware.start`. Check with `v4l2-ctl --list-devices`; a missing node means the module did not load (previously caused by a missing `/bin/sed` breaking the `modules` service). @@ -674,4 +674,4 @@ The bootstrap is idempotent: an up-to-date rootfs is left untouched. `prebuilt/` ## Verified 2720 Flip image set -For the `a1108` / `dejavu` release, use the verified `nokia-beatles` raw image, standalone boot image, and display-enabled lk2nd image generated in `images/`. These files are local build outputs and are not tracked in git; `scripts/check-rebuild.sh` pins their hashes when present. `scripts/set-bananarchy-hostname.sh` gives every image its target codename as the default hostname, and the display lk2nd image now requires the low-bit reboot cookie so **Reboot to loader** reaches the visible Fastboot menu. The default `147147` unlock passcode remains provisioned with the locker path unchanged. The X session performs a one-shot startup cleanup of stale `dmenu` and xlocker keyboard grabs, while `dwm` keeps the known-good 350 ms wake guard. `prepare-release.sh` rebuilds missing images from source and packages them; use `BA_REBUILD=1` for a forced source rebuild. +For the `a1111` / `lennon` release, use the verified `nokia-argon` and `nokia-beatles` raw images, plus the standalone boot image and display-enabled lk2nd image generated in `images/`. These files are local build outputs and are not tracked in git; `scripts/check-rebuild.sh` pins their hashes when present. `scripts/set-bananarchy-hostname.sh` gives every image its target codename as the default hostname, `scripts/apply-bananarchy-overlay.sh` writes `/usr/share/bananarchy/lid-profile` per target (`slider` on `nokia-argon`, `flip` on `nokia-beatles`, `none` on candybar targets) so flip-only daemons stay disabled on non-flip devices, and the display lk2nd image requires the low-bit reboot cookie so **Reboot to loader** reaches the visible Fastboot menu. The default `147147` unlock passcode remains provisioned with the locker path unchanged. The X session performs a one-shot startup cleanup of stale `dmenu` and xlocker keyboard grabs when unlocked, while `dwm` keeps the known-good 350 ms wake guard. `prepare-release.sh` rebuilds missing images from source and packages them; use `BA_REBUILD=1` for a forced source rebuild. diff --git a/README.md b/README.md index 0756527..a4ee23a 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,10 @@ **Bananarchy** is a keypad-first Linux distribution hardforked from postmarketOS (`v26.06` / Alpine `edge` `armv7`), built for **Qualcomm MSM8905 (Snapdragon 205)** and **Qualcomm MSM8909 (Snapdragon 210)** smart feature phones with **240x320 QVGA non-touch displays** and **physical 12-key T9 keypads**. -- **Current public release**: `a1108` (codename `dejavu`) — see the [changelog](./CHANGELOG.md) for release notes. -- **Device builds (`a1108` — codename `dejavu`)**: - - **Nokia 8110 4G (`nokia-argon`)**: https://bananarchy.top/builds/bananarchy-nokia-argon-a1108-dejavu.zip +- **Current public release**: `a1111` (codename `lennon`) — see the [changelog](./CHANGELOG.md) for release notes. +- **Device builds (`a1111` — codename `lennon`)**: + - **Nokia 8110 4G (`nokia-argon`)**: https://bananarchy.top/builds/bananarchy-nokia-argon-a1111-lennon.zip + - **Nokia 2720 Flip (`nokia-beatles`)**: https://bananarchy.top/builds/bananarchy-nokia-beatles-a1111-lennon.zip - **Project philosophy**: read [The Bananarchy Manifesto](./MANIFESTO.md) for the background and goals behind the distribution. - **User and flashing guide**: see the [user manual](./MANUAL.md) for installation, keypad navigation, and hardware details. - **UI and networking SDK reference**: see the [NeoUI and NeoNet SDK guide](./SDK.md) for building native C, C++, and Yabasic `240x320` GUI and networked applications. @@ -50,7 +51,7 @@ Instead of spawning slow shell scripts for everyday phone tasks, Bananarchy runs - **Kopher SmallWeb browser (`xkopher` / `kopher` / `xsmallweb` / `smallweb.so`)**: multi-protocol SmallWeb client for **Gopher** (`gopher://`) with optional TLS (`gophers://`), **Gemini** (`gemini://`), **Spartan** (`spartan://`), and **Nex** (`nex://`), featuring WAP-style default keypad controls from [Kopher](https://code.luxferre.top/luxferre/kopher.git), user-adjustable keybindings (`~/.config/sxmo/smallweb_controls.tsv`), 10 bookmarks, custom homepage support, and link focus that always scrolls the viewport to the focused link in both wrapped and unwrapped modes. - **Webarchy Web browser (`webarchy` / `xwebarchy` / `webarchy.so`)**: full-featured HTML5/CSS3/JS web browser built on WPE / WebKit (`webkit2gtk-4.1` + `libwpe-1.0`) with Adreno 304 hardware acceleration (`WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS`, WebGL, accelerated 2D canvas, and 512 MB RAM pressure tuning), default KaiOS 4.0 User-Agent (`Mozilla/5.0 (Mobile; rv:123.0) Gecko/123.0 Firefox/123.0 KAIOS/4.0`) with preset and custom User-Agent override (`~/.config/sxmo/webarchy_ua.txt`), `UTF-8` default encoding fallback, `Noto Sans` / `Noto Serif` (`font-noto` + `font-noto-emoji`) as the default non-monospace browser fonts and `Fira Code` with OpenType ligatures as the monospace font, full GStreamer multimedia (`MediaSource` / MSE, WebAudio, inline HTML5 `