diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-07-29 16:03:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-29 16:03:54 +0200 |
commit | df38212dd1af342321257188ee63738c82b6392a (patch) | |
tree | 5007cd6672f6220985c0b29532118c2592c0a271 | |
parent | 07e324af437a1744a73a0d07c3d0a73e5022b21d (diff) | |
parent | a077755abf6ecca7f801d306e363d7581150e23f (diff) | |
download | systemd-df38212dd1af342321257188ee63738c82b6392a.tar.gz |
Merge pull request #13212 from poettering/sleep-conf-default
sleep: document default HibernateDelaySec=
-rw-r--r-- | TODO | 15 | ||||
-rw-r--r-- | man/systemd-sleep.conf.xml | 9 | ||||
-rw-r--r-- | src/shared/sleep-config.c | 2 |
3 files changed, 20 insertions, 6 deletions
@@ -19,6 +19,21 @@ Janitorial Clean-ups: Features: +* beef up s2h to implement a battery watch loop: instead of entering + hibernation unconditionally after coming back from resume make a decision + based on the battery load level: if battery level is above a specific + threshold, go to suspend again, only hibernate if below it. This means we'd + stick to suspend usually, but fall back to hibernation only when battery runs + empty (well, subject to our sampling interval). Related to this, check if we + can make ACPI _BTP (i.e. /sys/class/power_supply/*/alarm) work for us too, + i.e. see if it can wake up machines from suspend, so that we could resume + automatically when the system is low on power and move automatically to + hibernation mode. (see + https://uefi.org/sites/default/files/resources/ACPI%206_2_A_Sept29.pdf + section 10.2.2.8 and + https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby-wake-sources + at the end). + * add an explicit "vertical" mode to format-table, so that "systemctl status"-like outputs (i.e. with a series of field names left and values right) become genuine first class citizens, and we gain automatic, sane JSON diff --git a/man/systemd-sleep.conf.xml b/man/systemd-sleep.conf.xml index 3311a046ca..a6949b0c3b 100644 --- a/man/systemd-sleep.conf.xml +++ b/man/systemd-sleep.conf.xml @@ -168,11 +168,10 @@ <varlistentry> <term><varname>HibernateDelaySec=</varname></term> - <listitem><para>The amount of time in seconds - that will pass before the system is automatically - put into hibernate when using - <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. - </para></listitem> + <listitem><para>The amount of time the system spends in suspend mode before the system is + automatically put into hibernate mode, when using + <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. Defaults + to 2h.</para></listitem> </varlistentry> </variablelist> </refsect1> diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c index f3c54f5ca1..26ed4776b9 100644 --- a/src/shared/sleep-config.c +++ b/src/shared/sleep-config.c @@ -82,7 +82,7 @@ int parse_sleep_config(SleepConfig **ret_sleep_config) { if (!sc->hybrid_states) sc->hybrid_states = strv_new("disk"); if (sc->hibernate_delay_sec == 0) - sc->hibernate_delay_sec = 180 * USEC_PER_MINUTE; + sc->hibernate_delay_sec = 2 * USEC_PER_HOUR; /* ensure values set for all required fields */ if (!sc->suspend_states || !sc->hibernate_modes |