New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mate-settings-daemon bugging out on keypress on numpad via synergy #57

Closed
mwrsa opened this Issue Jan 3, 2014 · 41 comments

Comments

Projects
None yet
@mwrsa
Copy link

mwrsa commented Jan 3, 2014

https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/969359
describes exactly the same issue that I am having:
Being remotely connected via synergy (both machines using Mint16 Mate, including all updates as of today Jan. 3, 2014, 22:00 CET), mate-settings-daemon starts consuming 100% CPU on having pressed any key on the keypad.

Just as a parallel, deleting (resp. moving) /usr/lib/mate-settings-daemon/keyboard.mate-settings-plugin seems to work for me. They also write (Post #155) that there's a fix out for gnome. I did not read beyond that.

I did look through the closed issues, too. Seems like nobody had it (or has reported it) yet? If I'm wrong, I apologize.

@langpavel

This comment has been minimized.

Copy link

langpavel commented Jan 23, 2014

+ :-D +1 for this,
After "random" time (or when trying hibernate system? I don't know exactly) my numlock can't be activated, only blink for second fraction.. then I see 2 processes of mate-settings-daemon consuming 100% CPU - SIGTERM does not kill them, only SIGKILL

@stefano-k

This comment has been minimized.

Copy link
Member

stefano-k commented Jan 23, 2014

Do you have something interesting in ~/.xsession-errors?

@stefano-k

This comment has been minimized.

Copy link
Member

stefano-k commented Jan 23, 2014

However, plugins can be disabled in GSettings (dconf-editor), no need to remove files

@langpavel

This comment has been minimized.

Copy link

langpavel commented Jan 23, 2014

@stefano-k Cannot find anything interesting in ~/.xsession-errors only ton of ** (mate-settings-daemon:5068): WARNING **: Timeout was reached messages

@stefano-k

This comment has been minimized.

Copy link
Member

stefano-k commented Jan 23, 2014

@langpavel can you try with mate-settings-daemon --debug --replace from terminal?

@stefano-k

This comment has been minimized.

Copy link
Member

stefano-k commented Mar 21, 2014

Please re-open if you can provide mate-settings-daemon --debug --replace output.

@stefano-k stefano-k closed this Mar 21, 2014

@biergaizi

This comment has been minimized.

Copy link

biergaizi commented Apr 9, 2014

Still exist in MATE 1.8. I hit by this bug on a Raspberry Pi running ArchLinux and a PC belongs to my school, running Gentoo Linux.

It seems be happen only when system under heavy load, for example, some processes eating the memory and kernel keeps swapping. I press NumLock button to check whether kernel is hang. The NumLock light won't change.

But after the crazy swapping, the system is usable again, and I'll find the NumLock can't stop change the state between on and off.

@biergaizi

This comment has been minimized.

Copy link

biergaizi commented Apr 10, 2014

Here's the log:

** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: Flushing sample cache
** (mate-settings-daemon:23215): DEBUG: Sample cache flushed
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: xft_settings_set_xresources: orig res 'Xft.dpi: 95.9404296875
Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintmedium
Xft.rgba:   none
'
** (mate-settings-daemon:23215): DEBUG: xft_settings_set_xresources: new res 'Xft.dpi:  95.9404296875
Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintmedium
Xft.rgba:   none
'
** (mate-settings-daemon:23215): DEBUG: xft_settings_set_xresources: orig res 'Xft.dpi: 95.9404296875
Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintmedium
Xft.rgba:   none
'
** (mate-settings-daemon:23215): DEBUG: xft_settings_set_xresources: new res 'Xft.dpi:  95.9404296875
Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintmedium
Xft.rgba:   none
'
** (mate-settings-daemon:23215): DEBUG: xft_settings_set_xresources: orig res 'Xft.dpi: 95.9404296875
Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintmedium
Xft.rgba:   none
'
** (mate-settings-daemon:23215): DEBUG: xft_settings_set_xresources: new res 'Xft.dpi:  95.9404296875
Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintmedium
Xft.rgba:   none
'
** (mate-settings-daemon:23215): DEBUG: xft_settings_set_xresources: orig res 'Xft.dpi: 95.9404296875
Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintmedium
Xft.rgba:   none
'
** (mate-settings-daemon:23215): DEBUG: xft_settings_set_xresources: new res 'Xft.dpi:  95.9404296875
Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintmedium
Xft.rgba:   none
'
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: Flushing sample cache
** (mate-settings-daemon:23215): DEBUG: Sample cache flushed
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: xft_settings_set_xresources: orig res 'Xft.dpi: 95.9404296875
Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintmedium
Xft.rgba:   none
'
** (mate-settings-daemon:23215): DEBUG: xft_settings_set_xresources: new res 'Xft.dpi:  95.9404296875
Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintmedium
Xft.rgba:   none
'
** (mate-settings-daemon:23215): DEBUG: xft_settings_set_xresources: orig res 'Xft.dpi: 95.9404296875
Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintmedium
Xft.rgba:   none
'
** (mate-settings-daemon:23215): DEBUG: xft_settings_set_xresources: new res 'Xft.dpi:  95.9404296875
Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintmedium
Xft.rgba:   none
'
** (mate-settings-daemon:23215): DEBUG: xft_settings_set_xresources: orig res 'Xft.dpi: 95.9404296875
Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintmedium
Xft.rgba:   none
'
** (mate-settings-daemon:23215): DEBUG: xft_settings_set_xresources: new res 'Xft.dpi:  95.9404296875
Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintmedium
Xft.rgba:   none
'
** (mate-settings-daemon:23215): DEBUG: xft_settings_set_xresources: orig res 'Xft.dpi: 95.9404296875
Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintmedium
Xft.rgba:   none
'
** (mate-settings-daemon:23215): DEBUG: xft_settings_set_xresources: new res 'Xft.dpi:  95.9404296875
Xft.antialias:  1
Xft.hinting:    1
Xft.hintstyle:  hintmedium
Xft.rgba:   none
'
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: Flushing sample cache
** (mate-settings-daemon:23215): DEBUG: Sample cache flushed
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
** (mate-settings-daemon:23215): DEBUG: keybindings: received 'changed' signal from dconf
@biergaizi

This comment has been minimized.

Copy link

biergaizi commented Apr 10, 2014

@stefano-k @mwrsa

Please re-open the issue since I don't have the permission.

@infirit infirit reopened this Apr 10, 2014

@chrstphrchvz

This comment has been minimized.

Copy link

chrstphrchvz commented Sep 1, 2014

https://bugs.launchpad.net/ubuntu/+source/mate-settings-daemon/+bug/1364111
In my case, this doesn't seem to happen for any other key besides num lock, nor am I using synergy, but the behavior in that bug report link in the first post (launchpad bug report 969359) is similar behavior.

@infirit

This comment has been minimized.

Copy link
Contributor

infirit commented Sep 2, 2014

There is a commit in the gnome-settings-daemon bugzilla for this, https://bug679151.bugzilla-attachments.gnome.org/attachment.cgi?id=228300. I'll have a quick look and see if this solves the problem.

@infirit

This comment has been minimized.

Copy link
Contributor

infirit commented Sep 2, 2014

Unfortunately gsd is quite different from msd so this commit does not apply.

@marmistrz

This comment has been minimized.

Copy link

marmistrz commented Oct 14, 2014

Confirming this bug. I've just noticed that problem in my case. The /org/mate/desktop/peripherals/keyboard/numlock-state is changing on <-> off a couple times in a second if the remember-numlock-state option is marked true. Unchecking the option stops this. This happens on two keyboards.

And a small request: until it's permanently fixed, could the remember-numlock-state option be marked false by default? Or are the Linux Mint folks the ones to be asked?

@sunweaver

This comment has been minimized.

Copy link
Member

sunweaver commented Nov 11, 2014

In X2Go, we have a related bug...
http://bugs.x2go.org/402

the "numlockx status" output starts flickering after NUM-Lock key has been hit on the client-side of X2Go (MATE runs as a desktop session on X2Go Server) and the msd load goes up to nearly 100%.

@nileshgr

This comment has been minimized.

Copy link

nileshgr commented Feb 7, 2015

Here's the fix for this problem:

--- plugins/keyboard/msd-keyboard-manager.c.orig    2015-02-07 12:17:03.372168487 +0530
+++ plugins/keyboard/msd-keyboard-manager.c 2015-02-07 10:57:10.936047797 +0530
@@ -267,10 +267,6 @@
         bell_volume   = (volume_string && !strcmp (volume_string, "on")) ? 50 : 0;
         g_free (volume_string);

-#ifdef HAVE_X11_EXTENSIONS_XKB_H
-        rnumlock      = g_settings_get_boolean  (settings, KEY_NUMLOCK_REMEMBER);
-#endif /* HAVE_X11_EXTENSIONS_XKB_H */
-
         gdk_error_trap_push ();
         if (repeat) {
                 gboolean rate_set = FALSE;
@@ -306,9 +302,13 @@
                                 &kbdcontrol);

 #ifdef HAVE_X11_EXTENSIONS_XKB_H
-        if (manager->priv->have_xkb && rnumlock) {
-                numlock_set_xkb_state (numlock_get_settings_state (settings));
-        }
+        rnumlock      = g_settings_get_boolean  (settings, KEY_NUMLOCK_REMEMBER);
+       
+       if(rnumlock == 0 || key == NULL) {
+           if (manager->priv->have_xkb && rnumlock) {
+                   numlock_set_xkb_state (numlock_get_settings_state (settings));
+           }
+       }
 #endif /* HAVE_X11_EXTENSIONS_XKB_H */

         XSync (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), FALSE);

Credits: https://git.gnome.org/browse/gnome-settings-daemon/commit/?id=ff5b65349a9e377d17946ccb29b764f19c3bef7e

I was facing this problem, and I can confirm that after making this change, it doesn't happen anymore -- and now I don't have to disable the keyboard plugin by removing the loader file from /usr/lib/mate-settings-daemon.

@biergaizi

This comment has been minimized.

Copy link

biergaizi commented Feb 7, 2015

@nileshgr Thank you very much!

@flexiondotorg

This comment has been minimized.

Copy link
Member

flexiondotorg commented Feb 26, 2015

@stefano-k - This is 1.10 essential.

@sunweaver

This comment has been minimized.

Copy link
Member

sunweaver commented Mar 10, 2015

@stefano-k, @monsta, @flexiondotorg: Isn't this actually something we should pull into 1.8.x?

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Mar 10, 2015

I have no idea - never used synergy.

@sunweaver

This comment has been minimized.

Copy link
Member

sunweaver commented Mar 10, 2015

@monsta: It happens in X2Go, as well.

@nileshgr

This comment has been minimized.

Copy link

nileshgr commented Mar 10, 2015

I don't know what's synergy either, but this bug affects users of vnc as
well.

I use xrdp and x11rdp and I was having this problem. Desktop is absolutely
unusable on client side as well as server side. You've to kill all user
processes by logging in as root from tty.
On 10-Mar-2015 11:31 pm, "monsta" notifications@github.com wrote:

I have no idea - never used synergy.


Reply to this email directly or view it on GitHub
#57 (comment)
.

@sunweaver

This comment has been minimized.

Copy link
Member

sunweaver commented Mar 10, 2015

The problem is if you have a remote desktop system, there are conflicts of interest:

The remote desktop agent tries to sync num lock status between client and session on remote desktop server (be it X2Go, xRDP, VNC), etc.

Whereas m-s-d tries to "remember" its desktop settings (I presume).

@sunweaver

This comment has been minimized.

Copy link
Member

sunweaver commented Mar 10, 2015

@nileshgr: do you have a foolproof way for reproducing the issue?

@sunweaver

This comment has been minimized.

Copy link
Member

sunweaver commented Mar 10, 2015

in X2Go it occurs sometimes...

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Mar 10, 2015

Well... if it affects three apps maybe it indeed should be pushed as 1.8 update.

@sunweaver

This comment has been minimized.

Copy link
Member

sunweaver commented Mar 10, 2015

/me nods...

@nileshgr

This comment has been minimized.

Copy link

nileshgr commented Mar 10, 2015

The steps for xrdp :
First install xrdp and get mate working with it.
Login as some user and hit num lock or try some numpad keys.

You should see a surge in cpu and io usage by m-s-d.
Then remove the keyboard plugin from /usr/lib and restart session. Keyboard
layouts anyway don't work in vnc mode (in x11rdp mode they do) so it
shouldn't matter and now you don't have this overload issue..

I have done xrdp deployment for concurrent 10+ users so I badly needed a
fix for this :p

Just to give an idea, cpu load with that bug when a few of those ten hit
numlock goes to 50 something on a dual core machine.
On 10-Mar-2015 11:37 pm, "Mike Gabriel" notifications@github.com wrote:

@nileshgr https://github.com/nileshgr: do you have a foolproof way for
reproducing the issue?


Reply to this email directly or view it on GitHub
#57 (comment)
.

@sunweaver

This comment has been minimized.

Copy link
Member

sunweaver commented Mar 10, 2015

Thanks, I will re-test with X2Go.

@chrstphrchvz

This comment has been minimized.

Copy link

chrstphrchvz commented Mar 10, 2015

The discussion here is only on how the issue occurs due to some form of desktop sharing (e.g. vnc, x2go, synergy, etc.). I am not using any of those--and I have yet to tell if the patch submitted solves my issue (https://bugs.launchpad.net/ubuntu/+source/mate-settings-daemon/+bug/1364111), so maybe it is not necessarily a duplicate of this; the trigger I have identified there is CPU unavailability.

@sunweaver

This comment has been minimized.

Copy link
Member

sunweaver commented Mar 10, 2015

I can confirm the issue happening in X2Go's x2goagent (a remote capable XServer).

Trying an m-s-d build with the above patch now.

@sunweaver

This comment has been minimized.

Copy link
Member

sunweaver commented Mar 10, 2015

@monsta: can you review the above patch? The issue is valid and the patch fixes the described problem also for X2Go. It also seems to fix X2GoBug#402 [1].

[1] http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=402

@sunweaver

This comment has been minimized.

Copy link
Member

sunweaver commented Mar 10, 2015

@monsta: saying this, can you provide a PR for this for 1.10 and 1.8?

@mwrsa

This comment has been minimized.

Copy link

mwrsa commented Mar 11, 2015

Argh, I wanted to edit my comment, not delete it...

Basically those of you who receive the notification can still read it, for the rest of the world:

Moving on to Mint 17 (or 17.1?) resolved the issue for me, now under Mate 1.8.1 I never experienced this behaviour.

However since there are still people having and discussing it, I won't close it even though it's resolved for me.
HAND, mwrsa

@nileshgr

This comment has been minimized.

Copy link

nileshgr commented Mar 11, 2015

I'm using Mint 17.1. And m-s-d 1.8.2.

On Wed, Mar 11, 2015 at 12:45 PM, mwrsa notifications@github.com wrote:

Argh, I wanted to edit my comment, not delete it...

Basically those of you who receive the notification can still read it, for
the rest of the world:

Moving on to Mint 17 (or 17.1?) resolved the issue for me, now under Mate
1.8.1 I never experienced this behaviour.

However since there are still people having and discussing it, I won't
close it even though it's resolved for me.
HAND, mwrsa


Reply to this email directly or view it on GitHub
#57 (comment)
.

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Mar 11, 2015

So, I made two PRs out of @nileshgr's patch, but that's it. I can only confirm that m-s-d builds fine and runs fine, but I don't have any remote desktop software around (and no spare machines to test it). So, please test the PRs as much as you can. :)

@sunweaver

This comment has been minimized.

Copy link
Member

sunweaver commented Mar 11, 2015

Thanks!

@mwrsa

This comment has been minimized.

Copy link

mwrsa commented Mar 11, 2015

@nileshgr Synergy is some software to span your desktop over multiple devices, in my case usually two laptops, sharing one keyboard and mouse here. Biggest benefit is that it's cross-platform for Linux, Win* and Mac (though I don't use that one too often. Awesome piece of software!

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Mar 17, 2015

So, PRs are merged. Did the fix work for you guys?
@sunweaver already confirmed it worked, what about the other reporters?

@biergaizi

This comment has been minimized.

Copy link

biergaizi commented Mar 17, 2015

Unluckily the computer & system I used are no longer exist, therefore I can't test it.

@tamer-hassan

This comment has been minimized.

Copy link
Contributor

tamer-hassan commented Apr 2, 2015

Confirmed the patch suggested by @nileshgr fixes the issue with Vino/X11RDP.
Kudos for that!
And thanks Monsta for the merge.

@monsta

This comment has been minimized.

Copy link
Member

monsta commented Apr 2, 2015

I didn't merge it, I only converted the patch into PRs, it's @stefano-k who merged them :)

@monsta monsta closed this Mar 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment