chiark / gitweb /
man: add networkctl(1)
[elogind.git] / man / systemd-sleep.conf.xml
1 <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2 <?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
6 <!--
7 This file is part of systemd.
8
9 Copyright 2013 Zbigniew JÄ™drzejewski-Szmek
10
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU Lesser General Public License as published by
13 the Free Software Foundation; either version 2.1 of the License, or
14 (at your option) any later version.
15
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Lesser General Public License for more details.
20
21 You should have received a copy of the GNU Lesser General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
23 -->
24
25 <refentry id="systemd-sleep.conf"
26           xmlns:xi="http://www.w3.org/2001/XInclude">
27   <refentryinfo>
28     <title>systemd-sleep.conf</title>
29     <productname>systemd</productname>
30
31     <authorgroup>
32       <author>
33         <contrib>Developer</contrib>
34         <firstname>Zbigniew</firstname>
35         <surname>JÄ™drzejewski-Szmek</surname>
36         <email>zbyszek@in.waw.pl</email>
37       </author>
38     </authorgroup>
39   </refentryinfo>
40
41   <refmeta>
42     <refentrytitle>systemd-sleep.conf</refentrytitle>
43     <manvolnum>5</manvolnum>
44   </refmeta>
45
46   <refnamediv>
47     <refname>systemd-sleep.conf</refname>
48     <refname>sleep.conf.d</refname>
49     <refpurpose>Suspend and hibernation configuration file</refpurpose>
50   </refnamediv>
51
52   <refsynopsisdiv>
53     <para><filename>/etc/systemd/sleep.conf</filename></para>
54     <para><filename>/etc/systemd/sleep.conf.d/*.conf</filename></para>
55     <para><filename>/run/systemd/sleep.conf.d/*.conf</filename></para>
56     <para><filename>/usr/lib/systemd/sleep.conf.d/*.conf</filename></para>
57   </refsynopsisdiv>
58
59   <refsect1>
60     <title>Description</title>
61
62     <para><command>systemd</command> supports three general
63     power-saving modes:</para>
64
65     <variablelist>
66       <varlistentry>
67         <term>suspend</term>
68
69         <listitem><para>a low-power state
70         where execution of the OS is paused,
71         and complete power loss might result
72         in lost data, and which is fast to
73         enter and exit. This corresponds to
74         suspend, standby, or freeze states as
75         understood by the kernel.
76         </para></listitem>
77       </varlistentry>
78
79       <varlistentry>
80         <term>hibernate</term>
81
82         <listitem><para>a low-power state
83         where execution of the OS is paused,
84         and complete power loss does not
85         result in lost data, and which might
86         be slow to enter and exit. This
87         corresponds to the hibernation as
88         understood by the kernel.
89         </para></listitem>
90       </varlistentry>
91
92       <varlistentry>
93         <term>hybrid-sleep</term>
94
95         <listitem><para>a low-power state
96         where execution of the OS is paused,
97         which might be slow to enter, and on
98         complete power loss does not result in
99         lost data but might be slower to exit
100         in that case. This mode is called
101         suspend-to-both by the kernel.
102         </para></listitem>
103       </varlistentry>
104     </variablelist>
105
106     <para>Settings in these files determine what strings
107     will be written to
108     <filename>/sys/power/disk</filename> and
109     <filename>/sys/power/state</filename> by
110     <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>
111     when
112     <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
113     attempts to suspend or hibernate the machine.</para>
114   </refsect1>
115
116   <xi:include href="standard-conf.xml" xpointer="confd" />
117   <xi:include href="standard-conf.xml" xpointer="conf" />
118
119   <refsect1>
120     <title>Options</title>
121
122     <para>The following options can be configured in the
123     <literal>[Sleep]</literal> section of
124     <filename>/etc/systemd/sleep.conf</filename> or a
125     <filename>sleep.conf.d</filename> file:</para>
126
127     <variablelist class='systemd-directives'>
128       <varlistentry>
129         <term><varname>SuspendMode=</varname></term>
130         <term><varname>HibernateMode=</varname></term>
131         <term><varname>HybridSleepMode=</varname></term>
132
133         <listitem><para>The string to be written to
134         <filename>/sys/power/disk</filename> by,
135         respectively,
136         <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
137         <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
138         <citerefentry><refentrytitle>systemd-hybrid-sleep.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>, or
156         <citerefentry><refentrytitle>systemd-hybrid-sleep.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     </variablelist>
164   </refsect1>
165
166   <refsect1>
167     <title>Example: freeze</title>
168
169     <para>Example: to exploit the <quote>freeze</quote> mode added
170     in Linux 3.9, one can use <command>systemctl suspend</command>
171     with
172     <programlisting>[Sleep]
173 SuspendState=freeze</programlisting></para>
174   </refsect1>
175
176   <refsect1>
177     <title>See Also</title>
178     <para>
179       <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
180       <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
181       <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
182       <citerefentry><refentrytitle>systemd-hybrid-sleep.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>