114

I have a Raspberry Pi running Raspbmc connected through HDMI to a dumb HDTV. (Does not support HDMI-CEC).

If I power on both the TV (both at source and display through remote) and Raspbmc at the same time then it all works fine.

If I power on the Raspbmc and TV, but the TV display is not turned on. Sometime later I use the TV remote to power on the TV display, then I get a blank display on TV through HDMI. This is not the screensaver because using a XBMC remote does not change anything. The Raspbmc is active though, because I can ping it and connect to it using SSH.

Is there a setting in Raspbmc I can change so that it always turns on HDMI, no matter if the TV display is on or off?

Alex Chamberlain
  • 15,530
  • 14
  • 67
  • 113
Ashwin Nanjappa
  • 1,335
  • 2
  • 11
  • 10
  • 6
    This is regular behaviour; the Raspberry Pi can only drive EITHER the RCA analogue out, or HDMI, but not both at once. The presence of an RCA output cannot be checked electronically, so the default is to check HDMI, then resort to RCA if no HDMI device was found. – Alexander Oct 12 '12 at 01:34
  • 1
    This is not working with a Philips tv. –  Jun 08 '13 at 19:04
  • Related - https://raspberrypi.stackexchange.com/questions/40164/how-do-i-get-rca-video-out-of-openelec-libreelec/40265#40265 – slm Aug 21 '18 at 03:07

2 Answers2

122

Add these two lines to /boot/config.txt and reboot Raspbmc:

hdmi_force_hotplug=1
hdmi_drive=2

hdmi_force_hotplug=1 sets the Raspbmc to use HDMI mode even if no HDMI monitor is detected. hdmi_drive=2 sets the Raspbmc to normal HDMI mode (Sound will be sent if supported and enabled). Without this line, the Raspbmc would switch to DVI (with no audio) mode by default.

Ashwin Nanjappa
  • 1,335
  • 2
  • 11
  • 10
Dennis Williamson
  • 1,689
  • 3
  • 13
  • 11
  • 9
    config.txt is read by the GPU so it will work on every distro. – Jivings Oct 11 '12 at 18:38
  • 7
    Dennis Williamson: Thanks, that worked. But audio was not working. I fixed it by adding hdmi_drive=2 – Ashwin Nanjappa Oct 13 '12 at 01:56
  • Thank you, that works well. However when I switch on the monitor it is flickering - it seems to change between 1024 and 1920 resolution about 5 times a second. – ESP32 May 04 '16 at 08:34
  • 1
    @Gerfried: Take a look here. – Dennis Williamson May 04 '16 at 13:01
  • This did not work for me. I uncommented those two lines mentioned in the answer and rebooted my pi. There is absolutely nothing on the monitor. I keeps switching to the PiTFT display not the monitor through HDMI. – ThN Jul 21 '16 at 19:11
  • @ThN: I don't know the answer to your problem, but it may be that the configuration that enables the PiTFT is taking precedence. Look in /boot/config.txt, /boot/cmdline.txt and at files in /etc/X11/xorg.conf.d/. Also, look in /home/pi/.profile to see what the setting for FRAMEBUFFER is. Also, check other questions and answers here concerning the PiTFT. – Dennis Williamson Jul 21 '16 at 19:47
  • Does hdmi_force_hotplug increase the power usage of the RPI? if so, anyone knows how much? – Roman Gaufman Jun 01 '17 at 11:01
  • @RomanGaufman: I seriously doubt that it would, but you should start a new question to ask that. – Dennis Williamson Jun 01 '17 at 16:02
  • After fighting with a cheap splitter for 2 days, I'm glad to say this is the only thing that helped. I also had to set hdmi_mode and hdmi_group, but I can live with that. – Melllvar Jul 12 '19 at 04:16
3

Although this question is very old, I would like to post my answer that I found recently. I am running Raspberry PI 2 Model B with 2.8 PiTFT capactive display. Once I figured out how to get my pitft display to work with Raspberry PI, I could not get Raspberry PI to switch over to HDMI output no matter what I did. Then, I came across this information, which worked for me.

There's two ways to do it. In older Pi installs, use the fb0 framebuffer when you want to display stuff on the HDMI/TV display, for example: FRAMEBUFFER=/dev/fb0 startx will use the HDMI/TV framebuffer for X windows instead of the PiTFT

On Jessie Pi installs, run sudo nano /usr/share/X11/xorg.conf.d/99-fbdev.conf to edit the configuration file and make sure it contains:

Section "Device"
  Identifier "display"
  Driver "fbdev"
  Option "fbdev" "/dev/fb0"
EndSection

change the Option "fbdev" "/dev/fb0" line to Option "fbdev" "/dev/fb1" if you want the xdisplay on the PiTFT or fb1 to fb0 for HDMI output.

Update: If don't see the code above in the file, then simply copy and paste what is shown in this answer at the bottom of that file. If you can't find 99-fbdev.conf file in that folder, then there is probably another file with different name like 10-evdev.conf in the same folder which you will have to modify to make it work as described above.

ThN
  • 1,063
  • 6
  • 22
  • 35