Opened 15 years ago

Closed 13 years ago

#5989 closed bug (fixed)

qemu/kvm's absolute mouse interface (-usbdevice tablet) doesn't work

Reported by: benb Owned by: mmlr
Priority: normal Milestone: R1
Component: Drivers/Mouse/USB Version: R1/alpha2
Keywords: qemu kvm Cc: planche2k@…
Blocked By: Blocking:
Platform: All

Description

When you start an OS with GUI in qemu, the most preferred way to do it generally is "-usbdevice tablet", because that allows the VNC (or whatever you use as VM display) to report absolute mouse coordinates to the VM, which match the pointer's position on the real desktop. That means that the mouse pointer is exactly at the point where it is on the real desktop. With -usbdevice mouse, only relative coordinates can be reported, because that's how hardware mice work, so if the VM desktop and the real desktop disagree about mouse acceleration or similar, which is almost always the case, you get seemingly erratic mouse behavior as you cross the border between VM window and rest of desktop, which is common and very irritating.

Reproduction:

  1. Start

kvm -hda haiku-r1alpha2-anyboot.image -m 512 -vnc :1 -k de -usbdevice tablet -net nic,model=pcnet -net tap,...

  1. On your desktop, start krdc vnc:/vmhost:1
  2. Try to access the desktop with the mouse. Move the mouse quickly over the window. Click.

Actual result:

  • You don't see any mouse pointer moving
  • While you move the mouse pointer, you see the CPU meter spike (to 50% here)
  • In the most bottom right, there is a 1x1 black pixel, which I guess is part of the mouse pointer.
  • When you click, the desktop menu appears in the bottom right. You still cannot select any entries with the mouse.
  • Keyboard words

Expected result:

  • Mouse pointer moves and works.

Additional information: "-usbdevice mouse" works, but not as well as tablet would, because it's not in sync with the desktop where VNC runs.

Change History (4)

comment:1 by benb, 15 years ago

What's worst with "mouse" is that when VM and real desktop get out of sync, the mouse leaves the VM window before it reaches the border of the VM desktop, so I often cannot access the VM desktop on the left/right/top/bottom, only in the middle. That makes it a blocker to use the OS.

comment:2 by idefix, 15 years ago

From IRC:

[13:29:58] <idefix_dommel> BenB: could you do a listusb -v in a terminal window? with qemu's "-usbdevice tablet"
[13:30:42] <idefix_dommel> it would be interesting to know what kind of tablet qemu is emulating
[13:41:36] <BenB> idefix_dommel: which parts of listusb do you need? I have neither network nor copy&paste, so I have to type it all.

You could take a screenshot of the qemu-window and attach it to this ticket.

comment:3 by andreasf, 15 years ago

Cc: planche2k@… added

I believe François (mmu_man) had a patch for QEMU's wacom device for such an issue, not sure if it ever got applied. You may want to search the qemu-devel mailing list.

You did not name the KVM version; can you reproduce it with QEMU Git HEAD?

comment:4 by mmlr, 13 years ago

Resolution: fixed
Status: newclosed

Implemented absolute pointer devices in hrev41951. Should now work fine in kvm with -usbdevice tablet.

Note: See TracTickets for help on using tickets.