PINE64
Guide to power off the Pinephone on low battery - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: General Discussion on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=127)
+--- Thread: Guide to power off the Pinephone on low battery (/showthread.php?tid=15969)



Guide to power off the Pinephone on low battery - Ulfnic - 02-04-2022

I wrote a low-power-off BASH script for the Pinephone and Pinephone Pro to help prevent over-discharge by forcing a power-off below a certain capacity.

It loops through all power sources the kernel is aware of and enforces a minimum capacity rule that powers off the system if a battery is below a certain threshold (default: 5%) and not charging.

It just needs something to run it every minute. I've included a Systemd setup guide but OpenRC (PostmarketOS), chron, ect will work just as well.

Guide here: https://discourse.destinationlinux.network/t/a-guide-to-power-off-the-pinephone-on-low-battery/4789

Enjoy Smile


RE: Guide to power off the Pinephone on low battery - Ulfnic - 02-06-2022

OpenRC guide now included.