Package: xscreensaver
Version: 4.21-3
Severity: normal
Tags: patch

Hello,

If I want to keep DPMS "standby" and "suspend" modes, but disable
"off" mode, I can do it with xset like this:
 
      xset dpms 1200 2400 0

With xscreensaver, if I set dpmsOff to 0:00:00, dpmsSuspend is set to
0:00:00 too which is not what I want.

The bug is located in the function stop_the_insanity() of file
"driver/prefs.c".  The following patch inverts the checks for the
values dpms_* (in order to chain the corrections), and adds a check
against 0.

========================================================================
--- xscreensaver-4.21.debian/driver/prefs.c     2005-08-18 19:27:25.688998971 
+0200
+++ xscreensaver-4.21/driver/prefs.c    2005-08-18 19:30:22.586086121 +0200
@@ -1576,11 +1576,15 @@
       p->dpms_off < 10 * 1000)
     p->dpms_off      = 4 * 60 * 60 * 1000;                      /* 4 hours */
 
-  /* standby may not be greater than suspend.
-     suspend may not be greater than off.
+  /* suspend may not be greater than off, unless off is 0.
+     standby may not be greater than suspend, unless suspend is 0.
    */
-  if (p->dpms_standby > p->dpms_suspend) p->dpms_standby = p->dpms_suspend;
-  if (p->dpms_suspend > p->dpms_off)     p->dpms_suspend = p->dpms_off;
+  if (p->dpms_off != 0 &&
+      p->dpms_suspend > p->dpms_off)
+    p->dpms_suspend = p->dpms_off;
+  if (p->dpms_suspend != 0 &&
+      p->dpms_standby > p->dpms_suspend)
+    p->dpms_standby = p->dpms_suspend;
 
 
   if (p->dpms_standby == 0 &&     /* if *all* are 0, then DPMS is disabled */
========================================================================


Furthermore, I believe that there is a typo in the patch to set the
watchdog timer to 30s (same file, a few lines below).  Look a the
closing of the first comment in the following code excerpt:

========================================================================
  /* Watchdog timer set to 30s, anything else is too slow to react 
   * appropriately on DPMS on battery running laptops (CPU intensive hack
   * keeps running for too long
   * /
   * 
  p->watchdog_timeout = 30000;
  /* p->watchdog_timeout = p->cycle * 0.6;
   * /
========================================================================

I think that it should be like this:

========================================================================
  /* Watchdog timer set to 30s, anything else is too slow to react 
     appropriately on DPMS on battery running laptops (CPU intensive hack
     keeps running for too long).
   */
  p->watchdog_timeout = 30000;
  /* p->watchdog_timeout = p->cycle * 0.6;
   * /
========================================================================

Regards,

        Arnaud

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-k7
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages xscreensaver depends on:
ii  libatk1.0-0            1.8.0-4           The ATK accessibility toolkit
ii  libc6                  2.3.2.ds1-22      GNU C Library: Shared libraries an
ii  libglade2-0            1:2.4.2-2         library to load .glade files at ru
ii  libglib2.0-0           2.6.4-1           The GLib library of C routines
ii  libgtk2.0-0            2.6.4-3           The GTK+ graphical user interface 
ii  libice6                4.3.0.dfsg.1-14   Inter-Client Exchange library
ii  libjpeg62              6b-10             The Independent JPEG Group's JPEG 
ii  libpam0g               0.76-22           Pluggable Authentication Modules l
ii  libpango1.0-0          1.8.1-1           Layout and rendering of internatio
ii  libsm6                 4.3.0.dfsg.1-14   X Window System Session Management
ii  libx11-6               4.3.0.dfsg.1-14   X Window System protocol client li
ii  libxext6               4.3.0.dfsg.1-14   X Window System miscellaneous exte
ii  libxml2                2.6.16-7          GNOME XML library
ii  libxmu6                4.3.0.dfsg.1-14   X Window System miscellaneous util
ii  libxpm4                4.3.0.dfsg.1-14   X pixmap library
ii  libxrandr2             4.3.0.dfsg.1-14   X Window System Resize, Rotate and
ii  libxrender1            0.8.3-7           X Rendering Extension client libra
ii  libxt6                 4.3.0.dfsg.1-14   X Toolkit Intrinsics
ii  xlibs                  4.3.0.dfsg.1-14   X Keyboard Extension (XKB) configu
ii  zlib1g                 1:1.2.2-4.sarge.2 compression library - runtime

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to