]> git.ipfire.org Git - thirdparty/systemd.git/blame_incremental - man/systemd-sleep.conf.xml
tree-wide: beautify remaining copyright statements
[thirdparty/systemd.git] / man / systemd-sleep.conf.xml
... / ...
CommitLineData
1<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5<!--
6 SPDX-License-Identifier: LGPL-2.1+
7
8 Copyright © 2013 Zbigniew Jędrzejewski-Szmek
9-->
10
11<refentry id="systemd-sleep.conf"
12 xmlns:xi="http://www.w3.org/2001/XInclude">
13 <refentryinfo>
14 <title>systemd-sleep.conf</title>
15 <productname>systemd</productname>
16
17 <authorgroup>
18 <author>
19 <contrib>Developer</contrib>
20 <firstname>Zbigniew</firstname>
21 <surname>Jędrzejewski-Szmek</surname>
22 <email>zbyszek@in.waw.pl</email>
23 </author>
24 </authorgroup>
25 </refentryinfo>
26
27 <refmeta>
28 <refentrytitle>systemd-sleep.conf</refentrytitle>
29 <manvolnum>5</manvolnum>
30 </refmeta>
31
32 <refnamediv>
33 <refname>systemd-sleep.conf</refname>
34 <refname>sleep.conf.d</refname>
35 <refpurpose>Suspend and hibernation configuration file</refpurpose>
36 </refnamediv>
37
38 <refsynopsisdiv>
39 <para><filename>/etc/systemd/sleep.conf</filename></para>
40 <para><filename>/etc/systemd/sleep.conf.d/*.conf</filename></para>
41 <para><filename>/run/systemd/sleep.conf.d/*.conf</filename></para>
42 <para><filename>/usr/lib/systemd/sleep.conf.d/*.conf</filename></para>
43 </refsynopsisdiv>
44
45 <refsect1>
46 <title>Description</title>
47
48 <para><command>systemd</command> supports four general
49 power-saving modes:</para>
50
51 <variablelist>
52 <varlistentry>
53 <term>suspend</term>
54
55 <listitem><para>a low-power state
56 where execution of the OS is paused,
57 and complete power loss might result
58 in lost data, and which is fast to
59 enter and exit. This corresponds to
60 suspend, standby, or freeze states as
61 understood by the kernel.
62 </para></listitem>
63 </varlistentry>
64
65 <varlistentry>
66 <term>hibernate</term>
67
68 <listitem><para>a low-power state
69 where execution of the OS is paused,
70 and complete power loss does not
71 result in lost data, and which might
72 be slow to enter and exit. This
73 corresponds to the hibernation as
74 understood by the kernel.
75 </para></listitem>
76 </varlistentry>
77
78 <varlistentry>
79 <term>hybrid-sleep</term>
80
81 <listitem><para>a low-power state
82 where execution of the OS is paused,
83 which might be slow to enter, and on
84 complete power loss does not result in
85 lost data but might be slower to exit
86 in that case. This mode is called
87 suspend-to-both by the kernel.
88 </para></listitem>
89 </varlistentry>
90
91 <varlistentry>
92 <term>suspend-then-hibernate</term>
93
94 <listitem><para>A low power state where the system is initially suspended
95 (the state is stored in RAM). If not interrupted within the delay specified by
96 <command>HibernateDelaySec=</command>, the system will be woken using an RTC
97 alarm and hibernated (the state is then stored on disk).
98 </para></listitem>
99 </varlistentry>
100
101 </variablelist>
102
103 <para>Settings in these files determine what strings
104 will be written to
105 <filename>/sys/power/disk</filename> and
106 <filename>/sys/power/state</filename> by
107 <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>
108 when
109 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
110 attempts to suspend or hibernate the machine.
111 See
112 <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>5</manvolnum></citerefentry>
113 for a general description of the syntax.</para>
114 </refsect1>
115
116 <xi:include href="standard-conf.xml" xpointer="main-conf" />
117
118 <refsect1>
119 <title>Options</title>
120
121 <para>The following options can be configured in the
122 <literal>[Sleep]</literal> section of
123 <filename>/etc/systemd/sleep.conf</filename> or a
124 <filename>sleep.conf.d</filename> file:</para>
125
126 <variablelist class='systemd-directives'>
127 <varlistentry>
128 <term><varname>SuspendMode=</varname></term>
129 <term><varname>HibernateMode=</varname></term>
130 <term><varname>HybridSleepMode=</varname></term>
131
132 <listitem><para>The string to be written to
133 <filename>/sys/power/disk</filename> by,
134 respectively,
135 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
136 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
137 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
138 <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
139 More than one value can be specified by separating
140 multiple values with whitespace. They will be tried
141 in turn, until one is written without error. If
142 neither succeeds, the operation will be aborted.
143 </para></listitem>
144 </varlistentry>
145
146 <varlistentry>
147 <term><varname>SuspendState=</varname></term>
148 <term><varname>HibernateState=</varname></term>
149 <term><varname>HybridSleepState=</varname></term>
150
151 <listitem><para>The string to be written to
152 <filename>/sys/power/state</filename> by,
153 respectively,
154 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
155 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
156 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
157 <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
158 More than one value can be specified by separating
159 multiple values with whitespace. They will be tried
160 in turn, until one is written without error. If
161 neither succeeds, the operation will be aborted.
162 </para></listitem>
163 </varlistentry>
164 <varlistentry>
165 <term><varname>HibernateDelaySec=</varname></term>
166
167 <listitem><para>The amount of time in seconds
168 that will pass before the system is automatically
169 put into hibernate when using
170 <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
171 </para></listitem>
172 </varlistentry>
173 </variablelist>
174 </refsect1>
175
176 <refsect1>
177 <title>Example: freeze</title>
178
179 <para>Example: to exploit the <quote>freeze</quote> mode added
180 in Linux 3.9, one can use <command>systemctl suspend</command>
181 with
182 <programlisting>[Sleep]
183SuspendState=freeze</programlisting></para>
184 </refsect1>
185
186 <refsect1>
187 <title>See Also</title>
188 <para>
189 <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
190 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
191 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
192 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
193 <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
194 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
195 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
196 </para>
197 </refsect1>
198
199</refentry>