uxer With xset s blank
, does the screensaver actually switch the monitor(s) off so does it help battery life or is it just a visual?
If you trust what software reports about hardware, then xset
screensaver is not a proper off. To switch monitor(s) off you need to resort to DPMS:
xset dpms force off
xset dpms force on; xset s off dpms 0 0 0 -dpms
Try it yourself:
#! /bin/sh
echo 'This script will not restore your xset settings, leaving screensaver and DPMS off.'
echo 'Press Enter to proceed or ^C to abort...'
read DUMMY
echo "First, let's try without DPMS and with screensaver only."
sleep 6
# here enable DPMS for reporting purpose only
# without it, this will not work:
# xset q | grep 'Monitor is'
xset +dpms
echo -n ' You clearly see that '
xset q | grep 'Monitor is'
sleep 4
echo -n 'OFF! '
sleep 2
xset s activate
sleep 1.5
echo -n 'It may have looked as if it was off, but actually it reported:'
xset q | grep 'Monitor is'
sleep 1.5
xset s reset
xset s off
sleep 10
echo -n "Now, let's try with DPMS."
sleep 5
echo ' OFF!'
sleep 1.5
xset dpms force off
sleep 2
echo -n ' It looked like off and actually it reported:'
xset q | grep 'Monitor is'
sleep 1.5
xset dpms force on # not obligatory on my machine - when you `xset -dpms`, it switches on
xset s off dpms 0 0 0 -dpms
sleep 6
echo "Conclusion (unless DPMS is not misreporting):
in order to actually switch the monitor off and help battery life,
you don't want to use:
xset s activate
xset s reset
You want to use:
xset dpms force off
xset dpms force on; xset -dpms
or even:
xset dpms force on; xset s off dpms 0 0 0 -dpms
Please note that order matters:
xset -dpms dpms 0 0 0
would disable and immediately reenable DPMS"