]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd-sleep.conf.xml
man: xinclude the generic text to talk about libsystemd pkgconfig
[thirdparty/systemd.git] / man / systemd-sleep.conf.xml
CommitLineData
3802a3d3 1<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
19adb8a3 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
12b42c76 3"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
19adb8a3
ZJS
4
5<!--
572eb058
ZJS
6 SPDX-License-Identifier: LGPL-2.1+
7
5de0ccff 8 This file is part of systemd.
19adb8a3 9
5de0ccff 10 Copyright 2013 Zbigniew Jędrzejewski-Szmek
19adb8a3
ZJS
11-->
12
778b6a3f
JT
13<refentry id="systemd-sleep.conf"
14 xmlns:xi="http://www.w3.org/2001/XInclude">
19adb8a3
ZJS
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>
778b6a3f 36 <refname>sleep.conf.d</refname>
19adb8a3
ZJS
37 <refpurpose>Suspend and hibernation configuration file</refpurpose>
38 </refnamediv>
39
40 <refsynopsisdiv>
12b42c76
TG
41 <para><filename>/etc/systemd/sleep.conf</filename></para>
42 <para><filename>/etc/systemd/sleep.conf.d/*.conf</filename></para>
778b6a3f 43 <para><filename>/run/systemd/sleep.conf.d/*.conf</filename></para>
12b42c76 44 <para><filename>/usr/lib/systemd/sleep.conf.d/*.conf</filename></para>
19adb8a3
ZJS
45 </refsynopsisdiv>
46
47 <refsect1>
48 <title>Description</title>
49
c58493c0 50 <para><command>systemd</command> supports four general
19adb8a3
ZJS
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>
c58493c0
ML
92
93 <varlistentry>
e68c79db 94 <term>suspend-then-hibernate</term>
c58493c0
ML
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
19adb8a3
ZJS
103 </variablelist>
104
778b6a3f 105 <para>Settings in these files determine what strings
19adb8a3
ZJS
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>
0f943ae4
ZJS
112 attempts to suspend or hibernate the machine.
113 See
114 <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>5</manvolnum></citerefentry>
115 for a general description of the syntax.</para>
19adb8a3
ZJS
116 </refsect1>
117
e93549ef 118 <xi:include href="standard-conf.xml" xpointer="main-conf" />
778b6a3f 119
19adb8a3
ZJS
120 <refsect1>
121 <title>Options</title>
122
123 <para>The following options can be configured in the
124 <literal>[Sleep]</literal> section of
12b42c76 125 <filename>/etc/systemd/sleep.conf</filename> or a
778b6a3f 126 <filename>sleep.conf.d</filename> file:</para>
19adb8a3
ZJS
127
128 <variablelist class='systemd-directives'>
129 <varlistentry>
130 <term><varname>SuspendMode=</varname></term>
131 <term><varname>HibernateMode=</varname></term>
132 <term><varname>HybridSleepMode=</varname></term>
133
134 <listitem><para>The string to be written to
135 <filename>/sys/power/disk</filename> by,
136 respectively,
137 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
c58493c0
ML
138 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
139 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
e68c79db 140 <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
0c722554 141 More than one value can be specified by separating
252094eb 142 multiple values with whitespace. They will be tried
19adb8a3 143 in turn, until one is written without error. If
0c722554 144 neither succeeds, the operation will be aborted.
19adb8a3
ZJS
145 </para></listitem>
146 </varlistentry>
147
148 <varlistentry>
149 <term><varname>SuspendState=</varname></term>
150 <term><varname>HibernateState=</varname></term>
151 <term><varname>HybridSleepState=</varname></term>
152
153 <listitem><para>The string to be written to
154 <filename>/sys/power/state</filename> by,
155 respectively,
156 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
c58493c0
ML
157 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
158 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
e68c79db 159 <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
0c722554 160 More than one value can be specified by separating
252094eb 161 multiple values with whitespace. They will be tried
19adb8a3 162 in turn, until one is written without error. If
0c722554 163 neither succeeds, the operation will be aborted.
19adb8a3
ZJS
164 </para></listitem>
165 </varlistentry>
c58493c0
ML
166 <varlistentry>
167 <term><varname>HibernateDelaySec=</varname></term>
168
169 <listitem><para>The amount of time in seconds
170 that will pass before the system is automatically
171 put into hibernate when using
e68c79db 172 <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
c58493c0
ML
173 </para></listitem>
174 </varlistentry>
19adb8a3
ZJS
175 </variablelist>
176 </refsect1>
177
178 <refsect1>
179 <title>Example: freeze</title>
180
181 <para>Example: to exploit the <quote>freeze</quote> mode added
182 in Linux 3.9, one can use <command>systemctl suspend</command>
183 with
9fccdb0f
LP
184 <programlisting>[Sleep]
185SuspendState=freeze</programlisting></para>
19adb8a3
ZJS
186 </refsect1>
187
188 <refsect1>
189 <title>See Also</title>
190 <para>
191 <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
192 <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
193 <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
194 <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
e68c79db 195 <citerefentry><refentrytitle>systemd-suspend-then-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
19adb8a3
ZJS
196 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
197 <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
198 </para>
199 </refsect1>
200
201</refentry>