Qemu Windows 10 mouse not working

I managed to set up my bios, grub and cpu for virtualization, and i passed through a GPU.
Just installed the drivers for it, but 2 times already, mouse stops working. ž

One time, when hovering over the VM, the mouse completely disappeared, and now it’s showing the correct “windows cursor” icon and it’s moving, but completely disregards clicks…

First time i managed to fix it by uninstalling virtio-win-gt-x64, then the mouse worked, but there was no network. Reinstalling virtio-win made network come back, and the mouse was working.

Then i installed AMD drivers and it stopped working again.
Then i AGAIN removed virtio-win, and it’s working now, no network.
Then i installed it and got network until i restarted the VM, and mouse went away again, no input.

How do i fix this? Im trying to get Windows VM with GPU passthrough to use some software i need, i need it to work properly.

It’s also a bit laggy, even with GPU passed through, recognized and drivers installed, but mouse first, i can’t deal with anything until i get mouse working.

EDIT: I tried SPICE guest tools, but it’s the same thing. As soon as they’re installed, mouse stops working.

inxi -Fza

System:
  Kernel: 6.1.0-x64v1-xanmod1-MANJARO arch: x86_64 bits: 64 compiler: gcc
    v: 12.2.0 parameters: BOOT_IMAGE=/@/boot/vmlinuz-manjaro-xanmod
    root=UUID=27a6f9c0-8b45-42c5-85e1-be095307048f rw rootflags=subvol=@
    amdgpu.gpu_recovery=1 audit=0
    resume=UUID=b58bc35c-1a93-4c4c-a1ec-5eefe535dea6 udev.log_priority=3
    amd_iommu=on vfio-pci.ids=1002:6658,1002:aac0
  Desktop: KDE Plasma v: 5.26.4 tk: Qt v: 5.15.7 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: ASRock model: B550M Pro4 serial: <superuser required>
    UEFI: American Megatrends LLC. v: P2.30 date: 02/24/2022
CPU:
  Info: model: AMD Ryzen 5 5600G with Radeon Graphics bits: 64 type: MT MCP
    arch: Zen 3 gen: 4 level: v3 note: check built: 2021-22
    process: TSMC n7 (7nm) family: 0x19 (25) model-id: 0x50 (80) stepping: 0
    microcode: 0xA50000C
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB desc: 6x512 KiB
    L3: 16 MiB desc: 1x16 MiB
  Speed (MHz): avg: 3524 high: 3900 min/max: 1400/4464 boost: enabled
    scaling: driver: acpi-cpufreq governor: performance cores: 1: 3900 2: 2991
    3: 3900 4: 2995 5: 2991 6: 3900 7: 3900 8: 3900 9: 3900 10: 2993 11: 3900
    12: 3019 bogomips: 93425
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Bonaire XTX [Radeon R7 260X/360] vendor: PC Partner / Sapphire
    driver: vfio-pci v: N/A alternate: radeon,amdgpu arch: GCN-2
    code: Sea Islands process: GF/TSMC 16-28nm built: 2013-17 pcie: gen: 3
    speed: 8 GT/s lanes: 16 bus-ID: 01:00.0 chip-ID: 1002:6658 class-ID: 0300
  Device-2: AMD Cezanne [Radeon Vega Series / Radeon Mobile Series]
    driver: amdgpu v: kernel arch: GCN-5.1 code: Vega-2 process: TSMC n7 (7nm)
    built: 2018-21 pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
    speed: 16 GT/s ports: active: DP-1,HDMI-A-1 empty: DP-2 bus-ID: 06:00.0
    chip-ID: 1002:1638 class-ID: 0300 temp: 35.0 C
  Display: x11 server: X.Org v: 21.1.6 with: Xwayland v: 22.1.7
    compositor: kwin_x11 driver: X: loaded: amdgpu unloaded: modesetting,radeon
    alternate: fbdev,vesa dri: radeonsi gpu: amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 5120x1440 s-dpi: 96 s-size: 1354x381mm (53.31x15.00")
    s-diag: 1407mm (55.38")
  Monitor-1: DP-1 mapped: DisplayPort-0 pos: primary,left
    model: AOC Q3279WG5B serial: <filter> built: 2020 res: 2560x1440 dpi: 90
    gamma: 1.2 size: 725x428mm (28.54x16.85") diag: 842mm (33.1") ratio: 15:9
    modes: max: 2560x1440 min: 720x400
  Monitor-2: HDMI-A-1 mapped: HDMI-A-0 pos: right model: AOC Q3279WG5B
    serial: <filter> built: 2020 res: 2560x1440 dpi: 90 gamma: 1.2
    size: 725x428mm (28.54x16.85") diag: 842mm (33.1") ratio: 15:9 modes:
    max: 2560x1440 min: 720x400
  API: OpenGL v: 4.6 Mesa 22.3.1 renderer: AMD Radeon Graphics (renoir LLVM
    14.0.6 DRM 3.49 6.1.0-x64v1-xanmod1-MANJARO) direct render: Yes
Audio:
  Device-1: AMD Tobago HDMI Audio [Radeon R7 360 / R9 OEM]
    vendor: PC Partner / Sapphire driver: vfio-pci bus-ID: 1-7.2:6
    alternate: snd_hda_intel chip-ID: 046d:0a9c pcie: class-ID: 0300
    speed: Unknown lanes: 63 serial: <filter> link-max: gen: 6 speed: 64 GT/s
    bus-ID: 01:00.1 chip-ID: 1002:aac0 class-ID: 0403
  Device-2: AMD Renoir Radeon High Definition Audio driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
    speed: 16 GT/s bus-ID: 06:00.1 chip-ID: 1002:1637 class-ID: 0403
  Device-3: AMD Family 17h/19h HD Audio vendor: ASRock driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
    speed: 16 GT/s bus-ID: 06:00.6 chip-ID: 1022:15e3 class-ID: 0403
  Device-4: Logitech G432 Gaming Headset type: USB
    driver: hid-generic,snd-usb-audio,usbhid
  Device-5: Focusrite-Novation Scarlett 2i4 USB type: USB
    driver: snd-usb-audio bus-ID: 3-2.2:4 chip-ID: 1235:8200 class-ID: 0103
  Sound API: ALSA v: k6.1.0-x64v1-xanmod1-MANJARO running: yes
  Sound Interface: sndio v: N/A running: no
  Sound Server-1: JACK v: 1.9.21 running: yes
  Sound Server-2: PulseAudio v: 16.1 running: yes
  Sound Server-3: PipeWire v: 0.3.63 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: ASRock driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: e000 bus-ID: 04:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: virbr0 state: down mac: <filter>
Bluetooth:
  Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) type: USB
    driver: btusb v: 0.8 bus-ID: 3-2.1:3 chip-ID: 0a12:0001 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Drives:
  Local Storage: total: 698.65 GiB used: 198.72 GiB (28.4%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Kingston model: SNV2S500G
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: SBI02102 temp: 32.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 250GB
    size: 232.89 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 1B6Q scheme: GPT
Partition:
  ID-1: / raw-size: 448.97 GiB size: 448.97 GiB (100.00%)
    used: 197.57 GiB (44.0%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 608 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 448.97 GiB size: 448.97 GiB (100.00%)
    used: 197.57 GiB (44.0%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 448.97 GiB size: 448.97 GiB (100.00%)
    used: 197.57 GiB (44.0%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 30 (default 60) cache-pressure: 50 (default 100)
  ID-1: swap-1 type: partition size: 16.5 GiB used: 1.16 GiB (7.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
Sensors:
  System Temperatures: cpu: 43.2 C mobo: N/A gpu: amdgpu temp: 35.0 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 336 Uptime: 1h 48m wakeups: 0 Memory: 15.01 GiB
  used: 3.74 GiB (24.9%) Init: systemd v: 252 default: graphical
  tool: systemctl Compilers: gcc: 12.2.0 clang: 14.0.6 Packages: pm: pacman
  pkgs: 1754 libs: 488 tools: pamac pm: flatpak pkgs: 0 Shell: Zsh v: 5.9
  default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.24

XML from the VM:

<domain type="kvm">
  <name>Affinity</name>
  <uuid>63891115-a4c7-4580-8ff8-5a92920193fb</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://microsoft.com/win/10"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit="KiB">8388608</memory>
  <currentMemory unit="KiB">8388608</currentMemory>
  <vcpu placement="static">8</vcpu>
  <os firmware="efi">
    <type arch="x86_64" machine="pc-q35-7.2">hvm</type>
    <boot dev="hd"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv mode="custom">
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
    </hyperv>
    <vmport state="off"/>
  </features>
  <cpu mode="host-passthrough" check="none" migratable="on">
    <topology sockets="1" dies="1" cores="4" threads="2"/>
  </cpu>
  <clock offset="localtime">
    <timer name="hpet" present="yes"/>
    <timer name="hypervclock" present="yes"/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" discard="unmap"/>
      <source file="/var/lib/libvirt/images/Affinity.qcow2"/>
      <target dev="sda" bus="sata"/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <source file="/home/veprovina/Downloads/Win10_22H2_EnglishInternational_x64.iso"/>
      <target dev="sdb" bus="sata"/>
      <readonly/>
      <address type="drive" controller="0" bus="0" target="0" unit="1"/>
    </disk>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <source file="/home/veprovina/Downloads/virtio-win-0.1.225.iso"/>
      <target dev="sdc" bus="sata"/>
      <readonly/>
      <address type="drive" controller="0" bus="0" target="0" unit="2"/>
    </disk>
    <controller type="usb" index="0" model="qemu-xhci" ports="15">
      <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
    </controller>
    <controller type="pci" index="0" model="pcie-root"/>
    <controller type="pci" index="1" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="1" port="0x10"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="2" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="2" port="0x11"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
    </controller>
    <controller type="pci" index="3" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="3" port="0x12"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
    </controller>
    <controller type="pci" index="4" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="4" port="0x13"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
    </controller>
    <controller type="pci" index="5" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="5" port="0x14"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
    </controller>
    <controller type="pci" index="6" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="6" port="0x15"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
    </controller>
    <controller type="pci" index="7" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="7" port="0x16"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x6"/>
    </controller>
    <controller type="pci" index="8" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="8" port="0x17"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x7"/>
    </controller>
    <controller type="pci" index="9" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="9" port="0x18"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="10" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="10" port="0x19"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x1"/>
    </controller>
    <controller type="pci" index="11" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="11" port="0x1a"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x2"/>
    </controller>
    <controller type="pci" index="12" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="12" port="0x1b"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x3"/>
    </controller>
    <controller type="pci" index="13" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="13" port="0x1c"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x4"/>
    </controller>
    <controller type="pci" index="14" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="14" port="0x1d"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x5"/>
    </controller>
    <controller type="pci" index="15" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="15" port="0x1e"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x6"/>
    </controller>
    <controller type="pci" index="16" model="pcie-to-pci-bridge">
      <model name="pcie-pci-bridge"/>
      <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
    </controller>
    <controller type="sata" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
    </controller>
    <controller type="virtio-serial" index="0">
      <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
    </controller>
    <interface type="network">
      <mac address="52:54:00:b6:f7:4b"/>
      <source network="default"/>
      <model type="virtio"/>
      <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>
    </interface>
    <serial type="pty">
      <target type="isa-serial" port="0">
        <model name="isa-serial"/>
      </target>
    </serial>
    <console type="pty">
      <target type="serial" port="0"/>
    </console>
    <channel type="spicevmc">
      <target type="virtio" name="com.redhat.spice.0"/>
      <address type="virtio-serial" controller="0" bus="0" port="1"/>
    </channel>
    <input type="tablet" bus="usb">
      <address type="usb" bus="0" port="1"/>
    </input>
    <input type="mouse" bus="ps2"/>
    <input type="keyboard" bus="ps2"/>
    <input type="tablet" bus="virtio">
      <address type="pci" domain="0x0000" bus="0x08" slot="0x00" function="0x0"/>
    </input>
    <graphics type="spice" autoport="yes">
      <listen type="address"/>
      <image compression="off"/>
    </graphics>
    <sound model="ich9">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
    </sound>
    <audio id="1" type="spice"/>
    <video>
      <model type="qxl" ram="65536" vram="65536" vgamem="16384" heads="1" primary="yes"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
    </video>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
      </source>
      <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x01" slot="0x00" function="0x1"/>
      </source>
      <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
    </hostdev>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="2"/>
    </redirdev>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="3"/>
    </redirdev>
    <memballoon model="virtio">
      <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
    </memballoon>
  </devices>
</domain>

just my opinion:

  1. we have no way of knowing how you configured your VM
  2. we have no hardware info
  3. this is not really Manjaro specific - installing Windows 10 …
  1. how do i share the configuration? EDIT: Nvm, i shared the XML, it has all the info in it.
  2. If you mean inxi -Fza, i edited it into my post now
  3. it’s in the “virtualization” part of the forum, i’m doing virtualization ON manjaro. Or is the forum only for installing manjaro as a guest? I already installed windows 10, it’s just one bug - the one that has nothing to do with the guest as well, but rather probably the host, or the tools i used for it. So it has not much to do with the guest being widnows really… Maybe it does, but still…

You probably should look into more niche forums. There is a related discord server you may find useful:

Neat! Thanks! :slight_smile: