I'm using Raspbmc. I'd like the display to actually go to sleep (not simply just screensaver) after 15 minutes, but I can't seem to find any option for that in the settings. Am I missing something?

  • 3
    There are many people in the same boat. raspberrypi.org/phpBB3/viewtopic.php?t=13801 They discuss this issue in detail, and have several fixes. They use the tvservice command, with some work arounds. Have a look, hope it helps. – Impulss Jan 22 '13 at 4:20

Case 1 : for x11 with no auto start X

$ vim ~/.xinitrc

xset s off # don't activate screensaver
xset -dpms # disable DPMS (Energy Star) features.
xset s noblank # don't blank the video device

Case 2 : for X11 with auto start X

Follow the instructions for Case 1, then

$ vim /etc/lightdm/lightdm.conf

xserver-command=X -s 0 -dpms

cd ~/.config
mkdir autostart
cd autostart
vim screensaver.desktop

[Desktop Entry]

Case 3 : bash without X

$ sudo vim /etc/kbd/config


$ sudo /etc/init.d/kbd restart
  • 1
    Hey @Gilles, welcome to RPi.SE. Great answer. It would be even better if you could add a link to your references and/or add some commentary to help beginners along the way. – Alex Chamberlain Aug 30 '13 at 7:14
  • 1
    This just disables the screensaver entirely. How do you set X to use a screensaver after a specific amount of time? – Macil Feb 27 '15 at 7:49

There is an undocumented option in /boot/config.txt that might help you:


Tried and tested under Raspbian "Jessie" (not Raspbmc). The display goes to sleep after about 10 minutes of inactivity. Source: https://github.com/raspberrypi/linux/issues/487

[Note that the Pi itself cannot sleep like grown-up PC-s do.]

  • Here we go again. Someone downvoted this (correct) answer without any explanation. I would like to learn, and a large number of other people on this site would like to learn, too. The downvoter is hereby kindly asked to enlighten us what s/he didn't like about this answer. Thank you. – Laryx Decidua Sep 24 at 14:18

In order to "ENABLE" power management options on Raspbian

GUI version:

sudo apt-get install xscreensaver

(might take a while to install)

You then find the screensaver application in Start > Preferences

Select the first tab Display Modes

Set Mode to "Blank Screen Only"

Set Blank After to "15" minutes"

Select the second tab Advanced

Enable Quick Power-Off in Blank Only Mode

I would recommend to leave Quick Power-Off in Blank Only Mode values for "Standby After, Suspend After and Off After" as default

Please note, that the screensaver daemon might not autostart on reboot

  • I just tried xscreensaver and it's not capable to do anything besides screen blanking. – Dmitry Grigoryev Sep 22 at 22:33

You can install xautolock which runs an arbitrary command as a screen locker. For instance, mine looks like this:

tvservice -o
DISPLAY=:0 xev -geometry 1900x1200 | stdbuf -o0 grep Motion >&-
tvservice -e "CEA 4"

The first line shuts down HDMI signal, making the TV go to sleep. The second line starts the "X event" tool in a window which is bigger than the screen, and waits until "Motion" is reported, that is, when the user moves the mouse inside the window (which is anywhere on the screen). Finally, the third line sets the HDMI mode back to the one I use, which is 1280x720.

xautolock itself is started from lxsession/LXDE-pi/autostart with:

xautolock -time 10 -corners +--- -cornerdelay 5 -noclose -locker bcmsaver

This means that the screen will be locked after 10 minutes, or after 5 seconds if the mouse pointer is "parked" in the top left corner. bcmsaver is the name of locker script above. Depending on how you run xautolock, you may need to specify the full path to the locker script, and use an & to send xautolock to the background.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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