feat(kvm): unattended Wayland input via uinput (VA-104 part 1) #106
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/VA-104-drm-kms-uinput-wayland"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First increment of #VA-104 (unattended Wayland desktop): the input half.
What
A
/dev/uinputpointer + keyboard backend (vervain-agent-kvm/src/uinput.rs) so a root system agent injects mouse and keyboard into a Wayland session (KWin / GNOME) with no xdg-desktop-portal consent prompt - the analogue of the X11 XTEST path. The kernel presents the virtual device to libinput, so the compositor consumes its events like a physical mouse/keyboard.0..=32767range.BTN_LEFT/RIGHT/MIDDLE/SIDE/EXTRA), wheel (REL_WHEEL/HWHEEL), and the evdevKEY_*range.vk_to_evdev): letters, digits, F1-F12, editing/navigation cluster, modifiers, common punctuation.touch.rs).The desktop input dispatch (
tunnel.rs::handle_desktop_input) now prefers uinput on a Wayland session (consent-free, present in the default build), falls back to the RemoteDesktop portal only when uinput is unavailable, and keeps XTEST for X11.Verification
just pre-commitgreen (fmt, clippy--deny warnings, build, tests). New unit tests cover the coordinate scaling and the keycode mapping. The device-open path is exercised in the no-/dev/uinputcase (returnsNotAvailable, no panic).Not in this PR
The capture half of VA-104 - DRM/KMS scanout capture for KWin/GNOME (the black-screen fix) - is the next increment. It needs on-hardware EGL iteration (tiled/compressed scanout buffers) and lands separately. This PR makes input work unattended once capture is in place.