Regression: Multiple Keyboard Layouts unusable: continuously changes layout + 100% CPU usage [updated]

Bug #625793 reported by Yura Tolstik
This bug affects 399 people
Affects Status Importance Assigned to Milestone
Application Indicators
Fix Released
Undecided
Karl Lattimer
Nominated for 0.1 by hendeby
Nominated for 0.2 by Yura Tolstik
GNOME Settings Daemon
Invalid
Undecided
Unassigned
Release Notes for Ubuntu
Won't Fix
Undecided
Unassigned
Baltix
Fix Released
Undecided
Unassigned
gnome-settings-daemon (Ubuntu)
Fix Released
Critical
Unassigned
Maverick
Fix Released
Critical
Chris Coulson

Bug Description

== General description ==

On some Ubuntu installs with two or more keyboard layouts (e.g. Russian and US English), after some time the keyboard layouts start switching in an endless loop and gnome-settings-daemon starts using more and more CPU until it reaches 100%.

== Known information ==

1) Some people here confirm that this happens with non-GTK (Java or Qt) windows more often then with native GTK. (probably, might be a coincidence)
2) Possible fixes are killing and restarting gnome-settings-daemon or disabling the "Separate layout for each window" option in keyboard preferences window.
3) The second fix, however didn't work for most people, though it might really reduce the probability of the bug appearing.
4) The bug happens both on upgrade installs and clean installs of Ubuntu, confirmed with RC and Alpha 3.
5) The bug is specific to Ubuntu, not existing in Arch Linux and AgiliaLinux.
6) There are users who experience this problem with Russian, Slovakian, Macedonian, Hebrew, Georgian layots. Having such a problem in final release will make keyboard use very problematic for users from these countries, so Ubuntu can lose many users.
7) The bug is still not fixed in GNOME 2.32, which again proves that it's an Ubuntu-specific issue.
8) For some users, the bug disappears after 2 to 15 minutes of use.
9) Confirmed for almost any key set for switching layouts (Shift+Alt, Shift+Ctrl, CapsLock, Alt, Ctrl)
10) Confirmed for both Latin and non-Latin layouts.
11) Permanent fix is to disable g-s-d keyboard plugin in gconf, not fully confirmed though.
12) Confirmed as a g-s-d issue, both with and without indicators.

== Debug ==

APPORT DATA here: https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/633167
and here: https://bugs.launchpad.net/ubuntu/+source/indicator-application/+bug/633346
MORE LOGS: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/636619
GDB DATA: https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/629444
XSESSIONERRORS: https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/630712
RANDOM LOGS: https://bugs.launchpad.net/ubuntu/+source/xkeyboard-config/+bug/64082

XEV OUTPUT: infinite loop of
PropertyNotify event, serial 30, synthetic NO, window 0x6000001, atom 0x174 (XKLAVIER_STATE), time 11886812, state PropertyNewValue

[NEW] GSD output:
(gnome-settings-daemon:2057):
libappindicator-CRITICAL **: app_indicator_set_label: assertion `IS_APP_INDICATOR (self)' failed

P.S. Do. Not. Touch. This. Please. There's more info here, which can make the devs remove the Incomplete status. Не трогайте это, пожалуйста. Здесь намного больше информации, чем во всех предыдущих описаниях, может снимут Incomplete.

TO DEVELOPERS: Please, comment on what logs and other info you need to get this problem solved.

Revision history for this message
Vladislav Rovda (filincrew) wrote :

I have the same problem

Revision history for this message
Yura Tolstik (yltsrc) wrote :

I attached video with login screen where you can see this bug.
Language changing without my activity.
And i can't login because of this bug.

Revision history for this message
Yura Tolstik (yltsrc) wrote :

I can see this behavior after language applet added in maverick.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

Can either of you determine the trigger for the bug? Does it seem to be doing it without a trigger? That would be impossible I think, but the indicator applet does respond to certain X events so I could investigate those.

Unfortunately I can't seem to watch the video, will try with some other players.

Changed in indicator-application:
assignee: nobody → Karl Lattimer (karl-qdh)
Revision history for this message
Karl Lattimer (karl-qdh) wrote :

The video locks up my system, could you re-encode it to another format using something like transmageddon

Revision history for this message
Yura Tolstik (yltsrc) wrote :

I don't know what's happend, but it appears few times every day on all my computers.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

It appears as if this is a gnome-screensaver dialog, I'll reassign this to gnome-settings-daemon as it's not related to the indicator itself.

Changed in gnome-settings-daemon:
assignee: nobody → Karl Lattimer (karl-qdh)
Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@Yura, could you also tell me what your current keyboard shortcut for changing layouts is?

You can find out by going to; Preferences > Keyboard > Layouts > Options > Key(s) to change layout

Revision history for this message
Yura Tolstik (yltsrc) wrote :

right win key

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@Yura, could you change it to left + right alt, or another combination of two keys and see if it keeps happening.

It could be a few things, possibly a keyboard error, possibly an accidental press of the key, if the shortcut is changed we'll have a better idea of what might be causing it.

Revision history for this message
Yura Tolstik (yltsrc) wrote :

ok, i changed it, and i'll update this bug when it appears again

Karl Lattimer (karl-qdh)
Changed in indicator-application:
status: New → Incomplete
Changed in gnome-settings-daemon:
status: New → Incomplete
Revision history for this message
Vladislav Rovda (filincrew) wrote :

I use right alt for layout switching, but this bug as I posted above affects me to

Revision history for this message
Yura Tolstik (yltsrc) wrote :

i сhanged it to alt+shift, but it appears agaшn

Revision history for this message
Yura Tolstik (yltsrc) wrote :

because on macbook2.1 no second alt and ctrl keys

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

Well, I can't see what of my work might have made this happen, so I think this *might* be an upstream bug.

Revision history for this message
Yura Tolstik (yltsrc) wrote :

when we run gnome-setting-daemon with enabled debug:
we can see:
(gnome-settings-daemon:4037): Gtk-WARNING **: Failed to load type module:(null) `menu_proxy_module_load': gnome-settings-daemon: undefined symbol: menu_proxy_module_load

i think this is the the reason which caused this error

Changed in indicator-application:
status: Incomplete → Invalid
Revision history for this message
Pedro Villavicencio (pedro) wrote :

If this is an upstream bug, could somebody having the issue send it to bugzilla.gnome.org ? Thanks in advance.

Revision history for this message
Yura Tolstik (yltsrc) wrote :

it is still reproduced with gnome-settings-daemon 2.31.91-0ubuntu2

Revision history for this message
Yura Tolstik (yltsrc) wrote :

I haven't gnome bugzilla account and i can't post it, please send this bug to bugzilla

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

do you still have this issue?

