5

I'm running Windows 8 in QEMU KVM, and two things make it not very usable.

First: mouse is slow (it lags behind movement) and I see the most mouse. That means every time I move, first I see host mouse moving and then guest mouse slowly gets under it.

Second: keyboard doesn't handle holding keys well. So let's say I press 'a' for several seconds. Normally I would expect a's to be typed every x miliseconds. In QEMU, only one a is written at start, and only when I release the key, all others are written at once.

My configuration is:

<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
  virsh edit Windows_8
or other application using the libvirt API.
-->

<domain type='kvm'>
  <name>Windows_8</name>
  <uuid>b0208dac-b52b-1c2f-99a0-464daa8028b1</uuid>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <os>
    <type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>Haswell</model>
    <vendor>Intel</vendor>
    <feature policy='require' name='tm2'/>
    <feature policy='require' name='est'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='osxsave'/>
    <feature policy='require' name='smx'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='ds'/>
    <feature policy='require' name='vme'/>
    <feature policy='require' name='dtes64'/>
    <feature policy='require' name='abm'/>
    <feature policy='require' name='ht'/>
    <feature policy='require' name='acpi'/>
    <feature policy='require' name='pbe'/>
    <feature policy='require' name='tm'/>
    <feature policy='require' name='pdcm'/>
    <feature policy='require' name='pdpe1gb'/>
    <feature policy='require' name='ds_cpl'/>
    <feature policy='require' name='rdrand'/>
    <feature policy='require' name='f16c'/>
    <feature policy='require' name='xtpr'/>
    <feature policy='require' name='monitor'/>
  </cpu>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/kvm-spice</emulator>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source dev='/dev/sda'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:9f:53:97'/>
      <source network='default'/>
      <model type='rtl8139'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes'/>
    <sound model='ich6'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
    <video>
      <model type='vga' vram='65536' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
</domain>

I have tried all types of mouse: PS/2, touchpad and USB.

Is it a common problem and is there some solution? Maybe some guest drivers? (But I have only found too difficult tutorials to install Spice, so if you know about understandable one, please point me to it)

Thanks for any useful advice.

Juraj
  • 161
  • 1
  • 2
  • 11

1 Answers1

1

I don't think it is strictly related to QEMU as it may be a problem between QEMU and especially Windows. Please see this article, it helped me fixing a similar problem few weeks ago.

Eugen Mihailescu
  • 3,553
  • 2
  • 32
  • 29
  • Thanks, the thing with registry helped with the keyboard problem. But mouse still lags and I see a host mouse. As for problem being QEMU specific, I think it is so, because in VMWare mouse works well (but VMWare seems to be not well separated from host - it causes several seconds host system freezes quite often, even though I only assigned 1/4 of processors and 1/2 of RAM to it). – Juraj Apr 14 '15 at 07:31
  • Certainly not related to your problem, but from your configuration above I can recommend you the following changes: (1) use virtio bus for your disk (ie instead of you should use ); it will improve the overall performances (2) I have more/less the same configuration on a Win10 preview test machine and everything works well – Eugen Mihailescu Apr 14 '15 at 09:52
  • Thanks for suggestion Eugen. Actually trying to install virtio was one of things I wanted to achieve. I tried installers from http://alt.fedoraproject.org/pub/alt/virtio-win/stable/ and https://launchpad.net/kvm-guest-drivers-windows/+download, but when I changed the driver to virtio, I couldn't boot, so I suppose installation wasn't successful. Could you point me to some up-to-date tutorial how to install it? – Juraj Apr 14 '15 at 13:09
  • There is nothing wrong with your virtio installation. The thing is that when you switch your bus from IDE to virtio the Windows doesn't know how to handle the new driver. My trick was to install the virtio driver first and only then to switch your disk bus to virtio. To do that just create an additional 1MB disk and set virtio as bus type. Then while on Windows install the virtio driver. Then power-off, switch entirely your disk buses to virtio and you are good to go. Finally drop the dummy disk where it belongs :-) – Eugen Mihailescu Apr 14 '15 at 13:25