==== TYPE = THIS = TO = NIX = THE = SCREEN = SAVER ====
xset s 0 0 s off s noblank s noexpose -dpms
at a command prompt,
or make it stick by placing that line in an init file.
=============================================
[SOLVED] How to Disable Screen Saver Blanking on the Raspberry Pi as Kiosk
I wanted to demonstrate using the Raspberry Pi as a weather/traffic
information kiosk for use by dispatchers in dispatch centers and by
guests in hotel lobbies, having neither mouse nor keyboard, just an HDMI
monitor. The problem was that for an unmanned 24/7 status display,
screen blanking occurred automatically on the Pi every ten minutes.
Disabling that "helpful" screen saving feature seemed to be a pain of
discovering the obscure documentation. The good news is that I had
already long-ago built both HTML traffic and weather pages with
auto-refresh, and a bit more which was stripped out for the .html file
loaded native to the RPi such as National Institute of Standards/Time
widgets and such, as my own personal agents (seen at
http://weather.disneywizard.com and
http://traffic.disneywizard.com .)
The auto refresh is accomplished in the <head> of the traffic.html and
weather.html pages with this line:
<meta http-equiv="refresh" content="600">
The content="600" meta http-equiv instructs client-side browsers which
honor refresh to display the page anew six times an hour by waiting
six-hundred seconds (10minutes*60) before re-loading is forced. (I'll
likely double the refresh rate to 12/hr by reducing refresh to 300 when
the kiosk is installed.) Thankfully Iceweasle honors refresh.
ARGh! How do I turn Screen Saver off?! Six-hundred seconds is also the
default "screen saver" blankout default in my Raspberry Pi Debian Wheezy
stock distribution. After several misfired Google searches due to poor
keyword selection I finally came upon
http://idratherhack.blogspot.com/2011/09/disable-screen-blanking-in-linux-how.html
Bingo! It helped immensely, but failed to locate the global default
xinitrc file, which is in the /etc/X11/xinit/xinitrc directory locaton.
Startx first searches for an xinitrc local startup file in each users
home directory labeled with a dot in front: .xinitrc , list it with
console command line ls -a to find the hidden file. If the file doens't
exist it uses the global settings in /etc/X11/xinit .
These user and global files are the initial hook which launches Xsession
when the user invokes startx. In the global file I inserted this line
utilizing 'root@Pi:~# leafpad /etc/X11/xinit/xinitrc ':
xset s 0 0 s off s noblank s noexpose -dpms
[your favorite editor will do this fine, I chose Leafpad.]
The xset command can be typed on the command line from any current
directory to tweak the Xwindow behavior before starting it, here in
xinitrc it happens to be this - the semi-permanent script seen below:
(the actual script is much shorter, I've included the "#xset usage:"
comment section for localized reference later when I forget what I did.):
#!/bin/sh
# /etc/X11/xinit/xinitrc
#
# global xinitrc file, used by all X sessions started by xinit (startx)
# Disable blanking. See
http://idratherhack.blogspot.com/2011/09/disable-screen-blanking-in-linux-how.html
xset s 0 0 s off s noblank s noexpose -dpms
# invoke global X session script
. /etc/X11/Xsession
#xset usage: xset [-display host:dpy] option ...
# To turn bell off:
# -b b off b 0
# To set bell volume, pitch and duration:
# b [vol [pitch [dur]]] b on
# To disable bug compatibility mode:
# -bc
# To enable bug compatibility mode:
# bc
# To turn keyclick off:
# -c c off c 0
# To set keyclick volume:
# c [0-100] c on
# To control Energy Star (DPMS) features:
# -dpms Energy Star features off
# +dpms Energy Star features on
# dpms [standby [suspend [off]]]
# force standby
# force suspend
# force off
# force on
# (also implicitly enables DPMS features)
# a timeout value of zero disables the mode
# To set the font path:
# fp= path[,path...]
# To restore the default font path:
# fp default
# To have the server reread font databases:
# fp rehash
# To remove elements from font path:
# -fp path[,path...] fp- path[,path...]
# To prepend or append elements to font path:
# +fp path[,path...] fp+ path[,path...]
# To set LED states off or on:
# -led [1-32] led off
# led [1-32] led on
# -led named 'name' led off
# led named 'name' led on
# To set mouse acceleration and threshold:
# m [acc_mult[/acc_div] [thr]] m default
# To set pixel colors:
# p pixel_value color_name
# To turn auto-repeat off or on:
# -r [keycode] r off
# r [keycode] r on
# r rate [delay [rate]]
# For screen-saver control:
# s [timeout [cycle]] s default s on
# s blank s noblank s off
# s expose s noexpose
# s activate s reset
# For status information: q
...and here is what the "xset s 0 0 s off s noblank s noexpose -dpms"
line did:
s 0 0 # s [timeout [cycle]]: set timeout and cycle to zero
s off # set screen-saver control to off
s noblank # set screen-saver control to noblank
s noexpose # set screen-saver control to noexpose
-dpms # set control Energy Star (DPMS) features -dpms Energy Star
features to off
That last one '-dpms' may indicate an error when accessing your Pi
headless from within PuTTY shell on a remote laptop or terminal, because
the server does not load the DPMS Extension when it has no HDMI monitor
to handshake. Not to worry should you see an error message, it's
harmless and just indicates no HDMI or energy star monitor was attached
when booted up. Truncate the -dpms switch option should you find the ''
xset: unable to open display "localhost:12.0" '' message error when
DPMS (Energy Star):
Server does not have the DPMS Extension.
Type 'xset q' to see the damage:P(tongue in cheek) er... status information:
root@Pi:/etc/X11/xinit# xset q
Keyboard Control:
auto repeat: on key click percent: 0 LED mask: 00000000
XKB indicators:
00: Caps Lock: off 01: Num Lock: off 02: Scroll Lock: off
03: Shift Lock: off 04: Group 2: off 05: Mouse Keys: off
auto repeat delay: 500 repeat rate: 31
auto repeating keys: 00ffffffdffffbbf
fadfffdfffdfe5ef
ffffffffffffffff
ffffffffffffffff
bell percent: 50 bell pitch: 400 bell duration: 100
Pointer Control:
acceleration: 2/1 threshold: 4
Screen Saver:
prefer blanking: no allow exposures: no
timeout: 0 cycle: 0
Colors:
default colormap: 0x20 BlackPixel: 0x0 WhitePixel: 0xffffff
Font Path:
built-ins
Bug Mode: compatibility mode is disabled
DPMS (Energy Star):
Server does not have the DPMS Extension
root@Pi:/etc/X11/xinit#
Of course you don't need to lock Screen Blanking Disable out of every
startx by editing xinitrc to include
xset s 0 0 s off s noblank s noexpose -dpms
and just type it on a command line before invoking startx per
non-blanking session.
And just in case all that above makes it sound more difficult than it
actually was, all I did was type
xset s 0 0 s off s noblank s noexpose -dpms
at a command prompt, and make it stick by placing that line in an init
file.
Yet to go: Cold booting directly into Iceweasle full-screen without
requiring an [F11] key -press
-------Synopsis----------
I'd Rather Hack's blog
http://idratherhack.blogspot.com/2011/09/disable-screen-blanking-in-linux-how.html
did a great job pointing me in the right direction, and to get me
started, but was missing
/etc/X11/xinit/xinitrc as the location of the key file nor did it
mention that screen saver cycle was an extra space zero value
immediately after the timeout value , nor that there could be a
different result if shelling in over Ethernet versus the native console.
In other words I'm not just parroting I'd Rather Hack to steal his
glory, but rather contributing my two cents of experience and spreading
the word of success here on c.s.r-pi.
He also mentions these three console-centric commands:
setterm -blank 0
setterm -powerdown 0
setterm -powersave 0
which I didn't invoke, and yet my weather and traffic pages successfully
burn on through the night!
--
- better to learn by mistakes of others, - Wiz.
- erroneous examples as provided, - Wiz.
- than to learn by mistakes made for oneself. - Wiz.
- A bakers dozen out of 12 Wizards agree: "And far less painful. - Wiz."
visit —(o=8>
http://disneywizard.com <8=o)— visit
p.s. Please be gentle with your replies, as this is my very fiirst
[SOLVED] post on news:comp.sys.raspberry-pi .