Changed in gnome-settings-daemon (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Sebastien Bacher (seb128) wrote :

ignore that I didn't read the new comments before posting, do you have steps to trigger the bug?

Revision history for this message
Yura Tolstik (yltsrc) wrote :

no i haven't
but it always happened when i didn't expect it :)
and i need to kill gnome-settings-daemon, but i can't enter this words in terminal(reboot is faster)

Revision history for this message
warder (warderbox) wrote :

Have the same problem

Revision history for this message
Ристе Ристевски (risteristevski) wrote :

It happens over 10 times in a day. The keyboard layouts change themselves over 10 times in a second. I have the English and Macedonian layouts, and I switch the layouts with ALT+Shift. Switching the layouts seems to trigger this bug, and killing the gnome-settings-daemon process is solving it. I can properly switch between my two layouts when the gnome-settings-daemon process isn't running.

We use the Cyrillic alphabet like the Russians too and maybe that too matters something, because I don't see any non-Cyrillic user who is affected by this bug.

Btw, I use Maverick x32 Beta (the bug had the alpha3 version too).

summary: - sometimes keyboard layout automatically changed
+ Keyboard layout automatically changes
Revision history for this message
Yura Tolstik (yltsrc) wrote : Re: Keyboard layout automatically changes

i posted this bug on gnome bugzilla https://bugzilla.gnome.org/show_bug.cgi?id=629234

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

Comment #24 seems to be the CPU hogging bug, this should have been fixed and a the fix released.

i.e. the layout starts changing rapidly and hogging CPU

Changed in gnome-settings-daemon:
assignee: Karl Lattimer (karl-qdh) → nobody
importance: Undecided → Unknown
status: Incomplete → Unknown
Changed in gnome-settings-daemon:
importance: Unknown → Critical
status: Unknown → New
Vandal (vandal1983)
description: updated
Extender (msveshnikov)
Changed in gnome-settings-daemon (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Karl Lattimer (karl-qdh) wrote :

Can someone confirm what is exactly happening here?

Does it suddenly change to a different layout and remain at that layout?

Does it continuously change quite rapidly?

Revision history for this message
shoo_ash (ash-mail) wrote :

It changes continuously vary rapidly (e.g. I see gxneur country flags changing very rapidly).
At the same time the process gnome_settings_daemon is shown in system monitor to use more and more memory (I saw up to 800-900 mb).
It doesn't stop without killing the gnome-settings-daemon.

Revision history for this message
shoo_ash (ash-mail) wrote :

ADD: And I don't see how to reproduce it. But I feel like it has more chances to occur if you work with editors and enter a lot of text.
ADD2: When it happens, you can-not change or launch anything through popdown kb-menu (but you can see it with no lags). I.e. keyboard preferences get also blocked.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

shoo what version of gnome-settings-daemon do you have?

I reproduced this once, fixed what I thought was the bug and released the fix.

Revision history for this message
divan (ivan-daniluk) wrote :

Yes, not only indicator text/flags does switch, but also layouts are switching, so if you have, for example two layouts - English and Russian, with letters 'q' and 'й' on the same key - and want to enter 'qqqqqqqqqq', the output will be 'qйqййqqййqйqq`. The indicator image(I use country flags images) also change it's image about 10-30 times per second, sometimes faster, sometimes slower - I guess it depends on system CPU usage.

When the option 'Separate layout for each window' is disabled, the bug doesn't occur. (I tested it on two machines with latest Maverick beta).

Karl, I can provide any info that will help to find the source of the problem, just tell me what info is needed.

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

As I've reported in bug #636619

It happens for me too. It's still there, I've just checked. It's triggered by switching layout. After that, it goes crazy and layouts are switched cycling between my previously configured ones rapidly. Scroll lock led flashes as well (it's configured to show the non-primary layout). I can't even type since pressing the same key generates random character based on the fact which layout was active at the moment when I pressed the key. xev reports things like this without stopping (even without toucing the keyboard or the mouse after I managed to launch xev in a terminal window):

PropertyNotify event, serial 30, synthetic NO, window 0x6000001,
    atom 0x174 (XKLAVIER_STATE), time 11886504, state PropertyNewValue

PropertyNotify event, serial 30, synthetic NO, window 0x6000001,
    atom 0x174 (XKLAVIER_STATE), time 11886505, state PropertyNewValue

PropertyNotify event, serial 30, synthetic NO, window 0x6000001,
    atom 0x174 (XKLAVIER_STATE), time 11886562, state PropertyNewValue

PropertyNotify event, serial 30, synthetic NO, window 0x6000001,
    atom 0x174 (XKLAVIER_STATE), time 11886634, state PropertyNewValue

PropertyNotify event, serial 30, synthetic NO, window 0x6000001,
    atom 0x174 (XKLAVIER_STATE), time 11886635, state PropertyNewValue

PropertyNotify event, serial 30, synthetic NO, window 0x6000001,
    atom 0x174 (XKLAVIER_STATE), time 11886694, state PropertyNewValue

PropertyNotify event, serial 30, synthetic NO, window 0x6000001,
    atom 0x174 (XKLAVIER_STATE), time 11886695, state PropertyNewValue

PropertyNotify event, serial 30, synthetic NO, window 0x6000001,
    atom 0x174 (XKLAVIER_STATE), time 11886756, state PropertyNewValue

PropertyNotify event, serial 30, synthetic NO, window 0x6000001,
    atom 0x174 (XKLAVIER_STATE), time 11886811, state PropertyNewValue

PropertyNotify event, serial 30, synthetic NO, window 0x6000001,
    atom 0x174 (XKLAVIER_STATE), time 11886812, state PropertyNewValue

My system was upgraded from the previous version of Ubuntu (lucid lynx) I am wondering if it can cause the problem and it works with a 'clean' install (ie: new home directory with gnome/etc settings created by the current development version of ubuntu). I have four layouts configured, one of them (USA) is the primary, the others are configured to be signaled by the scoll lock led, and I switch layouts by key "scroll lock".

Revision history for this message
shoo_ash (ash-mail) wrote :

I have version 2.32.0-0ubuntu1 installed.
I found how to reproduce the bug. You should have several layouts and any open window with text-input (eg gedit).
So try to minimize and restore the window, at the same time change the layout with a key combination (several times) - il will reproduce the same bug, the layout change will come to infinite loop.
I can make a video for you, if it is needed, with this bug reproduced.

Revision history for this message
shoo_ash (ash-mail) wrote :

> I am wondering if it can cause the problem and it works with a 'clean' install (ie: new home directory with gnome/etc settings created by the current development version of ubuntu).

I've got clean install since last alfa or beta.

Revision history for this message
Yura Tolstik (yltsrc) wrote :

I've submit new bug report with apport after i had to kill g-s-d again.
I hope additional information from apport help you to fix this bug.
https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/652015

Revision history for this message
Rich Wales (richw) wrote :

@divan: Could you clarify exactly how you set up your keyboard layout indicator to show country flags?

One problem I've been having (at the same time as this random layout switching bug) is that I am no longer seeing any indication of my current keyboard layout at all. All I am now seeing is an icon that looks like a keyboard, with a cable trailing off into the distance behind it — and this icon stays the same no matter which layout I am using.

I'm not certain if this indicator problem is related to the random layout switching problem or not, but (at least for me) both issues arose at the same time, so I'm suspicious. I've reported the indicator problem separately as bug #650166.

Revision history for this message
divan (ivan-daniluk) wrote :

@Rich Wales, copied flag icons(from internet) to ~/.icons/flags and set the option /desktop/gnome/peripherals/keyboard/indicator/showFlags to true, but I don't think it matters, cause people reported this bug with text indicator as well.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

I use Ubuntu 10.10 with default text indicator. When this occurs,
indicator displays 'USA', but I can't change it. I have russian as
second layot.

//Duplicate bug 633167 has apport information, it may be helpful

Revision history for this message
Screatch (screatch) wrote : Re: Keyboard layout automatically changes

Happens with clear install of 10.10 RC too. Layouts keep changing very quickly but then stops in 2-10 minutes, shortly this problem appears again.

Revision history for this message
pashazz (pzinin) wrote :

This bug affects me too

Yura Tolstik (yltsrc)
Changed in indicator-application:
status: Invalid → Incomplete
Revision history for this message
worthmate (slipped-on-blade) wrote :

I have the same problem. 10.10 updated from 10.04

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Yura, why do you think that it's AppIndicators issue?
What do others think?

Revision history for this message
shoo_ash (ash-mail) wrote :

I believe it is either keyboard indicator applet or gnome_settings_daemon issue (where does it loop layouts?).

al3xandre (al3xandre)
description: updated
Revision history for this message
K900 (k0009000) wrote :

Needs confirmation on whether it's an AppIndicator issue. Please, remove your indicator applets and test whether this problem persists. Doing the same, will report back in a couple of days.
===
Нужно подтверждение, где проблема. Пожалуйста, уберите с панели индикаторы и проверьте, появляется ли бага. Сам делаю то же самое, отпишусь через пару дней.

description: updated
summary: - Keyboard layout automatically changes
+ Keyboard layout automatically changes + 100% CPU usage [updated]
K900 (k0009000)
description: updated
description: updated
description: updated
description: updated
K900 (k0009000)
description: updated
Revision history for this message
Joe_Bishop (denis-cheremisov-gmail) wrote : Re: Keyboard layout automatically changes + 100% CPU usage [updated]

It's the stopper. You shouldn't release 10.10 before this bug will be fixed.

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

@Joe_Bishop I agree, this bug renders ubuntu deskop simply unusable for anyone who has more than one kbd layout.

Revision history for this message
Screatch (screatch) wrote :

Fully agree, the system must not be released with this bug as this will scare off many users.

I still can't understand how this bug got in RC, how come it wasn't fixed while it still was beta? I see reports were there for quite a while but no one noticed them.

Revision history for this message
Screatch (screatch) wrote :

> Needs confirmation on whether it's an AppIndicator issue. Please, remove your indicator applets and test whether this problem persists. Doing the same, will report back in a couple of days.

I removed indicator applet and confirming that issue appeared again.

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

> I removed indicator applet and confirming that issue appeared again.
Then I set Invalid for "Application Indicators".

Also I agree with Joe_Bishop, LGB [Gábor Lénárt] and Screatch. This must be fixed before release, or Ubuntu lost all users, who use cyrillic layout.

Changed in indicator-application:
status: Incomplete → Invalid
Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

Comment of Tolstik Yura from http://bugzilla.gnome.org/show_bug.cgi?id=629234:
"this is only ubuntu bug"

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

Someone of developers can set Critical Importance for gnome-settings-daemon (Ubuntu)?

Revision history for this message
Sergey Klimov (nbdarvin) wrote : Re: [Bug 625793] Re: Keyboard layout automatically changes + 100% CPU usage [updated]

Also I agree with Joe_Bishop, LGB [Gábor Lénárt] and Screatch. This
must be fixed before release, or Ubuntu lost all users, who use cyrillic
layout.

2010/10/2 RussianNeuroMancer <email address hidden>

> Someone of developers can set Critical Importance for gnome-settings-
> daemon (Ubuntu)?
>
> --
> Keyboard layout automatically changes + 100% CPU usage [updated]
> https://bugs.launchpad.net/bugs/625793
> You received this bug notification because you are a direct subscriber
> of a duplicate bug (645049).
>
> Status in Gnome Settings Daemon: New
> Status in Application Indicators: Invalid
> Status in “gnome-settings-daemon” package in Ubuntu: Confirmed
>
> Bug description:
> == General description ==
>
> On some Ubuntu installs with two or more keyboard layouts (e.g. Russian and
> US English), after some time the keyboard layouts start switching in an
> endless loop and gnome-settings-daemon starts using more and more CPU until
> it reaches 100%.
>
> == Known information ==
>
> 1) Most people here confirm that this happens with non-GTK (Java or Qt)
> windows more often then with native GTK.
> 2) Possible fixes are killing and restarting gnome-settings-daemon or
> disabling the "Separate layout for each window" option in keyboard
> preferences window.
> 3) The second fix, however didn't work for some people.
> 4) The bug happens both on upgrade installs and clean installs of Ubuntu,
> confirmed with RC and Alpha 3.
> 5) The bug is specific to Ubuntu, not exisiting in Arch Linux and
> AgiliaLinux.
> 6) Having such a problem in a final release will make keyboard use very
> problematic for Russian users, so Ubuntu can lose many users.
> 7) The bug is still not fixed in GNOME 2.32, which again proves that it's
> an Ubuntu-specific issue.
> 8) For some users, the bug disappears after 2 to 15 minutes of use.
> 9) Confirmed for almost any key set for switching layouts (Shift+Alt,
> Shift+Ctrl, CapsLock, Alt, Ctrl)
> 10) Probably happens only with Cyrrilic layouts (Russian, Macedonian)
>
> == Debug ==
>
> APPORT DATA here:
> https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/633167
> MORE LOGS:
> https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/636619
>
> P.S. Do. Not. Touch. This. Please. There's more info here, which can make
> the devs remove the Incomplete status. Не трогайте это, пожалуйста. Здесь
> намного больше информации, чем во всех предыдущих описаниях, может снимут
> Incomplete.
>
> TO DEVELOPERS: Please, comment on what logs and other info you need to get
> this problem solved.
>
>
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/gnome-settings-daemon/+bug/625793/+subscribe
>

Revision history for this message
Sergey Klimov (nbdarvin) wrote : Re: Keyboard layout automatically changes + 100% CPU usage [updated]

please, fix it, it make me sad!!!

Changed in indicator-application:
status: Invalid → Confirmed
Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

Sergey please check commentary 48 - looks like that only GSD bug, but not indicator applet.

Changed in indicator-application:
status: Confirmed → Invalid
Revision history for this message
Sergey Nizovtsev (snizovtsev) wrote :

This bug happens for me and for three my friends. It's really annoying, one girl asked us to downgrade her ubuntu laptop back to 10.04 because of this bug.

Revision history for this message
Dmitry Shachnev (mitya57) wrote : Re: [Bug 625793] Re: Keyboard layout automatically changes + 100% CPU usage [updated]

People with Slovakian locale also experience this (LP: #633402),
although they use Latin alphabet.
Please at least change importance to Critical.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

@K-9
I don't use any non-GTK apps, but this happens often for me, so p.1 is
maybe incorrect.
What about others?

Revision history for this message
Rich Wales (richw) wrote : Re: Keyboard layout automatically changes + 100% CPU usage [updated]

If this bug report is "invalid" w/r/t the indicator application, please advise what needs to be done in order for the problem to be addressed. It would (IMO) by a very bad thing if this problem were to be neglected, and if Maverick were to be released without anything being done, on account of the issue getting stuck in the middle of a finger-pointing contest. I'm not criticizing the "invalid" status label as such — if the bug doesn't belong here, then it doesn't belong here, no matter how serious it is — but it's got to belong *somewhere*, and it sounds to me like it's an issue whose classification is not at all obvious to the users who are suffering from it.

Revision history for this message
Dmitry Shachnev (mitya57) wrote : Re: [Bug 625793] Re: Keyboard layout automatically changes + 100% CPU usage [updated]

Rich, it's a bug in gnome-settings-daemon ubuntu package.

2010/10/2, Rich Wales <email address hidden>:
> If this bug report is "invalid" w/r/t the indicator application, please
> advise what needs to be done in order for the problem to be addressed.
> It would (IMO) by a very bad thing if this problem were to be neglected,
> and if Maverick were to be released without anything being done, on
> account of the issue getting stuck in the middle of a finger-pointing
> contest. I'm not criticizing the "invalid" status label as such — if
> the bug doesn't belong here, then it doesn't belong here, no matter how
> serious it is — but it's got to belong *somewhere*, and it sounds to me
> like it's an issue whose classification is not at all obvious to the
> users who are suffering from it.
>
> --
> Keyboard layout automatically changes + 100% CPU usage [updated]
> https://bugs.launchpad.net/bugs/625793
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Gnome Settings Daemon: New
> Status in Application Indicators: Invalid
> Status in “gnome-settings-daemon” package in Ubuntu: Confirmed
>
> Bug description:
> == General description ==
>
> On some Ubuntu installs with two or more keyboard layouts (e.g. Russian and
> US English), after some time the keyboard layouts start switching in an
> endless loop and gnome-settings-daemon starts using more and more CPU until
> it reaches 100%.
>
> == Known information ==
>
> 1) Most people here confirm that this happens with non-GTK (Java or Qt)
> windows more often then with native GTK.
> 2) Possible fixes are killing and restarting gnome-settings-daemon or
> disabling the "Separate layout for each window" option in keyboard
> preferences window.
> 3) The second fix, however didn't work for some people.
> 4) The bug happens both on upgrade installs and clean installs of Ubuntu,
> confirmed with RC and Alpha 3.
> 5) The bug is specific to Ubuntu, not exisiting in Arch Linux and
> AgiliaLinux.
> 6) Having such a problem in a final release will make keyboard use very
> problematic for Russian users, so Ubuntu can lose many users.
> 7) The bug is still not fixed in GNOME 2.32, which again proves that it's an
> Ubuntu-specific issue.
> 8) For some users, the bug disappears after 2 to 15 minutes of use.
> 9) Confirmed for almost any key set for switching layouts (Shift+Alt,
> Shift+Ctrl, CapsLock, Alt, Ctrl)
> 10) Probably happens only with Cyrrilic layouts (Russian, Macedonian)
>
> == Debug ==
>
> APPORT DATA here:
> https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/633167
> MORE LOGS:
> https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/636619
>
> P.S. Do. Not. Touch. This. Please. There's more info here, which can make
> the devs remove the Incomplete status. Не трогайте это, пожалуйста. Здесь
> намного больше информации, чем во всех предыдущих описаниях, может снимут
> Incomplete.
>
> TO DEVELOPERS: Please, comment on what logs and other info you need to get
> this problem solved.
>
>
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/gnome-settings-daemon/+bug/625793/+subscribe
>

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote : Re: Keyboard layout automatically changes + 100% CPU usage [updated]

> if the bug doesn't belong here, then it doesn't belong here, no matter how serious it is
Follow commentary 48 - not indicator bug. But you right, it's will be good, if few peoples try to reproduce this issue without indicator applet and confirm commentary 48.

> but it's got to belong *somewhere*, and it sounds to me like it's an issue whose classification is not at all obvious to the users who are suffering from it
Also there is enough information in duplicates. Maybe someone of developers can looks at this bugs?

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

@Sergey Klimov: Not just cyrillic ... I am using US layout as primary but also layout for my native language (Hungarian), and two languages I am learning (Finnish,Norwegian). I think it's not depend on "cyrillic" or not, but simply the fact that you have any layouts configured other than only one, so you can switch between them.

ALSO I am not sure if it's the problem but some developer may have check out the problem I've reported with "xev" that it can help the source of the problem for example. Again the output of xev in case of problem (endless loop of these):

PropertyNotify event, serial 30, synthetic NO, window 0x6000001,
    atom 0x174 (XKLAVIER_STATE), time 11886756, state PropertyNewValue

Can someone else to run "xev" in a terminal window too at the time when the problem occures? Maybe it can be useful to find the problem, maybe not :)

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

As I introduced the patch which caused it I confirm it's in gnome-settings-daemon. Now there was one thing definitely causing this bug and I fixed that, there is a possible second cause of the same kind of behaviour and it sounds plausible that this would occur during window changes.

Thanks for everyone that added detail to this bug, it'll help when I start fixing it :)

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

I can agree, just checked it out: killing process "/usr/lib/gnome-settings-daemon/gnome-settings-daemon" fixes the issue, cycling of layouts stops, xev output stops (no more XKLAVIER_STATE messages without end just other events like my mouse movements etc). After relaunching g-s-d by "hand" everything is normal. And what is odd: it seems (at least now) that the bug is no longer exists after killing-relaunching g-s-d. (until the next reboot or logout/login, etc).

Revision history for this message
APoz (alteravoce) wrote : Re: [Bug 625793] Re: Keyboard layout automatically changes + 100% CPU usage [updated]

yes, it IS important to see the duplicates - a lot of questiones
doubled here were already answered there. The problem is
reproduceable, the problem goes away (with "native" kb applet
indicator) if you turn off keyboard plugin in g-s-d tree in
gconf-editor and in that case you will still be able to switch layouts
with your current settings. So the solution might be easy - to comment
out layout switching in g-s-d's kb-"plugin", just keep indicator and
kb-settings.

K900 (k0009000)
description: updated
Revision history for this message
Yura Tolstik (yltsrc) wrote : Re: Keyboard layout automatically changes + 100% CPU usage [updated]

@LGB After relaunching g-s-d by "hand" I catch this bug again after a while(few times a day).

Ctrl+Alt+f1 helps me, because layout doesn't swithcing there.

Revision history for this message
K900 (k0009000) wrote :

Not a GNOME bug.

Changed in gnome-settings-daemon:
importance: Critical → Undecided
status: New → Invalid
Revision history for this message
K900 (k0009000) wrote :

Updated the description to include latest data.

Revision history for this message
Anton Voloshin (zombieff) wrote :

You can also kill (or remove from gnome-panel) the indicator-applet to stop layout switching. Then run (or add) it again.

May it be that the issue is caused by indicator-applet?

Revision history for this message
Ристе Ристевски (risteristevski) wrote :

Turning the 'Separate layout for each window' option off provides a good workaround for me, but since it's not really a fix - it must be fixed before the official Maverick release.

Revision history for this message
Dmitry Shachnev (mitya57) wrote : Re: [Bug 625793] Re: Keyboard layout automatically changes + 100% CPU usage [updated]

Disabling "Use different layouts for different windows" helped me.

Revision history for this message
Screatch (screatch) wrote : Re: Keyboard layout automatically changes + 100% CPU usage [updated]

I am trying right now "Use different layouts for different windows", so far i hadn't experienced this issue again, still testing.

Why is the priority of this issue low?

Revision history for this message
K900 (k0009000) wrote :

Please, confirm or unconfirm #48 and #64, we have different input on those.

description: updated
Revision history for this message
K900 (k0009000) wrote :

Checked all duplicates for related info, added some more logs to description.

Revision history for this message
divan (ivan-daniluk) wrote :

Little update on "Use different layouts for different windows" disable method - I've disabled it three days ago, bug seems to gone, but appeared two times - and both times under the heavy system load. I.e. when CPU and memory usage got high up to 100% due to some reasons the layouts start switching again, so I had to kill and restart gnome-settings-daemon.
It may sound strange. But under normal system load and 'use differen layouts.." disable I didn't get this bug.

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

I have/had "Use different layouts for different windows" disabled since years, even now. Anyway I still have the problem! I have never used any system with different layouts for different windows, it's confusing in my opinion.

K900 (k0009000)
description: updated
Revision history for this message
Sergey (rozmetanyk) wrote :

I have the same problem

Revision history for this message
MaksimKa (netvin) wrote :

Same here. Also at my side if i kill gnome-settings-daemon and then start it again keyboard layots will be changing again.

Revision history for this message
stee1rat (stee1rat) wrote :

This bug is very annoying. Why the importance of this bug is low?? The release is soon, but this bug affects a lot of people!

Revision history for this message
K900 (k0009000) wrote :

The importance is not Low, it should be High or even Critical, but it is currently set so cause noone of the devs have changed it. Better do that, but average people here can't, cause they're not maintainers.

Revision history for this message
Dmitry Kann (yktooo) wrote :

I confirm this one. I have Russian and English layouts, and switching is bound to Caps Lock. Just lately this bug began to appear, gnome-settings-daemon eats up one CPU entirely (~50% overall load), and the Caps Lock (=layout) indicator blinks like crazy, incredibly annoying.

Killing the daemon helps but if I restart it over again, the bug reverts in a few seconds.

Please raise the importance, it is a very eminent issue!

Revision history for this message
Sergey Sedov (serg-sedov) wrote :

I have same problem after fresh install "maverick-alternate-i386.iso 03-Oct-2010 08:38"

Revision history for this message
Dmitry Savin (envelsavinds) wrote :

I guess this bug's priority should be set as "Medium" or even "High" because it makes the system unusable for huge amount of users.

Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :

I have same problem, and had it two weeks ago. Sorry, I don't know write patch :/, I am working on other program

Revision history for this message
Alexander Nyrkov (mod1987) wrote :

Described problem affects me as well. When the switching thing happens sometimes it is possible to stop it by switching from one widow to another. It stops after fifth or tenth window or so.

Revision history for this message
jarondl (jarondl) wrote :

I have this too, with Hebrew layout.
This Bug really makes the system unusable

description: updated
Revision history for this message
Giorgi Maghlakelidze (dracid) wrote :

This BUG is of a VERY High importance!

I don't mean to offend anyone, but this is EXACTLY why people laugh at Ubuntu, pointing at its papercuts... and MANY OTHER BUGS THAT ARE more that 2-3 years old!

Please, raise the importance of this bug, because it's bugging the hell out of my friends and me... Every time it happens(couple of times a day), we have to log out-in, as it won't go away...

We have Maverick x86 with latest updates. Layouts: English + Georgian.

Good luck!

Revision history for this message
Screatch (screatch) wrote :

In keyboard settings, disable "Use different layouts for different windows".
Since i unchecked this checkbox few days ago, i didn't came across this issue again.

Revision history for this message
zyrg (zyrgzyrg) wrote :

Need. Fix it. Now.

Revision history for this message
K900 (k0009000) wrote :

@Screatch
This is a fix, but it doesn't work for everyone, and it's still default. Needs fixing
@zyrg and all the ppl out there crying FIXFIXFIX!!!
Don't. It doesn't help. Give us debug info, if any. Crying won't help.

Revision history for this message
Vasil Kolev (vasil-ludost) wrote :

