Bug 1074144 - Xwayland environments lose keycode mapping, breaking spice keyboard
Xwayland environments lose keycode mapping, breaking spice keyboard
Status: NEW
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: GNOME
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: E-mail List
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-12-27 18:01 UTC by Mike Latimer
Modified: 2018-04-09 21:39 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Latimer 2017-12-27 18:01:09 UTC
When running under Wayland, keyboard mappings are lost through remote spice/vnc connections. This is easy to reproduce as follows:

- Configure a Tumbleweed machine with Wayland
- Connect to a remote virtualization host (ssh -X [host])
- Run virt-viewer to connect to a running virtual machine (virt-viewer [domain]
- If the keyboard works, shut down virt-viewer, and restart it.
- If the keyboard no longer works, the following messages are usually displayed in the terminal where virt-viewer was started:

> (virt-viewer:113985): vnc-keymap-WARNING **: Unknown keycode mapping '(unnamed)'.
> Please report to gtk-vnc-list@gnome.org
> including the following information:
> 
>   - Operating system
>   - GDK build
>   - X11 Server
>   - xprop -root
>   - xdpyinfo
> 
> (virt-viewer:113985): Gtk-WARNING **: Allocating size to SpiceDisplay 0xc54360 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
> (virt-viewer:113985): GSpice-CRITICAL **: send_key: assertion 'scancode != 0' failed
> (virt-viewer:113985): GSpice-CRITICAL **: send_key: assertion 'scancode != 0' failed

Usually, the first time virt-viewer is started, the keyboard works. However, shutting down virt-viewer and restarting it will almost always result in a broken keyboard. Once in this state, the client machine (running Wayland) has to have X completely restarted in order to get back to a working state.

This problem has been reported upstream (https://bugs.freedesktop.org/show_bug.cgi?id=99714), and there are several RedHat bugs on this issue. The most comprehensive is https://bugzilla.redhat.com/show_bug.cgi?id=1512564.
Comment 1 Stefan Dirsch 2017-12-28 14:02:27 UTC
According to https://bugzilla.redhat.com/show_bug.cgi?id=1479682 it's a bug in spice-gtk, but since we don't have any expert there and it's related to Wayland I'm reassigning this one to our GNOME/desktop team, which are pushing Wayland.
Comment 2 Frederic Crozat 2018-01-11 15:38:31 UTC
(In reply to Stefan Dirsch from comment #1)
> According to https://bugzilla.redhat.com/show_bug.cgi?id=1479682 it's a bug
> in spice-gtk, but since we don't have any expert there and it's related to
> Wayland I'm reassigning this one to our GNOME/desktop team, which are
> pushing Wayland.

spice-gtk is handled by virtualization team. I guess we'll need to wait for upstream to come up with a solution
Comment 3 Bruce Rogers 2018-04-09 19:21:41 UTC
As of the current Tumbleweed update, I also started seeing the issue as well (well, in my case no ssh -X need be involved).

I see where the redhat bug shows a fix having been prepared, which is the following:

commit 28e3dc34424f5e5b0441f2341d777ae4362363f0
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Fri Mar 9 09:30:00 2018 +0100

    Use scancode instead of keycode names

I verified at least in my case, this addresses the issue.

Adding patch to the spice-gtk package.
Comment 4 Bruce Rogers 2018-04-09 21:39:37 UTC
Unfortunately this doesn't resolve the ssh -X usage though.