gnome-keyboard-properties : won't set back to defaults

Bug #431144 reported by Paul Tader
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-control-center (Ubuntu)
Invalid
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-control-center

The "Alt/Win key behavior" in "Keyboard Layout Options" will not re-map back to its
defaults. No matter if I choose the "Default" radio button and/or "Reset to Defaults"
(see image), the setting persist. Multiple users, even newly created users are effected as well.

I've also tried running it as root (# sudo gnome-keyboard-properties and after enabling the root account) but even
that won't change the selected radio button.

(Screenshot)
http://www.linuxscope.com/~ptader/images/keyboard_layout.png

Ubuntu 9.04

# apt-cache policy gnome-control-center
gnome-control-center:
  Installed: 1:2.26.0-0ubuntu3
  Candidate: 1:2.26.0-0ubuntu3
  Version table:
 *** 1:2.26.0-0ubuntu3 0
        500 http://us.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

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

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please answer these questions:

 * Is this reproducible?
 * If so, what specific steps should we take to recreate this bug?

 This will help us to find and resolve the problem.

Changed in gnome-control-center (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
status: New → Incomplete
Changed in gnome-control-center (Ubuntu):
importance: Undecided → Low
Revision history for this message
Paul Tader (ptader-linuxscope) wrote :

I'm unable to reproduce the initial state (getting it "stuck" in the non-default selection) but I'm able to reproduce the problem where the setting can not be set back to the default.

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

We are closing this bug report as it lacks the information, described in the previous comments, we need to investigate the problem further. However, please reopen it if you can give us the missing information and don't hesitate to submit bug reports in the future.

Changed in gnome-control-center (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Matt Sephton (matt-sephton) wrote :

I'm also suffering from this. :(

Revision history for this message
Matt Sephton (matt-sephton) wrote :

OK, I've heard from the guy who opened this bug and he never solved it (he did a fresh 9.10 install)

So, some more information about it from me (sorry about my earlier "me, too!" post):

Background
The behaviour of the Keyboard Preferences dialog shown above is that sections are shown in normal font, and when their setting is changed away from default the heading for that section turns bold to show that a change has been made. When the settings are changed back to default the heading goes back to normal font.

Expected Behaviour
Select System/Preferences/Keyboard/Layouts/Layout Options...
Open "Alt/Win key behaviour"
Click "Default"
Bold heading removed as default setting is restored

Actual Behaviour
Bold heading remains and default setting is not restored

Note
Changing other settings back to default results in the expected behaviour.

In my instance the setting is locked to "Control is mapped to Alt keys, Alt is mapped to Win keys" which is bad for me as my laptop (X31 ThinkPad) does not have any Win keys! So i am currently without Alt keys so can not do Alt+F2, Alt+F4 etc.

The preference for this setting is stored at: ~/.gconf/desktop/gnome/peripherals/keyboard/kbd/%gconf.xml

I have tried trashing this preference from a root/recovery console, using gconf-editor and the setting still persists. Either it's stored somewhere else or there's a bug in the dialog for that particular preference.

Any thoughts? I am happy to help with any answers to figure this one out.

Revision history for this message
Matt Sephton (matt-sephton) wrote :

OK, I've managed to find a workaround: adding a second keyboard layout has the side-effect of enabling you to change the "Alt/Win key behaviour" preference.

I can also reproduce this on demand, at least on my machine.

(perhaps multiple layouts is the trigger for this bug? I am sure I had briefly had more than one in the past.)

Anyway, I added the Afghanistan layout as it was the default after clicking "Add...". After adding a second layout, you'll have silently activated another preference - a key shortcut to swap between layouts. In "Keyboard Layouts..." this is known as "Key(s) to change layout" and is set as "Both alt keys together" after adding a layout. This is actually the important setting for the workaround.

Now, if you remove the second keyboard layout the extras "Key(s) to change layout" setting will stay active and you will still be able to change the "Alt/Win" setting to/from Default. Hurrah! Workaround found.

However, if you then change the "Key(s) to change layout" preference back to it's default setting (no items selected, heading will no longer be bold) then the original "Alt/Win" preference bug will be back - somehow the preference will be changed back to the "Control is mapped to Alt keys, Alt is mapped to Win keys" setting.

Some nice xprop debugging output:

With the "Alt/Win" bug present:
$ xprop -root | grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "pc105", "gb", "", "altwin:ctrl_alt_win"
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "gb", "", "altwin:ctrl_alt_win"

With a second layout and "Alt/Win" set back to "Default":
$ xprop -root | grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "pc105", "gb", "", "altwin:ctrl_alt_win"
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "gb,af", ",", "grp:alts_toggle"

With the second layout removed and the "Key(s) to change layout" preference kept active:
$ xprop -root | grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "pc105", "gb", "", "altwin:ctrl_alt_win"
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "gb", "", "grp:alts_toggle"

With the "Key(s) to change layout" preference set back to its Default:
$ xprop -root | grep XKB
_XKB_RULES_NAMES_BACKUP(STRING) = "evdev", "pc105", "gb", "", "altwin:ctrl_alt_win"
_XKB_RULES_NAMES(STRING) = "evdev", "pc105", "gb", "", "altwin:ctrl_alt_win"

Any help?

Revision history for this message
Matt Sephton (matt-sephton) wrote :

OK, it seems the global setting is stored in: /etc/default/console-setup

As follows:

(snip)
# The following variables describe your keyboard and can have the same
# values as the XkbModel, XkbLayout, XkbVariant and XkbOptions options
# in /etc/X11/xorg.conf.
XKBMODEL="pc105"
XKBLAYOUT="gb"
XKBVARIANT=""
XKBOPTIONS="altwin:ctrl_alt_win"

Not sure how that became the default, but to get rid of the dodgy "Alt/Win" setting edit the last line to this:

XKBOPTIONS=""

Works for me.

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.