Skip to content

Instantly share code, notes, and snippets.

@satori99
Created March 18, 2018 23:46
Show Gist options
  • Save satori99/630302d617f2f55f432dc5297b96f20e to your computer and use it in GitHub Desktop.
Save satori99/630302d617f2f55f432dc5297b96f20e to your computer and use it in GitHub Desktop.
Raspberry Pi - HDMI Off Service
# Raspberry Pi - HDMI Off Service
#
# This is a systemd one shot service to disable (power off) the HDMI port
# on a raspberry pi at boot to save a tiny amount of power (30mw)
#
# save this file as `/etc/systemd/system/hdmioff.service`, then run the
# following commands:
#
# $ sudo systemctl enable hdmioff.service
# $ sudo systemctl start hdmioff.service
#
# running the command:
#
# $ sudo systemctl status hdmioff.service
#
# will display `tvservice[345]: Powering off HDMI` if it worked
#
[Unit]
Description=HDMI Power Off
[Service]
Type=oneshot
ExecStart=/usr/bin/tvservice -o
RemainAfterExit=true
ExecStop=/usr/bin/tvservice -p
StandardOutput=journal
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment