Raspberry Pi 5 power switch not working

Raspberry Pi 5 power switch not working, on other OS pressing the green power light issue the shutdown command however on dietpi nothing happens

Any idea or pointers on how to fix this?

At power up it always just powers up the same as every previous Raspberry Pi. Once powered up and running Linux it appears to the operating system as a normal key providing the KEY_POWER scan code. /etc/systemctl/logind.conf can be used to define what happens ‘automatically’ and on the lite image it’ll say just shut down (i.e. one click to immediately shut down). On the desktop image, the keystroke is captured by the shutdown dialog, it gets displayed on the first click and if you click again will shutdown.

https://www.raspberrypi.com/news/introducing-raspberry-pi-5/

So you would need to define your own action

Single pressing the power button in the non desktop version of the OS does nothing.

Armbian and raspberry pi OS booth issue a shutdown command upon a single button press.

I will go grab version details and any required logs to help fault find the issue.

As of now (April 2025), the power button behavior is handled by the firmware and systemd, and there’s no official config option to remap or customize it deeply. However, it:

  • Triggers systemd-logind for shutdown
apt install dbus
systemctl unmask systemd-logind
systemctl enable systemd-logind
systemctl start systemd-logind

Power butting should be working now.

I get this


systemctl enable systemd-logind

**The unit files have no installation config (WantedBy=, RequiredBy=, Also=,**

**Alias= settings in the [Install] section, and DefaultInstance= for template**

**units). This means they are not meant to be enabled using systemctl.**

**Possible reasons for having this kind of units are:**

**• A unit may be statically enabled by being symlinked from another unit's**

**.wants/ or .requires/ directory.**

**• A unit's purpose may be to act as a helper for some other unit which has**

**a requirement dependency on it.**

**• A unit may be started when needed via activation (socket, path, timer,**

**D-Bus, udev, scripted systemctl call, ...).**

**• In case of template units, the unit is meant to be enabled with some**

**instance name specified.**

root@DietPi:~#

but it works

all as expected