13

I've found that my Raspberry Pi2's HDMI port only works if there's something attached to it when the RPi initially boots. If it boots with nothing attached, and I later attach a monitor, nothing shows up on the monitor.

My application is headless, but occasionally I want to attach a monitor to do debugging, and in those cases having to reboot the RPi risks losing debugging information.

How do I configure the RPi to either keep the HDMI port "turned on" even when nothing's connected, or continuously poll the HDMI port and enable the driver when it finds something there?

  • 2
    what debug info can't you get via SSH? – Steve Robillard Jan 6 '16 at 17:38
  • 1
    @SteveRobillard, Info about why SSH/Wifi/LAN isn't working :) – Cerin Jan 7 '16 at 0:48
6

To /boot/config.txt add:

hdmi_force_hotplug=1

You will have to reboot to make that effective (this applies to anything in config.txt), but the display should work now if you plug it in after boot. However, the resolution may not be set as correctly as it is when booted with the screen attached. To ensure that, set an explicit mode as explained here.

| improve this answer | |
  • This requires a reboot ... – flakeshake Apr 25 '17 at 11:46
  • @flakeshake Which is why the last paragraph begins, "You will have to reboot to make that effective..." The monitor does not have to be attached at the time, however. – goldilocks Apr 25 '17 at 12:08
6

Try

tvservice --explicit="DMT 35 HDMI"

This powers on HDMI explicitly with "DMT mode 35" which is 60 HZ at 1280x1024 pixels.

There is also tvservice --off if you've got enough.

For more information try both

tvservice --help and looking here for a tabular listing of modes.

| improve this answer | |
0

For me, with an "ACER V233H" LCD Monitor connecting with a DVI to HDMI converter to My RPi3, I had to set a few variables in the /boot/config.txt to make the "HDMI Force Hotplug" work with "1024x768 XGA 60Hz":

hdmi_force_hotplug=1
hdmi_group=1
hdmi_mode=16
hdmi_drive=1
| improve this answer | |

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.