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 1472756 - Keys to control audio are not forwarded to the guest
Summary: Keys to control audio are not forwarded to the guest
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Guo, Zhiyi
URL:
Whiteboard:
Depends On: 1471758
Blocks: 1482388
TreeView+ depends on / blocked
 
Reported: 2017-07-19 11:11 UTC by Pavel Grunt
Modified: 2018-04-11 00:30 UTC (History)
18 users (show)

Fixed In Version: qemu-kvm-rhev-2.10.0-1.el7
Doc Type: Bug Fix
Doc Text:
Prior to this update, sending the BREAK or PAUSE keys over the VNC or SPICE client was not properly handled and had no effect in the guest. This update adds proper key handlers for these keys, so they trigger appropriate events in the guest. In addition, sending keys for controlling guest audio over VNC or SPICE now works as expected.
Clone Of: 1471758
: 1482388 (view as bug list)
Environment:
Last Closed: 2018-04-11 00:30:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:1104 0 normal SHIPPED_LIVE Important: qemu-kvm-rhev security, bug fix, and enhancement update 2018-04-10 22:54:38 UTC

Description Pavel Grunt 2017-07-19 11:11:45 UTC
Reproducible using qemu-kvm-rhev-2.9.0 (rhevh-rhel-7.4)
works correctly in qemu-kvm-rhev-2.6.0 (rhevh-rhel-7.3)

+++ This bug was initially created as a clone of Bug #1471758 +++

Description of problem:
Some "special" keysymbols (mute, volume up, volume down) are not forwarded to the guest

Version-Release number of selected component (if applicable):
qemu-system-x86-2.9.0-2.fc26.x86_64

How reproducible:
100%

Steps to Reproduce:
1. connect to a VM using SPICE
2. press a key to control volume

Actual results:
Nothing happens, the key is not received

Expected results:
Key is received

Additional info:
regression since qemu commit 8c10e0baf0260b59a4e984744462a18016662e3e

--- Additional comment from Cole Robinson on 2017-07-17 12:19:40 EDT ---

That commit is:

commit 8c10e0baf0260b59a4e984744462a18016662e3e
Author: Hervé Poussineau <hpoussin>
Date:   Thu Sep 15 22:06:26 2016 +0200

    ps2: use QEMU qcodes instead of scancodes


Which has #if 0 code like:

#if 0
    [Q_KEY_CODE_POWER] = 0x0e5e,
    [Q_KEY_CODE_SLEEP] = 0x0e5f,
    [Q_KEY_CODE_WAKE] = 0x0e63,

    [Q_KEY_CODE_AUDIONEXT] = 0xe019,
    [Q_KEY_CODE_AUDIOPREV] = 0xe010,
    [Q_KEY_CODE_AUDIOSTOP] = 0xe024,
    [Q_KEY_CODE_AUDIOPLAY] = 0xe022,
    [Q_KEY_CODE_AUDIOMUTE] = 0xe020,
    [Q_KEY_CODE_VOLUMEUP] = 0xe030,
    [Q_KEY_CODE_VOLUMEDOWN] = 0xe02e,
    [Q_KEY_CODE_MEDIASELECT] = 0xe06d,
    [Q_KEY_CODE_MAIL] = 0xe06c,
    [Q_KEY_CODE_CALCULATOR] = 0xe021,
    [Q_KEY_CODE_COMPUTER] = 0xe06b,
    [Q_KEY_CODE_AC_SEARCH] = 0xe065,
    [Q_KEY_CODE_AC_HOME] = 0xe032,
    [Q_KEY_CODE_AC_BACK] = 0xe06a,
    [Q_KEY_CODE_AC_FORWARD] = 0xe069,
    [Q_KEY_CODE_AC_STOP] = 0xe068,
    [Q_KEY_CODE_AC_REFRESH] = 0xe067,
    [Q_KEY_CODE_AC_BOOKMARKS] = 0xe066,
#endif


Gerd, do you know what the issue was here?

--- Additional comment from Gerd Hoffmann on 2017-07-18 02:55:50 EDT ---

> Gerd, do you know what the issue was here?

We don't have Q_KEY_CODES for them

Comment 3 Ademar Reis 2017-08-10 18:28:38 UTC
fixed upstream:

commit 0500cb1d25e69108ae1a2474412bbd255bbc34b2
Author: Gerd Hoffmann <kraxel>
Date:   Wed Jul 26 17:29:18 2017 +0200

    ps2: enable multimedia keys
    
    Fixes: 8c10e0baf0260b59a4e984744462a18016662e3e
    Signed-off-by: Gerd Hoffmann <kraxel>
    Reviewed-by: Eric Blake <eblake>
    Message-id: 20170726152918.11995-6-kraxel

Comment 7 Guo, Zhiyi 2017-12-14 07:31:17 UTC
Reproduce this issue with qemu-kvm-rhev-2.9.0-16.el7_4.5.x86_64, host & guest kernel 3.10.0-693.5.1.el7.x86_64.

qemu cli used:
/usr/libexec/qemu-kvm -name input-test -m 2G \
        -cpu qemu64,check \
        -smp 2 \
        -vga std \
        -drive file=/home/rhel74-64-virtio.qcow2,if=none,id=drive-scsi-disk0,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-
scsi-pci,id=scsi0,addr=04 -device scsi-hd,drive=drive-scsi-disk0,bus=scsi0.0,scsi-id=0,lun=0,id=scsi-disk0,bootindex=1 \
        -uuid 215e11b2-a869-41b5-91cd-6a32a907be7e \
        -qmp unix:/tmp/vmmouse-keyboard,server,nowait \
        -monitor stdio \
        -device virtio-serial-pci,id=virtio-serial1 \
        -chardev spicevmc,id=charchannel0,name=vdagent \
        -device virtserialport,bus=virtio-serial1.0,nr=3,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 \
        -spice port=5900,disable-ticketing \

My keyboards has volume up/volume down/audio next/audio previous/audio stop/audio play/mail/calculator/home keys

Steps:
1)Login to guest desktop, open gnome-terminal and run xev -event keyboard
2)press the keys I have
3)launch another gnome-terminal and run xinput test keyboard_id
4)repeat step 2)
Result:
After 2), no keyevents prompt. After 4), no events prompt.
Switch display to vnc, get same results as spice.

Test against qemu-kvm-rhev-2.10.0-11.el7.x86_64, after 2) xev will prompt some output, because of some keys have no function defined in gnome, just output. 
After 4), the outputs of keys are same after comparing the outputs between host and guest.
Switch display to vnc, I get same results.So bug is fixed

Comment 8 Guo, Zhiyi 2017-12-14 07:31:50 UTC
Verified per comment 7

Comment 10 errata-xmlrpc 2018-04-11 00:30:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:1104


Note You need to log in before you can comment on or make changes to this bug.