Bug 521835 - German keymap using KVM+VNC missing some keys
Summary: German keymap using KVM+VNC missing some keys
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm
Version: 5.4
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Kevin Wolf
QA Contact: Lawrence Lim
URL:
Whiteboard:
: 547642 (view as bug list)
Depends On:
Blocks: 546075 552600 556823
TreeView+ depends on / blocked
 
Reported: 2009-09-08 13:57 UTC by Dan Yasny
Modified: 2018-10-27 15:16 UTC (History)
19 users (show)

Fixed In Version: kvm-83-115.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 07:53:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0271 0 normal SHIPPED_LIVE Important: kvm security, bug fix and enhancement update 2010-03-29 13:19:48 UTC

Description Dan Yasny 2009-09-08 13:57:57 UTC
Description of problem:
A customer is complaining that when he uses the "de" keymap with VNC (the client is based on U-VNC) some essential keys are missing.
We don't have a German k/b yet, so we can't check/fix/test

The customer mentioned not being able to use the "|" (pipe sign) key specifically

Version-Release number of selected component (if applicable):
RHEV-H beta17.2
# rpm -qa |grep kvm
kmod-kvm-83-105.el5
kvm-tools-83-105.el5
etherboot-zroms-kvm-5.4.4-10.el5
kvm-debuginfo-83-105.el5
kvm-qemu-img-83-105.el5
kvm-83-105.el5


How reproducible:
Always
change VNC keymap to "de" and connect

  
Actual results:

> I can confirm the problem, the Alt Gr key doesn't work but results in
> "unknown key" kernel messages (Pipe is "Alt Gr" +"<" in the German
> layout). Upstream works fine, though. I think I remember some patches
> regarding VNC keymaps that went in a couple of months ago. I can try if
> they apply to our tree.

Expected results:
To be able to use the "de" encoding with all keys functioning

Additional info:

Comment 6 Alexey Eromenko 2009-09-10 09:46:51 UTC
Adding myself CC.

Comment 7 Alexey Eromenko 2009-09-10 09:51:13 UTC
Let me know in which build (of KVM, and RHEV) it should be fixed.

Comment 12 Suqin Huang 2009-12-09 02:54:14 UTC
Steps:
1. Set host keyboard
#system-config-keyboard --> change keyboard to German.
2. Boot guest with parameter -k de

   /usr/libexec/qemu-kvm -drive file=~/images/rhel5.4-32.qcow2,if=ide -no-hpet -rtc-td-hack -smp 2 -m 2G -uuid `uuidgen` -net nic,model=e1000,macaddr=00:96:78:FA:0D:55,vlan=0 -net tap,vlan=0,script=/etc/qemu-ifup -cpu qemu64,+sse2 -boot c -vnc :2 -k de -monitor stdio -name 5.4-32
3. Set guest keyboard
#system-config-keyboard --> change keyboard to German.

Reproduce on kvm-83-101.el5
can not input "^", "`", "´", "~", "|", "@" is output as "q:, "€" is output as "e"

Fix on kvm-83-132.el5
all the symbols are input, output correctly.

Comment 14 Gerd Hoffmann 2010-01-05 17:36:43 UTC
*** Bug 547642 has been marked as a duplicate of this bug. ***

Comment 15 Suqin Huang 2010-01-06 04:59:47 UTC
iheim,
can not set -k de on rhev-m, it's -k en static

Comment 16 Itamar Heim 2010-01-06 08:28:18 UTC
1. i was wondering about the beahvior if we don't pass -k en at all.
2. you can change -k parameter using the configuration tool[1]. it is a system wide parameter though.

[1] under misc., VNC Keyboard Layout

Comment 17 Suqin Huang 2010-01-12 14:34:33 UTC
1. Set host keyboard
#system-config-keyboard --> change keyboard to German
2. set vnc keyboard layout on rhev-m

result CLI:

