wrong keyboard layout after upgrade with autologin

Bug #401497 reported by Guybrush88
66
This bug affects 10 people
Affects Status Importance Assigned to Milestone
gdm (Ubuntu)
Confirmed
Low
Unassigned
ubiquity (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

after an update from jaunty to alpha version of karmic i experienced automatically the presence of the american layout instead of the italian one. i resolved this question manually but this isn't a normal behaviour, so i suggest that the current keyboard layout shouldn't be changed into the american one after the upgrade, keeping the previous layout according to the given nationality/language

Revision history for this message
Guybrush88 (guybrush) wrote :

i experienced this problem also after the reboot of the pc but this tima i am not able to work-around this problem

Adil Arif (adisari06)
affects: ubuntu → ubiquity (Ubuntu)
Revision history for this message
phenest (steve-clark) wrote :

This happens with a fresh install too. And it's not possible to set the console to a different layout permanently (related?).

arky (arky)
summary: - [karmic]wrong keyboard layout after upgrade
+ wrong keyboard layout after upgrade
Revision history for this message
Bassem JARKAS (jarkas) wrote : Re: wrong keyboard layout after upgrade

This happen with me after upgrade, Karmic forget my Arabic layout, and keep me with the English layout only.
I used to have system wide keyboard variants configured via Ubuntu installer. now I don't know how to do the same, so I use "setxkbmap" command to set the variants.

Revision history for this message
Christian Funder Sommerlund (zero3) wrote :

Confirming on karmic RC. Happened after a reboot to me too.

Even though Denmark was selected in gnome-keyboard-properties, entering text in the text field revealed that the layout was indeed American. To fix, I had to remove the Denmark layout, add it again AND move it to the top of the list by drag and dropping.

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Revision history for this message
Christian Funder Sommerlund (zero3) wrote :

I'm losing my layout on every reboot it seems. Switching between USA and Denmark in gnome-keyboard-properties doesn't work. I have to remove Denmark, re-add it and move it to the top of the list to regain the layout.

Revision history for this message
Christian Funder Sommerlund (zero3) wrote :

For the record, "setxkbmap" doesn't fix this issue for me.

Revision history for this message
Antonio (tritemio) wrote :

I confirm this in final Karmic, new install. I have to remove the (unselected) USA layout to make the italian layout to work.

Revision history for this message
Christian Funder Sommerlund (zero3) wrote :

That works for me too. Unfortunately, the USA layout is re-added on every reboot. Seems like my system is infected with Americanness :/

Revision history for this message
Christian Funder Sommerlund (zero3) wrote :

I've added gnome-control-center as affected. This is probably not right, but it's as close as I can guess. Perhaps someone in the GNOME area can figure out which underlaying package is responsible for this.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Could people having the issue run gconftool-2 --get /desktop/gnome/peripherals/keyboard/kbd/layouts and copy that there? What keyboard layout is displayed in gdm before login?

Changed in ubiquity (Ubuntu):
importance: Undecided → Low
Changed in gnome-control-center (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Guybrush88 (guybrush) wrote :

with that command i get "[it]"

Revision history for this message
Sebastien Bacher (seb128) wrote :

could you also give details on the layout that should be used and the one active there?

Revision history for this message
Guybrush88 (guybrush) wrote :

in this case it's the correct layout i need

Revision history for this message
Christian Funder Sommerlund (zero3) wrote :

Hi Sebastien :)

Note that this is a regression. It used to work just fine.

I have autologin enabled, but after logging out again I can confirm that GDM has preselected USA as the keyboard layout (even though I delete it on every reboot while I'm suffering from this bug. Somehow it gets autocreated on every boot.).

The value of /desktop/gnome/peripherals/keyboard/kbd/layouts after a reboot is "[dk,us]". After removing the USA layout to fix the keyboard, the value is "[dk]", which seems correct.

Changed in gnome-control-center (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Hum, not sure if that' s a duplicate of the other gdm issues in karmic, Martin do you have any clue about this one?

Revision history for this message
Martin Pitt (pitti) wrote :

Issure reported on upgrades, not an ubiquity bug.

Changed in ubiquity (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Martin Pitt (pitti) wrote :

Can you please give me the output of

  grep X /etc/default/console-setup

?

affects: gnome-control-center (Ubuntu) → gdm (Ubuntu)
Revision history for this message
Martin Pitt (pitti) wrote :

Sounds similar to bug 462724.

Changed in gdm (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

Oh, and please also give me the output of

  cat /home/martin/.dmrc /var/cache/gdm/`id -un`/dmrc

Thanks!

summary: - wrong keyboard layout after upgrade
+ wrong keyboard layout after upgrade with autologin
Revision history for this message
Christian Funder Sommerlund (zero3) wrote :

Hi Martin

In the mean-time, I've fixed this by logging out, selecting the correct keyboard layout and logging in again. The system now correctly remembers my keyboard layout, even though it keeps adding the USA layout by itself.

For what it's worth, here are the output of those commands after I have fixed the problem myself:

zero3@Zero-Laptop:~$ grep X /etc/default/console-setup
grep: /etc/default/console-setup: No such file or directory

Note that I have a file called console-setup.pre-ubiquity in there:

zero3@Zero-Laptop:/etc/default$ grep X /etc/default/console-setup.pre-ubiquity
# values as the XkbModel, XkbLayout, XkbVariant and XkbOptions options
# in /etc/X11/xorg.conf.
XKBMODEL="pc105"
XKBLAYOUT="dk"
XKBVARIANT=""
XKBOPTIONS="lv3:ralt_switch"

The other command:

zero3@Zero-Laptop:/etc/default$ cat /home/zero3/.dmrc /var/cache/gdm/`id -un`/dmrc

[Desktop]
Session=gnome
Language=da_DK.UTF-8
Layout=dk

[Desktop]
Session=gnome
Language=da_DK.UTF-8
Layout=dk

Changed in gdm (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

So it seems Christian indeed has a different problem:

> zero3@Zero-Laptop:~$ grep X /etc/default/console-setup
> grep: /etc/default/console-setup: No such file or directory

That would explain why your keyboard layout isn't in hal/X/anywhere.

> Note that I have a file called console-setup.pre-ubiquity in there:

No idea where that comes from. Colin, Evan, any idea?

Changed in ubiquity (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Christian Funder Sommerlund (zero3) wrote :

The .pre-ubiquity file might be related to me trying to use ubiquity to install Ubuntu directly onto an USB stick (without any luck :/) a couple of days ago. The last modified date would match that. Not sure though.

Any idea why I would be missing the console-setup file? (assuming I need it)

Revision history for this message
Christian Funder Sommerlund (zero3) wrote :

Bug is back again. The USA layout is now being applied on every reboot.

For what it is worth:

zero3@Zero-Laptop:~$ cat /home/zero3/.dmrc /var/cache/gdm/`id -un`/dmrc

[Desktop]
Session=gnome
Language=da_DK.UTF-8
Layout=us

[Desktop]
Session=gnome
Language=da_DK.UTF-8
Layout=us

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

I'm experiencing the same problem, and I am able to reproduce it even on clean installations.

1) My layout is [us,gr]:
alkisg@alkis:~$ grep XKBLAYOUT /etc/default/console-setup
XKBLAYOUT="us,gr"

2) I clear all my gnome keyboard settings, and logoff:
alkisg@alkis:~$ gconftool-2 --recursive-unset /desktop/gnome/peripherals/keyboard

3) When I login again, gdm (I guess) has set my layout to [us]:
alkisg@alkis:~$ gconftool-2 --get /desktop/gnome/peripherals/keyboard/kbd/layouts
[us]

At this point, I am not able to change to the Greek layout.
Of course, if I clear the "layouts" gconf setting somehow (either with gconftool-2 or with gnome-keyboard-properties), then I am able to switch to Greek again. But the next time I logon gdm again forces my layout to [us].

Workaround:
If I do set the gnome layout to [us,gr] (instead of clearing it) then gdm respects it.

Revision history for this message
Dimitrios Dalagiorgos (dimndal) wrote :

Same problem here...

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Maybe I should post the command that I use to work around the problem, to see if it helps other people here as well:

gconftool-2 --type list --list-type string --set /desktop/gnome/peripherals/keyboard/kbd/layouts '[us,gr]'
Of course put the layouts for YOUR languages instead of [us,gr]

After that command, the layouts should be fixed immediately, and they should remain OK even after logging off or rebooting (if we're all talking about the same bug).

tags: added: iso-testing
Revision history for this message
Antonio (tritemio) wrote :

I confirm this bug on a clean karmic installation. It happens at every reboot, not using autologin.

The requested output before setting the correct layout back again from the USA to IT:

$ grep X /etc/default/console-setup
# values as the XkbModel, XkbLayout, XkbVariant and XkbOptions options
# in /etc/X11/xorg.conf.
XKBMODEL="pc105"
XKBLAYOUT="it"
XKBVARIANT=""
XKBOPTIONS="grp:alts_toggle"
$

$ cat /home/anto/.dmrc /var/cache/gdm/`id -un`/dmrc

[Desktop]
Session=default
Layout=us
Language=it_IT.UTF-8

[Desktop]
Session=default
Layout=us
Language=it_IT.UTF-8
$

Revision history for this message
Antonio (tritemio) wrote :

In my case, the command proposed by Alkis Georgopoulos

gconftool-2 --type list --list-type string --set /desktop/gnome/peripherals/keyboard/kbd/layouts '[us,it]'

fixes the problem for the current session but the problem appears again after reboot.

I can also fix the problem for the current session deleting the USA layout in the keyboard preferences. Note that, in the keyboard preference the IT layout is correctly set, but not working unless I delete the USA layout.

Revision history for this message
Antonio (tritemio) wrote :

Let me stress that this is a regression in karmic, since I had no problem with any previous version on the same laptop.

Antonio (tritemio)
tags: added: karmic keyboard regression
Revision history for this message
noddeat (noddeat) wrote :

that was an issue for me too. I applied the layout settings systemwide (Preferences -> Keyboard -> Layouts -> delete USA layout and press button "Apply system wide") and it now works: even in gdm the default keyboard is Polish, not USA.

my /etc/default/console-setup looks as follows:
$ grep X /etc/default/console-setup
# values as the XkbModel, XkbLayout, XkbVariant and XkbOptions options
# in /etc/X11/xorg.conf.
XKBMODEL="pc105"
XKBLAYOUT="pl,ua"
XKBVARIANT=",unicode"
XKBOPTIONS="lv3:ralt_switch,grp:lwin_toggle,grp_led:num,nbsp:level3n,terminate:ctrl_alt_bksp"

and settings in GNOME:
$ gconftool-2 --get /desktop/gnome/peripherals/keyboard/kbd/layouts
[pl,ua unicode]

Revision history for this message
Nyarlathotep (davihal) wrote :

I can't understand why this bug is set with low importance, as everything so badly affecting basic use cases should be a show stopper error.

Revision history for this message
Arjan (at-tuko) wrote :

Dear all,

I am experiencing a similar problem. However I would like to have a US Int'l keyboard, but I just don't seem to get rid of the Italian keyboard layout.

I agree with previous statement that this should be a high priority issue, unless Ubuntu is focusing on users who don't need their keyboard :-)

Keep up the good work!

Kind regards,

Arjan

arjan@ubuntu:~$ echo $GDM_KEYBOARD_LAYOUT
it
arjan@ubuntu:~$ gfconftool -R /desktop/gnome/peripherals/keyboard/kbd
No command 'gfconftool' found, did you mean:
 Command 'gconftool' from package 'gconf2' (main)
gfconftool: command not found
arjan@ubuntu:~$ gconftool -R /desktop/gnome/peripherals/keyboard/kbd
 layouts = [us alt-intl]
 options = [grp grp:alts_toggle]
 model = acer_laptop
arjan@ubuntu:~$ grep ^X /etc/default/co
grep: /etc/default/co: No such file or directory

Revision history for this message
Durand D'souza (durand1) wrote :

Seems like this has been fixed in lucid. After choosing gb dvorak keyboard during the installation, the same layout is used for login, ttys and my desktop.

Revision history for this message
Christian Göbel (christiangoebel) wrote :

On a fresh install of Lucid (daily 20100213) I have a similar Problem.
Details: Installing Lucid 386 32bit from an USB-Stick via Ubiquity. In Ubiquity I choose Language: English and Keyboard-layout: German. After a restart and login into gnome, the keyboard is set to US (In the Gnome menu under System/Keyboard/Layouts, only the US keyboard is present).
Since the bug description refers to "upgrade with auto-login", I wonder if I should open a new bug?
The description would than be "fresh install via Ubiquity, with gdm-login".

Revision history for this message
wellinux (brycek) wrote :

Similar problems here, with UK keyboard option. I've found a simple workaround, in Gnome, using System/Preferences/Keyboard.
In Layouts, by deleting the US keyboard and installing a second UK keyboard, it seems to stop the system from reverting to US. I've absolutely no idea why, but it has withstood half a dozen reboots.

Revision history for this message
Sebastien Bacher (seb128) wrote :

is that still an issue in lucid?

Revision history for this message
wellinux (brycek) wrote :

Sorry. Still on karmic, which is still OK.

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Yes, it is still an issue in current Lucid, exactly like I describe it in comment #24, nothing has changed since.

I'd like to emphasize that in the default case, gdm *shouldn't* modify the system-wide layout defined in /etc/default/console-setup. For me, that's XKBLAYOUT="us,gr". Yes, two simultaneous keyboard layouts are *required* for many countries.

One reasonable way to do that would be to provide an additional "default system layout" entry in the layout-selection combobox.
In other words, *gdm shouldn't assume that [us] is the default*.

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

I'm attaching a script which should make the situation more bearable for system admins.

To summarize the problem:
=========================
 * In some countries, two layouts are needed by default.
 * Console-setup correctly supports that, e.g. XKBLAYOUT='[us,gr]'.
 * Gdm makes the wrong assumption that "only one layout can be the system default" so it only keeps the first one, e.g. [us].
That's broken behavior.

A proposed fix for gdm, *without any UI changes*:
=================================================
 * In the login screen, there's a combo box with all the possible keyboard layouts.
 * Gdm could just add an additional, default entry there:
   [Use the system default layouts]
 * That entry should be selected by default.
 * If the user selected that entry, gdm should copy the system defaults from console-setup to the gconf keys (see the attached script).

Until gdm is fixed, sysadmins could use the attached script like this:
======================================================================
 * Copy it to /usr/bin/apply-system-default-layout
 * chmod +x /usr/bin/apply-system-default-layout
 * cat <<EOF > /etc/xdg/autostart/apply-system-default-layout
[Desktop Entry]
Name=Apply the system default layout
Exec=/usr/bin/apply-system-default-layout
OnlyShowIn=GNOME;
Icon=preferences-desktop-keyboard
Terminal=false
Type=Application
EOF
 * The default system layout would then be applied to all users.
   But some users may need a different layout than the system default.
   Those users should disable the script from System > Preferences > Startup programs.

Revision history for this message
Sebastien Bacher (seb128) wrote :

the multiple layout issue is a different one and tracked on bug #460328

Revision history for this message
Sebastien Bacher (seb128) wrote :

if all the issues described there are due to multiple layouts use then bug #460328 should probably be used since it has a lucid task and the corresponding settings

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Yes, I believe that all the issues described here are caused by gdm, which forces (in the gconf key) the first layout that it sees in console-setup. Please mark it as a duplicate of bug #460328.

It'd be best if an ubiquity task was also registered in #460328, because the new ubiquity (tested with yesterday's live cd) doesn't offer a chance to select a layout in the live cd, so its devs should also be aware of the need for multiple layouts.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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