1PM-ACTION(8)                 pm-utils User Manual                 PM-ACTION(8)
2
3
4

NAME

6       pm-action - Suspend or Hibernate your computer
7

SYNOPSIS

9       pm-hibernate [--help]
10
11       pm-suspend [--quirk-*] [--help]
12
13       pm-suspend-hybrid [--quirk-*] [--help]
14

DESCRIPTION

16       This manual page documents briefly the pm-action, pm-hibernate,
17       pm-suspend and pm-suspend-hybrid commands. This manual page was
18       originally written for the Debian(TM) distribution and has been adopted
19       by the pm-utils project.
20
21       These commands can be used to put the machine in a sleep state. The
22       precise way how this is done can be influenced by installing
23       executables and configuration snippets. For some options external
24       programs are needed.
25
26       These commands will usually be called by UPower or hald when triggered
27       to do so by a program in a desktop session such as gnome-power-manager.
28       Calling them from the command line is also possible, but it is not
29       guaranteed that all programs in your desktop session keep working as
30       expected.
31
32       pm-suspend
33           During suspend most devices are shutdown, and system state is saved
34           in RAM. The system still requires power in this state. Most modern
35           systems require 3 to 5 seconds to enter and leave suspend, and most
36           laptops can stay in suspend mode for 1 to 3 days before exhausting
37           their battery.
38
39       pm-hibernate
40           During hibernate the system is fully powered off, and system state
41           is saved to disk. The system does not require power, and can stay
42           in hibernate mode indefinitely. Most modern systems require 15 to
43           45 seconds to enter and leave hibernate, and entering and leaving
44           hibernate takes longer when you have more memory.
45
46       pm-suspend-hybrid
47           Hybrid-suspend is the process where the system does everything it
48           needs to hibernate, but suspends instead of shutting down. This
49           means that your computer can wake up quicker than for normal
50           hibernation if you do not run out of power, and you can resume even
51           if you run out of power. s2both(8) is an hybrid-suspend
52           implementation.
53

OPTIONS

55       On some hardware putting the video card in the suspend state and
56       recovering from it needs some special quirk handling. With the
57       --quirk-* options of the pm-suspend and pm-suspend-hybrid commands you
58       can select which quirks should be used.
59
60       If pm-suspend, pm-hibernate, or pm-suspend-hybrid are invoked without
61       any commandline parameters, they will try to grab the correct quirks
62       from the internal quirk database.
63
64       --quirk-dpms-on
65           This option forces the video hardware to turn on the screen during
66           resume. Most video adapters turn on the screen themselves, but if
67           you get a blank screen on resume that can be turned back on by
68           moving the mouse or typing then this option may be useful.
69
70       --quirk-dpms-suspend
71           This option forces the video hardware to turn off the screen when
72           suspending. Most video adapters seem to do this correctly, but some
73           do not, which wastes lots of power. If your screen is still on
74           after successfully suspending you may need to use this option.
75
76       --quirk-none
77           This option disables quirks.
78
79       --quirk-radeon-off
80           This option forces Radeon hardware to turn off the display during
81           suspend and turn it back on during resume. You only need to do this
82           on some old ThinkPads of the ´30 series (T30, X31, R32,... ) with
83           Radeon video hardware.
84
85       --quirk-reset-brigthness
86           This option resets display brightness during resume (i.e. sets the
87           brightness to 0 and returns it to the previous value).
88
89       --quirk-s3-bios
90           This option calls the video BIOS during S3 resume. Unfortunately,
91           it is not always allowed to call the video BIOS at this point, so
92           sometimes adding this option can actually break resume on some
93           systems.
94
95       --quirk-s3-mode
96           This option initializes the video card into a VGA text mode, and
97           then uses the BIOS to set the video mode. On some systems S3 BIOS
98           only initializes the video BIOS to text mode, and so both S3 BIOS
99           and S3 MODE are needed.
100
101       --quirk-vbe-post
102           This option will attempt to reinitialize the video card when
103           resuming from suspend, using the same code the system BIOS uses at
104           boot in order to initialize the video hardware. Not all video cards
105           need this, and using this option on systems where it is not needed
106           can cause a system to lock up when resuming.
107
108       --quirk-vbemode-restore
109           This option will save and restore the current VESA mode which may
110           be necessary to avoid X screen corruption. Using this feature on
111           Intel graphics hardware is probably a bad idea.
112
113       --quirk-vbestate-restore
114           This option saves and restores some low level hardware state which
115           may be invalid after suspend.
116
117       --quirk-vga-mode-3
118           This option will try to force the video card into a standard text
119           mode on resume.
120
121       --quirk-save-pci
122           Save the PCI config space for the VGA card.
123
124       --store-quirks-as-lkw
125           Save the quirks the video adaptor required by pm-suspend or
126           pm-suspend-hybrid as an .quirkdb file that is specific to this
127           system. The file will be saved in
128           /etc/pm/last_known_working.quirkdb. This parameter will only save
129           the actual quirks that were used to successfully suspend/resume a
130           system, and will be specific to the exact configuration of that
131           system, including the video hardware, video driver, and whether or
132           not kernel modesetting was used.
133

