Fix 2720 closed-flip call wakeups/preservation, live timezone sync, and Power menu

- Default CPU_RPM_SLEEP=0, CPU_L2_SLEEP=0, and MODEM_DRX_MODE=0 across bananarchy-power-policy.conf, bananarchy-power-policy.sh, bananarchy-display-power-sync, and kernel patch 0010 so closed-flip incoming calls wake APSS promptly via smd-edge without AT port contention.
- Serialize sxmo_modem.sh incoming/finished call checks, expire stale /tmp/sxmo_hangup_requested flags, re-verify live ModemManager call state before ringing/raising callscreen, guard idle/flip-open HANGUP_CLOSE paths in locker.so, callscreen.so, bananarchy-idle-lock.sh, and bananarchy-lid, preserve calls on flip-open (UNGRAB/RAISE), and add closed-flip cover call controls (bananarchy-cover-idle, bananarchy-cover-event.sh, bananarchy-volume-keys).
- Propagate live network/manual timezone updates across statusbar, locker.so, bananarchy-cover-idle, bananarchy-dsds, callscreen.so, and bananarchy-run-aligned without reboot (scripts/test-time-timezone-sync.py), remove non-functional Logout from the Power menu, ignore post-call sxmo_calls markers, add scripts/build-dwm-plugins.sh, and update a1114 (carbonara) hashes and docs.
This commit is contained in:
Luxferre committed 2026-11-14 10:57:29 +02:00
1 parent 786480a08f
commit 8b466ef8ae
110 files changed
+2728 -285

No files matched your search

