LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Anyone has Software Suspend working? (https://www.linuxquestions.org/questions/slackware-14/anyone-has-software-suspend-working-226648/)

suslik 09-04-2004 03:05 PM

Anyone has Software Suspend working?
 
Slack 10, 2.6.8.1+SoftwareSuspend2 patch.

I am using Software Suspend 2 kernel patch for 2.6.8.1 from here

Tried to suspend in console (no X, no fancy modules - as clean as possible) and got some kind of fatal error on reboot. Kernel seemed to go through most of the devices and the crash occured right before I would expect the console.

Before I start posting my config files, I would like to know in general if someone has any of the 3 version of Software Suspend working? (2 in kernel, one as SS2 patch)

NOTE: this is not the same as "Sleeping" mode or whatever its called, when computer is still on, with some of the things shut off. The SoftwareSuspend i am talking about is the one that behaves like "Hibernate" in Windows, i.e. drop all memory on HD, shutdown completely, place the image from HD into memory on start up.

quatsch 09-04-2004 07:59 PM

I can get both swsusp and pmdisk to work with kernel 2.6.6 (I presume it'll work with 2.6.8.1 as well; just downloaded the kernel, so will have to check first, though).

I did have some problems with modules not loading properly which I got around by compiling in what the kernel really needs and then a little script to run after resume. usb, pcmcia and network seemed to make trouble for me. Try shutting them off before suspending; maybe it'll behave better.

quatsch 09-05-2004 04:40 PM

Hi. Just a quick follow up to my response above. I can confirm that suspend to disk with pmdisk works on my laptop with kernel 2.6.8.1. I use apm and not acpi.

I haven't tried swsusp with 2.6.8.1 because I prefer pmdisk.

cheers

suslik 09-05-2004 05:11 PM

I think I tracked my problem with Software Suspend 2.

Even though it says no need for ACPI, when compiling the kernel with only APM chosen, the compilation craps out with something like "ACPI_******_*****" function missing.

If I choose the ACPI, the restore stops with fatal error cause it is looking for working ACPI and my computer is too old to have it enabled.

It's too sad to let SS2 go. On paper SS2 is superior in features compared to pmdisk. On paper...

I am glad to hear you have pmdisk working. You mentioned some -pre-sleep, post-sleep scripts. I'd be thankfull if you shared some of them if you can.

quatsch 09-05-2004 08:16 PM

Yeah, swsusp needs acpi and my laptop does better with apm at least when running linux so I use pmdisk.

Anyhow, I just have a simple script. The strcuture is:

stuff to be done before suspend
echo disk >/sys/power/state
stuff to be done after suspend

For example, USB stops working if kept running. I just need to remove the module ohci-hcd before suspend and load it back, so:

rmmod ohci-hcd
echo disk >/sys/power/state
modprobe ohci-hcd

I have the same problem with my ps/2 mouse (the mousepad as well as external mouse) so the script becomes

rmmod psmouse
rmmod ohci-hcd
echo disk >/sys/power/state
modprobe ogci-hcd
modprobe psmouse

It also seems that stopping pcmcia is better so I do

/etc/init.d/pcmcia stop {this is a script for starting/stopping pcmcia}
rmmod psmouse
rmmod ohci-hcd
echo disk>/sys/power/state
modprobe ohci-hcd
modprobe psmouse
/etc/init.d/pcmcia start

You ge the idea. The stuff after the echo line gets executed after resume. Of course, you can make it as complex as you please with sub-scripts and so on.
The suspending is done by running this script (as root). Other problems I had were my floppy drive and CD-Rom drive. I had to recompile my kernel to have support for them as modules so I could disable the drives before suspending.

hope this helps.


All times are GMT -5. The time now is 11:57 AM.