Power button to Raspberry Pi 5 not working through NVMe case

I’ve just installed my Raspberry Pi 5 into the NVMe case (PIM771) It’s a perfect fit - except the power button isn’t working. It depresses OK but the power light doesn’t go out and Home Assistant is still running. Any suggestions please?

Are you running a desktop version? In this case you need to press two times. The power light will never go off, it stays red.

Thanks bablokb; yes I have a desktop version of HA and also the app. The power light on my Raspberry PI is green - I’ve tried pressing it twice but unfortunately that doesn’t make any difference.

When you are logged in on the desktop and press the button once, does the shutdown selection screen pop up?

Another thing to be aware of: how long did you wait after pressing the power button (twice)? I have a system running Proxmox and it takes about three minutes to shut down. If you shut down from the menu, you should get an idea on how long it normally takes on your system.

It could of course be a mechanical problem. In this case you could solder a connector to the header next to the USB-C and attach your own button there.

In fact, I did not connect this to a button, but to a Pico-W for remote controlling the state via a simple web-server running on the Pico-W.

Yes, from the desktop I get the shutdown selection and it works fine - the green power button on the Pi turns red. Unplugging and replugging brings HA back quickly. But the power button doesn’t work - a single press, a double press, and a long hold, all with no result.

And yes, I waited a good 3 minutes.

Of course if I ever need to I can shut down from the desktop or app, but then not really sure what the point is of having the power button?

So to summarize: the button works mechanically, since it triggers the shutdown selection. But pressing it a second time does nothing. Correct? This would then be a software issue, since it is expected that the power button always creates the same low level key-event (typically EV_KEY with code KEY_POWER). The second key-event is handled by the shutdown selection program. Unless it looses focus directly after popping up.

So does HA use the normal PiOS as a basis, or does it have it’s own OS? And even if it uses PiOS, does it change the configuration? There are various places where key-events are handled, eg. in systemd-logind or via configurations in .config/wayfire.ini.

If you take the Pi out of the case, and press the button does it work? It may not be the case, it may be the actual button / switch on the Pi that’s not working.

I don’t think Home Assistant OS supports use of the RPi power button by default - there’s some info in this post:

If you need to shutdown Home Assistant you should be doing that via the option in the web interface or app really, not just by cutting the power. Database corruption can really ruin your day :)

HI Bablokb, thanks for your detailed response. This is above my pay grade but my friendly AI said "It turns out Home Assistant runs its own custom OS (HAOS) rather than PiOS, so there’s no desktop environment, no Wayfire, and no systemd-logind listening for key events in the normal way. That explains why the power button does nothing — HAOS simply isn’t set up to handle it. Not a fault, just how it works." I can shut down cleanly through the HA interface or app anyway, so no real issue. Thanks again!

Good idea, tried that but still no reponse, see explanation below.

Thanks Hal, all true. I’ll just use the app or desktop if a shutdown is needed.