Ubuntu 22.04: hibernate laptop on critically low battery level

edit /etc/Upower/Upowerc.conf and set

UsePercentageForPolicy=true
PercentageLow=20
PercentageCritical=8
PercentageAction=5
CriticalPowerAction=Hibernate

Now, restart the upower systemd unit:

systemctl restart upower

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.