Bug 1236412

Summary: Keyboard input via spice in virt-manager does not work
Product: [Fedora] Fedora Reporter: Kodiak Firesmith <kfiresmith>
Component: spiceAssignee: Christophe Fergeau <cfergeau>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: 100901017, alexl, alon, cfergeau, crobinso, hdegoede, jforbes, kfiresmith, luan.cestari, marcandre.lureau, sandmann, uril, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-20 19:50:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kodiak Firesmith 2015-06-28 18:12:53 UTC
Description of problem:
Since Fedora 22, keyboard input doesn't work via virt-manager nor virt-viewer when Spice protocol is used.  Keyboard *does* work if VNC protocol is used.  


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

libgovirt.x86_64 0.3.3-1.fc22
libvirt-client.x86_64 1.2.13.1-2.fc22
libvirt-daemon.x86_64 1.2.13.1-2.fc22
libvirt-daemon-config-network.x86_64 1.2.13.1-2.fc22
libvirt-daemon-driver-interface.x86_64 1.2.13.1-2.fc22
libvirt-daemon-kvm.x86_64 1.2.13.1-2.fc22
libvirt-gconfig.x86_64 0.2.0-1.fc22
libvirt-glib.x86_64 0.2.0-1.fc22
libvirt-gobject.x86_64 0.2.0-1.fc22
libvirt-python.x86_64 1.2.13-1.fc22
qemu-common.x86_64 2:2.3.0-5.fc22
qemu-kvm.x86_64 2:2.3.0-5.fc22
qemu-system-x86.x86_64 2:2.3.0-5.fc22
virt-manager.noarch 1.2.1-1.fc22
virt-manager-common.noarch 1.2.1-1.fc22
virt-viewer.x86_64 2.0-1.fc22


How reproducible:
 - Boot Fedora 22
 - Start virt-manager
 - Interact with VM using keyboard

Actual results:
 - keyboard input ignored completely

Expected results:
 - keyboard input should work

Additional info:
Tested on Lenovo T420 and Lenovo T430, in KDE 5 and XFCE.

Comment 1 Christophe Fergeau 2015-06-29 10:14:33 UTC
I assume this is a f22 host. What are you running as a guest? f22 as well? Is the spice agent running or not in the guest?

Comment 2 Kodiak Firesmith 2015-06-30 00:17:56 UTC
Hello Christophe,
Sorry I failed to include that information - I'm running Centos 7.1 guests.  This is before the spice agent could begin to run (assumption!) because this is happening early in Anaconda (the first part of a traditional VM build that requires keyboard input (rather than mouse which works) is the setting of partitions.  

I found something of a workaround.  While VNC does work, it also appears that you can use Spice if you change away from the default settings to the following:

Type: Spice server
Address: All interfaces (changed from default value of 'Localhost only')
Port: Auto
TLS Port: Auto

So it appears to be something about the address field on the spice server.  I find it kind of odd because the mouse part of Spice works regardless of the setting, but then again I don't know much about Spice.

Thanks a bunch!

 - Kodiak

Comment 3 Christophe Fergeau 2015-07-02 11:15:38 UTC
I haven't been able to reproduce with f22 host/client running GNOME, and centos 7.1 guest (DVD installer). I'm using the keyboard arrows at the grub menu to pick "boot installer", and very first screen is language chooser so this has keyboard navigation, the arrows there are working as expected. Any chance you could try with a GNOME desktop environment ?

Comment 4 Cole Robinson 2015-08-09 22:18:29 UTC
Can you attach the output of virt-manager --debug when reproducing the issue?

Comment 5 Cole Robinson 2015-09-20 19:50:50 UTC
No response for a couple months, so closing

Comment 6 100901017 2017-01-16 07:59:31 UTC
Hi Cole Im having same issue. Here are results. Thx in advance


[Mon, 16 Jan 2017 23:50:09 virt-manager 12979] DEBUG (cli:258) Launched with command line: /usr/share/virt-manager/virt-manager --debug
[Mon, 16 Jan 2017 23:50:09 virt-manager 12979] DEBUG (virt-manager:182) virt-manager version: 1.4.0
[Mon, 16 Jan 2017 23:50:09 virt-manager 12979] DEBUG (virt-manager:183) virtManager import: <module 'virtManager' from '/usr/share/virt-manager/virtManager/__init__.pyc'>
[Mon, 16 Jan 2017 23:50:10 virt-manager 12979] DEBUG (virt-manager:213) PyGObject version: 3.14.0
[Mon, 16 Jan 2017 23:50:10 virt-manager 12979] DEBUG (virt-manager:217) GTK version: 3.14.13
[Mon, 16 Jan 2017 23:50:10 virt-manager 12979] DEBUG (engine:496) libguestfs inspection support: False
[Mon, 16 Jan 2017 23:50:10 virt-manager 12979] DEBUG (systray:156) Showing systray: False
[Mon, 16 Jan 2017 23:50:10 virt-manager 12979] DEBUG (engine:177) Connected to remote app instance.

Comment 7 Luan Cestari 2017-10-11 03:19:40 UTC
I got the same issue too

Comment 8 Christophe Fergeau 2017-10-11 08:00:45 UTC
This could be https://bugzilla.redhat.com/show_bug.cgi?id=1479682

Comment 9 Luan Cestari 2017-10-11 11:00:29 UTC
(In reply to Christophe Fergeau from comment #8)
> This could be https://bugzilla.redhat.com/show_bug.cgi?id=1479682

It seems it is the sane

$ GDK_BACKEND=x11  virt-viewer -c qemu:///system generic

(virt-viewer:15227): vnc-keymap-WARNING **: Unknown keycode mapping '(unnamed)'.
Please report to gtk-vnc-list
including the following information:

  - Operating system
  - GDK build
  - X11 Server
  - xprop -root
  - xdpyinfo


(virt-viewer:15227): Gtk-WARNING **: Allocating size to SpiceDisplay 0x55f2180f03b0 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?

(virt-viewer:15227): GSpice-CRITICAL **: send_key: assertion 'scancode != 0' failed

(virt-viewer:15227): GSpice-CRITICAL **: send_key: assertion 'scancode != 0' failed