whateverandever
Posts: 10
Joined: Tue Oct 01, 2019 10:52 pm

Pi 4 won't boot (fully) without HDMI plugged in

Tue Oct 01, 2019 11:15 pm

I just installed "2019-09-26-raspbian-buster-full" on my new Raspberry Pi 4 and enabled VNC and SSH. When I went to make it headless, with only the power and LAN cables, I couldn't VNC into it. After a lot of diagnosing, I realized that it's just not booting until I plug the HDMI cable into it. If I plug it in without HDMI, and then plug in the HDMI 5 minutes later, it's still on the 4 raspberries screen, and then it starts the desktop.

My RP3 never had this issue, it always easily worked headless.

Any help will be much appreciated.
Last edited by whateverandever on Sat Oct 05, 2019 3:54 pm, edited 1 time in total.

whateverandever
Posts: 10
Joined: Tue Oct 01, 2019 10:52 pm

Re: RP4 won't boot without HDMI plugged in

Sat Oct 05, 2019 3:52 pm

Can somebody please help?

The freshly installed Raspberry Pi 4 just won't boot unless HDMI is plugged in. I've re-flashed the SD card and the same problem persists.

If, after plugging in, I plug the HDMI cable into the right output, the 4 berries show up on screen and the Pi continues booting. But if no HDMI is ever plugged in, the Pi just doesn't load the desktop.

I bought this Pi to use as my home server and now I can't do anything with it because of this problem. I don't know what to do. The Pi 3 never had this problem, it worked as a headless server just fine.

Please somebody help.

User avatar
davidcoton
Posts: 6141
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Pi 4 won't boot without HDMI plugged in

Sat Oct 05, 2019 3:58 pm

A few minutes searching finds this:
Adding hdmi_force_hotplug=1 to /boot/config.txt seems to have solved the problem. The Pi4 is running headless,
Source here.
Location: 345th cell on the right of the 210th row of L2 cache

klricks
Posts: 7738
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Pi 4 won't boot without HDMI plugged in

Sat Oct 05, 2019 7:50 pm

Use sudo raspi-config to set a forced screen resolution. (Choose anything other than monitor default).

The reason is that by default (RPi4), if no screen is connected at boot then a display device is not created. Without a display device the GUI desktop does not start so any program that requires GUI will not start. Other RPi models did not have that issue because they would fall back to composite mode if no HDMI was connected. The RPi4 has composite mode disabled by default so no display device is created.
Setting a resolution mode with raspi-config or the GUI config tool or manual edits to config.txt as mentioned above, will force a display device on boot even without the HDMI connected as long as you don't choose the monitor default setting.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

whateverandever
Posts: 10
Joined: Tue Oct 01, 2019 10:52 pm

Re: Pi 4 won't boot without HDMI plugged in

Sun Oct 06, 2019 12:40 am

klricks wrote:
Sat Oct 05, 2019 7:50 pm
Use sudo raspi-config to set a forced screen resolution. (Choose anything other than monitor default).

The reason is that by default (RPi4), if no screen is connected at boot then a display device is not created. Without a display device the GUI desktop does not start so any program that requires GUI will not start. Other RPi models did not have that issue because they would fall back to composite mode if no HDMI was connected. The RPi4 has composite mode disabled by default so no display device is created.
Setting a resolution mode with raspi-config or the GUI config tool or manual edits to config.txt as mentioned above, will force a display device on boot even without the HDMI connected as long as you don't choose the monitor default setting.

Thank you so much, this was the solution. I really appreciate the detailed explanation that you gave, and I was able to fix it using the raspi-config resolution section.

whateverandever
Posts: 10
Joined: Tue Oct 01, 2019 10:52 pm

Re: Pi 4 won't boot without HDMI plugged in

Sun Oct 06, 2019 12:41 am