I can confirm that disabling the g-s-d keyboard plug-in in gconf does resolve the issue for me, but it kills the per-window keyboard layout feature. The other workaround didn't help.
(I'm using english and bulgarian phonetic layouts)

Revision history for this message
stee1rat (stee1rat) wrote :

@K-9 What kind of debug info do you need? Tell us, and we will give it to you. A lot of people already said all possible information about this annoying bug. If you want it on your system, just use 2 or more layouts and you'll get it.

Revision history for this message
Muhammad Negm (ravingeek) wrote :

first of all sorry for my bad English "I'm not a native speaker"

the bug occurs always when using empathy or Xchat nothing else"for me at least"

when it happens I tried to remove the indicators then I add them again when I go over the keyboard indicator it gives a blank small area

closed the app which was in my case empathy it did nothing the same problem

the confusing thing that when i left my net-book for 5 mins and came again there were no problem with my keyboard and the indicator worked

the problem is resolved by restarting X or waiting without using the keyboard

that bug is annoying A REAL PROBLEM PEOPLE!a thing that makes ubuntu looks immature for newbies

Revision history for this message
Nir0 (nir0pilot) wrote :

i don't know how important is this, but this bug eats memory (and swap) a lot too after some time passed

Revision history for this message
MaksimKa (netvin) wrote :

Join to stee1rat. What exact debug info do you need? I am not either developer or maintainer, but i am ready to update the ticket with any info you need. Yesterday i cought this bug when was changing layot in google chromium browser. I can't predict when this happens again.

Revision history for this message
MaksimKa (netvin) wrote :

Here is video from the TS. I've uploaded it to youtube. Quality is very poor, but still it is posible to see thet keyboard layot switching rapidly. http://www.youtube.com/watch?v=ETePpA5GBUU

Revision history for this message
Ivan Semernik (djdb) wrote :

As for me it's starts when i'm open gmail in the chromium browser and trying to compose an email. gnome-setting-daemon makes system highly load and only reboot solves problem.

Karl Lattimer (karl-qdh)
Changed in indicator-application:
status: Invalid → Incomplete
Revision history for this message
Karl Lattimer (karl-qdh) wrote :

I managed to trigger the loop but not the changing icon, so there's hope for the bug yet. Still curious as to where it might be originating from though :/

Changed in indicator-application:
status: Incomplete → Confirmed
Karl Lattimer (karl-qdh)
Changed in indicator-application:
status: Confirmed → In Progress
Revision history for this message
MaksimKa (netvin) wrote :

In my case icon isn't changing. It just still on some layot and that's it. (i don't use login window)

Revision history for this message
Shadow Panther (panther-ru) wrote :

I noticed that keyboard indicator icon looked like bluetooth icon one time before I caught this bug. Bluetooth indicator is to the left of keyboard indicator.
Also, this bug seems to happen more likely after computer suspend, not fresh boot, but this might be a coincidence.

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

@Karl Lattimer: I haven't got this bug at the GDM screen, but later when I'm using (typically web browser, like chromium) to write mail in a non-English language which requires one of my non-US layouts. Usually then if I press scroll lock (it's configured to switch layout) the problem occures: layouts switches automatically like crazy, scroll lock led flashes rapidly (it's configured to show the non-primary layout is active, I have four btw), and if I press a key it produces random character each time, I guess based on the fact which was the actual layout at the very moment when I press it. So even pressing the same key for looooong, produces an odd sequence of different characters. But, please note that the kbd indicator applet itself does _NOT_ change, ie it says I am using "US" layout even if it's not true! Killing g-s-d seems to fix the problem though ...

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

I'm looking through the code and can't see a possibility of changing the popup group item rapidly, so there's other possibilities as to what is triggering it, I'm repeatedly changing layouts to test it, and it's pretty hard to trigger I need something which is confirmed to reproduce the bug always before i can fix it.

There's one possibility that the configuration is being changed and that's triggering a menu rebuild, which as we've learned in the gnome-power-manager bug can eat memory - but not CPU.

Revision history for this message
divan (ivan-daniluk) wrote :

> But, please note that the kbd indicator applet itself does _NOT_ change, ie it says I am using "US" layout even if it's not true!
Another possibility of this is _very_ fast switching, so you even can't recognize it changes. I saw such high speed switching for flags - it were cycling so rapidly, that "US" flag was visible all the time and only when system load became high, I could notice other layouts flag images appearing.

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

Doesn't it help what I have commented? That even xev outputs a huge amount of flood of "PropertyNotify event, serial 30, synthetic NO, window 0x6000001, atom 0x174 (XKLAVIER_STATE), time 11886812, state PropertyNewValue" lines, even if I don't touch keyboard, mouse or anything.

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

And btw it's very easy to trigger for me, only one keypress of scroll lock (configured to switch between my four kbd layouts) and it begins ...

Revision history for this message
Dmitry Shachnev (mitya57) wrote : Re: [Bug 625793] Re: Keyboard layout automatically changes + 100% CPU usage [updated]

@Carl: I don't see any indicator change, it displays USA when this bug occurs.
@Shadow: It happens after simple boot for me.
//There are many people here who use Chromium browser. Maybe it causes
the problem?)

Revision history for this message
Max Kamashev (max-kamashev) wrote : Re: Keyboard layout automatically changes + 100% CPU usage [updated]

@Dmitry Shachnev
 > //There are many people here who use Chromium browser. Maybe it causes
 > the problem?)

No, I have this problem appears when I use firefox or gwibber. But not every time these issues it appears.

Revision history for this message
Nir0 (nir0pilot) wrote :

after bug appears, press Ctrl+Alt+F1, login, tail -f /var/log/messages and check out if something crazy's going on in there

Revision history for this message
Nir0 (nir0pilot) wrote :

also, i think it's possible to run g-s-d from terminal window, and hit Ctrl+C when bug appears again.... mayb there's a debug flag for g-s-d

Revision history for this message
Sergey Klimov (nbdarvin) wrote :

i use chrome, and i have this bug

Revision history for this message
MaksimKa (netvin) wrote :

I just launched the system, opened Empathy and opened some contact. Tried to change layot about 100 times, no result. Then i've opened chromium and changed layot that's it. Or g-s-d was already blocked ( before i pressed ctrl-shift and after launched chromium) or it is has been blocked after i pressed ctrl-shift in chromium ( it was search text tab of google).
Hope this will help to reproduce the bug.

Revision history for this message
divan (ivan-daniluk) wrote :

New update with video of the bug.
I was running the system with '"Use different layouts for different windows" disabled for a 5 days and everything was fine. So, to reproduce the bug I've enabled this option again and continued my normal work. The bug have appeared in a half of an hour and I captured it on the video with pocket HD camera. The video is 167Megs in size cause it 1280x768x60fps (at this rate it's possible to see the fast layout indicator switching). Uploaded it into the temporary ftp server, so I would appreciate if someone reupload it to the some filesharing service.

Video link: http://skating.com.ua/tmp/bug_625793_10.10.mov
(It's recommended to play it via mplayer with framedrop option turned off = -noframedrop)

At this video we can clearly see:
1) layout indicator fast switching
2) CPU usage of the g-s-d and indicator-application-service processes
3) memory usage of g-s-d at the beginning of the bug (~23M)
4) layout indicator stopped to switch, but layouts still cycling - input characters test
5) clicking on items in the indicator layout menu doesnt change iconapplication-
6) memory usage of g-s-d process at the end (~51.5M)
7) restoring of normal state (layouts do not cycle, indicator as well, input is ok)

Revision history for this message
MaksimKa (netvin) wrote :

also i've started manually g-s-d and each layot changing(or windows changing) it show me this message:

maksim@maksim-desktop:~$ Unable to find a synaptics device.
(gnome-settings-daemon:2057): libappindicator-CRITICAL **: app_indicator_set_label: assertion `IS_APP_INDICATOR (self)' failed

(gnome-settings-daemon:2057): libappindicator-CRITICAL **: app_indicator_set_label: assertion `IS_APP_INDICATOR (self)' failed

And i was unable to reproduce this bug when g-s-d was started from console

Revision history for this message
Alex Popovskiy (alex-popovskiy) wrote :

I've got this bug after alt-tab'ing from Opera to Pidgin's chat window several times, but it never happens if I switch the layout in one particular window (no matter how many times)

Revision history for this message
shoo_ash (ash-mail) wrote :

Here comes another video:
http://www.youtube.com/watch?v=iXzvu5aGWQc&hd=1

Reproduced the bug by minimize-restore and simultaneous shift+alt kb layout switching (changing it quickly many times while restoring gedit window).
The "separate layout for each window" option is on.
Using gxneur with daemon "deactivated" just to show current layout.
Checking the input while on the bug.
Checking the cpu and memory (slowly increading) load of gnome-settings-daemon.
Restoring status quo by killing g-s-d from system monitor and relaunching it (as well as nautilus).

PS:
I also tried to launch g-s-d from console, reproduce the bug and then killall gnome-settings-daemon. It finished up with a whole lot of error lines
(gnome-settings-daemon:23807): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
While it printed this error in terminal I wasn't able to relaunch g-s-d (with ** (gnome-settings-daemon:23871): WARNING **: Failed to acquire org.gnome.SettingsDaemon and ** (gnome-settings-daemon:23871): WARNING **: Could not acquire name) - seems like it was still finishing while gave me back that error copies. When the error-jam terminated I could successfuly relaunch g-s-d.

Revision history for this message
Ристе Ристевски (risteristevski) wrote :

I said earlier that turning the 'Separate layout for each window' option fixes the bug for me, but I wasn't right about that.
I succeeded triggering the bug again with the method described by shoo_ash in comment #114.
With the 'Separate layout for each window' option turned on, the keyboard layout changes more frequently (every time you open a new window) so it's easier to notice the bug with that option turned on.

Revision history for this message
Shadow Panther (panther-ru) wrote :

I just caught bluetooth-icon state on photo (no screenshots with any menu open, sadly).

http://picasaweb.google.com/lh/photo/O85Gu-9vp4wvAWJ7XEfoH77ST6pF7O9bID77bEp3-Dk?feat=directlink
This is actually a power applet with keyboard icon and text. I have wireless trackball and it's battery is getting low.

http://picasaweb.google.com/lh/photo/gaDxkesPMfaDB2rQ6TwLqb7ST6pF7O9bID77bEp3-Dk?feat=directlink
This is a keyboard layout applet with bluetooth icon, next one is the actual bluetooth applet.

description: updated
description: updated
Revision history for this message
Karl Lattimer (karl-qdh) wrote :

I just had the bug appear without actively changing layout, when I changed windows and the layout should have remained the same.

I'm really not sure as to the cause of it, but I'll keep digging...

Revision history for this message
Yura Tolstik (yltsrc) wrote :

I suppose it is classic race condition on layout change
I don't see the code, and I can't help you find place where it happens

Revision history for this message
Dmitry Shachnev (mitya57) wrote : Re: [Bug 625793] Re: Keyboard layout automatically changes + 100% CPU usage [updated]
Download full text (3.8 KiB)

