Button shutdown not detecting a press
Posted: Thu Dec 04, 2025 8:03 pm
I have tried my best to find an answer to this problem, but can't find it. I recently acquired a used G2 and upon arrival the microSD in the G2 appeared to be corrupted. Luckily inside of the unit was a backup microSD which does work but shutdown via the power button does not work. I ran the script manually that waits for the button state to change, but it has no effect. The previous owner had upgraded the pi to 5 and it's running the bookworm OS.
Also, the power button originally stayed white. I ran the script that fixes that, and that works. Now when the pi is running, it turns red and turns white when the pi has shutdown. Since the button is not shutting down the pi, I have been shutting it down using the shutdown command.
Any clues as to why the power button shutdown script doesn't work? It is running and waiting for a button state change that it never detects.
Also, the power button originally stayed white. I ran the script that fixes that, and that works. Now when the pi is running, it turns red and turns white when the pi has shutdown. Since the button is not shutting down the pi, I have been shutting it down using the shutdown command.
Any clues as to why the power button shutdown script doesn't work? It is running and waiting for a button state change that it never detects.