mirror of
https://github.com/systemd/systemd.git
synced 2026-07-25 00:35:55 +00:00
Previously, setting HibernateDelaySec= would disable ACPI battery trip point (_BTP) alarms, forcing the system to rely solely on software polling for battery checks. This could result in the battery draining to 0% between polling intervals, causing data loss. Now, when ACPI _BTP is available AND HibernateDelaySec= is set, both mechanisms work together. The system will hibernate on whichever comes first: low battery (instant hardware alarm) or the configured timeout. This also properly respects HibernateOnACPower=no by resetting the timer while on AC power, matching the documented behavior. Fixes: https://github.com/systemd/systemd/issues/26498