+5 -5
View File
@@ -110,11 +110,11 @@ sudo dd if=./images/bananarchy-<device>.img of=/dev/sdX bs=4M status=progress co
| **2720 Flip outer side keys (closed)** | `KEY_VOLUMEUP` / `KEY_VOLUMEDOWN` / `KEY_POWER` | While the flip is closed, wake the external `240x240` cover display (centered clock, date, battery, and network indicators) for the configured **Screen blank** duration while keeping the internal panel dark |
> **Screen blanking, idle blanking, RPM idle standby, passcode locking (`xlocker`), waking, and brightness persistence**:
> While unlocked (and with the lid open), the display blanks automatically after the configured **Screen blank** timeout — **5 minutes by default** — via `dwm`'s own evdev input timer and `bananarchy-idle-blank.sh`. Change it in **Config -> Screen blank** (`Off`, 30 s, 1/5/10/30 min), which writes `~/.config/sxmo/idle_blank_timeout`; `bananarchy-idle-timeout.sh get|label|set <seconds>` does the same from the shell, and `SXMO_UNLOCK_IDLE_TIME` or `~/.cache/sxmo/sxmo.noidle` still override/disable it. Closing the slider/lid or locking from the **Power** menu blanks the panel **immediately** (both `Lock` and `Lock (Screen off)` now use `xlocker screenoff`), and an incoming call or SMS/notification turns it back on **immediately** via `bananarchy-screen-wake.sh`, which also resets `dwm`'s idle timer so it cannot blank again right away. Any keypad, lid or power key also restores the display; if it arrives before the idle-lock delay elapses, the desktop stays unlocked. Blanking now arms the screenlock daemon: `bananarchy-idle-blank.sh` calls `bananarchy-idle-lock.sh arm`, which starts the trusted `sxmo_state.sh set screenoff` transition (`xlocker screenoff` -> `LOCK_BLANK` on `locker.so`) after **30 seconds** of dark panel by default. Set `~/.config/sxmo/idle_lock_delay` with `bananarchy-idle-lock.sh set 0` to lock immediately on blank, any other number of seconds to change the grace period, or `set off` to keep the old blank-without-passcode behaviour. `bananarchy-idle-lock.sh get|label|cancel` reports and cancels the pending lock; `bananarchy-screen-wake.sh`, `bananarchy-idle-blank.sh on` and `sxmo_hook_unlock.sh` cancel it on every wake, and the transition only fires while the panel is still dark. X11 screensaver timeouts stay at `0 0 0`; DPMS is driven by the backlight state. Traditional Linux **`mem` suspend (`/sys/power/state`)** stays disabled (`# CONFIG_SUSPEND is not set` + `/etc/bananarchy-no-deep-standby`) to keep the pmaports module ABI and instant hardware wakeups (stock firmware lacks PSCI `SYSTEM_SUSPEND`); instead, `cpuidle_qcom_spm` enters hardware XO/RPM sleep (`vMPM`) and L2 SAW2 retention/collapse (`CPU_RPM_SLEEP=1`, `CPU_L2_SLEEP=1`) directly from deep idle while `serial@78af000` (`console=ttyMSM0`) is disabled so UART clocks never pin XO or `gpll0`. Locking the phone (`Power -> Lock`, `Power -> Lock (Screen off)`, `2x End / Power`, or closing the physical slider) activates the fullscreen `240x320` **Passcode Locker (`xlocker` / `locker.so`)**, which verifies your numeric system password (`147147` by default, checked against `/etc/shadow` via `/usr/bin/bananarchy-verify-passcode`). While locked, there is no keypad, softkey, slider, or power-button bypass (`dmenu`, `xdrawer`, terminal spawning, and desktop shortcuts are blocked, and only incoming calls can temporarily overlay `xcallscreen`). Screen and keypad brightness levels configured in **XDrawer** or **Config -> Brightness** are persisted in `~/.config/sxmo/brightness` and `/tmp/sxmo_saved_brightness` and restored on every wake.
> While unlocked (and with the lid open), the display blanks automatically after the configured **Screen blank** timeout — **5 minutes by default** — via `dwm`'s own evdev input timer and `bananarchy-idle-blank.sh`. Change it in **Config -> Screen blank** (`Off`, 30 s, 1/5/10/30 min), which writes `~/.config/sxmo/idle_blank_timeout`; `bananarchy-idle-timeout.sh get|label|set <seconds>` does the same from the shell, and `SXMO_UNLOCK_IDLE_TIME` or `~/.cache/sxmo/sxmo.noidle` still override/disable it. Closing the slider/lid or locking from the **Power** menu blanks the panel **immediately** (both `Lock` and `Lock (Screen off)` now use `xlocker screenoff`), and an incoming call or SMS/notification turns it back on **immediately** via `bananarchy-screen-wake.sh`, which also resets `dwm`'s idle timer so it cannot blank again right away. Any keypad, lid or power key also restores the display; if it arrives before the idle-lock delay elapses, the desktop stays unlocked. Blanking now arms the screenlock daemon: `bananarchy-idle-blank.sh` calls `bananarchy-idle-lock.sh arm`, which starts the trusted `sxmo_state.sh set screenoff` transition (`xlocker screenoff` -> `LOCK_BLANK` on `locker.so`) after **30 seconds** of dark panel by default. Set `~/.config/sxmo/idle_lock_delay` with `bananarchy-idle-lock.sh set 0` to lock immediately on blank, any other number of seconds to change the grace period, or `set off` to keep the old blank-without-passcode behaviour. `bananarchy-idle-lock.sh get|label|cancel` reports and cancels the pending lock; `bananarchy-screen-wake.sh`, `bananarchy-idle-blank.sh on` and `sxmo_hook_unlock.sh` cancel it on every wake, and the transition only fires while the panel is still dark. X11 screensaver timeouts stay at `0 0 0`; DPMS is driven by the backlight state. Traditional Linux **`mem` suspend (`/sys/power/state`)** stays disabled (`# CONFIG_SUSPEND is not set` + `/etc/bananarchy-no-deep-standby`) to keep the pmaports module ABI and instant hardware wakeups (stock firmware lacks PSCI `SYSTEM_SUSPEND`); instead, per-core `cpuidle_qcom_spm` Standalone Power Collapse (`L2_ON`) stays active with `< 0.2 ms` wakeup on all GIC SPIs while `serial@78af000` (`console=ttyMSM0`) is disabled so UART clocks never pin XO or `gpll0`. Locking the phone (`Power -> Lock`, `Power -> Lock (Screen off)`, `2x End / Power`, or closing the physical slider) activates the fullscreen `240x320` **Passcode Locker (`xlocker` / `locker.so`)**, which verifies your numeric system password (`147147` by default, checked against `/etc/shadow` via `/usr/bin/bananarchy-verify-passcode`). While locked, there is no keypad, softkey, slider, or power-button bypass (`dmenu`, `xdrawer`, terminal spawning, and desktop shortcuts are blocked, and only incoming calls can temporarily overlay `xcallscreen`). Screen and keypad brightness levels configured in **XDrawer** or **Config -> Brightness** are persisted in `~/.config/sxmo/brightness` and `/tmp/sxmo_saved_brightness` and restored on every wake.
> **Runtime power policy (`/etc/bananarchy-power-policy.conf`)**:
> `WIFI_LISTEN_INTERVAL` (1-10, default 5) sets the `wcn36xx` beacon listen interval (`max_listen_interval` and `conf.listen_interval`) via `/etc/modprobe.d/10-bananarchy-power.conf`, while `bananarchy-display-power-sync` toggles `/sys/module/wcn36xx/parameters/screen_off_offload` to enable WCN3620 ARP/IPv6-NS/GTK, BET, and DTIM offloads (`HOST_SUSPEND_IND`) while the main panel is dark without suspending host RX. `WIFI_SCREEN_OFF_IPV6_MUTE=1` (default) mutes unsolicited IPv6 router advertisements (`accept_ra=0`) on `wlan0` while dark if `wlan0` already holds an IPv4 address and restores the previous value on wake. `WIFI_STANDBY_RAT=keep` (default; set `gsm` to opt in) optionally parks QMI NAS mode preference to GSM after 30 s of darkness while `wlan0` is `up`, restoring the saved RAT preference on wake. `CPU_RPM_SLEEP=1` and `CPU_L2_SLEEP=1` (both default `1`) control runtime `/sys/module/cpuidle_qcom_spm/parameters/{rpm_sleep,l2_sleep}` cluster RPM (`vMPM`) and L2 SAW2 sleep handoff when all online CPUs go idle. `MODEM_DRX_MODE` (default `6`) applies the Qualcomm `AT$QCDRX` DRX mode across all `/dev/wwan0at*` channels at boot and on screen transitions (cached per AT port inode); `6` enables the standard ~1.28 s low-power paging cycle across active SIMs, `7-9` are progressively longer undocumented paging cycles, and `0` leaves the firmware default untouched. The standard `AT+CPSMS` / `AT+CEDRXS` PSM/eDRX commands are not supported by this modem firmware. `DSDS_SECONDARY_MODE=eco` (default `active`) deactivates the secondary SIM's GW provisioning session after `DSDS_PARK_DELAY` seconds (default 300) of a dark panel and restores it on wake; **SIM2 is unreachable while parked**. This uses QMI provisioning sessions, not SIM power-off, so a PIN-locked SIM stays locked. Edit the file as root and run `doas /usr/bin/bananarchy-power-policy.sh apply`, or reboot; `doas /usr/bin/bananarchy-power-policy.sh status` reports the effective values across AT ports, `wcn36xx`, `cpuidle_qcom_spm`, `/sys/kernel/debug/qcom_stats`, and `/sys/kernel/debug/qcom_rpm_master_stats`. See `BATTERY-OPTIMIZATION-ANALYSIS.md` §§15, 20-22.
> `WIFI_LISTEN_INTERVAL` (1-10, default 5) sets the `wcn36xx` beacon listen interval (`max_listen_interval` and `conf.listen_interval`) via `/etc/modprobe.d/10-bananarchy-power.conf`, while `bananarchy-display-power-sync` toggles `/sys/module/wcn36xx/parameters/screen_off_offload` to enable WCN3620 ARP/IPv6-NS/GTK, BET, and DTIM offloads (`HOST_SUSPEND_IND`) while the main panel is dark without suspending host RX. `WIFI_SCREEN_OFF_IPV6_MUTE=1` (default) mutes unsolicited IPv6 router advertisements (`accept_ra=0`) on `wlan0` while dark if `wlan0` already holds an IPv4 address and restores the previous value on wake. `WIFI_STANDBY_RAT=keep` (default; set `gsm` to opt in) optionally parks QMI NAS mode preference to GSM after 30 s of darkness while `wlan0` is `up`, restoring the saved RAT preference on wake. `CPU_RPM_SLEEP=0` and `CPU_L2_SLEEP=0` (both default `0`) control opt-in runtime `/sys/module/cpuidle_qcom_spm/parameters/{rpm_sleep,l2_sleep}` cluster RPM (`vMPM`) and L2 SAW2 sleep handoff; keep `0` by default because per-core SPC with L2 retention already wakes in `< 0.2 ms` on every GIC SPI without collapsing APSS GIC and dropping `smd-edge` modem wakeups during closed-flip standby. `MODEM_DRX_MODE` (default `0`) leaves the firmware's native DSDS paging scheduler untouched without contending with `ModemManager` on open `/dev/wwan0at*` ports; values `6-9` remain opt-in to apply Qualcomm `AT$QCDRX` across all `/dev/wwan0at*` channels (`6` enables ~1.28 s DRX, and `7-9` are progressively longer undocumented paging cycles). The standard `AT+CPSMS` / `AT+CEDRXS` PSM/eDRX commands are not supported by this modem firmware. `DSDS_SECONDARY_MODE=eco` (default `active`) deactivates the secondary SIM's GW provisioning session after `DSDS_PARK_DELAY` seconds (default 300) of a dark panel and restores it on wake; **SIM2 is unreachable while parked**. This uses QMI provisioning sessions, not SIM power-off, so a PIN-locked SIM stays locked. Edit the file as root and run `doas /usr/bin/bananarchy-power-policy.sh apply`, or reboot; `doas /usr/bin/bananarchy-power-policy.sh status` reports the effective values across AT ports, `wcn36xx`, `cpuidle_qcom_spm`, `/sys/kernel/debug/qcom_stats`, and `/sys/kernel/debug/qcom_rpm_master_stats`. See `BATTERY-OPTIMIZATION-ANALYSIS.md` §§15, 20-22.
#### 3.1.1 Window tiling modes and switching combos
By default, `dwm` uses the **vertical bottom-stack (`bstack`, `TTT`)** layout so multiple `st` terminals stack **vertically (one under another)** to preserve full line width on the `240x320` portrait screen.
@@ -139,7 +139,7 @@ All twenty-five phone applications are compiled as shared-object plugins (`/usr/
1. **System and context menus (`dmenu.so` / `dmenu` / `xdmenu`)**:
- **Open / close**: press **Left softkey (`Menu`)** for the **System menu** or **Right softkey (`Back`)** inside an application for its **Context menu**; press the same softkey or `Escape` to close.
- **Built-in submenus and instant toggles**: renders `sys`, `applications`, `scripts`, `modem`, `config`, `sdcard`, `power` (including **Lock**, **Lock (Screen off)**, **Logout**, **Reboot**, **Reboot to loader**, and **Poweroff**; use the lk2nd Fastboot menu for **EDL**), `audio` (with linear volume steps and **Output: Speaker**, **Output: Earpiece**, and **Output: Headphones** routing), `notifications`, `wm`, `timezone`, `games`, `st`, and `nano` menus in place in `< 0.5 ms` without spawning external processes.
- **Built-in submenus and instant toggles**: renders `sys`, `applications`, `scripts`, `modem`, `config`, `sdcard`, `power` (including **Lock**, **Lock (Screen off)**, **Reboot**, **Reboot to loader**, and **Poweroff**; use the lk2nd Fastboot menu for **EDL**), `audio` (with linear volume steps and **Output: Speaker**, **Output: Earpiece**, and **Output: Headphones** routing), `notifications`, `wm`, `timezone`, `games`, `st`, and `nano` menus in place in `< 0.5 ms` without spawning external processes.
- **Script compatibility**: any script piping items into `/usr/bin/dmenu` or `sxmo_dmenu.sh` communicates with the resident daemon over `/tmp/dwm_plugin_dmenu.sock`.
2. **Global phone controls (`xdrawer.so` / `xdrawer`)**:
@@ -458,8 +458,8 @@ Three native X11 games (`/usr/bin/snake`, `/usr/bin/tetris`, and `/usr/bin/scoun
- **Wi-Fi and Bluetooth missing**: both radios depend on the shared WCNSS remote processor. `msm-firmware-loader` must start in sysinit before udev and mount the stock `modem` and `persist` partitions under `/run/msm-firmware-loader/mnt`; it then exposes `wcnss.mdt` and the factory `WCNSS_qcom_wlan_nv.bin` through the kernel firmware path. Check `rc-service msm-firmware-loader status`, `cat /sys/class/remoteproc/remoteproc1/state`, and `dmesg | grep -Ei 'wcnss|remoteproc|firmware'`. A `Direct firmware load for wcnss.mdt failed` message means the loader package or its sysinit link is missing, not that the Wi-Fi and Bluetooth drivers are absent. After a successful boot, `wlan0` and `hci0` enumerate automatically; Bluetooth userspace still starts on demand from the Networks/Bluetooth UI to save power.
- **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 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.
- **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`, runs `sxmo_state.sh set lock`, and sends `RAISE` to `callscreen.so` when `/tmp/sxmo_call_ringing` or `/tmp/sxmo_active_call` is present. `sxmo_hook_lock.sh` and `locker.so` preserve active calls without triggering `HANGUP_CLOSE` when activating on lock or flip open, so opening the flip during an incoming or active call brings up `callscreen` above the locked desktop without hanging up. 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`, `CALL`, `REFRESH`, `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`. When a call arrives while closed (`CALL incoming|...|...|...`), the cover wakes automatically and stays lit past the normal blank timeout showing caller name/number, SIM tag, and side-key hints; pressing external **Volume Up/Down** (`BUTTON VOLUP`/`VOLDOWN` -> `bananarchy-cover-event.sh mute-ring`) mutes the ringer while keeping call state visible, and pressing external **Power**/camera (`BUTTON POWER` -> `bananarchy-cover-event.sh hangup-call`) hangs up without opening the flip. 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 or call frame once per second (with live timezone reloads via `ba_refresh_tz()`). `/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` (and clean `SIGTERM` shutdown) 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 (raising `callscreen` above it if a call is active or ringing). The outer panel stays off until a trusted side-key `BUTTON` / `WAKE` or incoming `CALL` 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`, `scripts/test-lid-gate.py` and `scripts/test-time-timezone-sync.py` guard the state machine, both backends, DT layouts, lid gate and live timezone/network sync 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 <file>` 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).