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">
7 This file is part of systemd.
9 Copyright 2013 Zbigniew Jędrzejewski-Szmek
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.
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.
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/>.
25 <refentry id="systemd-sleep.conf"
26 xmlns:xi="http://www.w3.org/2001/XInclude">
28 <title>systemd-sleep.conf</title>
29 <productname>systemd</productname>
33 <contrib>Developer</contrib>
34 <firstname>Zbigniew</firstname>
35 <surname>Jędrzejewski-Szmek</surname>
36 <email>zbyszek@in.waw.pl</email>
42 <refentrytitle>systemd-sleep.conf</refentrytitle>
43 <manvolnum>5</manvolnum>
47 <refname>systemd-sleep.conf</refname>
48 <refname>sleep.conf.d</refname>
49 <refpurpose>Suspend and hibernation configuration file</refpurpose>
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>
60 <title>Description</title>
62 <para><command>systemd</command> supports three general
63 power-saving modes:</para>
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.
80 <term>hibernate</term>
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.
93 <term>hybrid-sleep</term>
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.
106 <para>Settings in these files determine what strings
108 <filename>/sys/power/disk</filename> and
109 <filename>/sys/power/state</filename> by
110 <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>
112 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
113 attempts to suspend or hibernate the machine.</para>
116 <xi:include href="standard-conf.xml" xpointer="confd" />
117 <xi:include href="standard-conf.xml" xpointer="conf" />
120 <title>Options</title>
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>
127 <variablelist class='systemd-directives'>
129 <term><varname>SuspendMode=</varname></term>
130 <term><varname>HibernateMode=</varname></term>
131 <term><varname>HybridSleepMode=</varname></term>
133 <listitem><para>The string to be written to
134 <filename>/sys/power/disk</filename> by,
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.
147 <term><varname>SuspendState=</varname></term>
148 <term><varname>HibernateState=</varname></term>
149 <term><varname>HybridSleepState=</varname></term>
151 <listitem><para>The string to be written to
152 <filename>/sys/power/state</filename> by,
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.
167 <title>Example: freeze</title>
169 <para>Example: to exploit the <quote>freeze</quote> mode added
170 in Linux 3.9, one can use <command>systemctl suspend</command>
172 <programlisting>[Sleep]
173 SuspendState=freeze</programlisting></para>
177 <title>See Also</title>
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>