gdm

gdm ignores keyboard layout selection for variants

Bug #421212 reported by Alan Pope ๐Ÿบ๐Ÿง๐Ÿฑ ๐Ÿฆ„ on 2009-08-29
120
This bug affects 22 people
Affects Status Importance Assigned to Milestone
GNOME Settings Daemon
Fix Released
High
gdm
Fix Released
Medium
gdm (Ubuntu)
High
Martin Pitt
Karmic
High
Martin Pitt
gnome-settings-daemon (Ubuntu)
High
Martin Pitt
Karmic
High
Martin Pitt

Bug Description

gdm now displays and sets keyboard layouts properly, but does not read/display/export variants such as "nodeadkeys" or "dvorak".

Sebastien Bacher (seb128) wrote :

Thank you for your bug report. The issue is an upstream one and it would be nice if somebody having it could send the bug the to the people writting the software (https://wiki.ubuntu.com/Bugs/Upstream/GNOME)

Changed in gdm (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
Caleb (caleb-marcus) wrote :

I'd like to add that not only does changing the keyboard layout in GDM not change it in Gnome, but it doesn't change it for the GDM password dialog either. In my situation, I tried using Dvorak.

I'd also like to ask that this bug be considered a higher priority than simply "low importance," considering there's a fairly obvious and necessary piece of UI that's broken.

Matt Zimmerman (mdz) wrote :

I see three distinct problems here:

1. The fact that the defaul in gdm was USA, even though a different layout was selected during installation (bug 408292)

2. Setting the layout in gdm doesn't actually take effect for password entry (at least the first time...I've found that the next time around it seems to remember this setting and it actually takes effect)

3. Setting the layout in GDM (as in #2) doesn't change the layout in the session itself (in my case, it uses qwerty even though dvorak was selected on the login screen)

#1 is a regression from 9.04. #2 and #3 seem to relate to new functionality in the gdm greeter; I don't recall there being a keyboard layout selector there in 9.04.

These three issues need to be tracked separately.

Martin Pitt (pitti) wrote :

(1) was fixed long ago in bug 395103 (master of duplicate bug 408292)

(2) I cannot reproduce this, this works fine for me.

(3) is the issue which should be tracked here -- gdm doesn't know about variants.

summary: - gdm ignores keyboard layout selection
+ gdm ignores keyboard layout selection for variants
tags: added: regression-potential
Martin Pitt (pitti) wrote :

Putting onto our team's radar, since it's a regression.

Changed in gdm (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → Canonical Desktop Team (canonical-desktop-team)
importance: Low → High
Michael Bienia (geser) wrote :

Bug 416917 and bug 403397 might be the same problem.

Martin Pitt (pitti) wrote :

Indeed, thanks Michael. I marked those as duplicates.

Martin Pitt (pitti) wrote :

Taking for now, but please feel free to beat me to it. My queue is quite full :/

Changed in gdm (Ubuntu):
assignee: Canonical Desktop Team (canonical-desktop-team) → Martin Pitt (pitti)
status: New → Triaged
description: updated

Bug confirmed under 20090924 daily-live amd64 iso

Martin Pitt (pitti) wrote :

This bug has two parts:

 - gdm does not read variant from hal to select the default layout
 - gdm does export the variant ($GDM_KEYBOARD_LAYOUT == "de nodeadkeys" but gnome-settings-daemon does not take it into account.

Changed in gnome-settings-daemon (Ubuntu Karmic):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → High
status: New → Triaged
Martin Pitt (pitti) wrote :

g-s-d side fixed in r32, and patch sent upstream.

Changed in gnome-settings-daemon (Ubuntu Karmic):
status: Triaged → Fix Committed
Martin Pitt (pitti) wrote :

gdm side fixed in r121, patch sent to upstream.

Changed in gdm (Ubuntu Karmic):
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-settings-daemon - 2.28.0-0ubuntu2

---------------
gnome-settings-daemon (2.28.0-0ubuntu2) karmic; urgency=low

  * Add 03_gdm_keyboard_variant_handling.patch: gdm's configuration and
    $GDM_KEYBOARD_LAYOUT separates layout and variant with a space, but GConf
    uses tabs. Convert spaces to tabs in $GDM_KEYBOARD_LAYOUT to work with
    either format, for more robustness. (LP: #421212)

 -- Martin Pitt <email address hidden> Thu, 01 Oct 2009 23:59:39 +0200

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm - 2.28.0-0ubuntu10

---------------
gdm (2.28.0-0ubuntu10) karmic; urgency=low

  * 01_default_keyboard_layout_hal.patch: Read keyboard variant from hal, too.
    (LP: #421212)
  * debian/gdm.postinst: Set HumanLogin theme for metacity, too. Thanks to
    Devid Antonio Filoni! (LP: #439546)
  * 04_fix_external_program_directories.patch: Remove *.rej junk.
  * 04_fix_external_program_directories.patch: Fix path to polkit-gnome
    authentication agent. (Caught as a side issue in LP #401822)
  * debian/rules: Drop polkit-gnome agent autostart file. It has never worked
    anyway due to wrong path (see previous change), and we do not currently
    need it.

 -- Martin Pitt <email address hidden> Thu, 01 Oct 2009 23:53:54 +0200

Changed in gdm (Ubuntu Karmic):
status: Fix Committed → Fix Released
Changed in gnome-settings-daemon (Ubuntu Karmic):
status: Fix Committed → Fix Released
Bernhard (b.a.koenig) wrote :

Btw, just wanted to say that this is still not working for me in gdm 2.28.0-0ubuntu12.
The gdm screen still shows the wrong keyboard variant. Should I reopen?

Martin Pitt (pitti) wrote :

Bernhard, since it's working in general now, please rather open a new bug about this, to avoid mailing all the subscribers from duplicate bugs, and to track the various fixes properly.

It might be the case that there are still old gconf settings around from the time when it was broken. If you do

  sudo rm /var/lib/gdm/.gconf/apps/gdm/simple-greeter/%gconf.xml

and restart gdm (or just reboot), do you still have the problem? If so, please open a new bug. If not, then that was the necessary cleanup. :-)

Erik B. Andersen (azendale) wrote :

So this bug should be fixed in the RC release, right? I tested the beta and it wasn't working correctly off the livecd.

Benjamin Drung (bdrung) wrote :

The bug was fixed in 2.28.0-0ubuntu10, but it came back with 2.28.0-0ubuntu11, 12, or 13. It worked for me only for a short time.

Martin Pitt (pitti) wrote :

> So this bug should be fixed in the RC release, right? I tested the beta and it wasn't working correctly off the livecd.

Correct, it was fixed right after beta. You should be able to test the current daily CDs, or upgrade an installation.

@Benjamin: Hm, 11/12/13 did not change anything wrt. keyboard handling. Did you try to remove the old gconf file?

Bernhard (b.a.koenig) wrote :

Yes, it works for me after deleteing gconf.xml and restarting twice.

Bernhard (b.a.koenig) wrote :

And again it ignores my variant after another restart. I will test a little more, but it's still buggy.

Benjamin Drung (bdrung) wrote :

gdm 2.28.0-0ubuntu12 had this bug even if I remove the %gconf.xml file.

I upgraded my system and gdm 2.28.0-0ubuntu14 was pulled. I removed the %gconf.xml file again and restarted. Since then it works.

Matt Zimmerman (mdz) wrote :

This still isn't working for me with -0ubuntu14 + the instructions in comment #17, so I've filed bug 445846

Martin Pitt (pitti) wrote :

If this still does not work for you, this is a very likely cause:

The GNOME session _only_ applies the setting from gdm if you don't have any other configured layout in your gconf settings for the same language (like "us" vs. "us dvorak"). This is because of gnome-settings-daemon trying to find a "closest match" amongst the already configured layouts before actually applying $GDM_KEYBOARD_LAYOUT. This is discussed in detail in https://bugzilla.gnome.org/show_bug.cgi?id=585290, and so far it is not clear whether this is a bug or a feature.

To verify this, please check that

  gconftool -g /desktop/gnome/peripherals/keyboard/kbd/layouts

is nonempty, and has a non-variant layout already which you consider the "wrong" one. If you reset it with

  gconftool -u /desktop/gnome/peripherals/keyboard/kbd/layouts

things should work for you again.

(Oh, and thanks to you all for testing Ubuntu prior to release, and having to wade through those configuration juggling!)

Bernhard (b.a.koenig) wrote :

OK, now I have

> gconftool -g /desktop/gnome/peripherals/keyboard/kbd/layouts
[de nodeadkeys]

and the gdm screen showed "eliminate dead keys" yesterday but today I logged in and the variant got lost again.

Martin Pitt (pitti) wrote :

> and the gdm screen showed "eliminate dead keys" yesterday but today I logged in and the variant got lost again.

"got lost" -> it was wrong in gdm, or in the session? Was the gconf key changed by gdm again? What did "echo $GDM_KEYBOARD_LAYOUT" say?

Bernhard (b.a.koenig) wrote :

It's always correct in the session and in the "Keyboard" GUI. But in gdm, it showed correctly once and then reverted back to "Germany". I get

> echo $GDM_KEYBOARD_LAYOUT
de
> gconftool -g /desktop/gnome/peripherals/keyboard/kbd/layouts
[de nodeadkeys]

and have rebooted a couple of times now, always the same.

Martin Pitt (pitti) wrote :

> But in gdm, it showed correctly once and then reverted back to "Germany".

I guess it'd help to remove /var/cache/gdm/yourusername/dmrc ?

Bernhard (b.a.koenig) wrote :

Removing the dmrc file doesn't really help, it keeps going back to

> cat /var/cache/gdm/bkoenig/dmrc

[Desktop]
Layout=de
Language=en_US.UTF-8
> echo $GDM_KEYBOARD_LAYOUT

I noticed something funny though: the variant is not lost in the gdm screen when I restart but it does get lost when I just "Log Out" from a session.

Martin Pitt (pitti) wrote :

Bernhard,

so it keeps switching to "de" even if you remove both ~/.dmrc and /var/cache/gdm/bkoenig/dmrc ? If so, let's check that your system default layout is indeed nodeadkeys. Can you please give me the output of "lshal|grep input.xkb|sort -u"? It should be something like

  input.xkb.layout = 'de (string)
  input.xkb.model = 'pc105' (string)
  input.xkb.rules = 'base' (string)
  input.xkb.variant = 'nodeadkeys' (string)

Bernhard (b.a.koenig) wrote :

Yes, keeps switching even after deleting those two files and "de, nodeadkeys" is definitely set in the "Keyboard" GUI and the keyboard works correctly with that setting. The only problem is the gdm setting. I get the output:

> lshal|grep input.xkb|sort -u
  input.xkb.layout = 'de,de' (string)
  input.xkb.model = 'pc105' (string)
  input.xkb.options = 'grp:alts_toggle' (string)
  input.xkb.rules = 'base' (string)
  input.xkb.variant = 'nodeadkeys,' (string)

Bernhard [2009-10-20 23:11 -0000]:
> input.xkb.variant = 'nodeadkeys,' (string)

Oha! Where does the comma come from? I don't think that X.org/gdm
digest that properly. Can you please remove the comma from
/etc/default/console-setup, XKBVARIANT="...", and check that it works
then? How did you configure the layout on installation?

Thanks, Martin

Bernhard (b.a.koenig) wrote :

OK, I removed the comma and also changed "de,de" to "de", then rebooted and it works now. Still have to do some more long-term testing.

As for configuration, I installed karmic end of August and I'm not sure anymore: either I set "de, nodeadkeys" during installation or I set "de" and later switched to "nodeadkeys".

Martin Pitt (pitti) wrote :

Bernhard [2009-10-21 19:17 -0000]:
> OK, I removed the comma and also changed "de,de" to "de", then rebooted
> and it works now. Still have to do some more long-term testing.

Can you please attach your original /etc/default/console-setup? Did
you use ubiquity (the desktop CD installer) or d-i (the alternate CD
installer)? Did you happen to select multiple layouts there? (which
might be possible with the alternate CD)

Thanks!

--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Bernhard (b.a.koenig) wrote :

I used the usual Ubuntu installer from the live CD, must have been ubuntu-9.10-alpha4-desktop-i386.iso
I didn't use multiple layouts (don't even know what that is). The file console-setup is attached, I never changed it before today, so I guess the attached one is the one from the original install.

Marcos Toledo (mtoledo-gmail) wrote :

I use "USA Programmer Dvorak" exclusively as keyboard layout.

Now, if I set it as the single layout on keyboard layout screen, after a restart/login, I have one other layout: "USA International", and it is set as default (meaning I have to change back to dvorak and remove the international layout). On the next restart, its back again and set as default.

Is this the same issue or should I open a new one? This is a regression (worked properly in 9.04) and I dont really care which layout is used in gdm (I actually prefer qwerty, like in 9.04. since my wife uses the computer sometimes too)

Thanks,
Marcos Toledo

Rob Speer (rspeer) wrote :

I believe this bug has regressed.

I installed Lucid a few days ago, and my password worked correctly in Dvorak. (I am one of three users of the system and the only one to use Dvorak.)

After an update today, even though the keyboard layout selector says Dvorak, it will not let me log in until I type my password in QWERTY.

Shimi Chen (shimi-chen) wrote :

I had a problem of the USA keyvoard re-appearing on every boot along with my chosen layouts(usa altgr and israel).
So at every boot I had to remove it from Preferences->Keyboard.

I followed advice here, removing dmrc, and %gconf.xml.

Also edited /etc/default/console-setup as advised on one of the duplicates of this.
to show:
XKBMODEL="pc105"
XKBLAYOUT="us,il"
XKBVARIANT="altgr-intl,"
XKBOPTIONS="grp:alt_shift_toggle,grp_led:scroll"

And now on every boot I *only* have the standard USA keyboard.
Clicking on "Reset to Defaults" in "Keyboard Preferences" changes to my preferred setting(us algr-intl and israel), without the standard USA(exactly as I want it to be).

This reverts on every boot so I have to go to keyboard preferences and reset to defaults every time I log in.
Apply system-wide doesn't help either.

I am using Karmic 64, gdm version 2.28.1-0ubuntu2.1(latest from official repo)

Martin Pitt (pitti) wrote :

Shimi Chen [2010-03-26 8:12 -0000]:
> And now on every boot I *only* have the standard USA keyboard.
> Clicking on "Reset to Defaults" in "Keyboard Preferences" changes to my preferred setting(us algr-intl and israel), without the standard USA(exactly as I want it to be).
>
> This reverts on every boot so I have to go to keyboard preferences and reset to defaults every time I log in.
> Apply system-wide doesn't help either.
>
> I am using Karmic 64, gdm version 2.28.1-0ubuntu2.1(latest from official
> repo)

Right, this is precisely the bug that was now fixed in Lucid. :-)

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Martin Pitt (pitti) wrote :

Rob Speer [2010-03-25 8:56 -0000]:
> After an update today, even though the keyboard layout selector says
> Dvorak, it will not let me log in until I type my password in QWERTY.

This is handled in bug 550887 now.

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Shimi Chen (shimi-chen) wrote :

Bug persists after 10.04 upgrade.

Changed in gdm:
status: Unknown → Fix Released
Changed in gdm:
importance: Unknown → Medium
Changed in gnome-settings-daemon:
importance: Unknown → High
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.