Sense HAT and Raspberry Pi 4 (headless) do not start — the solution

A post from the category “You never stop learning”. I always like to play with my Sense HAT and it was already connected to headless Raspberry Pis. This has worked without problems so far. Now I connected the HAT to my Raspberry Pi 4 last night and it did not start.

Sense HAT shines in all colors — but nothing else is happening.

If you normally power on the Raspberry Pi with the Sense HAT connected, it will light up in all possible colors for a short time. But this is only for a short time and the LEDs go dark. In the end this is a good sign, because you can assume that a headless Raspberry Pi now starts.

In my case the LEDs were still lit. Even after about a minute nothing happened and then I slowly became skeptical. Especially as I could not ping the Pi either. Most of my devices get a fixed IP address via the DHCP server and I always know how to reach them. But if they do not start at all, this of course is difficult.

The solution was found relatively quickly and as so often in the excellent forum of raspberypi.org:

This is the only way to get it working!
If no screen is connected, you have to force HDMI.

You could have figured out by yourself that when you plug a Sense HAT into the Raspberry Pi 4 you have to force HDMI on, right? 🙄

How do I force HDMI?

Remove the microSD card from the Pi 4 and plug it into a computer where you can access it. I still need an SD adapter for my Laptop. That should be the case for most of them, but the microSD cards are usually shipped with such an adapter by default.

On the partition boot you will find a file called config.txt. Open it with the text editor of your choice. Great is that the necessary line is already present in my Raspbian Buster installation, but commented out. So all I have to do is remove the # and that’s it. Basically you are telling the system to use the line: hdmi_force_hotplug=1

It looks like this:

hdmi_force_hotplug=1 and an Raspberry Pi 4 headless will start with a Sense Hat attached to it
hdmi_force_hotplug=1 and an Raspberry Pi 4 headless will start with a Sense Hat attached to it

Save the file and put the microSD card back into your Pi 4, now try to start the device with the sense HAT connected. Well, it worked for me.

Raspberry Pi 4 now runs without problems with the Sense HAT - even headless
Raspberry Pi 4 now runs without problems with the Sense HAT – even headless

It’s always easy if you know what to do, right?

By the way, the temperature display will be more accurate if you remove the Sense HAT further away from the heat of the Pi-board with a ribbon cable.

What else can you do with a Raspberry Pi 4? Build a VPN router with it!

Leave a Reply

Your email address will not be published. Required fields are marked *