How to put the HDMI display into (and out of) power save mode

monitorsraspberry piscreensaverxorg

I am using a Raspberry Pi to run an information display in an office. I want the display in power save mode when outside of business hours. I was going to use cron to execute something at the beginning and end of the day, but xset dpms force off doesn't work.

I have disabled the screen saver (so the display stays on during the day) with the addition of xset s off, xset -dpms and xset s noblank in the /etc/xdg/lxsession/LXDE/autostart file.

Here are the results from xset q:

Keyboard Control:
  auto repeat:  on    key click percent:  0    LED mask:  00000000
  XKB indicators:
    00: Caps Lock:   off    01: Num Lock:    off    02: Scroll Lock: off
    03: Compose:     off    04: Kana:        off    05: Sleep:       off
    06: Suspend:     off    07: Mute:        off    08: Misc:        off
    09: Mail:        off    10: Charging:    off    11: Shift Lock:  off
    12: Group 2:     off    13: Mouse Keys:  off
  auto repeat delay:  500    repeat rate:  33
  auto repeating keys:  00ffffffdffffbbf
                        fadfffefffedffff
                        9fffffffffffffff
                        fff7ffffffffffff
  bell percent:  0    bell pitch:  400    bell duration:  100
Pointer Control:
  acceleration:  20/10    threshold:  10
Screen Saver:
  prefer blanking:  no    allow exposures:  yes
  timeout:  0    cycle:  600
Colors:
  default colormap:  0x20    BlackPixel:  0x0    WhitePixel:  0xffff
Font Path:
  built-ins
DPMS (Energy Star):
  Standby: 600    Suspend: 600    Off: 600
  DPMS is Disabled

UPDATE:xset s blank && xset +dpms && xset dpms force off will blank the display, but it doesn't put it in power save mode. After reading a lot of threads, I still can't get the system time correct either (I think that may be a firewall issue)…

Best Answer

This question really belongs back on raspberrypi.stackexchange.com because it's a Raspberry Pi-specific issue: the kernel framebuffer driver for the Raspberry Pi does not support the function that X uses to put the monitor to sleep:

https://github.com/raspberrypi/linux/issues/487

Until this issue is fixed, it won't be possible for X to put the monitor to sleep using DPMS.

You may have some luck with the /opt/vc/bin/tvservice program: tvservice -o powers off HDMI and tvservice -p should power HDMI back on.