[ltp] Keep awake/screen-non-blank with lid closed forever!

Charles Howes linux-thinkpad@linux-thinkpad.org
Tue, 10 Dec 2002 16:39:48 -0800 (PST)


On Tue, 10 Dec 2002, sebastian sauer wrote:

> On Tuesday 10 December 2002 22:41, Nfudd@speed-test.net wrote:
>
> > I've tried disabling a number of timers, but it still goes black.
> have you disabled Option "DPMS" in /etc/X11/XF86Config ?

Aha!  It works!

To turn off the dpms screen saver:

In the file /etc/X11/XF86Config, in the Monitor section:
  Section "Monitor"
     ...otherstuff...
     Option "dpms"
  EndSection

In the Server Flags section (add it if it doesn't exist):
  Section "ServerFlags"
    Option "BlankTime" "0"
    Option "StandbyTime" "0"
    Option "SuspendTime" "0"
    Option "OffTime" "0"
  EndSection

The zeros mean "disable", otherwise you can set the number of seconds
until the various stages kick in.


Alternatively, you can do it temporarily this way:
  xset -dpms           : Disable DPMS, screen comes on
  xset dpms force off  : Enable DPMS, screen goes off

If you are signed on with ssh and want to control the X login screen,
do the following (assuming kdm_greet is login program and tcsh is shell):

  xargs -0 -n1 echo < /proc/`pidof kdm_greet`/environ | gawk -F= '/XAUTHORITY/{print $2}' > /tmp/xauthfile
  setenv XAUTHORITY `cat /tmp/xauthfile`
  setenv DISPLAY localhost:0
  xset dpms force off
  xset -dpms

And voila, you can turn the screen on and off!

See also:
  http://barriebremner.com/xfreedpms.html
  http://www.xfree86.org/4.0.2/XF86Config.5.html
  http://www.xfree86.org/4.0.2/xset.1.html

Enjoy!
--
Nfudd@speed-test.net