Switch On/Off the HDMI port in Raspberry Pi 3

Sometime we need to switch Off or On the HDMI port on our Raspberry Pi 3.

Check the status of the HDMI port

To check the status of the HDMI port we can use the tvservice with parameter -s. Type:

If the HDMI port is OFF the output will be:

If the HDMI port is ON the output will be something similar to:

Switch On or Off the HDMI port

To switch On the HDMI port we will invoke the tvservice with parameter -p:

The output will be:

To switch Off the HDMI port we will invoke the tvservice with parameter -o:

The output will be:

Switch Off HDMI on boot

To switch Off the HDMI port on every boot, you have to edit your /etc/rc.local. I will use nano to edit the file:

Now, add the following line above the exit 0.

Switching Off HDMI on boot can save about 30mA of current.

 

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *