Raspberry Pi: Force HDMI – Hotplug

By default, the HDMI output of the Raspberry Pi is only activated if a monitor or a TV is connected and powered up before the Raspberry Pi is started up.

Fortunately, there is an easy fix which will force the Raspberry Pi to turn on the HDMI output, no matter whether a display is connected or not.

In this note i will show how to force the HDMI output on the Raspberry Pi by modifying the HDMI hotplug settings.

Cool Tip: How to wake a Raspberry Pi from sleep! Read more →

Force HDMI Hotplug on Raspberry Pi

To force the Raspberry Pi to turn on the HDMI output, it is required to uncomment some setting in the /boot/config.txt file:

$ sudo nano /boot/config.txt

Set hdmi_force_hotplug to 1 to activate the HDMI output, even if no monitor is detected:

hdmi_force_hotplug=1

To configure the HDMI output format, check the list of HDMI groups and modes here and set the appropriate numbers:

hdmi_group=<number>
hdmi_mode=<number>

For example, set hdmi_group to 1 if the Raspberry Pi is connected to a TV and hdmi_mode to 16 to select the resolution 1080p, frequency 60Hz and the screen aspect 16:9.

hdmi_group=1
hdmi_mode=16

Enable the HDMI sound output:

hdmi_drive=2

After updating the /boot/config.txt file, reboot the Raspberry Pi to apply the changes.

Was it useful? Share this post with the world!

5 Replies to “Raspberry Pi: Force HDMI – Hotplug”

  1. Thank you, just what i needed. Den

  2. Thanks! My Pi was changing to native resolution (4K) each time I turn the monitor and this allowed it to stay at 1920×1080

  3. Since I cannot see what is in the screen, how can I do these commands?

  4. From
    https://raspberrytips.com/change-resolution-raspberry-pi/

    “since Raspberry Pi OS Bullseye, it’s almost the only way to change the screen resolution. The Linux kernel is now in charge of detecting and setting up the resolution, it’s no longer done by the firmware, so options like editing the /boot/config.txt or using raspi-config no longer work.”

    and I have checked,

  5. VNC suddenly stopped working one day. Plex media server set up 2 years ago and never looked at it until this week, Still running version 10 Buster so couldn’t update anything! These uncomments worked beautifully, very grateful. So can now add to my music library.

Leave a Reply