Is there a command line prompt to disable sleep? Or is there a file I can access on the Raspberry Pi to change?

  • What do you want to stop sleeping?
    – joan
    Nov 30, 2017 at 18:03

1 Answer 1


Force the screen to stay on:

From an SSH session in PuttySSH or a terminal session on the Raspberry Pi itself:

$ sudo nano /etc/lightdm/lightdm.conf

Add the following lines to the [SeatDefaults] section:

# don't sleep the screen
xserver-command=X -s 0 dpms

CTRL+x to exit, Y to save then enter to accept the filename

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.