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