Skip to content

Commit

Permalink
mouse: Use event driven mode for syndaemon
Browse files Browse the repository at this point in the history
In default polling mode syndaemon wakeups 5 times per second. That
is pretty bad for power consumption with hungry laptop CPUs.

If syndaemon was compiled to include XRecord extension -R parameter
can be used to select even driven mode. Event driven mode wakeups
only when there is KeyPress or KeyRelease event. In that time CPU
is already running so impact for power consumption is lesser.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=639623
  • Loading branch information
suokko authored and hadess committed Feb 17, 2011
1 parent 33cf80e commit f7071bf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/mouse/gsd-mouse-manager.c
Expand Up @@ -555,7 +555,7 @@ set_disable_w_typing (GsdMouseManager *manager, gboolean state)
{
if (state && touchpad_is_present ()) {
GError *error = NULL;
char *args[5];
char *args[6];

if (manager->priv->syndaemon_spawned)
return 0;
Expand All @@ -564,7 +564,8 @@ set_disable_w_typing (GsdMouseManager *manager, gboolean state)
args[1] = "-i";
args[2] = "2.0";
args[3] = "-k";
args[4] = NULL;
args[4] = "-R";
args[5] = NULL;

if (!g_find_program_in_path (args[0]))
return 0;
Expand Down

0 comments on commit f7071bf

Please sign in to comment.