davidcoton wrote:
Sat Oct 05, 2019 3:58 pm
A few minutes searching finds this:
Adding hdmi_force_hotplug=1 to /boot/config.txt seems to have solved the problem. The Pi4 is running headless,
Source here.
Thank you for your help. I searched for hours but couldn't find the relevant info, mainly because most information was for previous versions of the Pi.

User avatar
Gavinmc42
Posts: 5487
Joined: Wed Aug 28, 2013 3:31 am

Re: Pi 4 won't boot without HDMI plugged in

Sun Oct 06, 2019 2:04 am

If this is not done would remote VNC have no Desktop too?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
CypherOz
Posts: 48
Joined: Fri Jul 05, 2019 1:46 pm

Re: Pi 4 won't boot without HDMI plugged in

Sun Oct 06, 2019 10:49 am

Gavinmc42 wrote:
Sun Oct 06, 2019 2:04 am
If this is not done would remote VNC have no Desktop too?
VNC seems to work; I also have this set to force a video setting (/boot/config.txt)

Code: Select all

# uncomment to force a specific HDMI mode (this will force 1080p)
hdmi_group=2
hdmi_mode=82
See: https://www.raspberrypi.org/documentati ... t/video.md
--
Regards, Kym
Retired software bloke from Adelaide, South Australia

whateverandever
Posts: 10
Joined: Tue Oct 01, 2019 10:52 pm

Re: Pi 4 won't boot without HDMI plugged in

Tue Oct 08, 2019 8:30 pm

Gavinmc42 wrote:
Sun Oct 06, 2019 2:04 am
If this is not done would remote VNC have no Desktop too?
VNC indeed doesn't work, that's how my problem started. I usually install raspbian on my Pi and then make it headless right afterwards, because I do everything through VNC. But it just wasn't working on my new Pi 4, because of this problem. VNC would connect, but then give a blank screen with an error message (I forget what the wording of the message is).

I'm honestly surprised this issue isn't a common complaint from new Pi 4 owners. It should be among the "raspbian won't boot" stickied thread, or another stickied thread.

Anyways, thankfully I finally got the help of users who replied to this post, and told me how to fix it above.

krzysp
Posts: 1
Joined: Mon Dec 23, 2019 6:25 pm

Re: Pi 4 won't boot without HDMI plugged in

Mon Dec 23, 2019 6:28 pm

When you see message in vnc, just login by ssh and type command:
sudo startx

After X server activation you should see the desktop by VNC

Daniel_Hrncir
Posts: 1
Joined: Sun Jan 19, 2020 1:15 pm

Re: Pi 4 won't boot without HDMI plugged in

Sun Jan 19, 2020 1:36 pm

krzysp wrote:
Mon Dec 23, 2019 6:28 pm
When you see message in vnc, just login by ssh and type command:
sudo startx

After X server activation you should see the desktop by VNC

Thats right, but only if the system recognized a display. If not, startx wont help you ;)

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 6214
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Pi 4 won't boot without HDMI plugged in

Sun Jan 19, 2020 4:16 pm

For any Pi, using Raspbian and RealVNC, and that may be required to run headless (ie. without a display temporarily or "permanently") I strongly suggest that use is made of the RealVNC server's virtual mode. FWIW, I have posted several examples here:
https://www.cpmspectrepi.uk/raspberry_p ... uster.html
I have also found that the server's -geometry option to be of some value eg. look for something like

Code: Select all

vncserver -geometry 1200x675
in the PuTTY SSH terminal on the LHS of the screenshots
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's & P400. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

ejolson
Posts: 7108
Joined: Tue Mar 18, 2014 11:47 am

Re: Pi 4 won't boot without HDMI plugged in

Sun Jan 19, 2020 4:23 pm

FTrevorGowen wrote:
Sun Jan 19, 2020 4:16 pm
For any Pi, using Raspbian and RealVNC, and that may be required to run headless (ie. without a display temporarily or "permanently") I strongly suggest that use is made of the RealVNC server's virtual mode. FWIW, I have posted several examples here:
https://www.cpmspectrepi.uk/raspberry_p ... uster.html
I have also found that the server's -geometry option to be of some value eg. look for something like

