Bug 353181

Summary: Messed up Finnish keyboard layout.
Product: [Fedora] Fedora Reporter: Joonas Sarajärvi <muep>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 9CC: hbrock
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-21 08:28:04 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:

Description Joonas Sarajärvi 2007-10-25 20:13:49 UTC
Description of problem:
I installed Rawhide from a snapshot livecd image found in
torrent.fedoraproject.org (rawhide-20071019-i686.iso) with virt-manager, using
Qemu with KVM. The host system has a Finnish keyboard with Finnish layout being
used. The guest machine won't respond correctly to keypresses, but instead shows
unwanted characters when trying to write non-alphanumeric text, like a '+' when
trying to write a '-'.


Version-Release number of selected component (if applicable):
0.4.0-2.fc7

How reproducible:
Always

Steps to Reproduce:
1. Use a Finnish keyboard and layout on the host machine.
2. Install a Fedora Rawhide guest, selecting Finnish layout there.
3. Boot the guest operating system
4. Try to write something with '-', 'ö' or '\', for example.
  
Actual results:
'-' get read as +
'ö' and '\' are nowhere to be found

Expected results:
Typing on the guest machine should be like typing on the host machine.


Additional info:
The keyboard works as expected if the guest operating system is run with
qemu-kvm, without virt-manager:

qemu-kvm -hda /dev/sda8

Comment 1 Joonas Sarajärvi 2008-04-04 15:12:16 UTC
This problem still persists in virt-manager in Rawhide. Pressing keys that
differ in US English and Finnish keyboards results in weird characters getting
through to the guest OS.

If I change my keyboard layout to US English, my keyboard seems to work mostly
fine in the graphical console. Thus I can actually work around the bug, but
this behavior seems unintended.

Another workaround to the problem is to not use virt-manager, but instead
launch qemu-kvm manually and use the SDL console that it provides, in which my
keyboard works as expected.

Comment 2 Mikko Huhtala 2008-04-28 18:21:50 UTC
Is this limited to virtualization? I had the same problem in a regular install:
selected FI Latin-1 keyboard during installation of F9 Beta and got a US English
layout in GNOME. I had to add the Finnish layout in GNOME manually (console
without X was FI as expected), make it the default and it still wouldn't stick.
I removed the US Eng layout from the list, and after that I have got the finnish
layout every time.

Comment 3 Daniel Berrangé 2008-04-28 18:40:50 UTC
The problem specifically referred to in this bug is related to the VNC server
and its interaction with the guest OS virtual keyboard.

If you have problems with installs of non-virtualized guests, please create a
separate bug against anaconda for that.

Comment 4 Cole Robinson 2008-05-08 15:19:55 UTC
Reporter, can what is your KEYTABLE entry in /etc/sysconfig/keyboard for finnish
layout? Also, for the initial guest you created, can you try 'virsh dumpxml
<guestname>' and see if the <graphics> tag has a keymap= entry? If so, please
paste that as well. Thanks!

Comment 5 Joonas Sarajärvi 2008-05-09 12:13:15 UTC
Note: I am currently using Fedora 8 x86_64, configured similarly the the former
installations where I had the same problem.

Anyways, here is the output:

[root@fedora ~]# cat /etc/sysconfig/keyboard | grep KEYTABLE
KEYTABLE="fi"

[root@fedora ~]# virsh dumpxml Fedora_8
<domain type='kvm' id='2'>
  <name>Fedora_8</name>
  <uuid>25532750-dfd4-cbed-bda3-fa2e70eb18d2</uuid>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <source file='/home/qemu-images/F8.img'/>
      <target dev='hda'/>
    </disk>
    <interface type='network'>
      <mac address='00:16:3e:0c:1d:49'/>
      <source network='default'/>
      <target dev='vnet0'/>
    </interface>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5900' listen='127.0.0.1'/>
  </devices>
</domain>

As far as I can tell, there is no keymap= entry in the <graphics> tag. I posted
the output anyway, so you can be sure that I didn't misinterpret it.

Comment 6 Joonas Sarajärvi 2008-05-09 12:35:29 UTC
Quick addition: Changing the line
<graphics type='vnc' port='5900' listen='127.0.0.1'/>
into
<graphics type='vnc' port='-1' listen='127.0.0.1' keymap='fi'/>

seems to have worked around the layout problem. I think virt-manager should set
the keymap= entry as default to match the system's physical keyboard, if possible.

Alt Gr still doesn't seem to do anything in the virtual machine console.



Comment 7 Cole Robinson 2008-05-09 14:41:57 UTC
The fix for the 'fi' case should already be upstream:

http://hg.et.redhat.com/virt/applications/virt-manager--devel?cs=98cd7845a3b5

With this changeset, any new guest you create should automatically set up the
correct fi keymap for the guest. Also upstream is the ability to custom specify
a keymap for the graphics device after install. Not as helpful, but if there are
issues in the future it can be remedied without having to manually edit the xml.

Setting bug to POST.

Comment 8 Bug Zapper 2008-05-14 03:44:24 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 9 Fedora Update System 2008-12-01 18:10:47 UTC
virt-manager-0.6.0-0.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/virt-manager-0.6.0-0.fc9

Comment 10 Fedora Update System 2008-12-01 18:23:11 UTC
virt-manager-0.6.0-1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/virt-manager-0.6.0-1.fc9

Comment 11 Fedora Update System 2008-12-03 01:30:03 UTC
virt-manager-0.6.0-1.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update virt-manager'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-10705

Comment 12 Fedora Update System 2008-12-21 08:27:07 UTC
virt-manager-0.6.0-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.