/usr/libexec/qemu-kvm -no-hpet -no-kvm-pit-reinjection -usbdevice tablet -rtc-td-hack -startdate 2010-1-13T4:45:27 -name rhel5 -smp 1,cores=1 -k de -m 1024 -boot cn -net nic,vlan=1,macaddr=00:1a:4a:42:46:00,model=e1000 -net tap,vlan=1,ifname=e1000_10_1,script=no -drive file=/rhev/data-center/d997c7e9-a766-4cbd-a5b9-7d9f65932bee/3271074f-770c-4bc9-ab7c-b345b0a6f0c8/images/78a04199-9fa8-4172-85e7-1283d281db0d/fec1859b-509b-4fc1-8c3b-660eaee6de9b,media=disk,if=ide,cache=off,index=0,serial=72-85e7-1283d281db0d,boot=off,format=raw,werror=stop -pidfile /var/vdsm/e0b50068-17ea-467f-8a31-965d850b26d3.pid -vnc 0:10,password -cpu qemu64,+sse2 -notify all -balloon none -smbios type=1,manufacturer=Red Hat,product=Red Hat Enterprise Linux,version=5Server-5.4.0.3,serial=44454C4C-3800-104E-8058-CAC04F4B3258,uuid=e0b50068-17ea-467f-8a31-965d850b26d3 -vmchannel di:0200,unix:/var/vdsm/e0b50068-17ea-467f-8a31-965d850b26d3.guest.socket,server -monitor unix:/var/vdsm/e0b50068-17ea-467f-8a31-965d850b26d3.monitor.socket,server

3. Set guest keyboard
#system-config-keyboard --> change keyboard to German

4. result when operate guest on rhev-m
guest output:  *!Q'$%~&*()_*'1234567890-023{[]} qwertyuiop89QWERTYUIOP/=@¤]asdfghjkl,#\ASDFGHJKL:">\zxcvbnm,.7>ZXCVBNM>>? µ
expect result: °!"§$%&/()=?`^1234567890ß´²³{[]}\qwertzuiopü+QWERTZUIOPÜ*@€~asdfghjklöä#ASDFGHJKLÖÄ'<yxcvbnm,.->YXCVBNM;:_|µ


5. kvm
kvm-qemu-img-83-140.el5
kmod-kvm-83-140.el5
etherboot-zroms-kvm-5.4.4-13.el5
kvm-tools-83-140.el5
etherboot-roms-kvm-5.4.4-13.el5
kvm-debuginfo-83-140.el5
kvm-83-140.el5

2.6.18-182.el5

Comment 18 Suqin Huang 2010-01-12 14:40:44 UTC
the following maybe more clear:
guest output: *!Q'$%~&*()_*'1234567890-023{[]} 
excepted:     °!"§$%&/()=?`^1234567890ß´²³{[]}\

guest:    qwertyuiop89QWERTYUIOP/=@¤]asdfghjkl,
expected: qwertzuiopü+QWERTZUIOPÜ*@€~asdfghjklö


guest:    #\ASDFGHJKL:">\zxcvbnm,.7>ZXCVBNM>>? µ
expected: ä#ASDFGHJKLÖÄ'<yxcvbnm,.->YXCVBNM;:_|µ

Comment 19 Kevin Wolf 2010-01-12 14:46:17 UTC
Does your VNC client use a German keyboard, too? This looks like the keymap used by it doesn't match the -k de option.

Comment 20 Suqin Huang 2010-01-13 04:53:46 UTC
yes, change VNC client though Start-> Red Hat -> RHEV Manager -> Configuration Tool -> Miscellaneous

test it again, for I didn't change keyboard on Windows.

1. Set host keyboard layout
#system-config-keyboard --> change keyboard to German

2. Set RHEV-M system keyboard layout
Start->Control Panel->Regional and Language Options
==> German

3. Set VNC client keyboard layout
Start-> Red Hat -> RHEV Manager -> Configuration Tool -> Miscellaneous
==> de

/usr/libexec/qemu-kvm -no-hpet -no-kvm-pit-reinjection -usbdevice tablet -rtc-td-hack -startdate 2010-1-13T4:45:27 -name rhel5 -smp 1,cores=1 -k de -m 1024 -boot cn -net nic,vlan=1,macaddr=00:1a:4a:42:46:00,model=e1000 -net tap,vlan=1,ifname=e1000_10_1,script=no -drive file=/rhev/data-center/d997c7e9-a766-4cbd-a5b9-7d9f65932bee/3271074f-770c-4bc9-ab7c-b345b0a6f0c8/images/78a04199-9fa8-4172-85e7-1283d281db0d/fec1859b-509b-4fc1-8c3b-660eaee6de9b,media=disk,if=ide,cache=off,index=0,serial=72-85e7-1283d281db0d,boot=off,format=raw,werror=stop -pidfile /var/vdsm/e0b50068-17ea-467f-8a31-965d850b26d3.pid -vnc 0:10,password -cpu qemu64,+sse2 -notify all -balloon none -smbios type=1,manufacturer=Red Hat,product=Red Hat Enterprise Linux,version=5Server-5.4.0.3,serial=44454C4C-3800-104E-8058-CAC04F4B3258,uuid=e0b50068-17ea-467f-8a31-965d850b26d3 -vmchannel di:0200,unix:/var/vdsm/e0b50068-17ea-467f-8a31-965d850b26d3.guest.socket,server -monitor unix:/var/vdsm/e0b50068-17ea-467f-8a31-965d850b26d3.monitor.socket,server