FILES

135       /etc/pm/config.d
136           The files in this directory are evaluated in C sort order. These
137           files can be provided by individual packages outside of pm-utils.
138           If a global configuration variable is set, the value set to will be
139           appended to the previous value. If any other variable is set, it
140           will be ignored. The syntax is simply: VAR_NAME=value. See the
141           CONFIGURATION VARIABLES section for valid variables defined by
142           pm-utils. External packages can define others, see their respective
143           documentation for more information.
144
145       /etc/pm/sleep.d, /usr/lib/pm-utils/sleep.d
146           Programs in these directories (called hooks) are combined and
147           executed in C sort order before suspend and hibernate with as
148           argument ´suspend´ or ´hibernate´. Afterwards they are called in
149           reverse order with argument ´resume´ and ´thaw´ respectively. If
150           both directories contain a similar named file, the one in
151           /etc/pm/sleep.d will get preference. It is possible to disable a
152           hook in the distribution directory by putting a non-executable file
153           in /etc/pm/sleep.d, or by adding it to the HOOK_BLACKLIST
154           configuration variable.
155
156       /var/log/pm-suspend.log
157           The log file shows what was done on the last suspend/hibernate and
158           resume/thaw.
159

SLEEP HOOK ORDERING CONVENTION

161       00 - 49
162           User and most package supplied hooks. If a hook assumes that all of
163           the usual services and userspace infrastructure is still running,
164           it should be here.
165
166       50 - 74
167           Service handling hooks. Hooks that start or stop a service belong
168           in this range. At or before 50, hooks can assume that all services
169           are still enabled.
170
171       75 - 89
172           Module and non-core hardware handling. If a hook needs to
173           load/unload a module, or if it needs to place non-video hardware
174           that would otherwise break suspend or hibernate into a safe state,
175           it belongs in this range. At or before 75, hooks can assume all
176           modules are still loaded.
177
178       90 - 99
179           Reserved for critical suspend hooks.
180

CONFIGURATION VARIABLES

182       Configuration variables defined by pm-utils. These can be set in any
183       file in /etc/pm/config.d/.
184
185       SLEEP_MODULE [=kernel]
186           The default suspend backend to use. Valid values are:
187
188           kernel
189               The built-in kernel suspend/resume support. Use this if nothing
190               else is supported on your system. The kernel backend is always
191               used if nothing else is available.
192
193           uswsusp
194               If your system has support for the userspace suspend programs
195               (s2ram/s2disk/s2both), then use this.
196
197           tuxonice
198               If your system has support for tuxonice/suspend2, use this.
199
200
201       HIBERNATE_RESUME_POST_VIDEO [=no]
202           If video should be posted after hibernate, just like after suspend.
203           You should not normally need to set this.
204
205       SUSPEND_MODULES
206           Space separated list of modules to unload before suspend.
207
208       HOOK_BLACKLIST
209           Space separated list of hooks that should be disabled.
210
211       HIBERNATE_MODE
212           Default method to power down the system when hibernating. If not
213           set, the system will use the kernel default as a default value.
214           Check /sys/power/disk for valid values. The default value will be
215           surrounded by [square brackets].
216
217       NEED_CLOCK_SYNC
218           If your system clock drifts across a suspend/resume or
219           hibernate/thaw cycle, you should set this to true. This will cause
220           pm-utils to synchronize the system clock whenever going through a
221           sleep/wake cycle at the expense of making suspend/resume take
222           longer.
223
224       PM_HIBERNATE_DELAY [=900]
225           If you are using kernel suspend/resume and invoke
226           pm-suspend-hybrid, this environment variable controls how many
227           seconds the system will wait after going into suspend before waking
228           back up and hibernating. By default, this is set to 900 seconds (15
229           minutes).
230

RETURN VALUES

232       Return values less than 128 mean that pm-action failed before trying to
233       put the system in the requested power saving state. A return value of
234       128 means that pm-action tried to put the machine in the requested
235       power state but failed. A return value greater than 128 means pm-action
236       encountered an error and also failed to enter the requested power
237       saving state.
238

DEBUGGING

240       Debugging suspend/resume can be a tricky process, and is covered in
241       more detail in /usr/share/doc/pm-utils/README.debugging.
242

BUGS

244       The upstream BTS can be found at https://bugs.freedesktop.org/. Select
245       ´pm-utils´ as product.
246

SEE ALSO

248       s2ram(8), s2disk(8), s2both(8), pm-is-supported(1), pm-powersave(8),
249       vbetool(8), radeontool(8)
250

AUTHOR

252       Tim Dijkstra <tim@famdijkstra.org>
253           Manpage author.
254
256       Copyright © 2007 Tim Dijkstra
257
258       This manual page was originally written for the Debian(TM) system, and
259       has been adopted by the pm-utils project.
260
261       Permission is granted to copy, distribute and/or modify this document
262       under the terms of the GNU General Public License, Version 2 or (at
263       your option) any later version published by the Free Software
264       Foundation.
265
266
267
268
269pm-action                        Apr 25, 2007                     PM-ACTION(8)
Impressum