How to set the screen to stay on

Question:

Some customers hope that the display will not go into sleep mode. How to set the screen to stay on the Raspberry Pi?

Solution:

Turn off the screen saver.

1.Open lightdm.conf

sudo nano /etc/lightdm/lightdm.conf


2.Find the code below:

#xserver-command=X

change into:

xserver-command=X -s 0 -dpms

(-s 0 sets the screen saver to disable, -dpms turns off power and energy-saving management)


3.Ctrl + X to exit, Y to confirm, Enter to confirm and exit the editing page


4.It takes effect after restarting:

sudo reboot


PS: Users can also set the closing and opening of the HDMI interface screen through the following commands

Turn off:

vcgencmd display_power 0

Turn on:

vcgencmd display_power 1

Sign In or Register to comment.