aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/power/swsusp.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/power/swsusp.txt')
-rw-r--r--Documentation/power/swsusp.txt45
1 files changed, 42 insertions, 3 deletions
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt
index 516c5019013b..823b2cf6e3dc 100644
--- a/Documentation/power/swsusp.txt
+++ b/Documentation/power/swsusp.txt
@@ -350,9 +350,34 @@ Q: How do I make suspend more verbose?
350 350
351A: If you want to see any non-error kernel messages on the virtual 351A: If you want to see any non-error kernel messages on the virtual
352terminal the kernel switches to during suspend, you have to set the 352terminal the kernel switches to during suspend, you have to set the
353kernel console loglevel to at least 5, for example by doing 353kernel console loglevel to at least 4 (KERN_WARNING), for example by
354 354doing
355 echo 5 > /proc/sys/kernel/printk 355
356 # save the old loglevel
357 read LOGLEVEL DUMMY < /proc/sys/kernel/printk
358 # set the loglevel so we see the progress bar.
359 # if the level is higher than needed, we leave it alone.
360 if [ $LOGLEVEL -lt 5 ]; then
361 echo 5 > /proc/sys/kernel/printk
362 fi
363
364 IMG_SZ=0
365 read IMG_SZ < /sys/power/image_size
366 echo -n disk > /sys/power/state
367 RET=$?
368 #
369 # the logic here is:
370 # if image_size > 0 (without kernel support, IMG_SZ will be zero),
371 # then try again with image_size set to zero.
372 if [ $RET -ne 0 -a $IMG_SZ -ne 0 ]; then # try again with minimal image size
373 echo 0 > /sys/power/image_size
374 echo -n disk > /sys/power/state
375 RET=$?
376 fi
377
378 # restore previous loglevel
379 echo $LOGLEVEL > /proc/sys/kernel/printk
380 exit $RET
356 381
357Q: Is this true that if I have a mounted filesystem on a USB device and 382Q: Is this true that if I have a mounted filesystem on a USB device and
358I suspend to disk, I can lose data unless the filesystem has been mounted 383I suspend to disk, I can lose data unless the filesystem has been mounted
@@ -380,3 +405,17 @@ safest thing is to unmount all filesystems on removable media (such USB,
380Firewire, CompactFlash, MMC, external SATA, or even IDE hotplug bays) 405Firewire, CompactFlash, MMC, external SATA, or even IDE hotplug bays)
381before suspending; then remount them after resuming. 406before suspending; then remount them after resuming.
382 407
408Q: I upgraded the kernel from 2.6.15 to 2.6.16. Both kernels were
409compiled with the similar configuration files. Anyway I found that
410suspend to disk (and resume) is much slower on 2.6.16 compared to
4112.6.15. Any idea for why that might happen or how can I speed it up?
412
413A: This is because the size of the suspend image is now greater than
414for 2.6.15 (by saving more data we can get more responsive system
415after resume).
416
417There's the /sys/power/image_size knob that controls the size of the
418image. If you set it to 0 (eg. by echo 0 > /sys/power/image_size as
419root), the 2.6.15 behavior should be restored. If it is still too
420slow, take a look at suspend.sf.net -- userland suspend is faster and
421supports LZF compression to speed it up further.