aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/power/swsusp.txt
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2006-03-23 06:00:02 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 10:38:07 -0500
commit543cc27d09643640cbc34189c03a40beb8227aef (patch)
tree034b4141ed5ac76b220d55c738a0eda668c1a490 /Documentation/power/swsusp.txt
parent74c7e2efbe37378026f00ad9e7253796d7b2fc99 (diff)
[PATCH] swsusp: documentation updates
Update suspend-to-RAM documentation with new machines, and makes message when processes can't be stopped little clearer. (In one case, waiting longer actually did help). From: "Rafael J. Wysocki" <rjw@sisk.pl> Warn in the documentation that data may be lost if there are some filesystems mounted from USB devices before suspend. [Thanks to Alan Stern for providing the answer to the question in the Q:-A: part.] Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/power/swsusp.txt')
-rw-r--r--Documentation/power/swsusp.txt51
1 files changed, 44 insertions, 7 deletions
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt
index b28b7f04abb8..d7814a113ee1 100644
--- a/Documentation/power/swsusp.txt
+++ b/Documentation/power/swsusp.txt
@@ -17,6 +17,11 @@ Some warnings, first.
17 * but it will probably only crash. 17 * but it will probably only crash.
18 * 18 *
19 * (*) suspend/resume support is needed to make it safe. 19 * (*) suspend/resume support is needed to make it safe.
20 *
21 * If you have any filesystems on USB devices mounted before suspend,
22 * they won't be accessible after resume and you may lose data, as though
23 * you have unplugged the USB devices with mounted filesystems on them
24 * (see the FAQ below for details).
20 25
21You need to append resume=/dev/your_swap_partition to kernel command 26You need to append resume=/dev/your_swap_partition to kernel command
22line. Then you suspend by 27line. Then you suspend by
@@ -27,19 +32,18 @@ echo shutdown > /sys/power/disk; echo disk > /sys/power/state
27 32
28echo platform > /sys/power/disk; echo disk > /sys/power/state 33echo platform > /sys/power/disk; echo disk > /sys/power/state
29 34
35. If you have SATA disks, you'll need recent kernels with SATA suspend
36support. For suspend and resume to work, make sure your disk drivers
37are built into kernel -- not modules. [There's way to make
38suspend/resume with modular disk drivers, see FAQ, but you probably
39should not do that.]
40
30If you want to limit the suspend image size to N bytes, do 41If you want to limit the suspend image size to N bytes, do
31 42
32echo N > /sys/power/image_size 43echo N > /sys/power/image_size
33 44
34before suspend (it is limited to 500 MB by default). 45before suspend (it is limited to 500 MB by default).
35 46
36Encrypted suspend image:
37------------------------
38If you want to store your suspend image encrypted with a temporary
39key to prevent data gathering after resume you must compile
40crypto and the aes algorithm into the kernel - modules won't work
41as they cannot be loaded at resume time.
42
43 47
44Article about goals and implementation of Software Suspend for Linux 48Article about goals and implementation of Software Suspend for Linux
45~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 49~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -333,4 +337,37 @@ init=/bin/bash, then swapon and starting suspend sequence manually
333usually does the trick. Then it is good idea to try with latest 337usually does the trick. Then it is good idea to try with latest
334vanilla kernel. 338vanilla kernel.
335 339
340Q: How can distributions ship a swsusp-supporting kernel with modular
341disk drivers (especially SATA)?
342
343A: Well, it can be done, load the drivers, then do echo into
344/sys/power/disk/resume file from initrd. Be sure not to mount
345anything, not even read-only mount, or you are going to lose your
346data.
347
348Q: How do I make suspend more verbose?
349
350A: If you want to see any non-error kernel messages on the virtual
351terminal the kernel switches to during suspend, you have to set the
352kernel console loglevel to at least 5, for example by doing
353
354 echo 5 > /proc/sys/kernel/printk
355
356Q: Is this true that if I have a mounted filesystem on a USB device and
357I suspend to disk, I can lose data unless the filesystem has been mounted
358with "sync"?
359
360A: That's right. It depends on your hardware, and it could be true even for
361suspend-to-RAM. In fact, even with "-o sync" you can lose data if your
362programs have information in buffers they haven't written out to disk.
363
364If you're lucky, your hardware will support low-power modes for USB
365controllers while the system is asleep. Lots of hardware doesn't,
366however. Shutting off the power to a USB controller is equivalent to
367unplugging all the attached devices.
368
369Remember that it's always a bad idea to unplug a disk drive containing a
370mounted filesystem. With USB that's true even when your system is asleep!
371The safest thing is to unmount all USB-based filesystems before suspending
372and remount them after resuming.
336 373