Create a gist now

Instantly share code, notes, and snippets.

@quelleck /rpi-hdmi.sh forked from AGWA/rpi-hdmi.sh
Last active Dec 5, 2017

Embed
Enable and disable the HDMI port on the Raspberry Pi: `rpi-hdmi on` to turn on, `rpi-hdmi off` to turn off.
#!/bin/sh
# Enable and disable HDMI output on the Raspberry Pi
is_off ()
{
vcgencmd display_power | grep "display_power=0" >/dev/null
}
case $1 in
off)
if is_off
then
echo Already off...
else
vcgencmd display_power 0
fi
;;
on)
if is_off
then
vcgencmd display_power 1
else
echo Already on...
fi
;;
status)
if is_off
then
echo off
else
echo on
fi
;;
*)
echo "Usage: $0 on|off|status" >&2
exit 2
;;
esac
exit 0
@fiveseven808

This comment has been minimized.

Show comment
Hide comment
@fiveseven808

fiveseven808 Apr 28, 2017

This one is definitely an improvement! thank you for this!

This one is definitely an improvement! thank you for this!

@sebaacuna

This comment has been minimized.

Show comment
Hide comment
@sebaacuna

sebaacuna Oct 14, 2017

Worked for me, thanks!

Worked for me, thanks!

@ksolomon

This comment has been minimized.

Show comment
Hide comment
@ksolomon

ksolomon Oct 31, 2017

Thanks! This is exactly what I was looking for to use on a build for my son. :)

Thanks! This is exactly what I was looking for to use on a build for my son. :)

@joenas

This comment has been minimized.

Show comment
Hide comment
@joenas

joenas Nov 14, 2017

This is awesome! I have one issue though. I'm using Chromium in kiosk mode on my Pi and after turning the screen on again it's just dark. I've found a script to refresh the page but to no avail. Has anyone else had this problem?

joenas commented Nov 14, 2017

This is awesome! I have one issue though. I'm using Chromium in kiosk mode on my Pi and after turning the screen on again it's just dark. I've found a script to refresh the page but to no avail. Has anyone else had this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment