Multiple video elements lead to erratic mouse behavior through spice
Daniel P. Berrangé
berrange at redhat.com
Wed Jun 10 13:42:42 UTC 2020
On Wed, Jun 10, 2020 at 01:58:13PM +0200, Christian Ehrhardt wrote:
> with a guest set up as in the following example mouse behavior breaks:
> <graphics type='spice' port='5901' autoport='no' listen='0.0.0.0'>
> <listen type='address' address='0.0.0.0'/>
> <gl enable='no'/>
> <model type='qxl' ram='65536' vram='16384' vgamem='16384' heads='1'
> <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> <model type='qxl' ram='65536' vram='16384' vgamem='16384' heads='1'/>
> <address type='pci' domain='0x0000' bus='0x08' slot='0x01'
> Please note that this is for illustration purposes as this everyone can
> easily retry.
> I originally had QXL + GPU as mediated device, where the behavior is the
> If I know connect to that via spice, spice is smart and opens both displays:
> $ virt-viewer --connect qemu+ssh://email@example.com/system guestname
> But while with one display mouse integration (to move in/out smoothly) and
> positioning of the mouse pointer is fine.
> It is broken with this double display setup.
> What I see is:
> - no mouse integration anymore (falls back to capture the mouse)
> - often the mouse can not move upwards anymore
> - sometimes "left" also doesn't work
> Let me know if someone wants a video in case the description is still too
> I have tried spice-client-gtk and virt-viewer, but both behave the same way.
> If I take away one of the displays it works well again.
> So I'm wondering how virtual-multi-monitor is supposed to work, are there
> known bugs or tweaks that would apply here?
Did you enable the SPICE agent ? IIUC, the SPICE agent provides a
paravirtualized mouse device, and that may be what's required to have
this work properly with multi-monitor. The agent is also what lets
you dynamically turn on/off each head and do display resizing.
BTW, there are two ways todo multi-monitor with SPICE. One as youve
shown here, and the oither using a single QXL card, but with heads=NNN
instead of heads=1. One approach works best with Windows, and one
approach works best with Linux, but I can't remember which way around.
I expect they'll probably still have the same mouse behaviour though.
> P.S. I tried VNC but that just has "other" issues. It only shows 1 of 2
> displays and on the one I see over amplifies the mouse movement by the
> amount the other display adds to ther overall desktop size.
VNC simply doesn't support multi-monitor at all. In theory we could
block this in libvirt, but then if QEMU fixed it, libvirt would be
needlessly blocking it.
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list