Karl, maybe it's this:
(gnome-settings-daemon:2057):
libappindicator-CRITICAL **: app_indicator_set_label: assertion
`IS_APP_INDICATOR (self)' failed

2010/10/5, Karl Lattimer <email address hidden>:
> I just had the bug appear without actively changing layout, when I
> changed windows and the layout should have remained the same.
>
> I'm really not sure as to the cause of it, but I'll keep digging...
>
> --
> Keyboard layout automatically changes + 100% CPU usage [updated]
> https://bugs.launchpad.net/bugs/625793
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Gnome Settings Daemon: Invalid
> Status in Application Indicators: In Progress
> Status in “gnome-settings-daemon” package in Ubuntu: Confirmed
>
> Bug description:
> == General description ==
>
> On some Ubuntu installs with two or more keyboard layouts (e.g. Russian and
> US English), after some time the keyboard layouts start switching in an
> endless loop and gnome-settings-daemon starts using more and more CPU until
> it reaches 100%.
>
> == Known information ==
>
> 1) Some people here confirm that this happens with non-GTK (Java or Qt)
> windows more often then with native GTK. (probably, might be a coincidence)
> 2) Possible fixes are killing and restarting gnome-settings-daemon or
> disabling the "Separate layout for each window" option in keyboard
> preferences window.
> 3) The second fix, however didn't work for most people, though it might
> really reduce the probability of the bug appearing.
> 4) The bug happens both on upgrade installs and clean installs of Ubuntu,
> confirmed with RC and Alpha 3.
> 5) The bug is specific to Ubuntu, not existing in Arch Linux and
> AgiliaLinux.
> 6) There are users who experience this problem with Russian, Slovakian,
> Macedonian, Hebrew, Georgian layots. Having such a problem in final release
> will make keyboard use very problematic for users from these countries, so
> Ubuntu can lose many users.
> 7) The bug is still not fixed in GNOME 2.32, which again proves that it's an
> Ubuntu-specific issue.
> 8) For some users, the bug disappears after 2 to 15 minutes of use.
> 9) Confirmed for almost any key set for switching layouts (Shift+Alt,
> Shift+Ctrl, CapsLock, Alt, Ctrl)
> 10) Confirmed for both Latin and non-Latin layouts.
> 11) Permanent fix is to disable g-s-d keyboard plugin in gconf, not fully
> confirmed though.
> 12) Confirmed as a g-s-d issue, both with and without indicators.
>
> == Debug ==
>
> APPORT DATA here:
> https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/633167
> and here:
> https://bugs.launchpad.net/ubuntu/+source/indicator-application/+bug/633346
> MORE LOGS:
> https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/636619
> GDB DATA:
> https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/629444
> XSESSIONERRORS:
> https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/630712
> RANDOM LOGS:
> https://bugs.launchpad.net/ubuntu/+source/xkeyboard-config/+bug/64082
>
> XEV OUTPUT: infinite loop of
> PropertyNotify event, serial 30, synthetic NO, window 0x6000001, atom 0x174
> (XKLAVIER_STATE), time 11886812,...

Read more...

Revision history for this message
Ivan Semernik (djdb) wrote : Re: Keyboard layout automatically changes + 100% CPU usage [updated]

I made an strace log from gnome-settings-daemon when the bug appears back (last part of the data inside file). May be this information will be useful for developers.

Revision history for this message
Marat Dyatko (marat-dyatko) wrote :

Switching between last viewed windows helps me to stop blinking.

May be, I'm press Alt+Tab to fast and something going wrong.
But when I'm switch back to the window, some process completes successfully.

Revision history for this message
K900 (k0009000) wrote :

Okay now, we probably know what causes it: switching between windows (maybe with a hotkey?). Hope it helps Karl sort out the bug.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

Yeah as K-9 said I kinda have enough useful info here, the problem is figuring out the trigger state. I have a few ideas as to what's happening and one way that I think might fix it.

Effectively the problem is when the XklState changes in a certain way, the state change causes a couple of annoyances anyway but without listening to the event it's impossible to change when the keyboard signal arrives :/

Revision history for this message
Yura Tolstik (yltsrc) wrote :

Can you listen original g-s-d layout change signal to fix it, couldn't you?

Revision history for this message
Screatch (screatch) wrote :

> Okay now, we probably know what causes it: switching between windows (maybe with a hotkey?). Hope it helps Karl sort out the bug.

I don't use hotkeys to switch through windows, not even alt+tab so no to this from me.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

I've produced a hillbilly patch which isn't ideal but *could* fix this problem, essentially the change prevents a state change signal from being processed twice, and then causing an infinite loop. It does this using a really crack-smoking-flag, which I'm not happy with but might just do the job.

I'll upload a package for testing probably later this evening when I'm happy i haven't caused other problems.

Revision history for this message
divan (ivan-daniluk) wrote :

@Karl, maybe it helps (or, in contrary, confuses more)) - I succeeded to trigger it with 'Separate layout for each window' disabled 3 times - and all 3 times it was a moment of high memory and disk usage(active swapping actually). Three times with same conditions is a reason to think it wasn't an occasion.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@Yura, there are two sources of signals to change layout, from Xklavier - layout changed outside of gsd; and the menu item has been changed. Both of these signals need to change the indicator, either the menu, the label or both.

When the signal arrives from gsd's indicator we need to tell Xklavier the state changed, which then *sometimes* causes an infinite loop which shouldn't happen.

The occurrence of the loop is puzzling to say the least, as I thought one of my updates patched it out, but not so it seems :/

Revision history for this message
Yura Tolstik (yltsrc) wrote :

@Karl, why anyone can reproduce this bug on any other distro with gnome 2.32?

Revision history for this message
K900 (k0009000) wrote :

@Yura confirmed an Ubuntu-specific bug, tested on Arch and Agilia

Revision history for this message
Nick Kondratiev (nickkon) wrote :

I confirm this bug on Ubuntu 10.10 RC.
GNOME 2.32.0
Kernel: 2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010 i686 GNU/Linux

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@Yura because the bug is caused by the application indicators patch

Revision history for this message
Yura Tolstik (yltsrc) wrote :

@Karl, as I understood, you can do this patch more gently to make behavior of the same as in g-s-d

p.s. hope we can test this fix soon and thanks for it :)

Revision history for this message
K900 (k0009000) wrote :

@Yura not more gently, but it needs bugfixes. For all of you who are ready to sacrifice the keyboard indicator, rebuilding g-s-d from VANILLA (NOT UBUNTU) source fixes the bug.

Revision history for this message
shoo_ash (ash-mail) wrote :

@K-9 If u r ready to sacrifice the kb indicator, there is no need to rebuild from src. You can disable it from gconf-editor, it will bring you peaceful life without this bug.

Revision history for this message
Rich Wales (richw) wrote :

I, for one, am *not* willing to sacrifice the keyboard layout indicator. If a user is using multiple layouts, the indicator is essential, and removing it is (IMO) a significant regression from Lucid (where the layout indicator worked just fine).

So, then, is this a bug in gnome-settings-daemon? Or in indicator-applet? Or some combination of the two? And what additional debugging information would help at this point to isolate the problem and allow it to be solved?

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@Rich, please don't angrily comment without reading the previous comments.

I am *presently* working on fixing this bug, and think my present patch works or at least has been for a while. I have *ALL* the debugging information that I need, which if you read the previous comments you'd see there's extensive information that has been added.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@everyone: Sorry for the lateness of the patch upload, had a little trouble with my laptop/wifi but the patch has been uploaded to my PPA and will be building shortly.

my ppa address is ppa:karl-qdh/ppa

It *seems* to work well, in that I haven't seen the bug reappear since I started testing the patch. Please let me know if you can still trigger it to happen.

Revision history for this message
Dmitry Shachnev (mitya57) wrote : Re: [Bug 625793] Re: Keyboard layout automatically changes + 100% CPU usage [updated]

Seems to be working well!
(Update) It's always in main repository, so there's no need to add a ppa to
upgrade.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Oh, that 2.32.0-0ubuntu2 is another version with the same number.
Karl, maybe you rise the version to 2.32.0-0ubuntu3~ppa so that users will
be able to upgrade via apt?

For users - you can use these files anyway:
https://launchpad.net/~karl-qdh/+archive/ppa/+files/gnome-settings-daemon_2.32.0-0ubuntu2_i386.deb
https://launchpad.net/~karl-qdh/+archive/ppa/+files/gnome-settings-daemon_2.32.0-0ubuntu2_amd64.deb

Revision history for this message
lega (lega911) wrote : Re: Keyboard layout automatically changes + 100% CPU usage [updated]

I have the same problem, work is not possible.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@Dmitry, The update is *NOT* in the main repositiory, it is ONLY in my PPA right now, I want this tested before I ask it to be sponsored and released.

@Everyone who feels the need to comment *me too*, instead of filling up the comments with fairly useless text and making my life a little more difficult, could you instead click the "this bug affects me" at the very top of the page.

Revision history for this message
Ivan Semernik (djdb) wrote :

i've recently updated my g-s-d from Karl's ppa but the bug still exist.

Revision history for this message
Ilja Sekler (ilja-sekler-) wrote :

The package <https://launchpad.net/~karl-qdh/+archive/ppa/+files/gnome-settings-daemon_2.32.0-0ubuntu2_i386.deb> makes changing the keyboard layout from menu inoperable. Shortcut works (I've set it to Alt+Shift).

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@Ilja, that's really interesting, and somewhat puzzling :/ I'll continue to have a punt at this one until I've got something more solid.

@Ivan, have you restarted your gnome session and/or computer?

Gnome settings daemon *MUST* be restarted in order for the package to become active.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@Ilja, I identified why it's not changing from the menu, thanks for reporting that, it's a very minor missing line; st->group = group_number; in just the right spot :)

New package is being uploaded ASAP

Revision history for this message
divan (ivan-daniluk) wrote :

I second that - the bug still exist (but I got it once, under heavy swapping and memory usage) and switching layout from menu doesn't work(even more, the icon image doesn't correspond the selected item in dropdown menu).
I've installed patched g-s-d from the link above and restarted g-s-d.

Revision history for this message
Ivan Semernik (djdb) wrote :

@Karl Lattimer, yes, firstly i killed g-s-d by hands (cause it highly loads my PC) and then restarted gnome session
also i confirm that after update changing the keyboard layout from applet's menu doesn't work

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

Ok, menu changing is fixed, maybe the high CPU usage only appears under heavy load in some kind of weird race condition.

Revision history for this message
Ilja Sekler (ilja-sekler-) wrote :

> Ok, menu changing is fixed

Confirmed for gnome-settings-daemon 2.32.0-0ubuntu3.

Unfortunately, this didn't fix 'en passant' the menu getting out of sync with the label after unsing a shortcut to switch layout <https://bugs.launchpad.net/ubuntu/+source/indicator-application/+bug/637360>. This might be a totally unrelated issue though.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

The out of sync problem with the radio buttons is in dbusmenu AFAIK, a simple off by one error unfixable in gsd, believe me, I tried, I spent a few days trying to find this off by one... tedg has the bug for that now.

Thanks for testing, what I really need to know is how often the 100% cpu usage bug appears. I haven't seen it since the change to the patch and am testing it in various ways.

Revision history for this message
Ivan Semernik (djdb) wrote :

top - 17:09:04 up 1 day, 7:10, 2 users, load average: 2.56, 0.96, 0.46
Tasks: 173 total, 2 running, 171 sleeping, 0 stopped, 0 zombie
Cpu(s): 47.4%us, 12.9%sy, 0.0%ni, 38.0%id, 1.6%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1017276k total, 997928k used, 19348k free, 28648k buffers
Swap: 1999868k total, 23780k used, 1976088k free, 532404k cached

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
28765 digitalb 20 0 198m 69m 9.8m R 81 7.0 1:52.47 gnome-settings-
28628 root 20 0 63744 15m 8500 S 15 1.5 2:45.17 Xorg
31125 digitalb 20 0 93288 13m 10m S 3 1.4 0:03.69 gnome-terminal
28864 digitalb 20 0 78836 14m 10m S 2 1.4 0:12.28 wnck-applet
28954 digitalb 20 0 75092 12m 9812 S 2 1.3 0:05.03 notify-osd
30192 digitalb 20 0 326m 58m 28m S 2 5.8 2:06.66 chromium-browse
30721 digitalb 20 0 151m 32m 22m S 2 3.3 1:23.56 chromium-browse
28780 digitalb 20 0 60036 25m 9540 S 2 2.5 0:38.32 compiz
28964 digitalb 20 0 96292 28m 14m S 2 2.9 0:20.47 xchat
28781 digitalb 20 0 123m 19m 15m S 1 2.0 0:03.13 nautilus
28867 digitalb 20 0 30644 10m 8264 S 1 1.0 0:04.80 gtk-window-deco
28938 digitalb 20 0 270m 50m 25m S 1 5.1 0:56.28 empathy
28713 digitalb 20 0 37776 7492 6080 S 1 0.7 0:00.94 gnome-session
28779 digitalb 20 0 40796 9744 7820 S 1 1.0 0:00.65 evolution-alarm
28865 digitalb 20 0 76808 11m 8616 S 1 1.1 0:00.80 trashapplet
28936 digitalb 20 0 20956 6928 5564 S 1 0.7 0:00.56 gdu-notificatio

Revision history for this message
Yura Tolstik (yltsrc) wrote :

I can't use gnome-terminal hotkeys(in particular Ctrl+Shift+C and Ctrl+Shift+V) after update, I hope it isn't caused by g-s-d update

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@Yura, I've had the same problem for about two weeks so it's unrelated... If you find out what causes it please let me know... what with my broken touchpad and broken copy/paste it's making developing particularly difficult.

Revision history for this message
divan (ivan-daniluk) wrote :

> I can't use gnome-terminal hotkeys(in particular Ctrl+Shift+C and Ctrl+Shift+V) after update,
Do not confirm. Still work for me with gnome-settings-daemon 2.32.0-0ubuntu3
Menu layout switching works(but still issues with menu labels sync).

Will wait a couple of hours for the bug.

As a quick resume on confitions (at least, on my experience):
For the unpatched version, bug triggers on:
1) Occasionally - when 'Different layouts for different windows' option is enabled.
2) Under heavy system load(swapping, etc) - no matter, enabled or disabled the 'Different layouts..' option.

And for the patched version (2.32.0-ubuntu2, at least):
1) Only under heavy load (with option 'Different layouts..' enabled in my single case).

So, I'm pretty sure that occasional switching is gone away, but will test it more.

Revision history for this message
Ilja Sekler (ilja-sekler-) wrote :

> I can't use gnome-terminal hotkeys(in particular
> Ctrl+Shift+C and Ctrl+Shift+V) after update

WFM

@Karl:

> The out of sync problem with the radio buttons is in dbusmenu AFAIK,
> a simple off by one error unfixable in gsd [...] tedg has the bug for that now.

Thanks for pointing to the appropriate place, I'll keep on searching for the right bug in <https://bugs.launchpad.net/~ted>, though it seems to be not just an off-by-one as the menu randomly skips 3 consecutive layout switches.

> what I really need to know is how often the 100% cpu usage bug appears.
> I haven't seen it since the change to the patch and am testing it in various ways.

Frankly, I never saw this bug with the official g-s-d, got it only once with the previous g-s-d version from the ppa and couldn't reproduce it later.

A lot of random g-s-d crashes with "Gdk-CRITICAL **: IA__gdk_cairo_create: assertion `GDK_IS_DRAWABLE (drawable)' failed" as last words when showing the active layout from the menu are probably unrelated.

