Project

General

Profile

Support #982

Automated Display Power Saving on a Raspberry Pi

Added by Daniel Curtis 4 days ago. Updated 4 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Workstation
Target version:
Start date:
06/27/2025
Due date:
% Done:

100%

Estimated time:
0.50 h

Description

This is a guide on using systemd timers to automatically turn on and off an HDMI display at specified times.

Setup the Timers

Display Off Timer

  • Create a service file to turn off the display:
    sudo nano /etc/systemd/system/display-off.service
    
    • Add the following:
      [Service]
      ExecStart=/usr/bin/vcgencmd display_power 0
      
  • Create a timer file to turn off the display:
    sudo nano /etc/systemd/system/display-off.timer
    
    • Add the following:
      [Unit]
      Description=Run display power off at 10pm Everyday
      
      [Timer]
      OnCalendar=*-*-* 22:00:00 
      
      [Install]
      WantedBy=timers.target
      

Display On Timer

  • Create a service file to turn on the display:
    sudo nano /etc/systemd/system/display-on.service
    
    • Add the following:
      [Service]
      ExecStart=/usr/bin/vcgencmd display_power 1
      
  • Create a timer file to turn off the display:
    sudo nano /etc/systemd/system/display-off.timer
    
    • Add the following:
      [Unit]
      Description=Run display power on at 7am Everyday
      
      [Timer]
      OnCalendar=*-*-* 07:00:00 
      
      [Install]
      WantedBy=timers.target
      
  • Reload systemd, then start and enable both timers:
    sudo systemctl daemon-reload
    sudo systemctl enable display-off.timer
    sudo systemctl enable display-on.timer
    sudo systemctl start display-off.timer
    sudo systemctl start display-on.timer
    
  • Verify the timer is added to the timers list:
    sudo systemctl list-timers
    

Resources

#1

Updated by Daniel Curtis 4 days ago

  • Description updated (diff)
#2

Updated by Daniel Curtis 4 days ago

  • % Done changed from 0 to 100
  • Status changed from New to Resolved
#3

Updated by Daniel Curtis 4 days ago

  • Description updated (diff)

Also available in: Atom PDF