[Pkg-acpi-devel] Bug#593303: acpi-support: suspend in half the time - background xscreensaver

David Fries david at fries.net
Tue Aug 17 01:57:23 UTC 2010


Package: acpi-support
Version: 0.137-3
Severity: normal
Tags: patch


I was excited when the 2.6.35 kernel suspended to ram
`echo mem > /sys/power/state` in 1.4 seconds, but then seeing Fn Zz
acpi suspend hot key taking 6.6 seconds was disapointing, especially
since /etc/acpi/sleep.sh was also using the same kernel suspend to ram
method.  Granted it was going to be slower because it has the whole
acpi and pm-suspend set of shell scripts to process through, but 4.7
times slower?  I tracked down 3+ seconds of that being
xscreensaver-command sleeping three times for a second each.  Here's a
patch to execute those sleeps in the background and half the time to
get the system suspended using the hot keys.  It could be executed in
another half the time, but I haven't tracked that down.

As a side note, throttling the screen saver and forcing dpms to off is
pointless when the cpu and graphics card are going to be powered off.

Index: usr/share/acpi-support/screenblank
===================================================================
--- usr/share/acpi-support/screenblank	(revision 106)
+++ usr/share/acpi-support/screenblank	(revision 107)
@@ -1,7 +1,7 @@
 if [ `pidof xscreensaver` ]; then
-	su $user -s /bin/sh -c "(xscreensaver-command -throttle)"
+	su $user -s /bin/sh -c "(xscreensaver-command -throttle&)"
 		if [ x$LOCK_SCREEN = xtrue ]; then	
-		su $user -s /bin/sh -c "(xscreensaver-command -lock)"
+		su $user -s /bin/sh -c "(xscreensaver-command -lock&)"
 	fi
 elif [ `pidof dcopserver` ]; then
 	if [ x$LOCK_SCREEN = xtrue ]; then
@@ -16,13 +16,13 @@ fi
 
 case "$DISPLAY_DPMS" in
   xset)
-su $user -s /bin/sh -c "xset dpms force off"
+su $user -s /bin/sh -c "xset dpms force off&"
 	;;
   xrandr)
-	su $user -s /bin/sh -c "xrandr --output LVDS --off"
+	su $user -s /bin/sh -c "xrandr --output LVDS --off&"
 	;;
   vbetool)
-	/usr/sbin/vbetool dpms off
+	/usr/sbin/vbetool dpms off &
 	;;
 esac
 

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.35 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages acpi-support depends on:
ii  acpi-fakekey                  0.137-3    tool to generate fake key events
ii  acpi-support-base             0.137-3    scripts for handling base ACPI eve
ii  acpid                         1:2.0.6-1  Advanced Configuration and Power I
ii  lsb-base                      3.2-23.1   Linux Standard Base 3.2 init scrip
ii  pm-utils                      1.3.0-2    utilities and scripts for power ma
ii  x11-xserver-utils             7.5+2      X server utilities

Versions of packages acpi-support recommends:
ii  dbus                          1.2.24-3   simple interprocess messaging syst
pn  radeontool                    <none>     (no description available)
ii  vbetool                       1.1-2      run real-mode video BIOS code to a
ii  xscreensaver                  5.11-1     Automatic screensaver for X

Versions of packages acpi-support suggests:
pn  rfkill                        <none>     (no description available)
ii  xinput                        1.5.2-1    Runtime configuration and test of 

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/share/acpi-support/screenblank (from acpi-support package)





More information about the Pkg-acpi-devel mailing list