Preventing Screen Blanking

15 posts
by suran » Fri Jul 13, 2012 5:20 pm

Using Raspbian on my pi to drive a couple 1080p monitors in our NOC (replacing an overpowered i7 box with some video cards in it).

The display is just a webpage that refreshes periodically with monitoring information. Nothing too fancy.

The problem is that after about 30 minutes, the screen goes blank. Seems like a power saver or screen saver of some kind, but I can't figure out how to turn it off.

At boot, we run:
xinit /usr/lib/iceweasel/firefox-bin -P default -url {webpage} -height 1080 -width 1920 &
xset s off -display :0
xset -dpms -display :0
xset s noblank -display :0

Which launches a bare X session with firefox.

in our .xinitrc file, we have:

xset s off # don't activate screensaver
xset -dpms # disable DPMS (Energy Star) features.
xset s noblank # don't blank the video device

(Yes, doing those commands twice in a vain attempt to fix the problem)

I have also, after some googling, tried adding consoleblank=0 to /boot/cmdline.txt:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 consoleblank=0 console=tty1 root=/dev/mmcblk0p3 rootfstype=ext4 elevator=noop rootwait

No joy. The monitor goes black after 30 minutes.

So, a couple questions:
*How do I prevent the screen blanking from occurring?
*Is there a better way of doing what I want to do (display a web page with no controls on a screen) than launching a fullscreened firefox in an X session?
Posts: 1
Joined: Fri Jul 13, 2012 5:12 pm
by recliq » Sat Jul 14, 2012 1:06 pm
Try adding this to your boot script
Code: Select all
setterm -blank 0 -powersave off -powerdown 0
Posts: 38
Joined: Wed Jun 13, 2012 4:56 pm
by tin » Fri Jul 20, 2012 1:43 pm
Could do with the answer to this too. Lots of searching with little results so far.

I understand the setterm command affects only the text mode console. In any case it doesn't work for me either.
Posts: 2
Joined: Fri Jul 20, 2012 1:17 pm
by wpc » Fri Jul 20, 2012 7:15 pm
FYI - I am having the same problems and it seems to me like it's a screen saver and not DPMS because the monitors don't go to power save mode. I opened a separate email thread but no response on my thread either.
Posts: 4
Joined: Thu Jul 19, 2012 9:30 pm
by wpc » Fri Jul 20, 2012 8:14 pm
I fixed the issue, it has to do with the X server itself starting with DPMS + Screen saver. You need to edit your script that's starting X. In the default build with lightdm the file to edit is


in the SeatDefaults section it gives the command for starting the X server which I modified to get it to turn off the screen saver as well as dpms

xserver-command=X -s 0 -dpms
Posts: 4
Joined: Thu Jul 19, 2012 9:30 pm
by tin » Thu Jul 26, 2012 10:53 am
Worked fantastic for me!

NOC (ish) screen doing it's job very nicely (except that I might replace Midori with Firefox - it blinks a bit too much on refreshes)

Thanks wpc :mrgreen:
Posts: 2
Joined: Fri Jul 20, 2012 1:17 pm
by Maxpi » Thu Aug 16, 2012 9:22 am
Hi all,

I am also having this issue and after much forum searching, Im still struggling:
I have the Raspian image and using the sudo raspi-config command i have it set to boot straight to the GUI Desktop.
I have then edited the following to start Midori with full screen:

Sudo nano ~/etc/xdg/lxsession/LXDE/autostart
@midori -e Fullscreen -a

I have done what you suggested and have added the following to
sudo nano /etc/lightdm/lightdm.conf
Under [Seat Defaults]
xserver-command=X -s 0 dpms

However, my Pi still blanks after 15 mins, do I need to add this to that autostart file?
If so, any ideas how?!

Would appreicate any help you can give!

Posts: 2
Joined: Thu Aug 16, 2012 8:59 am
by tmc4242 » Thu Aug 16, 2012 11:52 pm
I've done basically the same as Maxpi. I'm trying to use an RPi to run an information kiosk. I'm still seeing the screen blanking at 10 minutes.

Any further suggestions would be appreciated.


Posts: 1
Joined: Thu Feb 16, 2012 8:16 am
by Heater » Fri Aug 17, 2012 7:33 am
This does not help with your screen blanking but just a reminder that Google's Chrome browser has a kiosk mode.

$ chromium-browser --kiosk

Full screen no browser controls.
Posts: 6742
Joined: Tue Jul 17, 2012 3:02 pm
by asaeed » Tue Dec 11, 2012 4:22 am
I'm in the same boat as Max and Todd.

- tried the modifying lightdm.conf as Maxpi did.
- tried modifying /etc/X11/xinit/xinitrc with xset commands as Suran did.
- tried modifying ~/.xinitrc

Nothing has worked and I'm blanking after 10 min.

Has anyone found an effective solution to this problem?
Posts: 3
Joined: Tue Dec 11, 2012 4:13 am
by asaeed » Tue Dec 11, 2012 5:23 am
Hah... decided to give it one more try before calling it a night and found this:

Check out piglet's post (4th one down).
So far I've been blanking-free for about 25 min! Fingers crossed.

i really gotta work on my linux skills to be able to deal with these sorts of issues... :oops:
Posts: 3
Joined: Tue Dec 11, 2012 4:13 am
by nreicher » Fri Dec 28, 2012 1:00 am
The screen blanking I am seeing is more in the operation of Screenly as an app. I've only got one Asset, a webpage, and it's setup correctly and functioning ok, except...
It seems that there's a blank page loading in between refreshes. Is this a placeholder page put there as a screen wipe??
Can't see it in the screenly.db
Any leads? Would love to make it go away.

Posts: 5
Joined: Fri Aug 03, 2012 6:31 am
by nreicher » Tue Jan 29, 2013 5:33 am
Solution to MY screen blanking:
(BLACK page inserted on purpose in case of just videos in playlist), edit screenly/, line 251-3. Change:

f = open(fifo, 'a')
f.write('set uri = %s\n' % black_page)


# f = open(fifo, 'a')
# f.write('set uri = %s\n' % black_page)
# f.close()
Posts: 5
Joined: Fri Aug 03, 2012 6:31 am
by dfowler7437 » Wed Feb 20, 2013 11:11 pm
I was thinking of something similar to the described NOC status display. I plan to use the console (no X) with a large font (working now). With the screen saver turned off the screen might end up burned though.

My first thought on this was to invert the screen, Black on White for even hours and White on Black for odd hours, something like that.

Would also be nice to have the ability to let the screen go dark, monitor power save etc.. at non-working hours.

I'm sure the screen inversion can be done with ANSI terminal commands via nurses. Is there a known way to blank/power down the screen? I know the entire screen could be cleared to black but I don’t think that would be nearly as effective as letting the normal system screen saver.
Posts: 7
Joined: Wed Feb 20, 2013 10:01 pm
by -rst- » Fri Feb 22, 2013 6:03 pm
You could look at setting up cron jobs to enable/disable the blanking based on time?

Some more discussion on the blanking here viewtopic.php?f=66&t=18200 - Low-level graphics and 'Coding Gold Dust'
Posts: 1315
Joined: Thu Nov 01, 2012 12:12 pm
Location: Dublin, Ireland