[vfio-users] VM loses mouse

Patrick O'Callaghan poc at usb.ve
Tue Apr 25 11:35:09 UTC 2017


On Tue, 2017-04-25 at 09:07 +0000, Daimon Wang wrote:
> I can't imagine how it works.

Not sure what you don't understand, but to be explicit:

 * The host runs on the IGP with HDMI output
 * The guest runs on the 2nd GPU with HDMI output
 * Both HDMI cables go through a HDMI switch to my single monitor
 * I run KVM/QEMU via virt-manager, which shows a window on my host
   Linux desktop
 * To access the guest I click in the virt-manager window and hit the
   HDMI switch. This takes me to Windows.
 * To go back to the host I hit the HDMI switch, which returns the
   monitor to the virt-manager window, then Ctrl-Alt releases the mouse

This works reliably, even when the bug occurs, i.e. the bug only
affects mouse control in Windows. It doesn't affect my switching back
and forth in any way. Toggling back and forth between host and guest
does not correct the bug and reactivate the mouse. The only solution so
far is to forcibly reboot the guest from virt-manager.

> But maybe you can try the following.1. Set the VM mouse type to usb tablet. The default is PS/2. I'm not sure how to edit this in libvirt, but qemu option should be "-usbdevice tablet"2. Install the vdagent from https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-latest.exe. You may only install the agent related component.
> 

virt-manager had no options for the default mouse, i.e. it's a PS/2
mouse or nothing. I could add an additional mouse I guess.

@everyone, is there any way to freely switch mouse between the host and the VM with VGA pass-through? I remember there's a thread discussing this and the final solution is using ssh to execute some script, which is too complex. 

I've seen several references about this kind of thing, including
something called Synchronicity (?). All they did was make me waste a
lot of time when I first tried setting this up. I think part of the
problem is that people have different use cases and hence different
assumptions about what one is trying to do e.g. many of them implicitly
assume one has several monitors, or even several keyboards and/or mice,
which I would suspect is actually the minority. This complicates the
discussion.

poc




More information about the vfio-users mailing list