Turning off the screen saver – Easy way
An easy way to achieve this is to install xscreensaver then configure it to disable (its also the Raspberry Pi recommended way)
sudo apt-get install xscreensaver
Then in the GUI go to Preferences > Screensaver > Display Modes > Select disable screen saver from the dropdown.
Turning off the console screen saver – Raspbian Buster
Ciew the current setting in seconds:
cat /sys/module/kernel/parameters/consoleblank
To disable the screensaver:
sudo nano /boot/cmdline.txt
Add the following line to the file:
consoleblank=0
Turning off the screen saver – Raspbian Jesse
Edit the autostart file
For the standard Pi user:
sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart
For the root Pi user (if running the GUI with “sudo startx” for instance when running apps that access the IO pins):
sudo nano /root/.config/lxsession/LXDE-pi/autostart
If the above doesn’t work, then there is not a per user file so edit the global one:
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
The above has changed in that really annoying way that happens all to often with Linux versions, but seems to be the current file that needs to be edited. It used to be these but they no longer seem to work with the latest version of raspbian:
sudo nano /etc/xdg/lxsession/LXDE/autostart
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
Comment out the screensaver line, e.g.:
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
#@xscreensaver -no-splash
@sh ${HOME}/.config/lxsession/LXDE-pi/autokey.sh
Then add these lines:
#Disable screensaver:
@xset s noblank
@xset s off
@xset -dpms
Press CTRL+X to save and exit.
Now edit config
sudo nano /etc/kbd/config
Find the following lines and set the values accordingly:
BLANK_TIME=0
BLANK_DPMS=off
POWERDOWN_TIME=0
12 months ago
When will this work with Wayland?