Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1540056

Summary: Xwayland reports send_key: assertion 'scancode != 0'
Product: Red Hat Enterprise Linux 7 Reporter: Tomas Pelka <tpelka>
Component: spice-gtkAssignee: Default Assignee for SPICE Bugs <rh-spice-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: SPICE QE bug list <spice-qe-bugs>
Severity: unspecified Docs Contact: Jana Heves <jsvarova>
Priority: unspecified    
Version: 7.5CC: cfergeau, dblechte, jkoten, mboisver, ofourdan, rh-spice-bugs, vbenes, victortoso
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spice-gtk-0.35-1.el7 Doc Type: Known Issue
Doc Text:
Keyboard not working in VM browsed by *remote-viewer* and *virt-viewer* When run inside a Wayland session, *remote-viewer* and *virt-viewer* utilities do not recognize key events in a virtual machine. Moreover, Xwayland reports the following error: send_key: assertion 'scancode != 0'
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-03 12:25:46 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 Tomas Pelka 2018-01-30 07:38:54 UTC
Description of problem:
Key events in VM browsed by remote-viewer/virt-viewer and gnome-boxes most probably too are not recognized when remote-viewer/virt-viewer or gnome-boxes running inside wayland session.

Version-Release number of selected component (if applicable):
spice-gtk3-0.34-3.el7

How reproducible:
100%

Steps to Reproduce:
1. managed to get this reproduces when opening vv file in remote-viewer
2.
3.

Actual results:
lots of (remote-viewer:17111): GSpice-CRITICAL **: send_key: assertion 'scancode != 0' failed

Expected results:
no GSpice-CRITICALs and keyboard should be grabbed

Additional info:

Comment 1 Tomas Pelka 2018-01-30 07:42:37 UTC
I'm not really sure whether this is supported or not. If not please do not close yet we should document and ass to release notes first.

Comment 2 Tomas Pelka 2018-01-30 07:43:06 UTC
I'm not really sure whether this is supported or not. If not please do not close yet we should document and ass to release notes first.

Comment 3 Matěj Cepl 2018-01-30 16:11:36 UTC
Perhaps related are Fedora bug 1512564 and bug 1479682 ?

Comment 4 Olivier Fourdan 2018-02-06 15:05:12 UTC
*** Bug 1537525 has been marked as a duplicate of this bug. ***

Comment 5 Christophe Fergeau 2018-02-14 17:21:15 UTC
(In reply to Tomas Pelka from comment #0)
> Description of problem:
> Key events in VM browsed by remote-viewer/virt-viewer and gnome-boxes most
> probably too are not recognized when remote-viewer/virt-viewer or
> gnome-boxes running inside wayland session.
> 

One note here, remote-viewer/virt-viewer/gnome-boxes can run natively as wayland clients on Fedora, and this issue with keyboard events only happen when they are explicitly run with GDK_BACKEND=x11.
On RHEL7, they always get run through Xwayland, not as native wayland clients?

Comment 10 Victor Toso 2018-05-25 14:30:39 UTC
Patch merged upstream 28e3dc34424f5e5b0441f2341d777ae4362363f0
Thanks Olivier, for the fix.

Comment 11 Victor Toso 2018-06-22 08:23:32 UTC
git tag --contains 28e3dc34424f5e5b0441f2341d777ae4362363f0
v0.35

The fix should be included in the rebase from bug 1562126