How to Disable the Blank Screen on Raspberry Pi (Raspbian)

Here are two techniques to disable the blank screen on the Raspberry Pi. By default the screen is blanked after around 10/15 minutes if no user input (mouse or keyboard) is detected.

I successfully tested both methods with a Raspberry Pi 2 + latest Raspbian Jessie (v4.1) + 7-inch touchscreen display.

1 – Disabling the blank screen once

You can disable the blank screen once with the following command line instructions:

$ sudo xset s off
$ sudo xset -dpms
$ sudo xset s noblank

xset s off disable the screen saver, xset -dpms disables the DPMS (Display Power Management Signaling) and xset s noblank tells to X server to not blank the video device.


2 – Disabling the blank screen forever

Update (2018/12/26)
It looks like this method no longer works with recent version of Raspbian. See section 3 for alternative techniques.

If you want to disable the blank screen at every startup, just update the /etc/lightdm/lightdm.conf file and add in the [SeatDefaults] section the following command:

xserver-command=X -s 0 -dpms

You need root rights to update the lightdm.conf file. You can use the nano editor:

$ sudo nano /etc/lightdm/lightdm.conf


3 – Other Techniques with Recent Versions of Raspbian

Here are some techniques I found but I didn’t tested them yet.

3.1 – Install xscreensaver

xscreensaver is a screen saver utility for X Windows. Run the following command to install it:

$ sudo apt-get install xscreensaver

Once installed, go to Preferences option in the main desktop menu. You should find the screen saver application. Launch it and search for the option to disable it completely.


3.2 – Updating LXDE-pi/autostart

In root mode, edit the following file: /home/pi/.config/lxsession/LXDE-pi/autostart and add the following lines:

@xset s off
@xset -dpms 
@xset s noblank

These lines are the same than section 1. This technique should be persistant.

6 thoughts on “How to Disable the Blank Screen on Raspberry Pi (Raspbian)”

  1. debrucer

    You are correct in that method two no longer works with the Buster release. We are running five boards and attempted to upgrade from Stretch to Buster, but only two upgrades were successful. On the two successful upgrades the #2 method continued to work. This was setup previously. On three new installations, after installing xscreensaver, there was no folder or “autostart” file. The #3 method does not work. I am still fiddling with things, but, this much I understand – none of your techniques work with Buster.

  2. ulrich

    In my case all this did not work on Raspberry pi 4. So I installed the Screensaver and switched it off in the menue “Settings”/”Screensaver”. Here is how to install it:

    sudo apt-get install xscreensaver

Leave a Comment

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