Bug 478976
Summary: | qemu-kvm not working with evdev giving wrong key mappings | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Zdenek Kabelac <zkabelac> | ||||||
Component: | qemu | Assignee: | Glauber Costa <gcosta> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | rawhide | CC: | berrange, clalance, dwmw2, gcosta, james, jfrieben, knoel, markmc, mclasen, mhlavink, mishu, nerijus, petersen, quintela, ryanryan52, virt-maint | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2009-03-11 13:06:38 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 480594 | ||||||||
Attachments: |
|
Description
Zdenek Kabelac
2009-01-06 10:38:07 UTC
This is probably caused by the switch from Xorg using 'kbd' to 'evdev' for keyboard input. This broke the 1-to-1 mapping of scancodes to keycodes that QEMU and others relied on. We had todo a patch for GTK-VNC to handle the new evdev mapping, and I believe Ubuntu has a patch todo the same for KVM - there was also one posted to upstream qemu-devel list last week IIRC. Created attachment 328752 [details]
Ubuntu's patch to fix this
FYI, Ubuntu's patch is not suitable for application to QEMU as is - it is horrifically inefficient, checking for evdev by querying the server keymap on every single key press & release. It needs re-writing to only querying it once. okay, sorry, I didn't actually look at the patch. I'll come up with a revised one later tonight or sometime later this week. Created attachment 328839 [details]
revised patch to only check for evdev once
tested, fixes my problem with evdev, doesn't break using normal driver.
Is this patch submitted to upstream qemu ? Ryan: thanks for the patch! you'd probably get a much quicker response if you post it to upstream qemu-devel Shouldn't we populate the codes using whatever method xmodmap -pke uses? That will insulate us against further changes in this area. yes, I'll try to make a better patch that doesn't hard code the X driver's keycodes. *** Bug 463765 has been marked as a duplicate of this bug. *** Bug 478976 is a duplicate of bug 471000. .. and it is not a KVM bug, thus wrong component! Bug 471000 has been reported for a system with plain QEMU and no KVM. Enabling driver xorg-x11-drv-kbd instead of xorg-x11-drv-evdev allows to restore proper handling of keycodes. Yes, this *IS* a QEMU/KVM bug. It has hardcoded the assumption that there is a 1-to-1 mapping of scancodes to keycodes. This just happens to be true of the 'kbd' X driver, this is not true in general, thus QEMU breaks with evdev. QEMU must be fixed. This a plain QEMU bug, and thus, the appropriate component is QEMU. The bug appears regardless of whether KVM virtualization is used or not. For this reason, component KVM is misleading. (In reply to comment #14) > This a plain QEMU bug, and thus, the appropriate component is QEMU. The bug > appears regardless of whether KVM virtualization is used or not. For this > reason, component KVM is misleading. The problem exists in both the qemu and kvm packages, it's fine to have both bugs open to track them. In F11, we hope to merge the two packages. However, this bug does have information on the actual problem, proposed patches etc. Reassigning: The kvm package no longer exists in rawhide/F11, since it is now part of 'qemu'. The latest qemu package in rawhide (2:0.10-0.7.kvm20090310git) includes patches to detect & correctly handle evdev keyboard mappings with SDL graphics. For VNC issues, evdev handling is the responsiblity of the VNC client. *** Bug 471000 has been marked as a duplicate of this bug. *** |