Putting Raspberry Pi Monitor to Sleep (DPMS)
Fix for a longstanding Raspberry Pi annoyance: Getting the monitor into powersave mode after a period of idle time - turning off the backlight.
Here's a quick tweak that seems to work fine on native HDMI and VGA (via adapter*) monitors. Hopefully helpful to others.
Background: I've played with Linux Power Management commands, utilities, screen savers and such in attempts to get Pi's to turn off (standby) monitors when idle. I recently hit upon a couple of Raspberry Pi config option that seems to do the trick - not really sure when/where it appeared, but it does switch off the HDMI when Display Power Management (DPMS) is triggered, as opposed to simply blanking the screen. Works on Raspbian Stretch & Buster and recently on RaspOS
Fall 2021 Update: Rescued from http://ventures.tpedersen.net/projects/puttingraspberrypimonitortosleepdpms.
In spite of a recent Buster Update ... I STILL manually adjust /boot/config.txt & /boot/cmdline.txt to get HDMI into standby mode. Works on RPI 4 too!
Oct 2018 Step-by-step (Original Post)
The fix involves editing a couple of key configuration files - as always remember to make a backup copies before type-o'ing in these files!
Use sudo to edit files in boot partition *and* be careful!
Edit /boot/config.txt (RPi's main System Config File)
Add the following line to force HDMI output to switched off when DPMS is triggered. This config option was not explicitly defined in my Raspbian (Stretch) config.txt - apparently defaults to 0/off.
I added this line below hdmi_mode in config.txt, but it probably doesn't matter.
See complete details in https://www.raspberrypi.org/documentation/configuration/config-txt/video.md. There are some notes/considerations.
Make sure Screen Savers are installed/configured to take advantage of hdmi_blanking.
For Console Mode (no Desktop UI) set console blanking ...
Check current setting of consoleblank kernel parameter, it sets the inactivity time. It defaults to zero (returns 0)
Edit (sudo) /boot/cmdline.txt to set time in seconds to turn off monitor when Pi is in console mode.
Carefully add the string "consoleblank=<numsec>" to /boot/cmdline.txt - MUST be a single line text file like this:
For Desktop GUI set Display Power Management (DPMS) via screensaver or power manager applications - you may need to install these.
Install Power Manager:
See RPI Screensaver doc @ https://www.raspberrypi.org/documentation/configuration/screensaver.md for complete details.
Reboot and check your work!
As they say in IT - Works for me! Hope it works for others too.
Couple of random notes:
There are some very interesting BIOS-like options in RPi config.txt file.
Also a nice write-up @ https://www.raspberrypi.org/documentation/configuration/config-txt/
An FYI from http://saf.bio.caltech.edu/saving_power.html: "...for an LCD display there is often no difference between standby, suspend, and off"