stop screen from blanking

Can we stop the screen from blanking due to inactivity?
I tried installing xscreensaver but the deamon wouldn’t run from root.

Want to use this for an arcade cabinet and want to keep the screen from turning off.

I agree. This can be frustrating… especially when attempting to monitor a fully automated install with no keyboard attached. (I have a bluetooth keyboard that doesn’t activate until the end of my install 45-55 minutes later…)

I believe that this issue is further upstream in the kernel (framebuffer module is my guess), though.

There may be a config.txt or module parameter setting that can be changed, though. I’ll take a peak into the settings and see.

BTW, which board are you using?

I think I found what you’re looking for. Check out this post: https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=18200

basically, edit /etc/kbd/config
and set
BLANK_TIME=0
POWERDOWN_TIME=0

then reboot or /etc/init.d/kbd restart

I’m at work right now, so I haven’t tested this yet. I’ll do some preliminary testing tonight. I don’t think that it’s a good idea to make this a default change, but, perhaps set it during dietpi-software installs then reset it before the reboots…

Just to add to Rhkean’s post. You can disable the powersaving option on the current screen with:

setterm -blank 0 -powersave off

But if you want a system-wide and reboot proof method, check Rhkean’s post above.

Dan,
Do you think there would be an issue with adding this to the dietpi-software automated install logic?
like, around line dietpi-software:4630, if we are entering automation, disable screen blanking until next reboot…

-rob

Thanks guys!
I’ll be using rpi2/3 boards.

I’ll give it a try tonight!

Hi,

hmm, if you will do, please only for RPi. It may work (not tested), but not on all other devices.

root@Odroid-C2:~# setterm -blank 0 -powersave off
setterm: terminal xterm does not support --blank
setterm: cannot (un)set powersave mode: Unpassender IOCTL (I/O-Control) für das Gerät

Good idea Rob, never thought of it. I think it would be best placed at the start and inside of Run_Installations function. I’ve created a Git ticket for this, your more than welcome to add this in if you like :slight_smile:
https://github.com/Fourdee/DietPi/issues/277

This will only affect the main screen. Does not get applied to SSH sessions. We could probably redirect stdout to prevent the warning from appearing.