LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 09-13-2018, 12:40 PM   #1
Miguel_D
LQ Newbie
 
Registered: Sep 2018
Posts: 2

Rep: Reputation: Disabled
Modifier keys issue on Win10 as KVM guest on Kubuntu 18.04.1


Hello everyone,

My first post here!

I'm using Kubuntu 18.04.1 LTS (Bionic), and have Win 10 running inside KVM.
I use SPICE (from virt-manager) to connect.
Both mouse and keyboard use the virtio drivers from latest guest additions.
Version details in the technical section below.

Quite often (but not always) Windows misses some modifier key (SHIFT/CTRL), and I think it's related to using the mouse just before using the keyboard, but cannot be sure. That means for example if I try to CTRL-c, then CTRL-v, and later CTRL-z because the CTRL-v failed, what happens is:
  • CTRL-c correctly copies whatever I was copying
  • CTRL-v misses the CTRL, so a "v" is written
  • if I spot the issue, and without releasing CTRL, press CTRL-z to undo, as CTRL is in the "miss" state, a "z" is written
By releasing CTRL and pressing it again, we're back to normal (until the issue happens again!).
The keyboard works perfect on the Linux host.

I'm totally lost at what the reason may be.

Technical details below (feel free to ask for more if that helps).

VERSIONS
  • qemu-kdm v2.11 (1:2.11+dfsg-1ubuntu7.5)
  • libvirt0 v4.0.0 (4.0.0-1ubuntu8.5)
  • virt-manager v1.5.1 (1:1.5.1-0ubuntu1)
  • drivers: virtion-win-0.1.160.iso
  • Windows 10 Enterprise, version 1803, OS build 17134.228
(everything related to "Tablet mode" disabled on Windows guest)
(everything related to "Accessibility" disable on Linux host)

LIBVIRT DEFINITION
Code:
<!--
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 win10
or other application using the libvirt API.
-->

<domain type='kvm'>
  <name>win10</name>
  <uuid>fdb51f25-389d-448c-9677-5376bd9f3233</uuid>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <vcpu placement='static'>4</vcpu>
  <os>
    <type arch='x86_64' machine='pc-q35-2.11'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
    <nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
  </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='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/kvm-spice</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source file='/var/lib/libvirt/images/win10-NwHw.img'/>
      <target dev='vda' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <target dev='sdb' bus='sata'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='usb' index='0' model='nec-xhci'>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <model name='i82801b11-bridge'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <model name='pci-bridge'/>
      <target chassisNr='2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </controller>
    <controller type='pci' index='3' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='3' port='0x10'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0x11'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
    </controller>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0x12'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
    </controller>
    <controller type='pci' index='6' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='6' port='0x13'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
    </controller>
    <controller type='pci' index='7' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='7' port='0x14'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
    </controller>
    <controller type='pci' index='8' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='8' port='0x15'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
    </controller>
    <controller type='pci' index='9' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='9' port='0x16'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
    </controller>
    <controller type='pci' index='10' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='10' port='0x17'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:99:ad:f0'/>
      <source bridge='br1'/>
      <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='keyboard' bus='ps2'/>
    <input type='keyboard' bus='virtio'>
      <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
    </input>
    <input type='tablet' bus='virtio'>
      <address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <graphics type='spice' port='5920' autoport='no' listen='127.0.0.1' keymap='es'>
      <listen type='address' address='127.0.0.1'/>
      <image compression='off'/>
    </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>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </video>
    <redirdev bus='usb' type='spicevmc'>
      <address type='usb' bus='0' port='1'/>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
      <address type='usb' bus='0' port='2'/>
    </redirdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </memballoon>
  </devices>
</domain>
The guest addition logs don't tell much. The only bit which may be relevant are these from vdagent.log:
Code:
2860::INFO::2018-09-13 05:52:03,833::input_desktop_message_loop::Desktop: Default
2860::INFO::2018-09-13 07:40:01,258::handle_clipboard_grab::grab type 1 format=13
2860::INFO::2018-09-13 08:31:09,290::handle_control_event::Control command 4
2860::INFO::2018-09-13 10:01:08,813::handle_clipboard_grab::grab type 1 format=13
2860::INFO::2018-09-13 10:03:19,032::handle_clipboard_grab::grab type 1 format=13
2860::INFO::2018-09-13 10:03:20,924::handle_control_event::Control command 4
2860::INFO::2018-09-13 10:21:12,392::handle_clipboard_grab::grab type 1 format=13
2860::INFO::2018-09-13 10:21:40,347::handle_control_event::Control command 4
2860::INFO::2018-09-13 11:31:30,599::handle_clipboard_grab::grab type 1 format=13
2860::INFO::2018-09-13 11:43:49,957::handle_control_event::Control command 4
2860::INFO::2018-09-13 13:53:25,219::handle_control_event::Control command 2
and
Code:
3968::INFO::2018-09-13 14:18:42,897::handle_announce_capabilities::Got capabilities (1)
3968::INFO::2018-09-13 14:18:42,897::handle_announce_capabilities::5077
3968::INFO::2018-09-13 14:18:42,897::send_announce_capabilities::Sending capabilities:
3968::INFO::2018-09-13 14:18:42,897::send_announce_capabilities::6B7
3968::INFO::2018-09-13 14:18:42,897::handle_announce_capabilities::Got capabilities (1)
3968::INFO::2018-09-13 14:18:42,897::handle_announce_capabilities::5077
I'm totally lost, so any advice or request for more information welcome!
Thanks!

Miguel
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel-based Virtual Machine (KVM): Switching from KVM guest to host (e.g. Linux Mint) & maximize guest screen fanoflq Linux - Newbie 2 07-13-2016 06:10 PM
Kvm guest dns issue Wojk Linux - Virtualization and Cloud 0 11-05-2012 09:03 PM
Problem re-mapping non-standard keys to modifier keys tias42 Linux - General 4 04-09-2011 05:03 AM
Slackware64 -current kvm guest boot issue rpedrica Slackware 10 03-31-2011 10:15 AM
mouse keys as modifier keys (ctrl & alt) belda Linux - Desktop 3 06-25-2009 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 02:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration