Using GPIO 3 (wake) for power on/off switch

I tried already w/o success.

With regards to troubleshooting…
It’s confirmed that the button is working mechanically and electrically, means

  • I can boot Raspi
  • I can turn on/off automatic mode when enabled

But can I activate a log that shows when the button was triggered? Or is there anything else that can be monitored when the GPIO 3 and 17 are put to ground and that will trigger the shutdown?

Issue solved.

Root cause: service systemd-logind.service was not running.

# systemctl status systemd-logind.service
● systemd-logind.service
     Loaded: masked (Reason: Unit systemd-logind.service is masked.)
     Active: inactive (dead)

Nice to hear you finally got it working. Was just about to go hunt up some rpi.gpio code I use for shutdown on one of my headless builds. It occurred to me that it could also be used to check if the pin was a high or low. My brains a little slow some days due to pain meds etc.

Do you know how to mark this issue as solved?

There should be a icon marked solved down by the Like heart. It will be visible to you as its your thread.