uzbek-plus/logs/b13/B13-WAYLAND-WLROOTS-RESULT.md

57 lines
5.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# B13W — Wayland/wlroots on Alpine (Cage, Sway, wayvnc) next to X11 (2026-10-04)
System: Alpine 3.24.2 primary root on p27 (B12Q/B12R), kernel 7.2.7-aurora-b12 (no kernel/DTB/cache change in B13W).
Scripts: `b13/run/` (deployed to /usr/local/lib/b13/run): wl-common.sh, cage-up/down.sh, sway-up/down.sh, sway.conf, wayvnc-up/down.sh, pattern.sh.
X11 is the existing `/usr/local/bin/aurora-x start|stop` (the x-up/vnc-up names from the brief do not exist); its files/config were not edited.
## 1. Audit
- DRM: `/dev/dri/card0` = panel-mipi-dbi-spi (`/soc@0/spi@78b8000/panel@0`), connector **SPI-1** connected, mode **128x128 @ 59.953 Hz**, 1 CRTC, 1 plane,
physical 26x26 mm. **No render node** (no GPU). `/dev/fb0` = DRM fbdev emulation (used by Xorg fbdev driver).
- Input: only `pm8941_pwrkey` (/dev/input/event0). udevd running (started by the modem controller), /run/udev present.
- Seat: seatd 0.9.3 (`seatd -g video`, VT-bound seat0), libseat backend seatd; compositors run as root from the session scripts.
- Packages (apk, v3.24 via mirror.yandex.ru): wlroots0.20 0.20.2-r0, cage 0.3.0-r0, sway 1.12_rc3-r0, wayvnc 0.10.0-r0 (neatvnc 1.0.0, gnutls 3.8.13),
seatd/libseat 0.9.3-r0, wayland 1.25.0, libinput 1.31.3, foot 1.27.0 (test client), font-dejavu, grim (screencopy check), wayland-utils. No Xwayland.
- Note: wlroots links libEGL/libgbm → mesa's libgallium + LLVM must be present even with Pixman (musl resolves all symbols at load). The B13 RAM prune had
removed them → `apk fix mesa* llvm22-libs spirv-tools hwdata-pci xorg-server` restored the package files (p27 +215 MB; also restores Xorg's glamor/glx modules).
## 2. Renderer
`WLR_RENDERER=pixman WLR_BACKENDS=drm,libinput WLR_DRM_DEVICES=/dev/dri/card0 WLR_LIBINPUT_NO_DEVICES=1 LIBSEAT_BACKEND=seatd` — log: "Creating pixman renderer".
## 3–5. Results
Test UI = foot fullscreen with pattern.sh (red TL, green TR, blue BL, white BR, white frame, label). Cells 25x10 at 9 px → 3 px right / 8 px bottom of
background (font grid, visible identically in the screencopy) — not a panel offset.
| check | result |
|---|---|
| Cage on ST7735S | **PASS** — modeset SPI-1 128x128, pattern correct via grim and on the physical panel (operator: corners OK, only the font-grid strip right/bottom) |
| Sway on ST7735S | **PASS** — same pattern fullscreen, no bar/wallpaper/borders, 0 errors after `xwayland disable` + `swaybg_command -` |
| wayvnc on Sway | **PASS** — captures output SPI-1 (same physical output), listens **172.16.42.1:5900 only** (no 0.0.0.0, no IPv6), security types [19 VeNCrypt, 129, 5], **no None**; VeNCrypt X509Plain TLS1.3, pinned cert D4:46:9D…; wrong password → "Invalid username or password"; typed "vnc ok 42" + pointer move visible in the next frame and **on the physical panel (operator-confirmed)** |
| wayvnc on Cage | **PASS** — same: capture, auth, typed "cage 7" + pointer (warning: no output power-management protocol in Cage, harmless) |
| X11 regression | **PASS** — after cage/sway/wayvnc down: VT back to tty1, fbcon bound; `aurora-x start fbdev` → X-START OK 128x128, twm+xterm, x11vnc 172.16.42.1:5900 (IPv4 only) frame OK, X11 visible on the physical panel (operator-confirmed); Xorg (EE) lines identical to B13 (mouse/kbd modules, FBIOPUTCMAP) |
## 8. Comparison (idle, measured on the board, CPU = utime+stime over 20–30 s)
| stack | RSS | idle CPU | physical output | remote access | 128x128 suitability |
|---|---|---|---|---|---|
| Xorg (fbdev) | 49.0 MB (+ x11vnc 3.8, twm 4.0, xterm 5.9) | 0.05 % | /dev/fb0 (fbdev emulation) | x11vnc, no auth, NCM only | works; legacy toolkit/WM, no per-frame damage path |
| Cage | 47.5 MB (+ foot 7.7, seatd 0.7) | 0.00 % | DRM/KMS card0, Pixman | wayvnc (TLS+password) works | **best**: kiosk, one fullscreen app, start 0.45–0.67 s |
| Sway | 56.8 MB (+ foot 7.7) | 0.00 % | DRM/KMS card0, Pixman | wayvnc works, IPC/swaymsg for debugging | good debug/service shell, start 0.68 s |
| wayvnc | 38.0–38.6 MB | 0.00 % idle | — | — | — |
RSS of the wlroots compositors is dominated by mapped mesa/LLVM pages (VmSize ~1.28 GB), not by rendering. Free RAM stayed ≈ 320 MB available.
## Verdict
```
X11 PASS
Cage PASS
Sway PASS
wayvnc on Sway PASS
wayvnc on Cage PASS
```
- Production modem UI compositor: **Cage** (Pixman). Since wayvnc also works on Cage, production can expose remote view without Sway.
- Remote/debug: **Sway + wayvnc** (or Cage + wayvnc).
- Xorg: keep as fallback until the first Wayland UI exists; afterwards it can be removed (xorg-server, xf86-video-fbdev, x11vnc, twm, xterm) — it shares mesa with wlroots anyway.
## State left / notes
- p27 changes: packages above, /usr/local/lib/b13/run/*, /etc/aurora/wayvnc/{config,tls_key.pem,tls_cert.pem} (root 600; password + key only in b13/private/ locally — never publish).
- Nothing autostarts (no runlevel changes). At the end X11 (aurora-x) was left running on vt2 for inspection; `aurora-x stop` returns to the console.
- pattern.sh: the echo line clears to EOL and erases the right frame cell (cosmetic).
- 2026-10-04: operator connected interactively with TigerVNC (SecurityTypes X509Plain, X509CA = b13 cert) from 480s to wayvnc on Sway — Sway visible in the viewer.