systemd-sleep.conf.xml revision 252094eb05c58270a0bc35b14ad30a126ddbb3bb
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart PoetteringThis file is part of systemd.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart PoetteringCopyright 2013 Zbigniew Jędrzejewski-Szmek
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poetteringsystemd is free software; you can redistribute it and/or modify it
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poetteringunder the terms of the GNU Lesser General Public License as published by
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poetteringthe Free Software Foundation; either version 2.1 of the License, or
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering(at your option) any later version.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poetteringsystemd is distributed in the hope that it will be useful, but
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart PoetteringWITHOUT ANY WARRANTY; without even the implied warranty of
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart PoetteringMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart PoetteringLesser General Public License for more details.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart PoetteringYou should have received a copy of the GNU Lesser General Public License
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poetteringalong with systemd; If not, see <http://www.gnu.org/licenses/>.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <refentryinfo>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </authorgroup>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </refentryinfo>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <refentrytitle>systemd-sleep.conf</refentrytitle>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <refpurpose>Suspend and hibernation configuration file</refpurpose>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <refsynopsisdiv>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <para><filename>/etc/systemd/sleep.conf</filename></para>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </refsynopsisdiv>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <para><command>systemd</command> supports three general
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering power-saving modes:</para>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <variablelist>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering where execution of the OS is paused,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering and complete power loss might result
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering in lost data, and which is fast to
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering enter and exit. This corresponds to
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering suspend, standby, or freeze states as
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering understood by the kernel.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering where execution of the OS is paused,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering and complete power loss does not
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering result in lost data, and which might
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering be slow to enter and exit. This
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering corresponds to the hibernation as
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering understood by the kernel.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering where execution of the OS is paused,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering which might be slow to enter, and on
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering complete power loss does not result in
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering lost data but might be slower to exit
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering in that case. This mode is called
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering suspend-to-both by the kernel.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </variablelist>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <para>Settings in this file determine what strings
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering will be written to
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering attempts to suspend or hibernate the machine.</para>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <para>The following options can be configured in the
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <filename>/etc/systemd/sleep.conf</filename>:</para>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <variablelist class='systemd-directives'>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <term><varname>SuspendMode=</varname></term>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <term><varname>HibernateMode=</varname></term>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <term><varname>HybridSleepMode=</varname></term>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <listitem><para>The string to be written to
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek More than one value can be specified by separating
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek multiple values with whitespace. They will be tried
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek in turn, until one is written without error. If
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek neither succeeds, the operation will be aborted.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <varlistentry>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <term><varname>SuspendState=</varname></term>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <term><varname>HibernateState=</varname></term>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <term><varname>HybridSleepState=</varname></term>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <listitem><para>The string to be written to
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <filename>/sys/power/state</filename> by,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, or
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering More than one value can be specified by separating
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering multiple values with whitespace. They will be tried
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering in turn, until one is written without error. If
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering neither succeeds, the operation will be aborted.
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering </varlistentry>
601185b43da638b1c74153deae01dbd518680889Zbigniew Jędrzejewski-Szmek <para>Example: to exploit the <quote>freeze</quote> mode added
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering in Linux 3.9, one can use <command>systemctl suspend</command>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <programlisting>[Sleep]
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart PoetteringSuspendState=freeze</programlisting></para>
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd-sleep</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd-hibernate.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd-hybrid-sleep.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
9a00f57a5ba7ed431e6bac8d8b36518708503b4eLennart Poettering <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>