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
USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

  1. Kevin Klasmeier

    12 months ago

    When will this work with Wayland?

Comments

Your email address will not be published. Required fields are marked *