[vfio-users] VM loses mouse

Javier Celaya jcelaya at gmail.com
Tue Apr 25 12:09:42 UTC 2017


Another option is to use input-linux:
https://www.kraxel.org/blog/2016/04/linux-evdev-input-support-in-qemu-2-6/
I'm not sure how to use it with libvirt, though, I always use qemu from the
command line.

However, take into account that it does not work reliably until qemu
2.9.0-rc3 (I sent a patch to fix it that was included upstream on March
this year)


Javi

2017-04-25 13:45 GMT+02:00 Christopher Thompson <
Chris.Thompson1 at synopsys.com>:

> This sounds like the PS/2 driver/emulated hardware controller gets itself
> in knots. PS/2 isn't hot plug, so if something goes wrong it's generally
> stuffed until a reboot, which sounds like your issue.
>
> One common option is to use Synergy, which passes the keyboard and mouse
> over the network, you set up the synergy service running on the Linux host,
> with it configured to map an edge of the screen to your Windows VM, then
> when the Windows VM is running and the synergy client connects you can move
> the mouse over that edge of the screen and it will appear on Windows (if
> you have multiple monitors this looks like the mouse seamlessly goes from
> one screen to the other).
>
> Keyboard focus follows whatever system the mouse is active on. To pass the
> mouse back just take it back off the same screen edge. The edge->target
> machine relationship is programmable so you can have all edges go to the
> same machine, or some go to different machines, etc.
>
> Not ideal, but maybe this could be an acceptable workaround?
>
> It's probably also worth someone investigating the PS/2 code in KVM/QEMU,
> if you feel like compiling it yourself then you could investigate yourself
> where the mouse gets dropped.
>
> Cheers,
> Chris
>
> > -----Original Message-----
> > From: vfio-users-bounces at redhat.com [mailto:vfio-users-
> > bounces at redhat.com] On Behalf Of Patrick O'Callaghan
> > Sent: 25 April 2017 12:35
> > To: Daimon Wang <daimon_swang at yahoo.com>; vfio-users at redhat.com
> > Subject: Re: [vfio-users] VM loses mouse
> >
> > 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://urldefense.proofpoint.com/v2/url?u=https-3A__www.spice-
> > 2Dspace.org_download_windows_spice-2Dguest-2Dtools_spice-2Dguest-
> > 2Dtools-
> > 2Dlatest.exe&d=DwIGaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=TExZx8yLtOzsbf
> > _HC9QPv-ZkXYHFdhZk1V_A1MnZLYE&m=vHmykc4FOwm8RL79r-
> > ioblmVO8ILwqoy-ky11wg5oaw&s=zUoblW0icQsWVNuSnnriyvBKmRUXfIt6I-
> > 5Yv7XIsqE&e= . 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
> >
> > _______________________________________________
> > vfio-users mailing list
> > vfio-users at redhat.com
> > https://urldefense.proofpoint.com/v2/url?u=https-
> > 3A__www.redhat.com_mailman_listinfo_vfio-
> > 2Dusers&d=DwIGaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=TExZx8yLtOzsbf_HC9
> > QPv-ZkXYHFdhZk1V_A1MnZLYE&m=vHmykc4FOwm8RL79r-
> > ioblmVO8ILwqoy-
> > ky11wg5oaw&s=Ddz5LlGcMeAITQA396GX2ZaqTZYRAbfFXOnfvtQ8he4&e=
>
> _______________________________________________
> vfio-users mailing list
> vfio-users at redhat.com
> https://www.redhat.com/mailman/listinfo/vfio-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20170425/180a023b/attachment.htm>


More information about the vfio-users mailing list