Multiple video elements lead to erratic mouse behavior through spice

Christian Ehrhardt christian.ehrhardt at
Wed Jun 10 11:58:13 UTC 2020

with a guest set up as in the following example mouse behavior breaks:

    <graphics type='spice' port='5901' autoport='no' listen=''>
     <listen type='address' address=''/>
     <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://ubuntu@ 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?

In my original case I wanted to take away the QXL device, to jst keep the
Mdev as one screen (and the one I really want).
But due to [1] the video section is re-added automatically.

Maybe this comes down to not re-adding that default video entry if a
hostdev has display=on set?

I'd appreciate any pointers if this rings a bell or a discussion on
not-auto-adding-video if display=on is present.

Kind Regards,

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.

P.P.S. Sorry for cross posting, at least I avoided cross posting even
further (spice-devel / qemu-devel) hoping that libvirt & virt-tools would
be involved enough that if someone recognizes this he can point me to the
right place.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the libvir-list mailing list