I have read on this blog that you can reduce power consumption:


By disabling the HDMI port.

He says that I should add this line:

/usr/bin/tvservice -o

to /etc/rc.local

But I don't know where and how, my /etc/rc.local file is like this:

_IP= || true
if [ "" ]; then
  printf "My IP address is %s\n" ""

# disable console blanking on PiTFT
sudo sh -c "TERM=linux setterm -blank 0 >/dev/tty0"

exit 0

Where to add this line, and would it work?

  • Try adding t after sudo sh -c "TERM=linux setterm -blank 0 >/dev/tty0" and before exit 0 Jul 3, 2017 at 17:20
  • @SteveRobillard should I just add it like that, or should I add sudo prefix before it as well? Jul 3, 2017 at 17:21
  • did the tutorial have sudo? if not then no. Jul 3, 2017 at 17:22
  • The sudo in the previous line is also redundant - /etc/rc.local is executed by/as root (or possibly the kernel) before other users are even considered... OTOH /etc/local is an SysV init thing - does it still get considered/run if systemd is run as the first process as "Jessie" and later ("Stretch" is out on Debian has it made it to Raspbian yet?) uses that by default - although if you are a SysV init hold-out like me you may not know/care...! 8-)
    – SlySven
    Jul 7, 2017 at 0:48

1 Answer 1


You need to add:

/usr/bin/tvservice -o

between these two lines:

sudo sh -c "TERM=linux setterm -blank 0 >/dev/tty0"

exit 0

To reenable HDMI change this line:

/usr/bin/tvservice -o


/usr/bin/tvservice -p

Note: for these lines to take effect will require a reboot.

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.