Revision history for this message
divan (ivan-daniluk) wrote :

I've got this bug again, with gnome-settings-daemon 2.32.0-0ubuntu3. Everything the same as with unpatched version, occasionally caught, 50-80% CPU usage, increasing memory usage, fast layouts switching.
I attached to g-s-d process by gdb, but cannot find what info to look without knowing g-s-d structure. When I pause the process, switching stops and resumes when I continue g-s-d process, so it just an confirmation that this is the bug of g-s-d.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@Ilja, the bug isn't just off by one, it's off by -1 so it's actually going backwards as you cycle forwards :/

This bug was introduced by me *for shame* during the Maverick cycle while adding indicator support to the keyboard layout. :/ So should have been visible in any ubuntu maverick releases for about 4 weeks.

The other stuff is unrelated.

Revision history for this message
shoo_ash (ash-mail) wrote :

I can confirm the patched version has the same reproducible bug with the same error message: (gnome-settings-daemon:5952): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
(yes, I did restart the g-s-d)

Revision history for this message
shoo_ash (ash-mail) wrote :

sorry, forgot to mention I used gnome-settings-daemon 2.32.0-0ubuntu3

Revision history for this message
Yura Tolstik (yltsrc) wrote :

I can confirm, that bug still reproduced in g-s-d_2.32.0-0ubuntu3.
Maybe you can enable trace and post new bug in apport for killing g-s-d by hands?

Revision history for this message
shoo_ash (ash-mail) wrote :
Revision history for this message
Dmitry Shachnev (mitya57) wrote : Re: [Bug 625793] Re: Keyboard layout automatically changes + 100% CPU usage [updated]

This bug is about 2.32.0-0ubuntu2 (unpatched version), so I mark it as
duplicate. AFAIK apport can't report bugs about non-genuine-ubuntu
packages.

Revision history for this message
hassan eldhrawyy (k7rata121-hotmail) wrote : Re: Keyboard layout automatically changes + 100% CPU usage [updated]

affects me too
layout (ar,usa)
key alt+shift , lt ctrl+ lt shift

