FS#3294 - Laptop suspend-to-RAM

Attached to Project: Arch Linux
Opened by Eugenia Loli-Queru (Eugenia) - Tuesday, 04 October 2005, 18:25 GMT
Last edited by Tobias Powalowski (tpowa) - Wednesday, 04 January 2006, 11:27 GMT
Task Type Feature Request
Category System
Status Closed
Assigned To Judd Vinet (judd)
Architecture not specified
Severity Medium
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The main reason why I use my (slower) Mac laptop more than my two Arch Linux ones is because of a single feature: sleep, or "suspend to RAM".

I would like to ask for automatic support for sleep for laptops when the lid is closed.

I tried and modified many scripts found online that supposedly unload modules, put the gfx card to sleep etc etc, and the laptop DOES go to sleep. But it NEVER wakes up, no matter what I do or what the script does. Same problem on both my laptops (on from LinuxCertified.com and one Sony Vaio).

Now, I hear that Ubuntu has automatic sleep support for many laptops, including some IBM-branded ones. Their Gnome has a "suspend" and a "hibernate" button on their "log out" dialog, and the laptops my friends used with Ubuntu *work* with sleep.

For me, it's useless to have a laptop and not be able to put it successfully to sleep and wake it up. I understand that many BIOSes are buggy, and I understand that making sleep support is very difficult. But I would like to see an effort from Arch to create a service of a sort, that takes care of lid recognition (without the user having to deal with the /etc/acpi/ scripts) and suspends to RAM successfully.

Suspend to disk is kinda useless, as it takes almost as much time to reboot. :P
This task depends upon

Closed by  arjan timmerman (blaasvis)
Tuesday, 21 February 2006, 08:33 GMT
Reason for closing:  Fixed
Additional comments about closing:  kernel part is fixed, please test powersave from unstable to test userland stuff
Comment by arjan timmerman (blaasvis) - Saturday, 10 December 2005, 11:07 GMT
if have mad some progress on this.
first you will need to recompile your kernel without smp support.
second you will need to install the hibernate script from the aur : http://aur.archlinux.org/packages.php?do_Details=1&ID=1508&O=0&L=0&C=0&K=hiber&SB=&SO=&PP=25&do_MyPackages=0&do_Orphans=0&SeB=nd

configure /etc/hibernate/hibernate.conf

try the first run through running hibernate as root.
this should be enable you to suspend to ram with your laptop, if you want to execute the script on closing the lid. try looking at the acpid deamon scripts.

With the help of this i made my workstation hibernate \o/
Comment by Eugenia Loli-Queru (Eugenia) - Saturday, 10 December 2005, 20:09 GMT
AFAIK, the hibernate softsusp2 package only supports suspend-to-disk, not to RAM. Are you sure that the same script also does sleep (aka suspend-to-RAM)?

You see, what I need is how Windows and Macs do it: you close the lid, and the laptop goes to sleep automatically. You open the lid, and the desktop comes back up in 1-2 seconds.

SoftwareSuspend2's suspend-to-disk requires 25 to 45 seconds, depending on the speed of your drive and how much memory you got. This is why I insist on Suspend-to-RAM and not to-disk.

I don't have a non-smp kernel, and I really don't want to compile a custom one (because then Judd and others are telling me that they won't support my bug requests because I have non-default stuff). Is there any way to make suspend-to-RAM to work without recompiling the kernel? And if not, maybe Judd should apply a patch to the default kernel to support suspensions by default, somehow...
Comment by Eugenia Loli-Queru (Eugenia) - Monday, 19 December 2005, 19:19 GMT
So, any work was done on suspend-to-ram?
Comment by Vince W. (viniosity) - Monday, 16 January 2006, 13:03 GMT
I'd also like to see suspend to ram working. (This is definitely different than hibernate which suspends to disk). Right now this works out of the box in Ubuntu since Breezy. I've tried just copying the scripts over from their acpi folder but that didn't seem to work. Probably there has been some work done in the kernel too.

This would be a big win for anyone who wants to use Arch on a laptop!!!
Comment by Vince W. (viniosity) - Friday, 20 January 2006, 18:50 GMT
I just found this info on the thinkpad wiki which might help pull off suspend to ram. Perhaps these patches could be applied. Really, I'm very much hoping to go back to Arch for laptop general use. Here's the quote:

"I checked it only on Ubuntu Breezy Badger, but it seems, that if you compile kernel 2.6.15 with SATA suspend patch http://linux.spiney.org/system/files?file=02_libata_passthru.fixed.patch and also add patch ata_idle_wait after Andrew Morton's advice at http://lkml.org/lkml/2005/11/16/403, then you should have working suspend-to-RAM."

Quote attributed to whomever edited the wiki entry which can be found here:
http://www.thinkwiki.org/wiki/Installing_OpenSUSE_10.0_on_a_ThinkPad_X41
Comment by Tobias Powalowski (tpowa) - Saturday, 21 January 2006, 16:34 GMT
new kernel 2.6.15.1-2 supports now suspend also with smp enabled
Comment by Vince W. (viniosity) - Wednesday, 08 February 2006, 15:33 GMT
After much hashing around I finally got this working with help from the community. The CK Kernel was key for me since it has the sata patch. It would be great if that made it into the vanilla kernel as well. FWIW the powersave -u command did not prove as effective as the hibernate scripts for me on my Thinkpad x41.

Loading...