Which kind of software suspend?
My notebook is an hp compaq nc8000 running Debian unstable, and I'd like to know whether it is "already" possible to use software suspend (hibernation). To my knowledge, there is a lot of different ways to do suspension, all of them differently broken and/or incompatible.
I't like to run with an unpatched vanilla kernel, use suspend-to-ram and suspend-to-disk according to my choice at suspend time, and have the notebook wake up with the X session unhampered and the important hardware (sound, synaptics) still useable. Additional bonus points if wireless and/or wired network remains useable and USB/PCMCIA devices don't need an unplug/plug cycle.
Which solutions should I investigate, which web pages should I read?
Comments
Display comments as Linear | Threaded
glandium on :
apt-get install gnome-power-manager
and add resume=/dev/partition to your kernel parameters.
Marc 'Zugschlus' Haber on :
Why do I need to convert from KDE to GNOME just ot have software suspend?
glandium on :
... and use a debian kernel
Marc 'Zugschlus' Haber on :
Thanks, but no thanks. I'd rather continue rolling my own local kernel. Much smaller, and more stable because I do not use initrd.
Thomas on :
LWN net recently had a pointer to something:
http://lwn.net/Articles/186411/
Maik on :
Bei meinem Gerät (IBM T43p), das AFAIK auf einem recht ähnlichen technischen Stand ist, hat es gereicht, ein paar Scripts/Dateien unter /etc/acpi/ anzulegen. Natürlich sollte acpid laufen und der Kernel mit resume=deine-swap-part starten. Vor allem jedoch muss der Kernel neu genug sein -- bei mir funktioniert Suspend-to-Disk seit 2.6.13, S-to-RAM seit 2.6.15. Ein eventueller proprietärer Grafiktreiber muss auch neu genug sein, aber ich bezweifle, dass du sowas verwendest. Mit meinem fglrx geht es seit zwei oder drei Versionen.
Ich habe meine Files mal unter http://www.stud.uni-karlsruhe.de/~ujaxc/ hochgeladen.
Zu deinen Anforderungen: Alles bis auf WLAN davon erfüllt die Lösung bei meinem Gerät. USB-Geräte und PC-Cards und wired Ethernet kommen wieder hoch. Die beiden Problemtreiber lasse ich in den Scripts entladen und wieder laden. Das WLAN lasse ich hingegen beim Einschlafen stoppen; es kommt dann erst wieder hoch, wenn ich Fn-F5 drücke. Es wäre aber trivial, suspend.pre und suspend.post um eine Regelung "Wenn WLAN beim Einschlafen läuft, starte es beim Aufwachen" zu ergänzen, was ich aber gar nicht will, weil ich beim Aufwachen mit hoher Wahrscheinlichkeit ganz woanders bin, wo evtl. gar kein WLAN ist.
Alan Pater on :
Suspend-to-ram does work on my nw8000, which is, I am lead to believe, the same machine. However, I am using the latest Ubuntu Dapper and Gnome Power Manager. It was not working a month ago, so there have been changes to relevant packages recently.
Erich on :
I'm using Suspend2 (so no vanilla kernel) for years now, and I'm happy with it. It's pretty fast, it writes a compressed image and it can be told to free some buffers before suspending.
The "hibernate" package used to be for suspend2, but the script has become compatible to the other ways of suspending some time ago. It has a blacklist of drivers that won't suspend cleanly, and will unload them. Depending on your video hardware, it will spawn a new xserver to restore it into a sane state etc.
TNKS on :
I have pretty much everything on my Thinkpad T42 set up as per your requirement (including the "bonus" requirements).
I use the Debian linux-source-2.6.16 kernel source patched with the suspend2 patch (www.suspend2.net), but I suspect you'd have similar results with the vanilla kernel too. Although Suspend2 isn't formally "mature," it's pretty trustworthy, I think, and far from experimental.
The Debian "hibernate" package for Susend2 in unstable is recent and works very well. The hibernate script can be conveniently set up to handle both suspends to ram (ACPI S3) and also suspending to disk as per its primary design.
Regarding the "bonus" functionality you seek. The hibernate script is loaded with all kinds of pre-suspend and post-resume features that can be enabled and disabled to get want you need (such as module unloading and bringing network interfaces up and down). One point, though, I really only got my network behaving nicely with a recent wpasupplicant package. I deal with a few WPA-secured networks, so that was a complexity I had to deal with. Even if you don't deal with WPA, recent changes to wpasupplicant nicely hook it into the ifupdown system. And wpasupplicant does some nice auto-detection of networks (via a setup file you can configure for all your common networks). So if you configure your hibernate script to bring your interface up and down, you should be able to get some nice "roaming" network detection with wpasupplicant/hibernate. Bottom line, I rarely have to fuzt around with bringing my interface up and down anymore after resuming from a suspend cycle.
Also, the Freenode IRC community at #suspend2 is the absolute nicest and most helpful technical forum I've ever encountered. They're super helpful if you can catch them awake on their Australian time schedule.
Of course, a lot of my experience might tie into my hardware, but still, I don't see any blaring reason why my configuration shouldn't work on your laptop.
Marc 'Zugschlus' Haber on :
By E-Mail, http://www.linux.com/article.pl?sid=06/05/24/1716222 was mentioned as good article on that topic. I have not yet read it, though.