The results below may be distorted if gnome-screensaver is running. To get rid of it, do this:
$ gconftool-2 --type boolean -s /apps/gnome_settings_daemon/screensaver/start_screensaver falseWithout setting start_screensaver to false above, gnome-settings-daemon would restart gnome-screensaver whenever a GNOME application gets started. (Firefox a GNOME Terminal is GNOME applications in Ubuntu Jaunty, but icewm and xterm aren't.)
$ killall gnome-screensaver
X11 supports two distinct features for power saving when the user is away from the computer: screen blanking and power saving. Confusingly enough, the man page for xset uses the term screen saver instead of screen blanking. In our terminology, screen blanking is a feature to display a blank (solid black) screen after long enough user inactivity. However, screen saver is a program which gets started upon long enough user inactivity, which draws some simple animation on the screen, and asks the user's password before letting him back to his screen and applications. Power saving (DPMS turns the display off or puts it to some power-saving mode after long enough user inactivity. In power saving mode the display doesn't show anything, but it consumes much less power, see the DPMS link above for typical watt values for the power-saving modes standby, suspend and off (and also in the mode on, when power saving is inactive). User inactivity means that the user doesn't use the keyboard or the mouse for a configurable number of seconds. The typical default inactivity timeouts are around 2 minutes. By default, the X server disables screen blanking and power saving as soon as the user presses a key or moves the mouse. From now on we assume that there is no screen saver running, or its timeout is set to be high enough so it won't ever trigger. Screen blanking and power saving are independent features, they have to be configured independently.
How to set up the timeouts
- To disable screen blanking, run xset s off
- To make the screen blank after 600 seconds of user inactivity, run xset s 600 To put the display to standby after 100 seconds, to suspend after 200 seconds, and turn it off after 300 seconds, run xset dpms 100 200 300
- To disable power saving, run xset dpms 0 0 0
- To make the screen blanking display thee X11 logo on a blue background instead of displaying a solid black screen, run xset s noblank
- To make the screen blanking display a solid black screen (default), run xset s blank
How to change the screen state immediately
- To blank the screen, run xset s activate
- To unblank the screen, run xset s reset
- To turn the screen off, run xset dmps force off
- To activate the suspend power-saving mode (good savings, good resume time), run xset dpms force suspend
- To activate the standby power-saving mode (minimal savings, very quick resume time), run xset dpms force standby
- To turn the display on, run xset dpms force on; xset s reset (the latter is necessary because the screen was blanked automatically when power saving was activated).
1 comment:
Nice write up, thanks!
Post a Comment