4. Set guest keyboard layout
system-config-keyboard --> change keyboard to German

5. out put
There are still some error

expected: °!"§$%&/()=?`   ^1234567890ß´
guest:    ~!"#$%&/()=?`   ^1234567890\'

expected: qwertzuiopü+ QWERTZUIOPÜ*
guest:    qwertzuiop@+ QWERTZUIOP\*


expected: @€~   asdfghjklöä#   ASDFGHJKLÖÄ'
guest:    q +   asdfghjkl[]#   ASDFGHJKL{}'

expected: <yxcvbnm,.-  >YXCVBNM;:_  |µ
guest:    <yxcvbnm,.-  >YXCVBNM;:_  <m

Comment 21 Kevin Wolf 2010-01-13 11:34:55 UTC
(In reply to comment #20)
> yes, change VNC client though Start-> Red Hat -> RHEV Manager -> Configuration
> Tool -> Miscellaneous

Can someone from the RHEV-M team confirm that this is the right way to configure the keyboard layout on the client? I would have expected that you use normal system tools to change it, not any tool specific to RHEV, but I might be wrong there.

I just tested it once again with plain qemu-kvm and three different VNC viewers and always got the expected results.

Comment 22 Yaniv Kaul 2010-01-13 11:38:37 UTC
(In reply to comment #21)
> (In reply to comment #20)
> > yes, change VNC client though Start-> Red Hat -> RHEV Manager -> Configuration
> > Tool -> Miscellaneous
> 
> Can someone from the RHEV-M team confirm that this is the right way to
> configure the keyboard layout on the client? I would have expected that you use
> normal system tools to change it, not any tool specific to RHEV, but I might be
> wrong there.

This is actually setting the -k <XYZ> when launching the VM, so it's configuring the QEMU keyboard, I believe.
Not sure if something is also sent to the client (should it?)

> 
> I just tested it once again with plain qemu-kvm and three different VNC viewers
> and always got the expected results.

Comment 23 Kevin Wolf 2010-01-13 11:56:25 UTC
Thanks, Yaniv, this is what I was expecting. So this option actually changes what qemu expects the keyboard layout of the VNC client to be. You'll probably still need to change the keyboard layout of the machine running the VNC client, using the normal system tools.

(In case it's not clear, just to explain what -k de is for: VNC doesn't send raw key codes, but ASCII. So if qemu receives a "z" it needs to undo this conversion and find out if (on the client!) this was actually the key next to "t" or next to "x". So -k describes what the keyboard layout of the machine running the VNC client is.)

Comment 24 Suqin Huang 2010-01-14 02:28:29 UTC
(In reply to comment #23)
> Thanks, Yaniv, this is what I was expecting. So this option actually changes
> what qemu expects the keyboard layout of the VNC client to be. You'll probably
> still need to change the keyboard layout of the machine running the VNC client,
> using the normal system tools.

VNC is running on Windows client, I change its keyboard layout on step2:

2. Set RHEV-M system keyboard layout
Start->Control Panel->Regional and Language Options
==> German

Comment 25 Itamar Heim 2010-01-14 08:16:08 UTC
just to be certain:
- you are using the rhev-m machine as the client
- if you open a command prompt you see the expected result

Comment 26 Gal Hammer 2010-01-14 09:03:02 UTC
(In reply to comment #23)

> (In case it's not clear, just to explain what -k de is for: VNC doesn't send
> raw key codes, but ASCII. So if qemu receives a "z" it needs to undo this
> conversion and find out if (on the client!) this was actually the key next to
> "t" or next to "x". So -k describes what the keyboard layout of the machine
> running the VNC client is.)    

The problem is that VNC viewer is sending X-Windows key codes and qemu is trying to translate them to hardware scan codes. Since qemu does the translation using a keyboard layout, it means that the VNC viewer must use the same keyboard layout.

If qemu is running with the "-k de" command line option, and your Window machine is running the VNC viewer with "DE" (German) keyboard layout everything should work as expected.

On my machine with the above setup I got:

expected: °!"§$%&/()=?`   ^1234567890ß´
guest   : °!"§$%&/()=?`   ^1234567890ß´

BTW: qemu have a VNC extention for sending hardware codes as keyboard input. However our VNC client doesn't support it :-(.

Comment 27 Suqin Huang 2010-01-15 06:17:19 UTC
to Itamar, Gal Hammer
yes, the client is rhev-m machine, and I set my Window machine with German keyboard layout, which I mention on comment#24

to Gal Hammer
RHEV-M environment on rhel5.5 can not be setup now, can you test this issue, and give detail steps & result?

Thanks
Suqin

Comment 30 Alexey Eromenko 2010-01-21 15:49:20 UTC
sm30. Not fixed.

My steps are: (according to Gal's instructions)

1. Setting the VDC option to "de".
2. Restart the RHEV Manager service to apply change.
3. Start a VM (and verify in the VDS server qemu is running with "-k de"
command line option).
 *** Alexey: I have ensured that the VM started actually has "-k de" as Qemu parameter.
4. Start VNC viewer. 
 *** Alexey: (via Admin Portal)
5. Make sure the Windows' language bar is set to "DE" when VNC viewer is in
focus. 
 *** Alexey: Done on both Windows XP client and Windows XP guest.
6. Start typing.
 *** Alexey: pipeline symbol "|" does not work.

Bug Reopened.

Comment 32 Gal Hammer 2010-01-24 08:26:26 UTC
Alexey, did you check it with a German keyboard? My on-screen keyboard doesn't have the pipe symbol on it, so I can't check it.

Comment 33 Alexey Eromenko 2010-01-24 11:09:46 UTC
Yes, I checked with real German keyboard. You can come to my office to take it for limited time.

Comment 34 Itamar Heim 2010-01-25 09:24:55 UTC
Kevin, can you verify you get the pipe symbol correctly and specify the vnc client so Alexey can compare it to the one we have?
thanks.

Comment 35 Kevin Wolf 2010-01-25 10:36:48 UTC
I just retested it. Note that I'm testing the plain current 5.5 git version, no management tools involved. This is a F11 guest running on a lab machine, the VNC viewer is TigerVNC and runs on my F12 laptop (which has a German keyboard).

Command line on the lab machine:
# ~/source/kvm-userspace-rhel5/qemu/x86_64-softmmu/qemu-system-x86_64 -drive file=overlay.qcow2,if=virtio,boot=on -vnc :0 -k de -m 1024 -L ~/source/pc-bios/

Command line on the laptop:
$ vncviewer localhost:0 -via root.bos.redhat.com -LowColorLevel=1

The VM was installed with an English keyboard layout, so I needed to change it. For X, I chose "Keyboard: Germany" in the logon screen. I could enter pipe symbols in the username field then. I also could enter the pipe symbol on a shell in text mode after "loadkeys de-latin1". In earlier tests I had used a guest which was installed with German keyboard layout and it worked there without changing any options.

Hope this is detailed enough to find the difference between our tests.

Comment 37 Tomas Von Veschler 2010-02-09 13:54:30 UTC
The same happens with Spanish keyboard.

Comment 39 Chris Ward 2010-02-11 10:08:41 UTC
~~ Attention Customers and Partners - RHEL 5.5 Beta is now available on RHN ~~

RHEL 5.5 Beta has been released! There should be a fix present in this 
release that addresses your request. Please test and report back results 
here, by March 3rd 2010 (2010-03-03) or sooner.

Upon successful verification of this request, post your results and update 
the Verified field in Bugzilla with the appropriate value.

If you encounter any issues while testing, please describe them and set 
this bug into NEED_INFO. If you encounter new defects or have additional 
patch(es) to request for inclusion, please clone this bug per each request
and escalate through your support representative.

Comment 42 errata-xmlrpc 2010-03-30 07:53:53 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/RHSA-2010-0271.html


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