Bug 552612

Summary: Caps Lock key in the guest's vnc console does not match the host
Product: Red Hat Enterprise Linux 5 Reporter: Paolo Bonzini <pbonzini>
Component: xenAssignee: Michal Novotny <minovotn>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: areis, kraxel, leiwang, lihuang, llim, minovotn, qzhang, tburke, virt-maint, xen-maint, ykaul
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: xen-3.0.3-107.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 517814 Environment:
Last Closed: 2011-01-13 22:20:06 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: 514500    
Attachments:
Description Flags
Patch for Caps-Lock key synchronization with dom0 none

Description Paolo Bonzini 2010-01-05 16:53:23 UTC
The bug also apply to Xen's qemu.  The backport of Gerd's patches is quite easy.

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

Description of problem:
(1)view kvm with vnc: Caps Lock is on before booting guest, input character in
guest when caps lock still on, but output is lowercase letter. Guest keyboard
inputmethod is not synchronous with host.

Steps to Reproduce:
1.Boot a vm with vnc parameter, Caps Lock is on before booting vm.
2.Input some character in guest's terminal or notepad with Caps Lock still on.
  
Actual results:
After step 2,Caps Lock is on but keyboard output is lowercase letter.

Expected results:
Guest keyboard inputmethod should be synchronous with host all the time.

Additional info:

--- Additional comment from kraxel on 2009-11-02 06:48:29 EDT ---

Created an attachment (id=367117)
fix (upstream).

--- Additional comment from kraxel on 2009-11-02 06:49:30 EDT ---

Patch submitted to qemu-devel.

--- Additional comment from kraxel on 2010-01-05 11:32:45 EDT ---

Patch got committed to qemu git repo:

http://git.qemu.org/qemu.git/commit/?id=6b1325029d80455b9da7cd7bd84a88cb915b867c

Turned out an additional patch is needed:

http://git.qemu.org/qemu.git/commit/?id=4a93fe17081c7ae7f4d5607b266ca384d328986c

Comment 1 Michal Novotny 2010-03-12 10:04:27 UTC
Thanks Paolo, I'm taking this one;)

Michal

Comment 2 Gerd Hoffmann 2010-03-12 10:35:39 UTC
See bug 517814, duplicate?

Comment 3 Paolo Bonzini 2010-03-12 13:13:42 UTC
This is for Xen's qemu-dm.

Comment 4 Michal Novotny 2010-03-12 13:33:20 UTC
(In reply to comment #3)
> This is for Xen's qemu-dm.    

Exactly, this is Xen. Bug 517814 is for qemu-kvm and according to different codebase between qemu-kvm and qemu-dm (for xen) there is a lot of work and testing to be done because it appears that some bigger rewrite of VNC server implementation in qemu-dm may be required (but I am not 100% sure yet).

Michal

Comment 5 Gerd Hoffmann 2010-03-12 14:09:38 UTC
Ah, Xen.  Did almost forgot it exists ;)

Yes, the vnc codebase is much older (and can't handle multiple vnc clients for example).  I think for the keyboard patches it doesn't matter much though, they should be backportable without too much trouble.

Comment 6 Michal Novotny 2010-03-12 15:19:51 UTC
Created attachment 399678 [details]
Patch for Caps-Lock key synchronization with dom0

Well, I did backport those patches like stated above in comment #0 but since the codebase for Xen's qemu-dm is different some things had to be rewritten to make it working. It's been tested on x86_64 dom0 on RHEL 5.4 HVM domU and it was working fine. It's been tested in both GRUB and booted up RHEL 5.4 system to see whether the key-presses are interpreted in a good way and I saw no issue there. 

Michal

Comment 11 errata-xmlrpc 2011-01-13 22:20:06 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0031.html