Add hdmi on/off at boot to ensure state is kept on reboots

This commit is contained in:
KemoNine 2020-09-06 16:00:49 -04:00
parent 06128f7345
commit 211da755eb

View file

@ -5,6 +5,27 @@ The below comamnds will setup automatic on/off of the monitor connected to the H
The below is setup to turn the display on at ```0600``` and off at ```0000```. Please adjust accordingly.
``` sh
DL_URL=$(curl https://git.kemonine.info/api/v1/repos/PiFrame/piframe-go/releases | jq -r '.[0].assets[] | select(.name == "hdmi") | .browser_download_url')
wget $DL_URL -O /usr/local/bin/pf-hdmi
chmod a+x /usr/local/bin/pf-hdmi
cat > /etc/systemd/system/hdmi-on-off.service <<EOF
[Unit]
Description=Turn screen on / off at boot to ensure state is kept
After=network.target
[Service]
Type=oneshot
User=root
ExecStart=/usr/local/bin/pf-hdmi
TimeoutSec=15
Restart=never
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now hdmi-on-off
cat > /etc/systemd/system/screen-on.timer <<EOF
[Unit]