On 2023-06-06 I ran a system upgrade on my PinePhone (running Manjaro Phosh)
pacman -Syu. Afterwards, automatic suspend stopped working.
If you are in the lock screen and have the display turned off (this can due to automatic blank screen, or due to manually pressing the power button), then shortly before the automatic suspend timeout, the notification blue LED will light up.
Previously (before the upgrade), if you ignore the notification, after reaching the timeout, the notification will be cleared, and the PinePhone will be suspended. If you turn on the screen before it suspended, it will very briefly show a notification that the phone will be automatically suspended. However the notification will clear itself almost immediately.
After the upgrade, the notification LED stays on, and the phone does not suspend. When the screen is turned on again, it will always display the notification (which will clear itself very quickly). Most notably, because it does not actually suspend, the battery drains itself within a few hours. I’d go to work in the morning (unplugging from the charger at 08:30), arrive back home at 18:00 and the phone has already turned itself off.
gsettings set sm.puri.phosh.notifications wakeup-screen-triggers 
Note that this needs to be run on a terminal on the PinePhone.
It does not work via
For future reference, the original value was
Things we tried and found out before reaching the solution.
- Automatic suspend actually works if the display is turned on and not in the the lock screen.
sudo systemctl suspend- works.
systemctl suspend- works on a terminal on the PP. Does not work via
systemd-inhibit --listgives the following output:
WHO UID USER PID COMM WHAT WHY MODE ModemManager 0 root 3533 ModemManager sleep ModemManager needs to reset devices delay NetworkManager 0 root 3513 NetworkManager sleep NetworkManager needs to turn off networks delay UPower 0 root 3993 upowerd sleep Pause device polling delay eg25manager 0 root 3311 eg25-manager sleep eg25manager needs to prepare modem for sleep delay manjaro 1000 manjaro 3826 phosh handle-power-key Phosh handling power key block manjaro 1000 manjaro 4045 gsd-media-keys handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses block manjaro 1000 manjaro 4045 gsd-media-keys sleep GNOME handling keypresses delay manjaro 1000 manjaro 4046 gsd-power sleep GNOME needs to lock the screen delay manjaro 1000 manjaro 3826 phosh sleep Phosh handling suspend delay 9 inhibitors listed.