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

Eben King linux-thinkpad@linux-thinkpad.org
Tue, 21 Dec 2004 18:37:38 -0500 (EST)


On Mon, 20 Dec 2004, Brian P. Flaherty wrote:

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

> > 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.

Looks like that was it, as it worked* after I took out resume2=.  Now I need
to tie it to Fn-F12.  Autoselection is OK, as long as it's not going to get
confused and scribble on my NTFS partition.

* When it restores, the (text) console is messed up, and only the top half 
  of each character is displayed.  Scrolling region is smaller than actual 
  screen (guess 24x80).  I started X after resuming (init 5), and that 
  worked fine.  Any ideas?

> Here's my .config for swsusp2, for what it's worth:
[snip]

Mine is the same except I've not enabled LZF compression (don't need to
apparently, but I'll do time comparisons) and debug is off (does it help
you?).

> Is it possible there is some video stuff interfering with the hibernate
> script?

I doubt it, as I usually test it with X not running.

> There is a section at the bottom of hibernate.conf on X hacks.  Do you 
> need them?

I'll test hibernation/restoring with X running and find out.

Neither "SwitchToTextMode" nor "UseDummyXServer" looks like it would help a
system where X isn't running...

> > 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.

OK.  In /etc/hibernate/hibernate.conf, it says:

##############################################################################
### Choose your Suspend method. You currently have 3 choices:
###
###    swsusp2_15          Software Suspend 2 (requires kernel patches from
###                        http://softwaresuspend.berlios.de/)
###
###    sysfs_power_state   Uses /sys/power/state to suspend (activates pmdisk
###                        on kernels < 2.6.8, or vanilla swsusp otherwise).
###
###    acpi_sleep          Uses /proc/acpi/sleep to activate swsusp, or  other
###                        ACPI sleep state supported by your machine.
###
##############################################################################

and each method has its own set of options, plus the shared global options.  
Don't know what the defaults are, as neither that file nor the man page 
says.

> If /proc/acpi/sleep doesn't exist, does that mean you don't have ACPI
> running?

Well, there's other stuff in /proc/acpi just not that.  Maybe it got moved, 
and its existance is indicative of an older version of ACPI (or the kernel)?

> I have hibernate tied to Fn-F12 via ibm-acpi.

OK, latest at http://ibm-acpi.sourceforge.net/ is 0.8 and I have 0.2... I'll 
upgrade.

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

I _heard_ that Fn's a special key, so that may not work.  Anyhow, I have no 
experience playing with keybindings when not in X, and I think ACPI's 
running even if /proc/acpi/sleep doesn't exist...

-- 
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar

 They that can give up essential liberty to obtain a little temporary
      safety deserve neither liberty nor safety. -- Ben Franklin