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