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.

Revisions

  1. satori99 created this gist Mar 18, 2018.
    30 changes: 30 additions & 0 deletions hdmioff.service
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    # 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