After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 628529 - Keyboard Layout: New windows always use active window's layout
Keyboard Layout: New windows always use active window's layout
Status: RESOLVED NOTGNOME
Product: gnome-control-center
Classification: Core
Component: Keyboard
2.30.x
Other Linux
: High critical
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-09-01 16:51 UTC by Mikhail Golubev
Modified: 2011-11-14 11:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
debug output (gnome-settings-daemon --no-daemon) with XKL_DEBUG=150 (70.89 KB, text/plain)
2010-09-14 00:13 UTC, Mikhail Golubev
Details

Description Mikhail Golubev 2010-09-01 16:51:00 UTC
1. There are two keyboard layouts in my system keyboard settings (System - Preferences - Keyboard: Layouts):
USA (first layout) and Russia (second layout).

2. Checkbox "Separate layout for each window" is checked.

3. But checkbox "New windows use active window's layout" does not works. I can check it or uncheck, but new windows always use active window's layout regardless of my choice in keyboard preferences.
Сheckbox "New windows use active window's layout" has no effect on the behavior of the keyboard layout.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: gnome-control-center 1:2.30.1-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-24.41-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-24-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Mon Aug 23 23:15:11 2010
ExecutablePath: /usr/bin/gnome-keyboard-properties
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: gnome-control-center

This bug on Launchpad Bugtracker:
https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/622965
Comment 1 Sergey V. Udaltsov 2010-09-02 20:30:39 UTC
Could you do the following experiment:

1. Put the gnome-terminal icon on the panel.
2. Configure two layouts, USA and Russian

3. Have the checkbox (New windows use active window's layout) checked.

4. Create new gnome-terminal by clicking the icon on the panel
5. Change the layout
6. Check that new g-t window inherits the layout of the previous window

Repeat #4-#6 several times

7. Have the checkbox (New windows use active window's layout) unchecked

8. Create new gnome-terminal by clicking the icon on the panel
9. Change the layout
10. Check that new g-t window always uses USA layout (first in the list), regardless of what was the active layout in the previous g-t window

Repeat #8-#10 several times

That works for me (10.04 as well). Would it work for you?
Comment 2 Mikhail Golubev 2010-09-02 23:30:43 UTC
(In reply to comment #1)
> Could you do the following experiment:
> ....
> That works for me (10.04 as well). Would it work for you?

That does not work for me (Ubuntu 10.04).
New gnome-terminal window always use active window's layout.
Comment 3 Sergey V. Udaltsov 2010-09-05 15:13:43 UTC
In that case, please start gnome-settings-daemon in terminal (first kill existing instance), with env var XKL_DEBUG=150 and --no-daemon

Then repeat steps ##7-10

Please attach here the output
Comment 4 Manal 2010-09-08 17:34:30 UTC
I think I have quite the same problem.
I use two layouts : French and French Bépo. I don't check the checkbox «Separate layout for each window» : I want active layout change only when I click on its code in the notifier applet.
But when I use my second layout and I launch a new application, the active layout *sometimes* become the first one. This append too, sometimes, when I close a window.
I said «sometimes», but if I launch Firefox, the active layout become the first one almost every time.
Comment 5 Mikhail Golubev 2010-09-11 05:51:33 UTC
(In reply to comment #3)
> In that case, please start gnome-settings-daemon in terminal (first kill
> existing instance), with env var XKL_DEBUG=150 and --no-daemon
> 
> Then repeat steps ##7-10
> 
> Please attach here the output

Where should be the output file?
Maybe I have something not understood. Can you give a step-by-step instruction?
Comment 6 Sergey V. Udaltsov 2010-09-13 20:52:44 UTC
In gnome-terminal, you should do:
killall gnome-settings-daemon
export XKL_DEBUG=160
gnome-settings-daemon --no-daemon

After that point, there will be a lot of things in gnome-terminal when you switch windows, change layouts etc.
Comment 7 Mikhail Golubev 2010-09-14 00:13:26 UTC
Created attachment 170203 [details]
debug output (gnome-settings-daemon --no-daemon) with XKL_DEBUG=150

> In that case, please start gnome-settings-daemon in terminal (first kill
> existing instance), with env var XKL_DEBUG=150 and --no-daemon
> Then repeat steps ##7-10
> Please attach here the output

Console output attached.
Comment 8 Sergey V. Udaltsov 2011-08-12 20:20:07 UTC
Mikhail, sorry for delay. The bug got lost. I checked your log - it seems correct. The new window got group 0 which should be the default group for the new window. What's wrong about that?

Is this bug still reproducable in the latest gnome?
Comment 9 Mikhail Golubev 2011-08-13 16:18:28 UTC
Now I'm using Ubuntu 11.04 with Unity desktop. But this bug is still reproducible in both systems: one is upgraded from Ubuntu 10.04 and one is clean installed Ubuntu 11.04.

This bug appears not every time when I switch keyboard layout and launch new application window, but sometimes.
I'm using "Caps Lock" and "Right Ctrl + Right Shift" keys to change keyboard layout, may be this affects the bug.
Comment 10 Oleg Cherkasov 2011-09-28 10:31:41 UTC
The same is here for me on Natty using Unity or GNOME compiz sessions.  Traditional GNOME sessions with metacity work ok.

It is something with compiz vs GNOME because it obviously ignores that option and it is always ON, so new windows always got the latest active window layout.
Comment 11 Mikhail Golubev 2011-10-02 20:12:37 UTC
(In reply to comment #10)
> The same is here for me on Natty using Unity or GNOME compiz sessions. 
> Traditional GNOME sessions with metacity work ok.
> 
> It is something with compiz vs GNOME because it obviously ignores that option
> and it is always ON, so new windows always got the latest active window layout.

Oleg, thank you for your addition. My experiments confirm your comment.
This problem occurs only when using Gnome with Compiz window manager.
If I boot into Gnome with Metacity [Ubuntu Classic (no effects)] the "New windows use active window's layout" option in the gnome-keyboard-properties works fine.

To Sergey V. Udaltsov:
Can you reproduce this bug with Gnome + Compiz?
Should we forward this bug to the Compiz developers or it can be solved on the side of the gnome-control-center package?
Comment 12 Bastien Nocera 2011-10-03 16:55:09 UTC
Seeing as both Unity is based on compiz, is there any data points telling us that this isn't a compiz bug? I'm enclined to close this bug and have you report it to compiz/Unity because it doesn't affect GNOME...
Comment 13 Mikhail Golubev 2011-10-03 17:11:51 UTC
(In reply to comment #12)
> it doesn't affect GNOME...

Are you shure?
But gnome-control-center package is a part of Gnome.
This bug affects Compiz, but it affects Gnome too.
Is there any data points telling us that this isn't a Gnome bug?
The problem is somewhere between Gnome and Compiz.
Comment 14 Sergey V. Udaltsov 2011-10-03 17:17:36 UTC
Unfortunately I cannot run Compiz on the HW I have. I would be inclined to say it is Compiz bug. Or it can be some kind of subtle race condition in X11 protocol handling (inside libxklavier) that is triggered by Compiz.
Comment 15 Oleg Cherkasov 2011-10-04 07:04:22 UTC
I do agree it is very comfortable to blame compiz causing the problem however it is a hypothesis.  I would suggest the problem have to be reproduced and observed before reporting to compiz.  Besides if anyone have time to test compiz with KDE, LXDE or XFCE it would be good contribution to 'divide & conquer' way of identifying the root of the problem.
Comment 16 Sergey V. Udaltsov 2011-10-04 22:14:05 UTC
There is another option. Instead of metacity, trying to run gnome with some different WMs (not compiz). Thanks God, gnome 2 allowed that.
Comment 17 Mikhail Golubev 2011-10-05 03:44:55 UTC
What if Gnome sends the wrong keyboard layout parameter to Compiz? In that case it's a Gnome's bug.
Comment 18 Sergey V. Udaltsov 2011-10-08 18:43:41 UTC
GNOME does not send anything to Compiz, actually. It just configures X (which is a standard function - otherwise X would just fail to configre) and switches groups by number 1-4. Again, this is a command from g-s-d to X - either X is switching or not.

Also, there is interaction with the window manager - g-s-d keeps the current group in the window property. That's where g-s-d interaction with compiz can fail, if compiz does not behave properly as window manager - or if there are some grey areas in the WM specs which g-s-d and compiz read differently).
Comment 19 Oleg Cherkasov 2011-11-12 14:01:30 UTC
I have switched to Ubuntu 11.10 and the bug is still there.

I do not see any progress, so I reported it to Canonical as compiz related issue: #889484.
Comment 20 Bastien Nocera 2011-11-14 11:55:17 UTC
I'm closing this bug, as it only occurs with compiz (which Unity is based on). If you can actually reproduce the problem with GNOME 3 and gnome-shell, reopen the bug.

Downstream bug:
https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/889484