Support #982
Automated Display Power Saving on a Raspberry Pi
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
- Add the following:
- 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
- Add the following:
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
- Add the following:
- 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
- Add the following:
- 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¶
Updated by Daniel Curtis 4 days ago
- % Done changed from 0 to 100
- Status changed from New to Resolved