So I tried and failed to disable the screensaver and screen blanking within pidora on the Raspberry Pi. I was up against a time target and needed to find a solution.
I needed the screen to stay live, with no screen blanking or screensaver, even when the keyboard and mouse were completely disconnected. I tried a range of settings and all of them failed me within the time available. After aproxommatly 10 minuites, the screen would blank with either a black screen, gray screen, or screensaver depending on the settings in use.
I found some commands would work, however attempts to ensure this was the case after a reboot failed.
Option 1 – Disable the screensaver from within the settings menu
Option 2 – Reconfigure X power saving with .xinitrc
“You may need to install xset, a lightweight application that controls some X settings.”
apt-get install x11-xserver-utils
Now open up your ~/.xinitrc file (if you don’t have one then create it) and enter this:
xset s off # don't activate screensaver
xset -dpms # disable DPMS (Energy Star) features.
xset s noblank # don't blank the video device
Start LXDE
exec /etc/alternatives/x-session-manager
To view your Xsession screen saver setting, use this command (must be used from xterminal)
xset q
Disable text terminals from blanking
change two settings in /etc/kbd/config
BLANK_TIME=0
POWERDOWN_TIME=0
Disable Xsession from blanking
Additional info https://wiki.archlinux.org/index.php/Di … _Signaling
Add these lines to /etc/xdg/lxsession/LXDE/autostart
@xset s noblank
@xset s off
@xset -dpms
Option 3: Simulate Input = The answer…
For me, the easiest answer in the end was to simulate mouse movement. A cop out some may say, but as this pi will never have a keyboard or mouse connected and I wanted the pointer out of the viewable area it also solved moving the pointer from the centre.
I created this file:
#!/bin/bash
# mousemove.sh - R. Jervis - Move the mouse to keep screen alive and force webpage refresh with F5.
sleep 60
while :
do
echo "Test"
xdotool mousemove 30 45
sleep 60
xdotool mousemove 30 55
sleep 60
xdotool click 1
xdotool key F5
done
I then enabled it to run on-boot.