Bug 498140 - keyboard layout doesn't survive into the session
keyboard layout doesn't survive into the session
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: gnome-settings-daemon (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Bastien Nocera
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-29 00:07 EDT by Matthias Clasen
Modified: 2010-06-28 08:15 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-28 08:15:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matthias Clasen 2009-04-29 00:07:13 EDT
1. Set up de as the default keyboard layout 
2. Create a fresh user account
3. Go to the login screen, notice the default layout is picked up by gdm
4. Make no changes to the keyboard layout, log in with the fresh account
5. Notice that the session comes up with a keyboard layout of 'us'

After 1., I verified that the default layout has made it into both /etc/sysconfig/keyboard and hal:

cat /etc/sysconfig/keyboard 
KEYBOARDTYPE="pc"
KEYTABLE="de"
LAYOUT="de"
MODEL="pc105"
OPTIONS=""
VARIANT=""

lshal | grep xkb
  input.xkb.layout = 'us'  (string)
  input.xkb.model = 'evdev'  (string)
  input.xkb.rules = 'base'  (string)
  input.xkb.variant = ''  (string)
  input.xkb.layout = 'us'  (string)
  input.xkb.model = 'evdev'  (string)
  input.xkb.rules = 'base'  (string)
  input.xkb.variant = ''  (string)
  input.xkb.layout = 'us'  (string)
  input.xkb.model = 'evdev'  (string)
  input.xkb.rules = 'base'  (string)
  input.xkb.variant = ''  (string)
  input.xkb.layout = 'us'  (string)
  input.xkb.model = 'evdev'  (string)
  input.xkb.rules = 'base'  (string)
  input.xkb.variant = ''  (string)
  input.xkb.layout = 'de'  (string)
  input.xkb.model = 'pc105'  (string)
  input.xkb.options = 'terminate:ctrl_alt_bksp'  (string)
  input.xkb.rules = 'base'  (string)
  input.xkb.variant = ''  (string)
Comment 1 Peter Hutterer 2009-04-29 00:38:14 EDT
< mclasen> g-s-d should be easy to exclude, by setting /apps/gnome_settings_daemon/plugins/keyboard/active to false in gconf

Blaming gnome-settings-daemon. Deactivating it stops it from happening, and the client ID that changes the keyboard matches the one from g-s-d.
Comment 2 Matthias Clasen 2009-04-29 10:05:19 EDT
Peter, here is what I am seeing: 

As I pointed out on irc, the 'us' is sneaking in by libgnome-keyboard loading an 'initial' x configuration from the _BACKUP root property. At first I thought that the property was not there and libxklavier is falling back to its builtin 'us' fallback, but inserting a xprop -root  grep XKB very early in the xinitrc scripts yields:

_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "evdev", "us", "", "terminate:ctrl_alt_bksp"
_XKB_RULES_NAMES(STRING) = "evdev", "evdev", "de", "", ""


So, as you can see, the actual configuration is the 'de' that is the system setting in /etc/sysconfig/keyboard / hal, but the backup seems to be coming from somewhere else ? Who sets that this early, and why is it set to 'us' ? Is that the driver ?
Comment 3 Peter Hutterer 2009-04-29 20:51:23 EDT
The problem is we can't rely on the BACKUP property, and we can't even rely on
the other property when it comes down to it.

The property is set by the server when a keyboard is initialised. Since
there's only one property, the value is overwritten with the value of the last
keyboard. The last keyboard is usually a special device (Power Button, Video
Bus, etc.) and we don't call fedora-setup-keyboard for those - so they are
always 'evdev/us'. So if you start a plain X session, the property is almost
always "us", even though the actual keyboard has the right layout.
This value is then backed up by libgnomekbd or libxklavier before the actual
layout is applied by gdm. When gdm changes the layout it also changes the
normal property, so this one contains the right value. 

It's just yet another broken-by-design issue that has come up since the switch
to multiple physical input devices. Ideally, this property should be stored on
the respective device, but that requires changing quite a bit of the stack.


(the drivers have nothing to do with the properties btw.)
Comment 4 Matthias Clasen 2009-04-29 22:55:13 EDT
I have patched gdm, gnome-settings-daemon and control-center to look at _XKB_RULES_NAMES instead of _XKB_RULES_NAMES_BACKUP now. A better fix will have to wait till F12.
Comment 5 Bug Zapper 2009-06-09 10:44:44 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 6 Joachim Frieben 2009-06-26 05:29:41 EDT
I have the same problem regarding the variant of the German keyboard layout which had been chosen during install. According to /etc/sysconfig/keyboard:

  KEYBOARDTYPE="pc"
  KEYTABLE="de-latin1-nodeadkeys"
  LAYOUT="de"
  MODEL="pc105"
  OPTIONS=""
  VARIANT="nodeadkeys"

which is ok for I had chosen a German keyboard layout without dead keys in anaconda (DVD install, no live CD). However, in a GNOME session, the "no dead keys" setting is simply ignored. Furthermore,

  $ shal | grep xkb
  input.xkb.layout = 'us'  (string)
  input.xkb.model = 'evdev'  (string)
  input.xkb.rules = 'base'  (string)
  input.xkb.variant = ''  (string)
  input.xkb.layout = 'us'  (string)
  input.xkb.model = 'evdev'  (string)
  input.xkb.rules = 'base'  (string)
  input.xkb.variant = ''  (string)
  input.xkb.layout = 'de'  (string)
  input.xkb.model = 'pc105'  (string)
  input.xkb.options = 'terminate:ctrl_alt_bksp'  (string)
  input.xkb.rules = 'base'  (string)
  input.xkb.variant = 'nodeadkeys'  (string)

Btw, no changes had been made through 'gnome-keyboard-properties'.
Comment 7 Peter Hutterer 2009-06-28 18:27:42 EDT
(In reply to comment #6)
>   $ shal | grep xkb
>   input.xkb.layout = 'us'  (string)
>   input.xkb.model = 'evdev'  (string)
>   input.xkb.rules = 'base'  (string)
>   input.xkb.variant = ''  (string)
>   input.xkb.layout = 'us'  (string)
>   input.xkb.model = 'evdev'  (string)
>   input.xkb.rules = 'base'  (string)
>   input.xkb.variant = ''  (string)
>   input.xkb.layout = 'de'  (string)
>   input.xkb.model = 'pc105'  (string)
>   input.xkb.options = 'terminate:ctrl_alt_bksp'  (string)
>   input.xkb.rules = 'base'  (string)
>   input.xkb.variant = 'nodeadkeys'  (string)

if you're referring to all the 'us' entries here, that's supposed to be that way. we only apply the keyboard layout to actual keyboards, not the devices that merely have keys (like video bus, power button, etc.).
Comment 8 Joachim Frieben 2009-06-29 03:56:22 EDT
(In reply to comment #7)
I am simply referring to the fact that option "no dead keys" does not work in a GNOME terminal whereas it does after switching to a virtual console. GDM shows the system layout "de-latin1-nodeadkeys", but GNOME appears to be using a plain German layout once the user is logged in.
Comment 9 Joachim Frieben 2009-06-30 08:27:46 EDT
(In reply to comment #8)
I have to correct myself: the GDM login panel actually shows keyboard "German" whereas /etc/sysconfig/keyboard reads:

  KEYBOARDTYPE="pc"
  KEYTABLE="de-latin1-nodeadkeys"
  LAYOUT="de"
  MODEL="pc105"
  OPTIONS=""
  VARIANT="nodeadkeys"

A corresponding entry appears in :0-greeter.log, namely:

  ** (process:1879): DEBUG: Greeter session pid=1879 display=:0.0
    xauthority=/var/run/gdm/auth-for-gdm-DRxH6E/database
  Error: No Symbols named "nodeadkeys" in the include file "us"

This looks like a problem of reading in the correct system keyboard layout in the GDM init scripts.
Comment 10 Joachim Frieben 2009-07-15 14:06:01 EDT
It seems like xorg-x11-drv-evdev-2.2.99-3.20090629.fc12.1.x86_64 solves the issue.
Comment 11 Bug Zapper 2010-04-27 09:59:35 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 12 Bug Zapper 2010-06-28 08:15:25 EDT
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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