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 – Steve Robillard Jul 3 '17 at 17:20
  • @SteveRobillard should I just add it like that, or should I add sudo prefix before it as well? – AmateurElectronics Jul 3 '17 at 17:21
  • did the tutorial have sudo? if not then no. – Steve Robillard Jul 3 '17 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 '17 at 0:48

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, privacy policy and cookie policy

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