[ltp] Re: suspend-to-disk (ACPI S3?)

Brian P. Flaherty linux-thinkpad@linux-thinkpad.org
Mon, 20 Dec 2004 19:39:16 -0500


Eben King <eben1@tampabay.rr.com> writes:

> On Mon, 20 Dec 2004, Brian P. Flaherty wrote:
>
>> Similarly, I'm using hotplug, so I use /etc/init.d/hotplug stop to
>> remove the usb stuff.
>
> Got to make sure hotplug comes up before eth0, as eth0 relies on hotplug to 
> load its firmware.

On my system, hotplug brings up my eth0 and eth1.  My hotplug scripts
don't stop them though, they just bring them up.  I haven't had time
to look into using it to bring them down (or even if I'd want them
to).

>> > I still get the same result from swsusp.
>> 
>> Are you using swsusp in the kernel or the swsusp2 patch?
>
> I went and checked out http://softwaresuspend.berlios.de/ ; much nicer patch
> than the last time I tried (2.9.1xx, I believe).  Kudos to the developers.  
> I actually got it to work this time!
>
> I had to compile in (not modularize) the main swsusp2 segment, so it's
> present to recognize the hibernating image in swap when the system
> boots.

Here's my .config for swsusp2, for what it's worth:

bxf4@gautama:~$ zgrep SUSP /proc/config.gz 
# CONFIG_SOFTWARE_SUSPEND is not set
CONFIG_SOFTWARE_SUSPEND2_CORE=y
CONFIG_SOFTWARE_SUSPEND2=y
CONFIG_SOFTWARE_SUSPEND2_WRITER=y
CONFIG_SOFTWARE_SUSPEND_SWAPWRITER=y
CONFIG_SOFTWARE_SUSPEND_LZF_COMPRESSION=y
# CONFIG_SOFTWARE_SUSPEND_GZIP_COMPRESSION is not set
CONFIG_SOFTWARE_SUSPEND_TEXT_MODE=y
CONFIG_SOFTWARE_SUSPEND_DEFAULT_RESUME2="/dev/hda3"
# CONFIG_SOFTWARE_SUSPEND_KEEP_IMAGE is not set
CONFIG_SOFTWARE_SUSPEND_DEBUG=y
# CONFIG_SOFTWARE_SUSPEND_CHECKSUMS is not set
# CONFIG_X86_GX_SUSPMOD is not set
# CONFIG_USB_SUSPEND is not set

>
> Alas, now I get a different lack of success.  When I run "hibernate" (after
> modifying /etc/hibernate/hibernate.conf to taste), the machine may do some
> stuff that I can't see (no or very little disk activity), then the screen
> blanks (backlight on, screen black) after <1 second and it sits there until
> I give up and hit ctrl-alt-del, at which point it reboots normally.

Is it possible there is some video stuff interfering with the
hibernate script?  There is a section at the bottom of hibernate.conf
on X hacks.  Do you need them?
>
> Should I have both "swsusp=/dev/hda3" and "swsusp2=/dev/hda3" as kernel 
> arguments?  Right now I only have the latter.

I don't have either as a kernel argument.  swsusp2 looks everytime
automatically.  I don't have any of swsusp included in the kernel
(Debian 2.6.9) and I do have /dev/hda3 as the resume device under
swsusp2.  Here's what a normal boot looks like on my machine:

Dec 17 22:07:52 localhost kernel: Software Suspend Core.
Dec 17 22:07:52 localhost kernel: Software Suspend text mode support
loaded.
Dec 17 22:07:52 localhost kernel: Software Suspend LZF Compression
Driver regist
ered.
Dec 17 22:07:52 localhost kernel: Software Suspend Swap Writer
registered.
[...]
Dec 17 22:07:52 localhost kernel: Looking for first block of swap
header at block 0.
Dec 17 22:07:52 localhost kernel: Setting logical block size of resume
device to 4096.
Dec 17 22:07:52 localhost kernel: Software Suspend 2.1.5: Swap space
signature found.
Dec 17 22:07:52 localhost kernel: Software Suspend 2.1.5: Suspending
enabled.
Dec 17 22:07:52 localhost kernel: Software Suspend 2.1.5: This is
normal swap space.


> Am I meant to choose between swsusp (does nothing), echo sleep >
> /sys/power/state (also does nothing) and /proc/acpi/sleep (doesn't exist)?  
> Not using the third is a no-brainer, but how do I decide among the first 
> two?

I'm not exactly sure what you mean above.  If /proc/acpi/sleep doesn't
exist, does that mean you don't have ACPI running?  I'm not positive,
but I don't think you need it for hibernate to work.  I have hibernate
tied to Fn-F12 via ibm-acpi.  So, when I hit Fn-F12, an ACPI event is
triggered and the hibernate script is run.  I got all this stuff off
this list, so it should be available in the archives.  I believe I
found several emails from Henrik Brix Andersen very useful.

Without ACPI, maybe you just need to run 'hibernate' or somehow make a
keybinding that you like to the hibernate script.

Brian