Posts: 12
Joined: Mon Jan 09, 2017 3:40 pm

Turn off HDMI

Mon Jan 09, 2017 3:54 pm

Using: rPi 3 B Pixel
I have found two commands that will turn off my HDMI:

vcgencmd display_power 0
tvservice -o

Both must be restarted with similar command, 1 and -p (with chvt 6 & 7) respectively.
Neither of these will restore the HDMI via a keyboard or mouse movement.

Is there a command that I can use to blank the screen, turning off the backlight, that can be restored with a keyboard entry or mouse movement?

The use is a weather monitor that shuts off the display overnight and turns it on in the morning. While either of the above command works from crontab it would be nice to be able to start the display if need before the turn on command runs in the morning.
ANY input would be appreciated.
Thanks Den

W. H. Heydt
Posts: 15395
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Turn off HDMI

Mon Jan 09, 2017 6:06 pm

Whether or not the backlight turns off is--generally speaking--a function of the display. You can set the Pi to blank the screen after a set period of inactivity. Do a search on various efforts to disable that feature and how to keep it active and adjust the interval should be pretty obvious. The Pi should then wake up the display on any keyboard input or mouse movement.

Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: Turn off HDMI

Mon Jan 09, 2017 6:41 pm

After turning off HDMI with tvservice -o, get it back with tvservice -p && fbset -depth 8 && fbset -depth 16. That depth 16 may better be depth 24 on Pixel, and you may need an xrefresh too.

Posts: 1
Joined: Tue Feb 13, 2018 12:27 pm

Re: Turn off HDMI

Sun Feb 09, 2020 10:55 pm

I used a 7-inch waveshare screen with a switch on the back of the screen.
I removed the switch and used a transistor as a key and used the gpio pins to help
then create a program In the Red Node environment, I managed to
create a script to turn off the screen and disable the HDMI port at the specified time,
but touch is enable it and turn it on if the screen is touched again.

Return to “Beginners”