Some metacity shortcuts get changed into lists and stop working

Bug #963125 reported by Christian Theune
134
This bug affects 40 people
Affects Status Importance Assigned to Milestone
unity-2d
Invalid
Undecided
Unassigned
gnome-settings-daemon (Ubuntu)
Confirmed
Undecided
Unassigned
gsettings-desktop-schemas (Ubuntu)
Confirmed
Undecided
Unassigned
unity-2d (Ubuntu)
Invalid
High
Michu_z

Bug Description

Not sure whether this is unity-2d or something else.

A recent update (in the last 2-3 days) caused my Alt-Tab switcher to disappear. The best I could to was to set the keyboard-shortcut for Alt-Tab to "Switch windows directly".

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: unity-2d 5.7.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-20.32-generic 3.2.12
Uname: Linux 3.2.0-20-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 1.95-0ubuntu1
Architecture: amd64
Date: Fri Mar 23 15:14:14 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
PackageArchitecture: all
SourcePackage: unity-2d
UpgradeStatus: Upgraded to precise on 2012-01-21 (61 days ago)

Revision history for this message
Christian Theune (ctheune) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity-2d (Ubuntu):
status: New → Confirmed
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Is there any information I can provide to help debug this? It seems like a very serious UI regression.

Changed in unity-2d (Ubuntu):
importance: Undecided → High
Changed in unity-2d:
status: New → Confirmed
Revision history for this message
Paweł Stołowski (stolowski) wrote :

I've also experienced this issue on 1 of 2 Precise systems. I noticed that on the affected system all metacity keybindings suddenly have List type (list of strings) in the schema - you can see this with gconf-editor - all key values are surrounded with [ ]. This looks completly wrong. In particular, switch_windows key binding is [<Alt>Tab]. I compared this with the other system that doesn't have the problem, and keybindings are all strings.

I checked my local user schema:

pawel@pawel-VirtualBox:~/.gconf$ grep -R switch_windows *
apps/gconf-editor/%gconf.xml: <stringvalue>/apps/metacity/global_keybindings/switch_windows</stringvalue>
apps/metacity/global_keybindings/%gconf.xml: <entry name="switch_windows_backward" mtime="1333006464" type="list" ltype="string">
apps/metacity/global_keybindings/%gconf.xml: <entry name="switch_windows" mtime="1333040076" type="list" ltype="string">

So again, the type="list" is incorrect.

I enabled metacity debugging, and it doesn't read such keybindings:
...
KEYBINDINGS: Binding "switch_to_workspace_left" has new gconf value "none"
KEYBINDINGS: Keybinding for "switch_to_workspace_left" is unchanged
KEYBINDINGS: Binding "switch_windows" has new gconf value "none"
KEYBINDINGS: Keybinding for "switch_windows" is unchanged
...

Alex, could you please open gconf-editor and check the value of apps/metacity/global_keybindings/switch_windows?
Then, please also do the grep test like I did above. This will confirm if we're facing the same issue.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Hi Pawel,

I have:

switch_windows=[<Alt>Tab]

and

$ grep -R switch_windows *
apps/metacity/global_keybindings/%gconf.xml: <entry name="switch_windows_backward" mtime="1333033181" type="list" ltype="string">
apps/metacity/global_keybindings/%gconf.xml: <entry name="switch_windows" mtime="1333033181" type="list" ltype="string">

Revision history for this message
Shahar Or (mightyiam) wrote :

Dear Friends,

To work around this I removed just about everything related:
~/.gconf/apps/metacity
~/.gconf/desktop/keybindings
~/.gconf/desktop/unity-2d

And logged out & logged back in.

Now keyboard shortcuts are default and working.

Thanks and Blessings,
Shahar

Revision history for this message
Paweł Stołowski (stolowski) wrote :

Shahar, thanks, yes, this is a possible workaround. The root cause may be related to https://bugs.launchpad.net/unity/+bug/963264 but I haven't investigated it as the hack mentioned in 963264 was a one time problem and will be removed soon. As I mentioned above, I didn't happend on my other Precise system.

Revision history for this message
Paweł Stołowski (stolowski) wrote :

I've just experienced the issue today again. I don't think it's related to https://bugs.launchpad.net/unity/+bug/963264, as I reproduced it today by logging in & out several times, only using unity2d. At some point broken keybindings were created in ~/.gconf directory. Possibly a gconfd bug?

Shahar Or (mightyiam)
tags: added: configuration-upgrade
Revision history for this message
Dmitriy (sukharevd) wrote :

Had the same problem in GNOME Classic today.

Revision history for this message
Jacob Lorensen (jalor-yousee) wrote :

Same problem, just did a software upgrade and now Alt-Tab does not work anymore. Will try and apply the work-around described by Shahar.

Revision history for this message
Jacob Lorensen (jalor-yousee) wrote :

I can confirm that Shahar's workaround works nicely. Thanks. Back to being productive.

Revision history for this message
Night Eagle (nighteagle) wrote :

I experienced this problem after upgrade to Precise.

It affected both unity-2d and gnome-2d

