October 24, 2003

Software suspend under Linux!

The past couple of weeks I've been lazily playing around with various patches available for the 2.4 Linux kernels on my Dell Inspiron 8500.

I installed supermount-ng last week which automatically mounts devices when they're loaded (eg. cdrom, disk, memory stick, compact flash card, etc), rather than having the user drive this process. That worked out pretty well.

Last night I started playing with software suspend under linux. This one's a bit more detailed than supermount, but there was light at the end of the tunnel, and I now have software suspend working :)

To get software suspend working (state S4, ie. suspend to disk) I had to apply a ACPI patch to load a custom DSDT into my kernel. The DSDT that comes with my Dell is apparently broken but people out there have fixed it up. With the custom DSDT patch I was able to load the repaired DSDT into my kernel.

After that I had to apply a software suspend patch to my kernel source, which added support for a suspend daemon kswsupd that intercepted ACPI requests to suspend the system.

Then, initiating a hibernate from kswsupd serialized the memory state to disk and the machine turned itself off. Upon restarting the machine it resumed from where I had suspended it. :)

Still have some more tests to do, and customization, but the suspend-resume operation was definitely faster than a normal reboot. Looking forward to taking advantage of this :)

Posted by crafterm at October 24, 2003 12:50 PM | TrackBack
Comments

Excellent, Mate! I was always wondering why this ACPI stuff isn't available in the usual kernel by default. Same goes for the suspend patch. I think it's quite a usual requirement nowadays.
Hoping the DSDT of my Acer laptop isn't broken :)

Can you already trigger the suspend when you close the laptop?

Posted by: Torsten Curdt at October 24, 2003 10:30 PM

Hi Torsten!

Yes, AFAIK it's possible to trigger a suspend on a lid close event. In /proc it's possible to see the current lid state, etc.

acpi.sourceforge.net has success stories - perhaps your Acer is listed there mate :)

Cheers,

Marcus

Posted by: Marcus Crafter at October 26, 2003 03:35 PM

Hi Marcus,

I did a search for software suspend on google and it took me to this page. Behold...the power of google...awesome!!!

Anyways...i have just recently gotten interested in linux and so i dont know too much about it. I just want to ask you what distribution of linux did you get software suspend to work? Please send me an email.

Thanks a whole bunch,
Vuong

Posted by: Vuong Ly at November 18, 2003 12:16 AM

Hi There,

I use Debian GNU/Linux (http://www.debian.org/), although theoretically it should work well with any of the latest Linux distributions, as most of the work is kernel oriented and not distribution oriented.

Cheers,

Marcus

Posted by: Marcus Crafter at November 18, 2003 03:59 PM
Post a comment









Remember personal info?