Code: Select all

vncserver -geometry 1200x675
in the PuTTY SSH terminal on the LHS of the screenshots
Trev.
Doesn't virtual mode incur a significant performance loss when running any 3D graphics code including Minecraft?

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 6214
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Pi 4 won't boot without HDMI plugged in

Sun Jan 19, 2020 5:07 pm

ejolson wrote:
Sun Jan 19, 2020 4:23 pm
FTrevorGowen wrote:
Sun Jan 19, 2020 4:16 pm
For any Pi, using Raspbian and RealVNC, and that may be required to run headless (ie. without a display temporarily or "permanently") I strongly suggest that use is made of the RealVNC server's virtual mode. FWIW, I have posted several examples here:
https://www.cpmspectrepi.uk/raspberry_p ... uster.html
I have also found that the server's -geometry option to be of some value eg. look for something like

Code: Select all

vncserver -geometry 1200x675
in the PuTTY SSH terminal on the LHS of the screenshots
Trev.
Doesn't virtual mode incur a significant performance loss when running any 3D graphics code including Minecraft?
Sorry, I have never run Minecraft on anything (although my daughters have, but not on a Pi) so can't comment about any performance loss that may occur. TBH, apart from basic tests of VNC on older Pi's, I've only found VNC methods useful since the arrival of the P4's (coupled with a house move the previous year) since I'm now using the HDMI inputs of a 24" TV** for two of them (one has a camera connected and thus is "never headless") and a third, normally headless, for testing GPIO controlled circuits. It's the latter I usually VNC into. to take screenshots etc. to include in the wiki I run on the "first" (the one I'm writing this post with now :) ) and subsequently export my webpages from. (Previously the wiki was run on a headless P2B pi and I used a 3-port HDMI switch wihich requires external power****).
Trev.
** It's VGA input is used for a Gigabyte Brix.
**** https://www.cpmspectrepi.uk/raspberry_p ... tcher.html
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's & P400. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Gortsch
Posts: 1
Joined: Sun Feb 07, 2021 8:20 pm

Re: Pi 4 won't boot without HDMI plugged in

Sun Feb 07, 2021 8:23 pm

Hi there,
I did register for this forum just to say thanks and let you know that the fix helped me with my RPI 3B too.

So maybe this solution can be useful for other models as well. I am using raspeeian (January 2021 release) with an Raspberry Pi model 3B.

Thanks again.

Sjonnie
Posts: 9
Joined: Thu Jan 07, 2016 7:11 pm

Re: Pi 4 won't boot without HDMI plugged in

Sun Mar 14, 2021 1:54 pm

klricks wrote:
Sat Oct 05, 2019 7:50 pm
Use sudo raspi-config to set a forced screen resolution. (Choose anything other than monitor default).

The reason is that by default (RPi4), if no screen is connected at boot then a display device is not created. Without a display device the GUI desktop does not start so any program that requires GUI will not start. Other RPi models did not have that issue because they would fall back to composite mode if no HDMI was connected. The RPi4 has composite mode disabled by default so no display device is created.
Setting a resolution mode with raspi-config or the GUI config tool or manual edits to config.txt as mentioned above, will force a display device on boot even without the HDMI connected as long as you don't choose the monitor default setting.
Thank you for this elegant solution and thorough explanation. Had the same problem and your solution fixed my issue. Kudos!

Greetz,

Sjonnie

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13896
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Pi 4 won't boot (fully) without HDMI plugged in

Sun Mar 14, 2021 2:50 pm

If the PI does not find a monitor at startup, it won't reserve memory for a screen buffer, to circumvent this just force the creation of a screen buffer by firing the "detection" of a virtual monitor.

Return to “Troubleshooting”