I am working on the raspberry pi3 wrote the following code under sudo nano ~/.config/lxsession/LXDE-pi/autostart 00 12 **** /usr/bin/vgencmd display_power 0 I know in terminal display_power 0 turns off the hdmi and the monitor then just needs to be turned off manually. Am I entering this code correctly so the display turns off at a certain time in this case it is set for noon. Any comments or suggestions is appreciated.

  • What are you asking? Oct 13, 2017 at 17:40
  • What is the question, are you wanting to turn the HDMI off / on at certain times of the day?
    – Dr.Rabbit
    Oct 13, 2017 at 20:04

1 Answer 1


Turn on / off via Cronjob

If you want to turn the hdmi off and on at certain times you can do it via crontab.

crontab -e

add these two lines down the bottom

#on at 6am off at 6pm
0 6 * * * /usr/bin/python /home/pi/hdmi_on.sh
0 18 * * * /usr/bin/python /home/pi/hdmi_off.sh

create two files and remember to chmod +x both files



tvservice -o



sudo tvservice -p
sudo chvt 1
sudo chvt 7

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.