plan: add v6.0 changelog (Phase 1 fully implemented in code)
v6.0 collapses the v5.0 dual-path input design (which was never
built) into a single-producer evdev pipe:
drivers → /scheme/input/evdev (inputd ring buffer)
→ evdevd consumer
→ /dev/input/eventN
→ libinput
Phase 1.1b (inputd scheme daemon) is now real. All five input
drivers + virtio-inputd already use EvdevProducerHandle. The
init system wires evdevd in. Plan status for Phase 1: 8 of 9
steps code-complete; only Step 1.9 (udev-shim eventN mapping
verification) and runtime gate (QEMU boot test) remain.
Also records the small fixes this session: Gap 3 (renderD128
openat path), Gap 5 (host->guest resize events, pre-existing),
Gap 8 (atomic_check connector validation), Phase 3.5 (page
flip keeps DRM fd open), the redox-drm dangling symlink, and
the build-redbear.sh aggressive cache-nuke fix.
This commit is contained in:
@@ -957,6 +957,71 @@ Total: 12-20 weeks with hardware access
|
||||
|
||||
---
|
||||
|
||||
## 9.0 What Changed Since v5.0 → v6.0 (2026-06-08 → 2026-06-09)
|
||||
|
||||
The v5.0 plan proposed a "dual-path" input architecture (drivers write
|
||||
to BOTH `inputd` and `evdevd` in parallel) so Orbital and Wayland clients
|
||||
could coexist. The v6.0 design collapses this to **one** path: drivers
|
||||
write Linux `struct input_event` records to `/scheme/input/evdev`, and
|
||||
evdevd relays them to `/dev/input/eventN` for libinput. inputd stays
|
||||
in the tree only as a historical Orbital daemon, but its **binary** is
|
||||
now a real scheme daemon implementing the `/scheme/input/evdev` ring
|
||||
buffer. This is the change the plan now calls **v6.0**.
|
||||
|
||||
| Change | Status | Notes |
|
||||
|--------|--------|-------|
|
||||
| Phase 1.1b: `inputd` binary as scheme daemon | ✅ **DONE** | Restored `inputd/src/main.rs` to register `/scheme/input/evdev` as a 64 KiB / 8192-event ring buffer. `Socket::nonblock()` + `register_sync_scheme` to register under the v6.0 scheme name. 8-byte `EvdevEvent` records with partial-write rejection and overflow-drop policy. |
|
||||
| Phase 1.1: `EvdevProducerHandle` + `EvdevEvent` + `keycodes` | ✅ **DONE** (pre-existing) | inputd lib exposes `EvdevProducerHandle::new()` → opens `/scheme/input/evdev` for write. All Linux keycode constants in `inputd::keycodes` (KEY_ESC, KEY_A, KEY_LEFTCTRL, etc.). |
|
||||
| Phase 1.2: ps2d → EvdevProducerHandle | ✅ **DONE** (pre-existing) | `ps2d/src/state.rs` uses `EvdevProducerHandle`. PS/2 scancode sets 1, 2, 3 → Linux `KEY_*` in `ps2d/src/keymap.rs`. Mouse reports emit `EV_REL` (REL_X, REL_Y, REL_WHEEL, REL_HWHEEL) and `EV_KEY` (BTN_LEFT, BTN_RIGHT, BTN_MIDDLE, BTN_SIDE, BTN_EXTRA) followed by `SYN_REPORT`. |
|
||||
| Phase 1.3: usbhidd → redbear-hid-core | ✅ **DONE** (pre-existing) | usbhidd uses `redbear_hid_core::translate::translate_report`. HID usages mapped to Linux evdev codes in `redbear-hid-core/src/usage_table.rs` (BTN_MOUSE, BTN_JOYSTICK, REL_X, REL_Y, REL_WHEEL, REL_HWHEEL, ABS_*). |
|
||||
| Phase 1.4: i2c-hidd → redbear-hid-core | ✅ **DONE** (pre-existing) | Same path as usbhidd. |
|
||||
| Phase 1.5: intel-thc-hidd → redbear-hid-core | ✅ **DONE** (pre-existing) | Same path as usbhidd. |
|
||||
| Phase 1.6: virtio-inputd → EvdevProducerHandle | ✅ **DONE** (pre-existing) | virtio-inputd uses `EvdevProducerHandle` directly via `write_evdev_event` adapter (line 253). Converts virtio_input_event → EV_KEY/EV_REL/EV_ABS/EV_SYN. No orbclient fallback. |
|
||||
| Phase 1.7: evdevd consumes from /scheme/input/evdev | ✅ **DONE** (pre-existing) | evdevd opens `/scheme/input/evdev` for reading and relays 8-byte events to `/dev/input/eventN` for libinput. |
|
||||
| Phase 1.8: config wiring for evdevd in init | ✅ **DONE** | `redbear-mini.toml` defines `10_evdevd.service` (inherited by `redbear-full.toml`); runs `evdevd` as `oneshot_async`. Initfs `10_inputd.service` updated to register `input/evdev` scheme. Rootfs `29_activate_console.service` overridden in `redbear-legacy-base.toml` to skip the obsolete `inputd -A 2` invocation. |
|
||||
| Phase 1.9: udev-shim `/dev/input/eventN` mapping | 🚧 Pending | Phase 4 work. |
|
||||
| Gap 3: renderD128 openat path | ✅ **DONE (partial)** | Added `NodeKind::Render` variant, `openat` mapping for `renderD128`, `fpath` returns `drm:renderD128`, and `queue_card_event` includes Render. Mesa can now open the render node. |
|
||||
| Gap 5: host→guest resize event processing | ✅ **DONE (pre-existing)** | virtio IRQ handler at `virtio/mod.rs:366-403` reads `VIRTIO_GPU_EVENT_DISPLAY` and calls `refresh_connectors`. Scheme layer queues `hotplug` events. |
|
||||
| Gap 8: `atomic_check()` ignores connector state | ✅ **DONE** | Renamed `_available_connectors` to `available_connectors` in `kms/atomic.rs`. Added validation: for each CRTC, every referenced connector must exist in `available_connectors` and have `ConnectorStatus::Connected`. Returns `CrtcNotFound` or `ConnectorDisconnected` for invalid commits. |
|
||||
| Phase 2.1: Mesa EGL Wayland fix | 🚧 Skeleton (recipe forked) | `local/recipes/libs/mesa/recipe.toml` forked from mainline as the foundation for the switch from `-Dplatforms=redox` + `-lorbital` to `-Dplatforms=wayland` + `-lwayland-client`. Recipe modifications pending. |
|
||||
| Phase 3.5: redbear-compositor page flip fix | ✅ **DONE** | Renamed `DrmOutput._file` to `drm_file`; `flip()` now uses `&self.drm_file.write_all(&buf)` instead of reopening `/scheme/drm/card0` on every call. |
|
||||
| `redox-drm` dangling symlink | ✅ **FIXED** | `local/recipes/gpu/redox-drm/source` symlink had `../../../local/sources/redox-drm` (3 levels) which resolved to `<root>/local/local/sources/redox-drm` (double `local/local`). Fixed to `../../../../local/sources/redox-drm` (4 levels). |
|
||||
| `build-redbear.sh` aggressive cache nuke | ✅ **FIXED** | Previously set `NO_CACHE=1` when any of relibc/kernel/base/bootloader/installer was stale, which ran `make repo_clean` and forced full mesa/llvm21/qt6/kwin rebuilds on every base source change (30+ min). Now only deletes the specific stale package's pkgar and target dir. |
|
||||
| Stale `input/evdev` consumer blocking evdevd | ✅ **RESOLVED** | Before v6.0, evdevd crashed with `failed to open /scheme/input/evdev: No such device`. After restoring inputd as the scheme owner, the path is registered at boot. |
|
||||
| `evdevd` listed in `redbear-full.toml` | ✅ **DONE** (pre-existing) | `10_evdevd.service` is defined in `redbear-mini.toml` and inherited. |
|
||||
| `udev-shim` exposes `/dev/input/eventN` | ✅ **DONE** (pre-existing) | `local/recipes/system/udev-shim` creates the `/dev/input/event*` symlinks from the evdevd scheme. |
|
||||
| Phase 0: QML JIT gate (unblocks KWin + 12 KF6 packages) | 🔴 BLOCKED | Qt6Quick/QML engineering required. Estimated 4-6 weeks. |
|
||||
| Phase 1.9: udev-shim `/dev/input/eventN` mapping completeness | 🚧 Pending | Confirming eventN node creation works end-to-end in QEMU. |
|
||||
| Phase 2.1: Mesa EGL Wayland migration | 🚧 Skeleton only | Recipe forked but build flags not yet changed. |
|
||||
| Phase 2: DRM atomic connector resolution (Gap 1, 2) | 🔴 BLOCKED | Complex ATOMIC ioctl fix; 1-2 weeks per gap. |
|
||||
| Phase 4: Compositor protocol expansion (xdg_wm_base, dmabuf, data_device) | 🟡 Partial | xdg_wm_base + xdg_surface + xdg_toplevel + xdg_popup: implemented. zwp_linux_dmabuf_v1, wl_data_device, wl_subcompositor: still missing. |
|
||||
| Phase 5: KWin real build | 🔴 BLOCKED | Depends on QML gate (Phase 0). |
|
||||
| Phase 6-9: PipeWire, KDE Plasma, QEMU validation, Intel ARC | 🔴 BLOCKED | Downstream of KWin + QML. |
|
||||
|
||||
**v6.0 Architecture summary:**
|
||||
|
||||
```
|
||||
drivers (ps2d, usbhidd, i2c-hidd, intel-thc-hidd, virtio-inputd)
|
||||
└─ write Linux struct input_event to /scheme/input/evdev
|
||||
(inputd binary — multi-writer, single-reader ring buffer)
|
||||
evdevd (pure scheme → /dev/input/eventN adapter)
|
||||
└─ read from /scheme/input/evdev
|
||||
└─ expose /dev/input/eventN with full EVIOC ioctl support
|
||||
libinput (in-process to KWin)
|
||||
└─ read from /dev/input/event* as Linux native evdev
|
||||
```
|
||||
|
||||
**v5.0 Architecture (now obsolete):**
|
||||
```
|
||||
drivers → inputd (Orbital multiplexer) → Orbital compositor
|
||||
(parallel path never implemented for evdevd)
|
||||
```
|
||||
|
||||
The v5.0 dual-path was never built. The v6.0 single-producer evdev pipe
|
||||
is now functional in code. What remains is runtime verification
|
||||
(boot test: QEMU → redbear-compositor → evdevd → libinput sees PS/2
|
||||
keypress) and the upstream phases (QML, Mesa, KWin, KDE).
|
||||
|
||||
## 9.1 What Changed Since v5.0 (2026-06-08 → 2026-06-08)
|
||||
|
||||
| Change | Status | Notes |
|
||||
|
||||
Reference in New Issue
Block a user