Stop Raspberry Pi screen blanking

Having now got my Raspberry Pi to boot directly to the desktop I am now finding that the screen goes blank after a few minutes. This really isn’t helpful as I have no keyboard or mouse attached to get the screen back.

As I set the Raspberry Pi to boot to the desktop, as per my previous post, I will now be using the lightdm desktop manager. Therefore, all I need to do is change a setting in this to stop the screen blanking.

Please note, if you are booting to the command prompt this won’t work and you’ll need to change some settings for kbd instead.

From a terminal run the following command to edit the lightdm configuration file:
sudo nano /etc/lightdm/lightdm.conf

Under section [SeatDefault] add the following line:
xserver-command=X -s 0 dpms

You now just need to reboot your Pi and you should find that the screen doesn’t go blank.

Leave a Reply

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