people you must hurry we dont want el final release until all bugs are fixed :(:(

Revision history for this message
Marat Dyatko (marat-dyatko) wrote :

Guys, I have often freezing of Alt or Tab buttons in various apps.
For example, in the Firefox focus starts running on all elements (links, inputs) on a page.
And I need to repeat pressing of the button to stop it.

Maybe problem with my keyboard or *problem in xkb layer*?

Revision history for this message
Marat Dyatko (marat-dyatko) wrote :
Revision history for this message
Andrey Voronov (voronov84) wrote :

I rebuild g-s-d from source, without app indicator patch, bug dissapeared

Revision history for this message
Marat Dyatko (marat-dyatko) wrote :
Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

@Marat Dyatko: Hmmm, well I am not an expert about Xorg and kbd handling etc, but this was my first guess when I met this bug, since as I've commented according to output of command "xev" I got non-stopping output of key events even if I don't touch the kbd/mouse or anything (during the bug I mean). I had the idea that the problem that kbd layer (whatever it is, or how it should be called) reports I am pressing scroll-lock (the layout changer key for me), so does the system switches it for me then. The problem that I don't press the scoll-lock for real (only once) just it is "stucked" for some reason. If my guess is true, then bugs like this with other keys (even shift, and not related the layouts as all!) is about the "key stucking" problem, and not depend strictly on the layout problem. So is it possible that we try to find the solution of the bug behind the layout changes etc, when the real problem is a more general one about the kbd handling in some way?

Btw, as I've commented, xev reports endless messages during the triggered bug like:

PropertyNotify event, serial 30, synthetic NO, window 0x6000001, atom 0x174 (XKLAVIER_STATE), time 11886812, state PropertyNewValue

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@LGB, this is exactly the state change i've tried to suppress, I can't identify an appropriate trigger case though.

@Shoo_ash, that looks like ubuntuone causing it?! is that *this* bug?

Revision history for this message
divan (ivan-daniluk) wrote :

Little update - If I kill g-s-d while bug appears and quickly start it again, the layout switching still continue. If I wait some time(~20 secs) before starting g-s-d again - the switching gone away. (using g-s-d 2.32.0-0ubuntu3 now)

And, I agree with some of the previous posters - that's the *stopper* bug for everyone who use more than one layout.

Revision history for this message
Al Zhukov (wordtinker) wrote :

@Karl, I don't have ubuntuone installed, but I have this bug.

Sometimes I can stop layout switching by closing all or some program windows. Forcing Skype to notification area and closing all his messaging windows often helps, closing Chrome completely might help too. I can't see the consistent behavior of the bug, but I usually have 2-3 Skype messaging windows open, pidgin, chrome stable with 5-6 tabs and one of text editors open and I do a lot of switching, I have 3 layouts installed.

Revision history for this message
Dmitry Shachnev (mitya57) wrote : Re: [Bug 625793] Re: Keyboard layout automatically changes + 100% CPU usage [updated]

I still can't reproduce it with gsd 2.32.0-0ubuntu3. Karl, maybe you
push this version to main repository?

Revision history for this message
Novid (novid) wrote : Re: Keyboard layout automatically changes + 100% CPU usage [updated]

there is similar bug for Persian people .... https://bugs.launchpad.net/ubuntu/+bug/656988

can you fix this problem for the final release ?

Revision history for this message
Mahdi Fattahi (mfat) wrote :

Same problem here. Ubuntu 10.10 RC. I have USA and Persian keyboard layouts. I filed a bug here https://bugs.launchpad.net/ubuntu/+bug/656988 because I was not sure it's a duplicate of this bug. My friends using Arch and Gentoo are also reporting similar problems, so the problem might not be distro-specific. Some people told me this bug has been fixed in Xorg 1.9.2.
Anyway this is a very annoying bug which could prevent many users from using ubuntu 10.10 at all.

Revision history for this message
Mahdi Fattahi (mfat) wrote :

I think low-priority state for this bug is not correct. This is a critical bug. Many users cannot type in their native language.

Revision history for this message
Dmitry Shachnev (mitya57) wrote : Re: [Bug 625793] Re: Keyboard layout automatically changes + 100% CPU usage [updated]

I've searched Arch bugtracker and have found nothing like this. Can
you give a link please?
@Navid and others
Don't write unnecessary comments. Update now from ppa:karl-qdh/ppa,
click "This bug affects me" and wait.
@Karl Is it possible to make the patched version be in main *today*?

Revision history for this message
Dimitrios Ntoulas (ntoulasd) wrote : Re: Keyboard layout automatically changes + 100% CPU usage [updated]

Extremely weird bug. Its changes keyboard layouts all the time !
Ubuntu 10.10 RC
2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010 i686 GNU/Linux

Revision history for this message
Mahdi Fattahi (mfat) wrote :
Revision history for this message
Mahdi Fattahi (mfat) wrote :

Who's supposed to change the priority of this bug? Ubuntu is going to be released in 24 hours and it has such a bug that renders the system completely unusable. Is this low-priority?

Revision history for this message
Simos Xenitellis  (simosx) wrote :

@Mehdi Fattahi: The archlinux bug that you are referring to has to do with a different bug that is specific to the Iranian layout,
https://bugs.freedesktop.org/show_bug.cgi?id=30548
This bug was fixed in xkeyboard-config on 1st Oct 2010 (8 days ago) with
http://cgit.freedesktop.org/xkeyboard-config/commit/?id=e5c77e30a9457a301e0a3857db450310584dae1a
You need to make sure that the fix goes into Ubuntu 10.10. You should open a new bug report for this for 'xkeyboard-config'.

Revision history for this message
Mahdi Fattahi (mfat) wrote :

@Simos To be honest I'm not 100% sure the two bugs are the same. Let's forget about arch to avoid confusion. This bug does exist in ubuntu. Thanks for your kind help. I'll compare the files to see if the fix went into ubuntu and post the result here.

Revision history for this message
Screatch (screatch) wrote :

Seriously, it's 10th october here for me and the the bug is still not fixed and has a low priority. Ubutu risks to lose quite a huge audience.

Revision history for this message
Al Zhukov (wordtinker) wrote :

@Dmitry
@Karl
I've been working with gsd upgraded to 2.32.0-0ubuntu3 from Karl's repo for almost 24 hours. I've got no layout switching.

Revision history for this message
divan (ivan-daniluk) wrote :

@Al Zhukov, I use g-s-d 2.32.0-0ubuntu3 version from Karl's PPA as well and I still have this bug with "Different Layouts for different windows" enabled. But the frequency of bug is much lower - now I see it once per day (actually I catched it 3 times after g-s-d ubuntu3 version installed). I restarted the system, and restarted g-s-d, so I don't think it's my mistake.
Need more confirmations, but for me patched g-s-d doesn't solve the problem unfortunately.

Revision history for this message
Dmitry Shachnev (mitya57) wrote : Re: [Bug 625793] Re: Keyboard layout automatically changes + 100% CPU usage [updated]

@divan Since Ubuntu is released, we can upload -ubuntu3 package to
maverick-proposed so that other people could test it.

Paul Sladen (sladen)
Changed in ubuntu-release-notes:
status: New → Confirmed
Changed in gnome-settings-daemon (Ubuntu):
importance: Low → Critical
milestone: none → maverick-updates
Paul Sladen (sladen)
summary: - Keyboard layout automatically changes + 100% CPU usage [updated]
+ Regression: Multiple Keyboard Layouts unusable: continuiously changes
+ layout + 100% CPU usage [updated]
summary: - Regression: Multiple Keyboard Layouts unusable: continuiously changes
+ Regression: Multiple Keyboard Layouts unusable: continuously changes
layout + 100% CPU usage [updated]
Changed in ubuntu-release-notes:
status: Confirmed → Won't Fix
Changed in gnome-settings-daemon (Ubuntu Maverick):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Urgh, I just managed to trigger this by changing window focus quickly a few times.

Will investigate this later on when I've got some free time

Changed in gnome-settings-daemon (Ubuntu Maverick):
assignee: Canonical Desktop Team (canonical-desktop-team) → Chris Coulson (chrisccoulson)
status: Confirmed → Triaged
Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@Chris, I've been working on this bug and it's got me confused as hell, would be good to have a second set of eyes on it.

Basically, the state_changed signal from Xklavier is problematic as far as I can see.

Revision history for this message
Antono Vasiljev (antono) wrote :

I got strace of g-s-d when this bug happened

Changed in gnome-settings-daemon (Ubuntu Maverick):
status: Triaged → Confirmed
Revision history for this message
yurik81 (yurik81) wrote :

Same there. What could it be?

Revision history for this message
Sardorbek Pulatov (prockrammer) wrote :

Please fix the bug quicker.

Changed in gnome-settings-daemon (Ubuntu Maverick):
status: Confirmed → Triaged
Revision history for this message
Soroosh Radpoor (ssh-rdp) wrote :

I was trying to take a look at the code. There is a one big 5.1mb patch on patches.ubuntu.com against gnome-settings-daemon. Wasn't this place supposed be where upstream can look at ubuntu patches and cherry pick?

Revision history for this message
Soroosh Radpoor (ssh-rdp) wrote :

There is a feature in feature in g-s-d which remembers the keyboard layout for each application. If you switch the active window it will restore the last active layout. It does so by comparing the current active keyboard and the stored keyboard for that window. If they are different it *starts* to change the keyboard. If the user change the keyboard layout while g-s-t hasn't finished changing it will get confused.
I think it's only triggered now because it takes longer to send updates to Application indicator and there is a more chance that user can do something in between.

Revision history for this message
yurik81 (yurik81) wrote :

Temporal workaround: uncheck "Separate layout to each window" in Keyboard Preferences.

Revision history for this message
Al Zhukov (wordtinker) wrote :

@Soroosh Radpoor

It makes sense. I've just got the bug by trying to rapidly change the layout in google searchbox. I've closed the browser and normal behavior recovered.

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

@yurik81: I always had that option unchecked. I've never used my system with that option. Still I have got the bug! So it's not even a workaround for me, since I have the bug with that option unchecked you mentioned ...

Revision history for this message
Anton Gladky (gladky-anton) wrote :

I can also confirm, that unchecking the option "Separate layout to each window" does not solve the problem for me.

Evgeniy (godlike-devil)
Changed in gnome-settings-daemon (Ubuntu Maverick):
status: Triaged → Confirmed
Revision history for this message
Mahdi Fattahi (mfat) wrote :

I unchecked "Separate layout to each window" and it didn't solve the problem.

Revision history for this message
Mahdi Fattahi (mfat) wrote :

I wonder if compiling the unpatched version of g-s-d my work. Will that break compatibility with ubuntu indicators and notifications?

Revision history for this message
Mahdi Fattahi (mfat) wrote :

I wonder if compiling the unpatched version of g-s-d may work. Will that break compatibility with ubuntu indicators and notifications?

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

I've just uploaded a change suggested to me over irc from ssh_rpc1 (not sure who that is, but thanks!). The change is very simply to remove the get_state which should stop the infinite loop. This *should* fix the problem. I still have trouble reproducing this bug reliably so please test test test!

This has been uploaded to my PPA and should be building/releasing soon-ish.

ppa:karl-qdh/ppa

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Will people stop changing the status of this bug

Changed in gnome-settings-daemon (Ubuntu Maverick):
status: Confirmed → Triaged
Revision history for this message
Ilja Sekler (ilja-sekler-) wrote :

@Karl:

Sorry for such a question, but is there a public bzr branch to monitor the actual state of your work on g-s-d before it lands in the ppa and gets in reach of 'apt-get source'? This is sort of irritating on launchpad in general that patches are mentioned but not automatically attached to a bug.

Revision history for this message
Ilja Sekler (ilja-sekler-) wrote :

I've built g-s-d 2.32.0-0ubuntu4 locally, installed the .deb and it has an unpleasant habit not to react to the keyboard shortcut for switching layouts during the first ~5 seconds+ of a gnome session even after clicking on the desktop or opening a menu (which was necessary before). Later, when opening a new window, the first attempt to switch kbd layout with a shortcut always fails, subsequent ones work.

Revision history for this message
Eugene Korbut (vlmonk) wrote :

@Klar

I've tested your version of g-s-d (2.32.0-0ubuntu3) for 2 hours. Still working without bug.

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@Ilja, the patch is a distro patch in the debian/patches folder of the package, so working on a bzr branch isn't really required. I know it could be irritating but as soon as I've done a test build, install and restart of gsd I then build the source and upload it. So there's really no delay that you'd notice.

The points you note about changing the layout is either because the system is under load or some other transient error as the code to actually react to the keyboard shortcut hasn't been changed at all.

@Eugene, thanks for testing, please keep testing, if this fixes it today then I'll push to get it out the door.

Revision history for this message
Dimm Stankov (dmytric) wrote :

I've installed 10.10 yesterday. Today it was working without any bugs for about 6 hours, but after the dinner, i've returned to my computer and was very upset when I saw that layout is spontaneously switching. The upper panel of the laptop was very hot.
And I could not restore the session, as the flashing layout did not let me enter the password of my account.

Revision history for this message
Anton Gladky (gladky-anton) wrote :

I have also started to test Karl's patch. Righ now it is ok. We will see, the bug appears or not.

Revision history for this message
Ilja Sekler (ilja-sekler-) wrote :

@Karl:

> The points you note about changing the layout is either because
> the system is under load or some other transient error as the code
> to actually react to the keyboard shortcut hasn't been changed at all.

I'm not quite sure about the first seconds after the start of a gnome session, but the issue with the first attempt to switch layout in a new window failing is not transient and not related to system load. The workaround is to Alt+Tab to another window and back. This problem didn't exist with g-s-d 2.32.0-0ubuntu3.

Revision history for this message
Andrey Voronov (voronov84) wrote :

g-s-d 2.32.0-0ubuntu4 from Karl ppa, bug still here, work only if rebuild package without app indicator patch

Revision history for this message
Ilja Sekler (ilja-sekler-) wrote :

> This problem didn't exist with g-s-d 2.32.0-0ubuntu3.

Please disregard this statement. I was plain wrong. The issue with the first attempt to switch the keyboard layout in a new window ineffective is reproducible in 2.32.0-0ubuntu3 and in 2.32.0-0ubuntu2 as well. I'll file a new bug if this wasn't reported yet.

Revision history for this message
Yura Tolstik (yltsrc) wrote :

@Karl, please explain us what we should do to grab strace(or something else what helps you) when this bug will appear again

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@Yura, what would be useful is a backtrace from gdb

So when the bug is happening;

gdb attach pid_of_gsd

> stop
> bt

You'll need gsd and libgnomekbd and libxklavier debug packages installed so the symbols end up being useful.

Revision history for this message
Ilja Sekler (ilja-sekler-) wrote :

> The issue with the first attempt to switch the keyboard layout in a new
> window ineffective is reproducible in 2.32.0-0ubuntu3 and in
> 2.32.0-0ubuntu2 as well. I'll file a new bug if this wasn't reported yet.

Filed <https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/658338>.

Revision history for this message
Eugene Korbut (vlmonk) wrote :

@Klar bug still here, with 2.32.0-0ubuntu3
I updated to 2.32.0-0ubuntu4 and installed libgnomekbd and libxklavier debug packages, so next time I'll post gdb backtrace.

Revision history for this message
Soroosh Radpoor (ssh-rdp) wrote :

As a workaround I use caps-lock to change groups. Somehow I never had a problem unless I change it during a window switch. And I have 3 different keyboard layouts. I have been using it for a week now.

@karl
Sorry, I tested the patch that I told you and it didn't work. I should I have told you this too. My only finding is that if you comment return from state_callback before call to popup_menu_set_group this bug won't happen.

Revision history for this message
shoo_ash (ash-mail) wrote :

2.32.0-0ubuntu4 - still able to reproduce the bug after session restart

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Ok, I've tested a fix for this now which seems to work

Changed in gnome-settings-daemon (Ubuntu Maverick):
status: Triaged → In Progress
Revision history for this message
Watcharapol Tadtiang (aborigines) wrote :

@Klar , very very thank you to patch it , i get this long time (maverick alpha3)
2.32.0-0ubuntu4 it's work,

Revision history for this message
Anton Gladky (gladky-anton) wrote :

I am using this patch almost 8 hours, did not meet the problem again. Thanks!

Revision history for this message
Mahdi Fattahi (mfat) wrote :

@Chris from where can I get your patch? Is it available from this PPA: ppa:karl-qdh/ppa?

Revision history for this message
Mahdi Fattahi (mfat) wrote :

Oops! i already have 2.32.0-0ubuntu4 and I still experience the bug! The only way I could write this comment is by issuing killall gnome-settings-daemon! When I run gnome-settings-daemon the bug appears immediately!

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Ok, fix pushed to bzr now.

I can't upload this though so I'll have to find somebody to sponsor it in the morning

Revision history for this message
Dmitry Shachnev (mitya57) wrote : Re: [Bug 625793] Re: Regression: Multiple Keyboard Layouts unusable: continuously changes layout + 100% CPU usage [updated]

No errors for me with -ubuntu4 as well as with -ubuntu3.

Revision history for this message
geek (igor-boulliev) wrote :

gnome-settings-daemon 2.32.0-0ubuntu4 - bug still exists

Revision history for this message
Platon Pukhlechev (ifalkorr-deactivatedaccount) wrote :

gnome-settings-daemon 2.32.0-0ubuntu4 - bug still exists

Revision history for this message
shoo_ash (ash-mail) wrote :

@Chris Coulson
So is this another patch?
Is it available for testing, any .deb?

Revision history for this message
alexander seroshtan (alexseroshtan-deactivatedaccount) wrote :

Most often arises when minimizing Skype

Revision history for this message
Yura Tolstik (yltsrc) wrote :

I confirm, that bug still in 0ubuntu4 and attach gdb trace, hope it will help you

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Ok, I *can* upload this, so I've just uploaded it to maverick-proposed.

The version is 2.32.0-0ubuntu3, so people running the version from Karl's PPA will need to downgrade first

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

Great, thanks Chris. This bug was proving illusive to me.

Revision history for this message
waster (waster2007) wrote :

Had this bug too. Is this reproducible on the system without Compiz enabled?

Revision history for this message
MaksimKa (netvin) wrote :

I don't see this update. How much time should pass after you upload it? (Maverick-proposed enabled, and i tried local update server and global update server)

Revision history for this message
Alexey Ivanov (alexey-ivanov) wrote :

@Karl Lattimer

Hello Karl, I'm using your repository, you delete gsd from it, what does this mean?

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted gnome-settings-daemon into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in gnome-settings-daemon (Ubuntu):
milestone: maverick-updates → natty-alpha-1
Changed in gnome-settings-daemon (Ubuntu Maverick):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
MaksimKa (netvin) wrote :

Thanks Chris, right now i've download the fixed GSD. Will test tomorrow and will update the ticket

Revision history for this message
Vladimir Yakovlev (nagos) wrote :

Package from maverick-proposed fixed problem, thank you!

Changed in gnome-settings-daemon (Ubuntu Maverick):
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

@Andrey Voronov @shoo_ash @geek @Skai Falkorr @Mehdi Fattahi
You all say that you still experience this with 2.32.0-0ubuntu4.
Can you please try it with proposed package? You can get it by running:
sudo apt-get update && sudo apt-get install gnome-settings-daemon/maverick-proposed
Please write if it still exists. Don't forget to restart your session first.

Revision history for this message
shoo_ash (ash-mail) wrote :

This time I was unable to reproduce the bug =)
I will see if it suddenly reappears, but I believe it won't.
Thanks!

Revision history for this message
Vladimir Yakovlev (nagos) wrote :

@Dmitry Shachnev i was able reproduce bug in 2.32.0-0ubuntu4 (and ubuntu3 , ubuntu2 from Chris Coulson).
gnome-settings-daemon_2.32.0-0ubuntu3 from maverick-proposed work fine, no bug.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Andrey Voronov (voronov84) wrote :

gnome-settings-daemon_2.32.0-0ubuntu3 from maverick-proposed work fine, no bug, for six hours =)

