Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

This is a follow up question to: Change output to HDMI after tv has turned off

This solution works partially. I can turn off the TV and turn it on again and get the screen back on my TV. However this does not work in the following case:

Turn on both devices. Let the raspberry stay on the login screen. (Don't log in) Turn off the TV. Wait a few hours. Turn on the TV.

Now the screen is just black. It does not say "No input" as it would when nothing was connected, but the screen stays black, no matter how much I type on the keyboard.

Now, considering that it seems like the TV is receiving something, or that it can at least sense the presence of a device, then the first solution obviously worked. But again, no joy over prolonged periods of time.

Is there a way to fix THIS? :)

share|improve this question

1 Answer 1

Perhaps the console blanking is kicking in.

I tried several suggested methods, but the one that worked for me was to edit /etc/rc.local and add a setterm -blank 0 command:

setterm -blank 0

So the file looks like this afterwards:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# turn off console blanking
setterm -blank 0

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

exit 0

(entire file here to show exactly where I put it)

Essentially, the setterm -blank 0 command sets the terminal blanking period to 0 seconds (off), disabling the blanking which usually occurs. rc.local is executed at the end of the boot process with root privileges so it affects all the physical consoles (the TV & HDMI outputs here)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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