Hi,

back in June I posted a patch for syndaemon. Syndaemon is causing 45 wakeups
a second because of a hardcoded 20 ms timer:
Ref: http://www.bughost.org/pipermail/power/2007-June/000602.html

Here is a new patch that introduces a commandline switch to modify the poll
delay for nearly disappearing from powertop, causing only 3 wakeups a
second while
still working accurate.

I also maintain a patched version in openSUSE 10.3 repository:
http://download.opensuse.org/repositories/home:/FunkyM/openSUSE_10.3/i586/x11-input-synaptics-0.14.6-109.1.i586.rpm

-- 
Best regards,
Florian Schäfer

synaptics-0.14.6-poll-delay.patch:
===================================================================
--- ./syndaemon.c       2006-04-16 21:31:43.000000000 +0200
+++ ./syndaemon.c       2008-01-21 13:40:02.000000000 +0200
@@ -43,9 +43,11 @@
 static void
 usage()
 {
-    fprintf(stderr, "Usage: syndaemon [-i idle-time] [-d] [-t] [-k]\n");
+    fprintf(stderr, "Usage: syndaemon [-i idle-time] [-m poll-delay]
[-d] [-t] [-k]\n");
     fprintf(stderr, "  -i How many seconds to wait after the last key
press before\n");
     fprintf(stderr, "     enabling the touchpad. (default is 2.0s)\n");
+    fprintf(stderr, "  -m How many milli-seconds to wait until next poll.\n");
+    fprintf(stderr, "     (default is 20ms)\n");
     fprintf(stderr, "  -d Start as a daemon, ie in the background.\n");
     fprintf(stderr, "  -p Create a pid file with the specified name.\n");
     fprintf(stderr, "  -t Only disable tapping and scrolling, not
mouse movements.\n");
@@ -159,9 +161,8 @@
 }

 static void
-main_loop(Display *display, double idle_time)
+main_loop(Display *display, double idle_time, int poll_delay)
 {
-    const int poll_delay = 20000;          /* 20 ms */
     double last_activity = 0.0;
     double current_time;

@@ -228,17 +229,21 @@
 main(int argc, char *argv[])
 {
     double idle_time = 2.0;
+       int poll_delay = 20000;     /* 20 ms */
     Display *display;
     int c;
     int shmid;
     int ignore_modifier_keys = 0;

     /* Parse command line parameters */
-    while ((c = getopt(argc, argv, "i:dtp:kK?")) != EOF) {
+    while ((c = getopt(argc, argv, "i:m:dtp:kK?")) != EOF) {
        switch(c) {
        case 'i':
            idle_time = atof(optarg);
            break;
+       case 'm':
+           poll_delay = atoi(optarg) * 1000;
+           break;
        case 'd':
            background = 1;
            break;
@@ -314,7 +319,7 @@
     setup_keyboard_mask(display, ignore_modifier_keys);

     /* Run the main loop */
-    main_loop(display, idle_time);
+    main_loop(display, idle_time, poll_delay);

     return 0;
 }

_______________________________________________
Power mailing list
[email protected]
http://www.bughost.org/mailman/listinfo/power

Reply via email to