Re: Multiple video elements lead to erratic mouse behavior through spice
Hi, > 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. ? > 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 has hotkeys (ctrl-alt-) to switch between displays. You can also pin the vnc server to one specific display (-device qxl,id=video0 -vnc :0,display=video0). That is probably easiest if you want use one of them only anyway. If you configure the guests xorg server to only use that display the mouse should behave too. It's also possible to configure multiple vnc servers and assign a different display to each of them, then start two vnc clients to see both displays side-by-side. mouse configuration is quite tricky then though. take care, Gerd
Re: Multiple video elements lead to erratic mouse behavior through spice
On Wed, Jun 10, 2020 at 01:58:13PM +0200, Christian Ehrhardt wrote: > Hi, > with a guest set up as in the following example mouse behavior breaks: > > > > > > > primary='yes'/> > function='0x0'/> > > > > function='0x0'/> > > > 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 > same. > > If I know connect to that via spice, spice is smart and opens both displays: > $ virt-viewer --connect qemu+ssh://ubuntu@10.246.115.255/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 > odd. > > 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. Regards, Daniel -- |: 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 :|
Re: Multiple video elements lead to erratic mouse behavior through spice
On Wed, Jun 10, 2020 at 01:58:13PM +0200, Christian Ehrhardt wrote: > Hi, > with a guest set up as in the following example mouse behavior breaks: > > > > > > > primary='yes'/> > function='0x0'/> > > > > function='0x0'/> > > > 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 > same. > > If I know connect to that via spice, spice is smart and opens both displays: > $ virt-viewer --connect qemu+ssh://ubuntu@10.246.115.255/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 I'm afraid I can't help on ^this, that is beyond libvirt. > > Let me know if someone wants a video in case the description is still too > odd. > > 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. So, if you want to stop libvirt doing that, use: https://libvirt.org/formatdomain.html#elementsVideo With ^this in place, you can use mdev with display=on as your primary display (I assume you're using Intel? Or are you already making use of ramfb to get boot output from NVIDIA?) > > 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, > Christian > > 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. Okay, this hints Intel, because there's no cursor with NVIDIA :D unless you use vncviewer and force usage of the remote cursor. But if you do want to use 2 virtual monitors (QXL+mdev combo), I've never tried such a thing, sorry. Erik > > 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. > > [1]: https://bugzilla.redhat.com/show_bug.cgi?id=707439
Multiple video elements lead to erratic mouse behavior through spice
Hi, with a guest set up as in the following example mouse behavior breaks: 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 same. If I know connect to that via spice, spice is smart and opens both displays: $ virt-viewer --connect qemu+ssh://ubuntu@10.246.115.255/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 odd. 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, Christian 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. [1]: https://bugzilla.redhat.com/show_bug.cgi?id=707439