Evdev Qemu mouse passthrough "teleporting mouse"

If i pass my mouse through via evdev, it works. Except if i perform a click: it teleports to a specific location on the screen, which depends on the mouse position of the host. Does anyone know how to fix this?

My qemu:commandline

  >     <qemu:commandline>
>     <qemu:arg value='-global'/>
>     <qemu:arg value='pcie-root-port.speed=8'/>
>     <qemu:arg value='-global'/>
>     <qemu:arg value='pcie-root-port.width=16'/>
>     <qemu:arg value='-object'/>
>     <qemu:arg value='input-linux,id=mouse1,evdev=/dev/input/by-id/usb-Logitech_G203_Prodigy_Gaming_Mouse_0A7536623330-event-mouse'/>
>     <qemu:arg value='-object'/>
>     <qemu:arg value='input-linux,id=kbd1,evdev=/dev/input/by-id/usb-Logitech_Gaming_Keyboard_G213_056A37673136-event-kbd,grab_all=on,repeat=on'/>
>   </qemu:commandline>

I am currently having the same issue, my keyboard works perfect but on my mouse if I left/right click or scroll the cursor teleports.

Here’s my configuration:

   <qemu:arg value='-object'/>
   <qemu:arg value='input-linux,id=mouse1,evdev=/dev/input/by-id/usb-Logitech_USB_Receiver-if01-event-mouse'/>
   <qemu:arg value='-object'/>
   <qemu:arg value='input-linux,id=kbd1,evdev=/dev/input/by-id/usb-Corsair_Corsair_K65_Gaming_Keyboard-if02-event-kbd,grab_all=on,repeat=on'/>

I seem to have fixed my issue. In virt-manager I had a default Tablet device called “EvTouch USB Graphics Tablet”. Removed it and now everything works perfectly.

2 Likes

This solved the issue for me, thanks!