Skip to content

fix: make graphical VMs usable with a mouse - #29

Merged
NovusEdge merged 2 commits into
mainfrom
fix-usb-tablet
Aug 9, 2026
Merged

fix: make graphical VMs usable with a mouse#29
NovusEdge merged 2 commits into
mainfrom
fix-usb-tablet

Conversation

@NovusEdge

Copy link
Copy Markdown
Owner

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-tablet so 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 from udev. The tablet's event device 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 runs setup-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 udev and a reboot, the Xorg log shows Adding extended input device "QEMU QEMU USB Tablet" (type: MOUSE), and the desktop takes clicks.

Tests: TestArgsLive now asserts the tablet on both the window and VNC paths. just check and just test pass.

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.
@NovusEdge NovusEdge added the bug Something isn't working label Aug 9, 2026
@NovusEdge NovusEdge self-assigned this Aug 9, 2026
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@NovusEdge, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 02f514e0-0ce5-4493-964f-e3cb1441d047

📥 Commits

Reviewing files that changed from the base of the PR and between 4250d87 and 0e37b86.

📒 Files selected for processing (3)
  • internal/qemu/args.go
  • internal/qemu/args_test.go
  • internal/recipes/bundled/xfce/install-alpine.sh

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@NovusEdge
NovusEdge merged commit 69a4558 into main Aug 9, 2026
7 of 8 checks passed
@NovusEdge
NovusEdge deleted the fix-usb-tablet branch August 9, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant