Bug 985461 - No mouse cursor in Spice/QXL-enabled guests
Summary: No mouse cursor in Spice/QXL-enabled guests
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-viewer
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Daniel Berrangé
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-17 14:22 UTC by Erik Lotspeich
Modified: 2024-01-16 13:31 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Erik Lotspeich 2013-07-17 14:22:40 UTC
Description of problem:

I have a guest that isn't using the guest QXL video driver. The mouse cursor works fine in that guest. All of my QXL-enabled VMs show no mouse cursor.

Note that the mouse works, just no cursor. I can click on stuff, but I just can't see the cursor.

This was working fine with exactly the same VM configuration when I was using virt-manager 0.9.5 and virt-viewer 0.5.6 compiled with GTK 2 support. It seems that this issue is somehow related to the move to GTK 3.

Version-Release number of selected component (if applicable):

Spice 0.12.3
virt-manager 0.10.0
virt-viewer 0.5.6

How reproducible:

Always

Steps to Reproduce:
1. Configure two VMs both with qxl/spice and with the tablet emulation device in addition to mouse
2. Install the guest qxl driver in only one of the VMs (the other will work in QXL's VGA compatibility mode)
3. Observe the results

Actual results:

The VM in VGA emulation shows the mouse cursor. The VM with the QXL driver shows no mouse cursor.

Expected results:

Mouse cursor shows in all video consoles

Additional info:

I have tried this both with virt-viewer and virt-manager and the problem shows in both. As I mentioned above, everything worked with the previous version of virt-manager (0.9.5) and virt-viewer compiled with GTK 2 support.

Comment 1 Erik Lotspeich 2013-07-30 14:09:22 UTC
I just upgraded to the latest libvirt 1.1.1 that was released today. That fixed this issue for me.

Comment 2 bjoernv 2016-01-02 16:20:20 UTC
The issue still isn't fixed with latest sources:

Host:
- libvirt 1.3.0
- Qemu 2.4.0
- spice-protocol 0.12.10
- virt-viewer 2.00
- Kernel 4.3.3

Guest:
- spice-protocol 0.12.10
- xf86-video-qxl-0.1.4
- X.Org X Server 1.18.0
- Kernel 4.3.3

The cursor works, but is invisible. Sometimes a nearly transparent rectangle can be seen instead of a cursor.

Comment 3 nicolas 2016-01-15 17:55:38 UTC
I can confirm that report.
guest : windows seven 
last qxl drivers
sdl2 display client 

=> no mouse cursor, 
so dual monitor is impossible

Regards, 
Nicolas

Comment 4 anton.gubarkov@gmail.com 2018-10-10 10:17:05 UTC
I still experience this issue from time to time with 

Spice-protocol 0.12.14
Spice  0.14.0-r2
virt-viewer 7.0
spice-gtk 0.35

Windows 10 guest with QXL DOD 10.0

Comment 5 anton.gubarkov@gmail.com 2018-10-10 10:17:45 UTC
Restarting the spice session makes the problem go away for a time.

Comment 6 Jon Ingason 2018-11-23 13:02:52 UTC
I am experience same problem, no mouse cursor. The cursor is usually not visible in none of virt-managers' windows when VM has started. Sometimes it get visible after some time and then visible in all windows.

I am running virt-manager-1.5.1-1.fc28 on Fedora 28. I have seen this problem before on previous version of Fedora.

Comment 7 webi 2018-11-27 16:01:28 UTC
I also experience a similar issue. The mouse cursor is not visible under the first qxl display only when using more than one qxl device (required for windows guests). I use the following components:

Host:
=====
* Ubuntu Mate 18.04.1 LTS
* QEMU 3.0.0
* spice-protocol 0.12.14
* usbredir 0.7.1
* spice-gtk 0.35
* virt-viewer 7.0

Guest:
======
* Windows 10
* latest spice-guest-tools from https://www.spice-space.org/download/windows/spice-guest-tools/

I avoid using libvirt and thus built virt-viewer without libvirt support. I use the remote-viewer application for spice rendering.

Steps to reproduce:
===================
* Start QEMU with a Windows10 Image: 
  $ qemu-system-x86_64 -vga qxl -spice port=5930,disable-ticketing -device virtio-serial-pci -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 -chardev spicevmc,id=spicechannel0,name=vdagent -m 4G -enable-kvm -monitor stdio -drive if=virtio,file=.../Windows10.qcow2,cache=none -device qemu-xhci,id=xhci -device usb-tablet -device qxl-vga
  $ remote-viewer spice://127.0.0.1:5930
 -> Mouse cursor is not shown in primary display

Comment 8 Daniel Moraes 2018-12-11 13:43:04 UTC
I am also having this issue.

The cursor only appears on the guest when the host mouse is grabbed (by clicking on the display), and disappears when you release it (by pressing Ctrl + Alt). I need to use the host and guest cursors at the same time, without having to grab.

Host:
* Arch Linux (Linux 4.19.8)
* QEMU 3.0.0
* libvirt 4.9.0
* virt-viewer 7.0

Guest:
* Windows 10
* Spice Guest Tools: https://www.spice-space.org/download/windows/spice-guest-tools/

Libvirt XML:

<domain type='kvm'>
  <name>win10</name>
  <uuid>9204881a-a58c-414c-82e5-9cdd1632a91c</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'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <os>
    <type arch='x86_64' machine='pc-q35-3.0'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/ovmf/x64/OVMF_CODE.fd</loader>
    <nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
    </hyperv>
    <vmport state='off'/>
  </features>
  <cpu mode='host-model' check='partial'>
    <model fallback='allow'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <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'/>
      <source file='/home/moraes/vm/kvm/win10'/>
      <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/moraes/net/dls/virtio-win-0.1.141.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='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </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>
    <interface type='network'>
      <mac address='52:54:00:65:ed:4d'/>
      <source network='default'/>
      <model type='e1000e'/>
      <address type='pci' domain='0x0000' bus='0x01' 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>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <input type='mouse' bus='usb'>
      <address type='usb' bus='0' port='2'/>
    </input>
    <graphics type='spice' autoport='yes'>
      <listen type='address'/>
    </graphics>
    <sound model='ich9'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
    </sound>
    <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='usb' managed='no'>
      <source>
        <vendor id='0x045e'/>
        <product id='0x0745'/>
      </source>
      <address type='usb' bus='0' port='1'/>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </memballoon>
  </devices>
</domain>

Comment 9 Laurent Bonnaud 2024-01-16 13:31:18 UTC
I had the same problem with a Windows 11 guest (but strangely not with another old Windows 10 guest).

I solved it by running Qemu with this option:

    -display gtk,show-cursor=on # needed with qxl

Hope this helps...


Note You need to log in before you can comment on or make changes to this bug.