Revision history for this message
discont (discont) wrote :

Just updated from lutsid. Bug is missing. Thank you for fixing.

In general, it is a strange situation, which has received less attention than it should.

Revision history for this message
discont (discont) wrote :

Lucid of course

Revision history for this message
pfgx (pfgx) wrote :

Reproduce bug BEFORE update:
- install gxneur
- set key for change (rotate) layout, i.e. "k"
- press "k" and hold, then release
That always get a bug in my Maverick.
AFTER update no bug, thanks.

Revision history for this message
Mahdi Fattahi (mfat) wrote :

‌Bug still here after enabling proposed repo and running sudo apt-get install gnome-settings-daemon/maverick-proposed (2.32.0-0ubuntu3).

Revision history for this message
Simos Xenitellis  (simosx) wrote :

@Mehdi: You need to either logout and re-login, or just restart your computer. In this way, the updated gnome-settings-daemon will be used.

Can you confirm whether you still get the regression, even after you re-login (or restart)?

Revision history for this message
Mahdi Fattahi (mfat) wrote : Re: [Bug 625793] Re: Regression: Multiple Keyboard Layouts unusable: continuously changes layout + 100% CPU usage [updated]

I rebooted the system and I have been working for 30 minutes now without any
bug. But I still need more time to confirm the bug is completely gone. In
some cases it appeared after 3 or 4 hours of use.

On Wed, Oct 13, 2010 at 11:58 PM, Simos Xenitellis <
<email address hidden>> wrote:

> @Mehdi: You need to either logout and re-login, or just restart your
> computer. In this way, the updated gnome-settings-daemon will be used.
>
> Can you confirm whether you still get the regression, even after you re-
> login (or restart)?
>
> --
> Regression: Multiple Keyboard Layouts unusable: continuously changes layout
> + 100% CPU usage [updated]
> https://bugs.launchpad.net/bugs/625793
> You received this bug notification because you are a direct subscriber
> of a duplicate bug (656988).
>

Revision history for this message
geek (igor-boulliev) wrote :

@Dmitry Shachnev

bug is not reproduced

(gnome-settings-daemon 2.32.0-0ubuntu3 from maverick-proposed)

Revision history for this message
Kai (ilya.skorik) wrote :

Bug still here.

g-s-d 2.32.0-0ubuntu4 from karl repo

Revision history for this message
Anton Gladky (gladky-anton) wrote :

I do not see this bug any more after maverick-proposed.

But I noticed the next: after reloading the system, indicator shows the layout "USA", but really it is german layout. I need to switch the layout several time to get it USA again. Not sure, it is related to this bug.

Thanks

Revision history for this message
Karl Lattimer (karl-qdh) wrote :

@Kai, you need to remove my repository and run with maverick proposed

@Anton, can you experiment and find more detail here, I think it's not cycling through them correctly.

Revision history for this message
MaksimKa (netvin) wrote :

@Anton, Same here it often happens when screen is locked. I see layot is USA and tape my pass, but it says wrong password. Then i should change layot again until i see USA. After this i can login.

Revision history for this message
Anton Gladky (gladky-anton) wrote :

I have a German system, but default language is USA. When the system is loaded, indicator shows right layout - USA, but it is not really USA, it is DE. I think it is possible to reproduce the bug using another languages as well: RU + USA or others.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Ok. So the package from maverick-proposed works fine for all.
I change status in AppIndicator to invalid because it doesn't need fix.

Changed in indicator-application:
status: In Progress → Invalid
Revision history for this message
Said Babayev (phoenix49) wrote :

@MaksimKa
I didn't install this patch, waiting for update repo, but regarding "Same
here it often happens when screen is locked" it happens for me too (I didn't
apply this patch), so I think it is not related with bugfix. P.S. I avoid
this bug by turning off "Separate layout for each window"

Almas (almasd)
Changed in gnome-settings-daemon (Ubuntu Maverick):
status: Fix Committed → Fix Released
Changed in gnome-settings-daemon (Ubuntu Maverick):
status: Fix Released → Fix Committed
rlomkkko (rlomko)
Changed in gnome-settings-daemon (Ubuntu Maverick):
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
Bobba Fett (bobba-fett)
Changed in gnome-settings-daemon (Ubuntu Maverick):
status: Fix Committed → Fix Released
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

This package is still in maverick-proposed now.
https://edge.launchpad.net/ubuntu/maverick/+source/gnome-settings-daemon

Changed in gnome-settings-daemon (Ubuntu Maverick):
status: Fix Released → Fix Committed
Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

Release of the fix will be tomorrow?

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

This bug was fixed in the package gnome-settings-daemon - 2.32.0-0ubuntu3

---------------
gnome-settings-daemon (2.32.0-0ubuntu3) maverick-proposed; urgency=low

  * Fix LP: #625793 - Multiple Keyboard Layouts unusable: continuously
    changes layout + 100% CPU usage. Don't call xkl_engine_lock_group in
    response to XKB events, as XkbLockGroup generates another event
    - update debian/patches/06_use_application_indicator.patch
  * Fix LP: #658777 - In popup_menu_set_group() - after adding new entries to
    the hash table, don't free the keys else we end up with a hash table full
    of keys pointing to invalid memory. Instead, create the hash table with
    g_hash_table_new_full, and have the keys freed when the hash table is
    destroyed
    - update debian/patches/06_use_application_indicator.patch
 -- Chris Coulson <email address hidden> Tue, 12 Oct 2010 11:03:40 +0100

Changed in gnome-settings-daemon (Ubuntu Maverick):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Copied to natty.

Changed in gnome-settings-daemon (Ubuntu):
status: Triaged → Fix Released
Changed in gnome-settings-daemon (Ubuntu):
assignee: Chris Coulson (chrisccoulson) → braulioareis (braulioareis)
Changed in gnome-settings-daemon (Ubuntu Maverick):
assignee: Chris Coulson (chrisccoulson) → braulioareis (braulioareis)
Changed in baltix:
status: New → Opinion
Changed in indicator-application:
assignee: Karl Lattimer (karl-qdh) → braulioareis (braulioareis)
status: Invalid → Fix Released
C de-Avillez (hggdh2)
Changed in baltix:
status: Opinion → New
Changed in gnome-settings-daemon (Ubuntu Maverick):
assignee: braulioareis (braulioareis) → nobody
Changed in gnome-settings-daemon (Ubuntu):
assignee: braulioareis (braulioareis) → nobody
Paul Sladen (sladen)
Changed in indicator-application:
assignee: braulioareis (braulioareis) → Karl Lattimer (karl-qdh)
Changed in gnome-settings-daemon (Ubuntu):
assignee: nobody → Chris Coulson (chrisccoulson)
Changed in gnome-settings-daemon (Ubuntu Maverick):
assignee: nobody → Chris Coulson (chrisccoulson)
Revision history for this message
xcape77 (xcape77) wrote :

Is there a solution?

Revision history for this message
K900 (k0009000) wrote :

@xcape77 Fixed, just dist-upgrade.

Revision history for this message
Xion (xionx) wrote :

Yeah, the same problem =(
I have Ubuntu 10.04 LTS, I'v just upgraded from proposed repository and it's not helped to me =(
Please fix this problem

Changed in gnome-settings-daemon:
status: Invalid → Incomplete
Changed in gnome-settings-daemon:
status: Incomplete → Invalid
Revision history for this message
Krastanov (krastanov-stefan) wrote :

First: The bug is invalid for the upstream gnome-settings-daemon because it was introduced only in ubuntu's patched version.

Second: It was fixed in gnome-settings-daemon - 2.32.0-0ubuntu3. Check your version (using synaptic for example). If it's older, update.

Third: The bug was introduced on 10.10 not 10.04. As far as I know it was never experienced on 10.04. Make sure you are not experiencing another (new) bug.

As all 300 people who have been originally affected do not complain anymore, it may be better to fill new bug report. That will keep this report clean.

It will also help you because the devs will have easier time tracing and fixing it (here we already have ~300 comment, no one can find the useful information here). If you are sure the two bugs are connected, add a link to this one in you new bug report.

Revision history for this message
RussianNeuroMancer (russianneuromancer) wrote :

Patch for Baltix is already released?

Changed in baltix:
status: New → Fix Released
sugrob (d-snezhinskiy)
Changed in gnome-settings-daemon (Ubuntu):
assignee: Chris Coulson (chrisccoulson) → sugrob (d-snezhinskiy)
Changed in gnome-settings-daemon (Ubuntu):
assignee: sugrob (d-snezhinskiy) → nobody
Revision history for this message
Sergey (sergeyzsg) wrote :

Also this bug affect's me. I have ubuntu precise 12.04 amd64.
E.g. some process use to many memory. After killing this process I get gnome-settings-daemon that uses 100% cpu.
But I have num lock swtching instead of kb layout switching.

Revision history for this message
chochis (chochis) wrote :

Installed cinammon on ubuntu 12.10 and now it started to happend.

Revision history for this message
chochis (chochis) wrote :

Sorry, meant 12.04

Revision history for this message
Amir Eldor (amireldor) wrote :

That's weird, it did not happen to me when I installed 12.04. Did happen on 11.10 but it was fixed after an upgrade (when the fix was released).

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

Other bug subscribers

Related blueprints

Remote bug watches

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