Bug 1512456

Summary: usb-kbd missing some special keys
Product: Red Hat Enterprise Linux 8 Reporter: Guo, Zhiyi <zhguo>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
qemu-kvm sub component: USB QA Contact: Guo, Zhiyi <zhguo>
Status: CLOSED WONTFIX Docs Contact:
Severity: low    
Priority: low CC: chayang, jinzhao, juzhang, knoel, kraxel, nanliu, ngu, qizhu, rbalakri, ribarry, virt-maint, zhguo
Version: 8.0Keywords: Triaged
Target Milestone: pre-dev-freeze   
Target Release: 8.1   
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-08 07:25:28 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 Guo, Zhiyi 2017-11-13 09:42:49 UTC
Description of problem:
Media keys are missing for qemu usb-kbd

Version-Release number of selected component (if applicable):
host & guest: 3.10.0-781.el7.x86_64
qemu-kvm-rhev-2.10.0-5.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot a rhel7.5 guest with usb-kbd:
/usr/libexec/qemu-kvm -name input-test -m 2G \
-cpu qemu64,check \
-smp 2 \
-device cirrus-vga \
-netdev tap,id=idinWyYp,vhost=on -device virtio-net-pci,mac=42:ce:a9:d2:4d:d7,id=idlbq7eA,netdev=idinWyYp \
-uuid 215e11b2-a869-41b5-91cd-6a32a907be7e \
-device ich9-usb-uhci6 \
-drive file=/home/rhel75.qcow2,if=none,id=drive-scsi-disk0,format=qcow2,cache=none,werror=stop,rerror=stop  -device ide-drive,drive=drive-scsi-disk0 \
-qmp unix:/tmp/input-port,server,nowait \
-monitor stdio \
-device usb-kbd \
2.Inside guest, open gnome-terminal,execute 'showkey -k | grep press' and try to input media keys, keys I used are:
'NEXTSONG',
'PREVIOUSSONG',
'STOPCD',
'PLAYPAUSE',
'MUTE',
'VOLUMEUP',
'VOLUMEDOWN',
'MAIL',
'CALC',
'COMPUTER',
'SEARCH',
'HOMEPAGE',
'BACK',
'FORWARD',
'STOP',
'REFRESH',
'FAVORITES'
3.After input finish, wait for 10s for showkey to terminate and check the output of showkey

Actual results:
No output from showkey

Expected results:
the keycode of media keys output here:
keycode 163 press
keycode 165 press
keycode 166 press
keycode 164 press
keycode 113 press
keycode 115 press
keycode 114 press
keycode 155 press
keycode 140 press
keycode 157 press
keycode 217 press
keycode 172 press
keycode 158 press
keycode 159 press
keycode 128 press
keycode 173 press

Additional info:
ps2-kbd has all these keys. vnc/spice won't affect the result.

Comment 2 Guo, Zhiyi 2017-11-14 02:04:14 UTC
Summary the missing keys are:
'NEXTSONG',
'PREVIOUSSONG',
'STOPCD',
'PLAYPAUSE',
'MUTE',
'VOLUMEUP',
'VOLUMEDOWN',
'MAIL',
'CALC',
'COMPUTER',
'SEARCH',
'HOMEPAGE',
'BACK',
'FORWARD',
'STOP',
'REFRESH',
'FAVORITES',
'KATAKANA',
'HIRAGANA',
'HENKAN'

Comment 3 Gerd Hoffmann 2018-08-10 12:04:50 UTC
please retest with a 2.12 build.

Comment 4 liunana 2018-08-14 08:54:33 UTC
(In reply to Gerd Hoffmann from comment #3)
> please retest with a 2.12 build.

Use emulate-key tools(command # ./emulate-key -v NEXTSONG) to retest with qemu-kvm-rhev-2.12.0-7.el7.x86_64,
and keys I sent to guest from host(login by ssh on another host) are:
'NEXTSONG',
'PREVIOUSSONG',
'STOPCD',
'PLAYPAUSE',
'MUTE',
'VOLUMEUP',
'VOLUMEDOWN',
'MAIL',
'CALC',
'COMPUTER',
'SEARCH',
'HOMEPAGE',
'BACK',
'FORWARD',
'STOP',
'REFRESH',
'FAVORITES'

Inside guest gnome terminal, there is no output except the three keys below.
key 'MUTE' outputs a mute icons,
key 'VOLUMEUP' output a volume icons and do volume up,
key 'VOLUMEDOWN' output a volume icons and do volume down.


Does emulate-key tool have any update ?

Comment 5 Guo, Zhiyi 2018-08-20 23:31:25 UTC
Hi Gerd, could you help to check the comment 4?

Comment 6 Gerd Hoffmann 2018-08-21 05:56:15 UTC
(In reply to Guo, Zhiyi from comment #5)
> Hi Gerd, could you help to check the comment 4?

You can use "input-events" inside the guest to see all key events, even in case they are not causing any visible action (like the volume keys do).

Comment 7 liunana 2018-08-28 01:50:10 UTC
> You can use "input-events" inside the guest to see all key events, even in
> case they are not causing any visible action (like the volume keys do).

Use "input-events" inside the guest have the same result with media keys of Comment 4.
Besides, sometimes guest have more than Comment 4 media keys that can show actions,but this is low probability.

Comment 8 Ademar Reis 2020-02-05 22:44:57 UTC
QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks

Comment 13 RHEL Program Management 2021-01-08 07:25:28 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.