Bug#659802: xscreensaver: Option to leave DPMS alone
Tags: patch thanks Despite Jamie's misgivings, I believe it's possible to provide the functionality I need without inconvenience users who like the existing action; I attached a patch that adds a config file option leaveDpmsAlone (no UI or documentation - I could perhaps have a stab at that later if requested). If false (default), xscreensaver takes over DPMS for the user; if set to true, then it will not touch the DPMS settings. diff -ru xscreensaver-5.15/debian/changelog xscreensaver-5.15-2+tms1/debian/changelog --- xscreensaver-5.15/debian/changelog 2012-02-15 19:29:57.0 + +++ xscreensaver-5.15-2+tms1/debian/changelog 2012-02-15 19:17:38.0 + @@ -1,3 +1,10 @@ +xscreensaver (5.15-2+tms1) unstable; urgency=low + + * Add config file option to prevent xscreensaver touching DPMS (Closes: +#659802). + + -- Toby Speight t.m.speight...@cantab.net Wed, 15 Feb 2012 19:17:38 + + xscreensaver (5.15-2) unstable; urgency=low * Build-dep on libjpeg-dev instead of libjpeg62-dev (Closes: #647110) Only in xscreensaver-5.15-2+tms1/debian/patches: .dpkg-source-applied diff -ru xscreensaver-5.15/driver/prefs.c xscreensaver-5.15-2+tms1/driver/prefs.c --- xscreensaver-5.15/driver/prefs.c 2011-10-05 21:51:17.0 +0100 +++ xscreensaver-5.15-2+tms1/driver/prefs.c 2012-02-15 18:48:38.0 + @@ -275,6 +275,7 @@ logFile, /* not saved */ ignoreUninstalledPrograms, font, + leaveDpmsAlone, dpmsEnabled, dpmsQuickOff, dpmsStandby, @@ -817,6 +818,7 @@ CHECK(font) type = pref_str, s =stderr_font; + CHECK(leaveDpmsAlone) type = pref_bool, b = p-dpms_leave_alone_p; CHECK(dpmsEnabled) type = pref_bool, b = p-dpms_enabled_p; CHECK(dpmsQuickOff) type = pref_bool, b = p-dpms_quickoff_p; CHECK(dpmsStandby) type = pref_time, t = p-dpms_standby; @@ -1074,6 +1076,7 @@ windowCreationTimeout, Time); + p-dpms_leave_alone_p = get_boolean_resource (dpy, leaveDpmsAlone, Boolean); p-dpms_enabled_p = get_boolean_resource (dpy, dpmsEnabled, Boolean); p-dpms_quickoff_p = get_boolean_resource (dpy, dpmsQuickOff, Boolean); p-dpms_standby= 1000 * get_minutes_resource (dpy, dpmsStandby, Time); diff -ru xscreensaver-5.15/driver/timers.c xscreensaver-5.15-2+tms1/driver/timers.c --- xscreensaver-5.15/driver/timers.c 2011-10-05 21:51:17.0 +0100 +++ xscreensaver-5.15-2+tms1/driver/timers.c 2012-02-15 19:02:44.0 + @@ -1445,13 +1445,14 @@ /* If the DPMS settings on the server have changed, change them back to what ~/.xscreensaver says they should be. */ - sync_server_dpms_settings (si-dpy, - (p-dpms_enabled_p - p-mode != DONT_BLANK), - p-dpms_standby / 1000, - p-dpms_suspend / 1000, - p-dpms_off / 1000, - False); + if (!p-dpms_leave_alone_p) +sync_server_dpms_settings (si-dpy, + (p-dpms_enabled_p +p-mode != DONT_BLANK), + p-dpms_standby / 1000, + p-dpms_suspend / 1000, + p-dpms_off / 1000, + False); if (si-screen_blanked_p) { diff -ru xscreensaver-5.15/driver/types.h xscreensaver-5.15-2+tms1/driver/types.h --- xscreensaver-5.15/driver/types.h 2011-10-05 21:51:17.0 +0100 +++ xscreensaver-5.15-2+tms1/driver/types.h 2012-02-15 08:24:09.0 + @@ -111,6 +111,7 @@ Time watchdog_timeout; /* how often to re-raise and re-blank screen */ int pointer_hysteresis; /* mouse motions less than N/sec are ignored */ + Bool dpms_leave_alone_p; /* Whether to update DPMS settings */ Bool dpms_enabled_p; /* Whether to power down the monitor */ Bool dpms_quickoff_p; /* Whether to power down monitor immediately in Blank Only mode */ diff -ru xscreensaver-5.15/driver/xscreensaver.c xscreensaver-5.15-2+tms1/driver/xscreensaver.c --- xscreensaver-5.15/driver/xscreensaver.c 2011-10-05 21:51:17.0 +0100 +++ xscreensaver-5.15-2+tms1/driver/xscreensaver.c 2012-02-15 19:02:44.0 + @@ -1096,13 +1096,14 @@ /* If the DPMS settings in the init file have changed, change the settings on the server to match. */ - sync_server_dpms_settings (si-dpy, - (p-dpms_enabled_p - p-mode != DONT_BLANK), - p-dpms_standby / 1000, - p-dpms_suspend / 1000, - p-dpms_off / 1000, - False); + if (!p-dpms_leave_alone_p) + sync_server_dpms_settings (si-dpy, + (p-dpms_enabled_p +
Bug#659802: xscreensaver: Option to leave DPMS alone
Sorry, I think this is only going to confuse people. Applications should not have UI elements that just magically get ignored if some forgotten text-only preference is set. I'm not going to install this patch upstream. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#659802: xscreensaver: Option to leave DPMS alone
Jamie == Jamie Zawinski j...@jwz.org writes: Jamie Sorry, I think this is only going to confuse people. Jamie Applications should not have UI elements that just magically Jamie get ignored if some forgotten text-only preference is set. Jamie I'm not going to install this patch upstream. I did say that I could add UI to that proof-of-concept (which would disable the rest of the DPMS UI when leaveDpmsAlone is set, in the same way that the timeout fields are disabled when dpmsEnabled is unset). But you do seem vehemently prejudiced against anyone wanting to do things differently from you so I won't push it unless Jose Luis thinks my approach is valuable in Debian. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#659802: xscreensaver: Option to leave DPMS alone
Jamie == Jamie Zawinski j...@jwz.org writes: Jamie Intended behavior. Won't fix. It's impossible to allow use Jamie of both xset and a GUI and know which setting should take Jamie priority, since changes to settings don't have timestamps on Jamie them. Therefore, xscreensaver has to be 100% in charge of Jamie these settings for it to work at all. I'm not asking to use both xset and a GUI; I'm asking to to use only xset, and have the GUI leave DPMS well alone. At present, there's a ./configure option to do so, but no run-time equivalent. An acceptable alternative would for XScreenSaver to take charge, as you want, but to permit users to turn DPMS on and off (and change its timings) via xscreensaver-command. Or even (uglily) to re-read the relevant X resources each time it is about to set DPMS. Or even to do the expected thing, and only set DPMS at startup, and when the user changes the settings using the GUI, instead of every single time the screensaver activates, deactivates or cycles. In case it's not obvious what I'm doing, here's my pamusb user script: /[ screenlock ] | #!/bin/sh | | dev=Logitech USB-PS/2 Optical Mouse | prop=Device Enabled | | case $1 in | off|lock) | # Lock screen, disable mouse (to prevent accidental wakeup), | # and minimise monitor usage while I'm away. | xscreensaver-command --lock | xinput set-prop $dev $prop 0 | xset dpms 5 20 20 dpms force off | sleep 15# xscreensaver stomps on DPMS settings | xset dpms 5 20 20 dpms force off | ;; | on|unlock) | # Undo all the above | xset -dpms | xscreensaver-command --deactivate | xinput set-prop $dev $prop 1 | sleep 15# xscreensaver stomps on DPMS settings | xset dpms -dpms | ;; | *) | echo Usage: $0 lock|unlock 2 | exit 1; | esac \ P.S. I'm not sure why timestamps of changes are important - if DPMS settings changed since XScreenSaver started, then that's probably what the user wants. But perhaps I'm missing something? -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#659802: xscreensaver: Option to leave DPMS alone
I'm not asking to use both xset and a GUI; I'm asking to to use only xset, and have the GUI leave DPMS well alone. At present, there's a ./configure option to do so, but no run-time equivalent. I understand what you're asking for. You want this, but more people want the opposite. Sorry, but you lose. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#659802: xscreensaver: Option to leave DPMS alone
Package: xscreensaver Version: 5.15-2 Severity: wishlist XScreenSaver imposes its idea of DPMS settings every time it does something. However, I prefer to set DPMS externally (in particular, I set a much shorter timeout when away, according to pam-usb). One might expect that setting the 'dpmsEnabled' resource to a false value would have the desired effect; however, that makes XScreenSaver turn DPMS off at every opportunity - not what I wanted It seems like the only way to stop XScreenSaver touching DPMS is to recompile with --without-dpms-ext I'd like to see a resource to prevent XScreenSaver using or touching DPMS at all, so I can manage it without being overruled. -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (900, 'testing'), (900, 'stable'), (400, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 3.1.1-balti (SMP w/4 CPU cores; PREEMPT) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages xscreensaver depends on: ii libatk1.0-0 2.2.0-2 ii libc6 2.13-26 ii libcairo2 1.10.2-6.2 ii libfontconfig1 2.8.0-3.1 ii libfreetype62.4.8-1 ii libgdk-pixbuf2.0-0 2.24.0-2 ii libglade2-0 1:2.6.4-1 ii libglib2.0-02.30.2-6 ii libgtk2.0-0 2.24.8-3 ii libice6 2:1.0.7-2 ii libpam0g1.1.3-7 ii libpango1.0-0 1.29.4-2 ii libsm6 2:1.2.0-2 ii libx11-62:1.4.4-4 ii libxext62:1.3.0-3 ii libxi6 2:1.4.5-1 ii libxinerama12:1.1.1-3 ii libxml2 2.7.8.dfsg-7 ii libxmu6 2:1.1.0-3 ii libxpm4 1:3.5.9-4 ii libxrandr2 2:1.3.2-2 ii libxrender1 1:0.9.6-2 ii libxt6 1:1.1.1-2 ii libxxf86vm1 1:1.1.1-2 ii xscreensaver-data 5.15-2 Versions of packages xscreensaver recommends: ii libjpeg-progs 8d-1 ii miscfiles [wordlist] 1.4.2.dfsg.1-9 ii perl [perl5] 5.14.2-7 ii wbritish [wordlist]7.1-1 ii wbritish-large [wordlist] 7.1-1 Versions of packages xscreensaver suggests: ii elinks [www-browser] 0.12~pre5-7 ii fortune-mod [fortune]1:1.99.1-4 ii gdm3 | kdm-gdmcompat none ii iceweasel [www-browser] 9.0.1-1 ii lynx-cur [www-browser] 2.8.8dev.9-3 ii qcam | streamer none ii w3m [www-browser]0.5.3-5 ii xdaliclock 2.35+debian-1 ii xfishtank2.2-25.2 ii xscreensaver-gl 5.15-2 -- Configuration Files: /etc/pam.d/xscreensaver changed: auth[success=done new_authtok_reqd=ok default=die] pam_usb.so @include common-auth -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#659802: xscreensaver: Option to leave DPMS alone
Intended behavior. Won't fix. It's impossible to allow use of both xset and a GUI and know which setting should take priority, since changes to settings don't have timestamps on them. Therefore, xscreensaver has to be 100% in charge of these settings for it to work at all. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org