https://bugs.kde.org/show_bug.cgi?id=462617
Jakob Petsovits <jpe...@petsovits.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|WAITINGFORINFO |--- Status|NEEDSINFO |CONFIRMED --- Comment #4 from Jakob Petsovits <jpe...@petsovits.com> --- (In reply to Natalie Clarius from comment #3) > Jakob, where did you find that information? It seems to conflict with the > source I linked, is one of them outdated? The source you linked says: > If the system has no battery, it would be hibernated after HibernateDelaySec= > has passed. If not set, then defaults to "2h". > > If the system has battery and HibernateDelaySec= is not set, low-battery > alarms (ACPI _BTP) are tried first for detecting battery percentage and wake > up the system for hibernation. > If not available, or HibernateDelaySec= is set, the system would regularly > wake up to check the time and detect the battery percentage/discharging rate. > The rate is used to schedule the next detection. > If that is also not available, SuspendEstimationSec= is used as last resort. This is basically pseudo-code. Let's interpret it in order of paragraphs: 1. The system has a battery. Therefore, the first paragraph is skipped, HibernateDelaySec remains empty and does not default to "2h". 2. The system has a battery and HibernateDelaySec is not set. Systemd will try ACPI_BTP, or as a fallback, regular wake-ups, or as a last-resort fallback, SuspendEstimationSec. So "2h" is not used at all. To be fair, the systemd documentation requires us to interpret paragraph spacing to come to this conclusion. That's a little ambiguous, do I double-checked in the source itself and confirmed my interpretation: https://github.com/systemd/systemd/blob/bf39626d610628771dee20fb4322d2fc400a46be/src/sleep/sleep.c#L379 Indeed, the DEFAULT_HIBERNATE_DELAY_USEC_NO_BATTERY ("2h") constant is only used in this no-battery condition, and sleep_config->hibernate_delay_usec defaults to infinity. So the user *can* configure a particular time for hibernating, but by default is tries hard to target the 5% remaining charge. -- You are receiving this mail because: You are watching all bug changes.