Raspberry Pis are great. If you have one, and a spare old monitor, you’ve basically got a public display screen. A bit of clever HTML and Javascript and you can have it displaying virtually anything on a timer or some other conditions. Personally, I have an old 19” monitor in a picture frame on my landing which fades between my favourite photos, but also displays important information when I need to know about it. Things such as when the bin needs to be taken out, or upcoming bank holidays.
There is one thing that hinders me every time I set up a permanently-on Raspberry Pi, and that’s the screen blanker. The Raspberry Pi is quite power-efficient, and that’s partly because it has at least three methods of blanking or turning off the screen after too much non-activity. Simply changing the screensaver setting won’t stop it, there are other things that must be done. This post is basically a list of things you need to do in order to get the Pi to be a public display screen.
The Mouse Cursor
Firstly, as an aside, let’s get rid of that pointer. Really simple, just install unclutter.
sudo apt-get install unclutter
This should hide the mouse pointer if there’s no mouse plugged in, but if it fails, simply typing unclutter at a command prompt should do the job.
Disabling the Screen Blanker
Now the post proper. Firstly, you may need to install the following package
sudo apt-get install x11-xserver-utils
This is nearly always installed already, but it’s always best to check. Next, open ~/.xinitrc
(create it if it doesn’t exist) and append the following lines
xset s off
xset -dpms
xset s noblank
exec /etc/alternatives/x-session-manager
Next, open /etc/xdg/lxsession/LXDE/autostart
(you’ll need sudo to save it). Comment out (add a # to the beginning) the following line
# @xscreensaver -no-splash
And add the following lines to the end of the file
@xset s noblank
@xset s off
@xset -dpms
Now edit the file /etc/kbd/config (again, sudo is needed) and make sure the following options are set as follows
BLANK_TIME=0
BLANK_DPMS=off
POWERDOWN_TIME=0
You’ll need to find these options in the text, they’ll already be there, just set at different values (BLANK_TIME
will probably be set to 30, for example.)
Finally, open the file /etc/lightdm/lightdm.conf
(sudo again), and look for the [SeatDefaults]
section. Within this should be a line (probably commented out) with the option xserver-command. Uncomment it, and change it to read
xserver-command=X -s 0 -dpms
If there is no xserver-command
option, create it. Now, reboot your Pi and it should never power off the screen again.