["System Settings" -> "Keyboard" -> "Shortcuts" -> "Navigation": "Switch Applications" ] indicated no binding for me. I set it to Alt-Tab and that solved the problem for me.

The general proble seems to be that that particular key binding [and I believe any others in that Navigation group) were wiped out or not properly migrated on upgrade.

Revision history for this message
Styg (stygar-laszlo) wrote :

Same problem, just did a software upgrade and now Alt-Tab does not work anymore.

Revision history for this message
Si Dedman (si-dedman) wrote :

Shahar's idea may work for unity users but removing metacity removes gnome-fallback i.e. the classic interface. Reinstalling it makes everything appear as it was (phew) but alt-tab goes back to not working.

Revision history for this message
Shahar Or (mightyiam) wrote : Re: [Bug 963125] Re: Alt-Tab window switcher lost

On 1 June 2012 01:47, Si Dedman <email address hidden> wrote:
>
> Shahar's idea may work for unity users but removing metacity removes
> gnome-fallback i.e. the classic interface. Reinstalling it makes
> everything appear as it was (phew) but alt-tab goes back to not working.

Dear Si,
Does it really remove the gnome-fallback interface? And how would
reinstalling it change anything since reinstalling a package should
never change anything in your home directory?
Blessings,
Shahar

Michu_z (michuzet)
Changed in unity-2d (Ubuntu):
assignee: nobody → Michael Szczep (michuzet)
Revision history for this message
Pi Delport (pi-delport) wrote : Re: Alt-Tab window switcher lost

I just encountered this bug on a fresh Precise installation, with Alt-Tab and most other window management key bindings not working in Unity 2D.

I looked in /apps/metacity/global_keybindings and /apps/metacity/window_keybindings as suggested by Pawel, and all the relevant values were wrapped in lists, instead of being strings: unsetting them with gconf-editor made them revert to their default string-only values, and immediately restored functionality.

I have not extensively used this installation, but i did log into non-2D Unity a few times before logging into Unity 2D: maybe it (or some other package) inserts these non-working entries into gconf?

Are the list values perhaps part of a migration to multi-valued keybindings that Unity 2D should also come to support?

Revision history for this message
ChrisJ (spammichvoll11elf) wrote :

Thanks Piet, removing the list brackets for cycle_windows does the trick.

Revision history for this message
jan2ary (jan2ary) wrote :

The setting made by System Settings -> Keyboard -> Shortcats -> Navigation -> Move between windows, using a popup window helped for a once, but is not stable because of issue reproduces by itself weekly, so I have to configure it again and again.

Revision history for this message
Radu Cristescu (radu.c) wrote :

Looks like that "strings are lists" information is right on the money. It fixed my alt-tab issue that appear out of the blue, with no prior warning, yesterday, after I rebooted my laptop. It worked fine during the day, I turned it off, powered it back up in the evening and it was broken, without doing any updates inbetween. I guess there's a rogue element in there somewhere and it won't be easy to find it.

Revision history for this message
joehill (joseph-hill) wrote :

I'm having the same problem. X is constantly crashing (as in, the screen freezes and takes no keyboard or mouse input), and the last time it crashed and I restarted, I found that the "switch applications" setting had been disabled. I opened up "System settings" -> "Keyboard" and set it again to "alt-tab" and now it's working again. This is the first time this particular bug has happened to me.

Revision history for this message
Joel Ebel (jbebel) wrote :

Adding packages gnome-settings-daemon and gsettings-desktop-schemas, as a "fix" could be done in either.

The issue appears to be that dconf stores the keybindings in arrays of strings, and when set there, gnome-settings-daemon will transition those settings to gconf as defined by /usr/share/GConf/gsettings/wm-schemas.convert. metacity expects those keybindings to just be strings, not lists of strings, so after the conversion, metacity can't read the keybindings.

Possible solutions would be
1. Allow conversion to a string, which is probably a challenging task, especially if the array in dconf contains multiple values. the .convert files would have to indicate that a type change is required, which would be a syntax change from existing files, and probably not worth the effort.
2. Just remove these keybindings from the .convert files. I suspect they aren't really necessary.

Changed in gnome-settings-daemon (Ubuntu):
status: New → Confirmed
Changed in gsettings-desktop-schemas (Ubuntu):
status: New → Confirmed
Revision history for this message
Margarita Manterola (marga-9) wrote :

Hi, I've retitled the bug to reflect more closely what happens.

Not only Alt-Tab is lost, any shortcut managed through the metacity entries can be affected by this.

Joel already explained what is happening and what the possible solutions are. It would be great to get some of the maintainers of these packages to chime in here.

summary: - Alt-Tab window switcher lost
+ Some metacity shortcuts get changed into lists and stop working
Revision history for this message
gratefulfrog (gratefulfrog) wrote :

I do not use unity, but gnome and xfce and this bug just appeared today for me!

What a terrible regression...

Any workarounds?

I tired to set the navigation on keyboard settings, but it was already set to alt-tab....

Please help!

Changed in unity-2d:
status: Confirmed → Invalid
Changed in unity-2d (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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