So I have a Windows 10 VM running on Arch Linux and it is working fine with 1 Display. When I add the second video tag with virsh edit VM-name, and get the two displays, the mouse starts moving around weird and when not in movement place it self all the way to the left. Then when I try to click anywhere it moves to the top left corner and not pressing where it was.

How can I get the mouse to move normally or debug this error?

I see the VM with virt-viewer, setup up with libvirt and has spice set to graphics.


<domain type="kvm" id="2">
      <libosinfo:os id="http://microsoft.com/win/10"/>
  <memory unit="KiB">7864320</memory>
  <currentMemory unit="KiB">7864320</currentMemory>
  <vcpu placement="static">2</vcpu>
    <type arch="x86_64" machine="pc-q35-3.1">hvm</type>
    <boot dev="hd"/>
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
  <cpu mode="host-passthrough" check="none"/>
    <clock offset="localtime">
      <timer name="rtc" tickpolicy="catchup"/>
      <timer name="pit" tickpolicy="delay"/>
      <timer name="hpet" present="no"/>
      <timer name="hypervclock" present="yes"/>
      <suspend-to-mem enabled="no"/>
      <suspend-to-disk enabled="no"/>
      <disk type="file" device="disk">
        <driver name="qemu" type="raw" cache="none" io="native"/>
        <source file="/var/lib/libvirt/images/win10.raw"/>
        <target dev="sda" bus="virtio"/>
        <alias name="virtio-disk0"/>
        <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
      <disk type="file" device="cdrom">
        <driver name="qemu" type="raw"/> 
        <source file="/usr/share/virtio-win.iso"/>
        <target dev="sdb" bus="sata"/>
        <alias name="sata0-0-1"/>
        <address type="drive" controller="0" bus="0" target="0" unit="1"/>
      <disk type="file" device="cdrom">
        <driver name="qemu" type="raw"/>
        <source file="/usr/share/win10.iso"/>
        <target dev="sdc" bus="sata"/>
        <alias name="sata0-0-2"/>
        <address type="drive" controller="0" bus="0" target="0" unit="2"/>
      <controller type="usb" index="0" model="qemu-xhci" ports="15">
        <alias name="usb"/>
        <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
      <controller type="sata" index="0">
        <alias name="ide"/>
        <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
      <controller type="pci" index="0" model="pcie-root">
        <alias name="pcie.0"/>
      <controller type="pci" index="1" model="pcie-root-port">
        <model name="pcie-root-port"/>
        <target chassis="1" port="0x10"/>
        <alias name="pci.1"/>
        <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
      <controller type="pci" index="2" model="pcie-root-port">
        <model name="pcie-root-port"/>
        <target chassis="2" port="0x11"/>
        <alias name="pci.2"/>
        <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
      <controller type="pci" index="3" model="pcie-root-port">
        <model name="pcie-root-port"/>
        <target chassis="3" port="0x12"/>
        <alias name="pci.3"/>
        <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
      <controller type="pci" index="4" model="pcie-root-port">
        <model name="pcie-root-port"/>
        <target chassis="4" port="0x13"/>
        <alias name="pci.4"/>
        <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
      <controller type="pci" index="5" model="pcie-root-port">
        <model name="pcie-root-port"/>
        <target chassis="5" port="0x14"/>
        <alias name="pci.5"/>
        <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
      <interface type="network">
        <mac address="xxx"/>
        <source network="default" bridge="virbr0"/>
        <target dev="vnet0"/>
        <model type="e1000e"/>
        <alias name="net0"/>
        <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
      <serial type="pty">
        <source path="/dev/pts/2"/>
        <target type="isa-serial" port="0">
          <model name="isa-serial"/>
        <alias name="serial0"/>
      <console type="pty" tty="/dev/pts/2"> 
        <source path="/dev/pts/2"/>
        <target type="serial" port="0"/>
        <alias name="serial0"/>
      <input type="tablet" bus="usb">
        <alias name="input0"/>
        <address type="usb" bus="0" port="1"/>
      <input type="mouse" bus="ps2">
        <alias name="input1"/>
      <input type="keyboard" bus="ps2">
        <alias name="input2"/>
      <graphics type="spice" port="5900" autoport="yes" listen="">
        <listen type="address" address=""/>
        <model type="qxl" ram="131072" vram="65536" vgamem="65536" heads="2" primary="yes"/>
        <alias name="video0"/>
        <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
      <memballoon model="virtio">
        <alias name="balloon0"/>
        <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
    <seclabel type="dynamic" model="dac" relabel="yes">

If anyone experiences this, the answer to my problem was to add a channel device with spicevmc. Also, make sure you have the spice-vdagent running

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.