fix: make graphical VMs usable with a mouse - #29
Conversation
A window or VNC VM had only qemu's default relative PS/2 mouse. A desktop guest cannot align its cursor to the host cursor from relative deltas, so the pointer drifted and clicks in XFCE landed off target. usb-tablet reports absolute coordinates, so the guest cursor tracks the host cursor in the gtk window and in a VNC client. qemu-xhci gives it a USB bus; the default pc machine has none.
Alpine boots mdev, which never feeds Xorg its input devices, so libinput found no mouse or keyboard and the desktop ignored every click. The tablet device existed but no driver bound it. setup-devd udev makes eudev the device manager and adds udev-trigger and udev-settle to sysinit. A cold-plug then hands the current devices to the live session that starts X now, before the next boot's trigger runs. Ubuntu, Debian, and Arch already run udev under systemd, so only the Alpine script needs this.
|
Warning Review limit reached
Next review available in: 45 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
A provisioned XFCE VM opened a window but ignored every click. Two causes, both fixed here.
No absolute pointer (all VMs). A window or VNC VM had only qemu's default relative PS/2 mouse. A desktop guest cannot align its cursor to the host cursor from relative deltas, so the pointer drifts and clicks miss. Added
-device qemu-xhci -device usb-tabletso the guest cursor tracks the host cursor 1:1 in the gtk window and in a VNC client. This is OS-agnostic — it rides the QEMU command line for every VM.Alpine fed Xorg no input (Alpine only). Even with the tablet attached, XFCE got nothing. Alpine boots
mdev, and Xorg reads its input devices fromudev. The tablet'seventdevice existed but no driver bound it, so libinput saw no mouse or keyboard. The Xorg log said "The server relies on udev to provide the list of input devices" and then added none. The Alpine xfce recipe now runssetup-devd udev(switches the device manager to eudev, adds udev-trigger/udev-settle to sysinit) and cold-plugs, so X finds the pointer in the live session and after a reboot. Ubuntu, Debian, and Arch already run udev under systemd, so their scripts need nothing.Verified live: after
setup-devd udevand a reboot, the Xorg log showsAdding extended input device "QEMU QEMU USB Tablet" (type: MOUSE), and the desktop takes clicks.Tests:
TestArgsLivenow asserts the tablet on both the window and VNC paths.just checkandjust testpass.