20

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)...

  • Do you get an error from xset or does nothing happen? Also what distro? If it doesn't work I would guess ACPI is not compiled into the kernel. As a diagnostic, please post the output of xset q. Thanks. – Jivings Oct 9 '12 at 17:14
  • @Jivings: no error, the screen goes static-ish. Before I disabled the blanking, the screen would actually go blank (not sure if it went into power save mode). I am using 2012-09-18-wheezy-raspbian with software/firmware updates/upgrades. – shaun5 Oct 9 '12 at 17:58
  • Okay. Can you edit your question with the output of xset q? – Jivings Oct 9 '12 at 22:07
  • @jivings sorry I was out of town, but back and updated the question with the info you requested. – shaun5 Oct 15 '12 at 17:40
  • At the bottom it says DPMS is disabled. Turn it on: xset +dpms then your commands should work... – Jivings Oct 16 '12 at 7:02
9

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.

| improve this answer | |
2

Dispelling wrong paths

First, virtually all modern displays support sleep modes. Also, xset dpms force off (or other ways to tell the X server) is the correct way (under X) to turn off monitors. I've used that for years without a hitch.

Second, the mention DPMS is Disabled only comes from your xset -dpms. As soon as you issue xset dpms force off or other DPMS-related xset option, it gets re-enabled, so it is normal that you get the same result with or without xset +dpms.

Hypothesis

Now, you wrote that you see "static". This display supports traditional Analog TV signals, right ?

One hypothesis is that the TV, instead of going to sleep, actually switches to Analog TV, and as there's no signal, it shows what is usually called "static".

Test that hypothesis

Here's an option to try. Try once to plug another display, ideally one that does not support Analog TV. See if that display goes to sleep on xset dpms force off. If yes, then the setup is okay on the Pi side.

Try variants

Perhaps the other video states will instruct the TV to stay on the right channel but with reduction in power usage. Instead of xset dpms force off, try these:

xset dpms force standby
xset dpms force suspend

And see if one of those produces what you need. Wait at least 10 seconds after each try to see what it does. Pressing any key on the Pi keyboard will resume the display (remotely you can use xset dpms force on).

Get to production

If one of the variants above does what you need, then fine, please share!

If not and you really need to use the original display, see in the menus if you can somehow disable Analog TV features.

Please share what you learned from these tries.

| improve this answer | |
1

Won't vbetool works?

Suspend screen (physically says the monitor to go to standby mode): vbetool dpms suspend Resume (exits standby mode): vbetool dpms on

| improve this answer | |
  • 1
    vbetool is x86-only, I think. Thus won't help for ARM – Renan Nov 9 '12 at 16:53
0

You can turn on and off the HDMI itself.

  • HDMI on: /opt/vc/bin/tvservice -p

  • HDMI off: /opt/vc/bin/tvservice -o

More details on tvservice binary:

# dpkg -S /opt/vc/bin/tvservice
libraspberrypi-bin: /opt/vc/bin/tvservice

# dpkg -s libraspberrypi-bin
Package: libraspberrypi-bin
Maintainer: Serge Schneider <serge@raspberrypi.org>
Description: Miscellaneous Raspberry Pi utilities
 This package contains various utilities for interacting with the Raspberry
 Pi's VideoCore IV.
Homepage: https://github.com/raspberrypi/firmware

# /opt/vc/bin/tvservice
Usage: tvservice [OPTION]...
  -p, --preferred                   Power on HDMI with preferred settings
  -e, --explicit="GROUP MODE DRIVE" Power on HDMI with explicit GROUP (CEA, DMT, CEA_3D_SBS, CEA_3D_TB, CEA_3D_FP, CEA_3D_FS)
                                      MODE (see --modes) and DRIVE (HDMI, DVI)
  -t, --ntsc                        Use NTSC frequency for HDMI mode (e.g. 59.94Hz rather than 60Hz)
  -c, --sdtvon="MODE ASPECT [P]"    Power on SDTV with MODE (PAL or NTSC) and ASPECT (4:3 14:9 or 16:9) Add P for progressive
  -o, --off                         Power off the display
  -m, --modes=GROUP                 Get supported modes for GROUP (CEA, DMT)
  -M, --monitor                     Monitor HDMI events
  -s, --status                      Get HDMI status
  -a, --audio                       Get supported audio information
  -d, --dumpedid <filename>         Dump EDID information to file
  -j, --json                        Use JSON format for --modes output
  -n, --name                        Print the device ID from EDID
  -h, --help                        Print this information
| improve this answer | |
-2

(you read articles posted by people who had no experience, trying to sell you a different OS or cover up lack of energy star from a china device, or and didn't read the source code - all of which are not suggested reading materials).

xset s on ; OR ; xset +dpms

you CANNOT do both unless you want blanking issues (such as wake up). both do the same job a slightly different - they DO interfere with each other. (RedHat linux is famous for mis-instructing people on that and shipping many distros with both turned on by default, so is debian)

when you use "xset dpms force off ; sleep 2" you have to sleep so it doesn't wake up by your pressing Enter (assuming your doing this using your keyboard not a script)

as far as HDMI i'm unsure if Energy Star is part of the HDMI 1.0-2.x specification. but if it 1/2 worked then perhaps it is.

linux and freeBSD are nifty but if your not "part of a large team" it's impractical to think it can run your home entertainment center (controlling media equipment doing hardware specific things like Energy Star, true hardware mpeg playback support (TV), etc). they do have libs and initiatives and examples of working devices - but these things are short lived (you have to use same OS and same device known good, or "good luck")

| improve this answer | |

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.