Turn off HDMI on Pi-Star Image

It is common practice on headless Raspberry Pi computers to turn off the HDMI to save some power. Even without a monitor attached, the HDMI hardware seems to draw ~ 50 ma of current. However, in the interest of saving space in the image, Pi-Star (as distributed) lacks the necessary tvservice command to turn off the HDMI hardware.

This command is part of the Raspberry PI “userland” package, which for some reason is not packaged as a .deb. So you’ll have to grab the code off github, but it is pretty easy. Before starting, make certain that you have expanded the filesystem of your image to fill the SD card.

sudo pistar-expand
sudo reboot

After the reboot, do the following:

rpi-rw
git clone https://github.com/raspberrypi/userland
sudo apt-get install cmake -y
cd userland
./buildme

Add the libraries to the ld.so search patch by creating a file named “userland.conf” in /etc/ld.so.conf.d. In that file add the following line:

/opt/vc/lib

Next, update the ld.so search path:

sudo ldconfig -v

You can now run the tvservice command:

## Status
sudo /opt/vc/bin/tvservice -s
## Turn off HDMI
sudo /opt/vc/bin/tvservice -o

All that is left to be done is to add the HDMI off command to your /etc/rc.local file so that it will run every time the system boots.