Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm running Crunchbang (Debian Wheezy + OpenBox, basically) on a Lenovo Thinkpad Edge 13. I don't have a power manager, instead I'm using apcid, pm-utils and xautolock to get my computer to suspend when lid is closed or it has been idle for some time, and to hibernate when battery is critically low. It's fine, only problem is:
When my computer is in suspend mode and I leave until the battery is dead, it shuts down.
I would like it to stay on suspend as long as possible and go into hibernation if the battery level gets critically low.
I do not want it to:
- change from suspend to hibernate after a predetermined amount of time as can be done like this ...
- nor do I want it to go into hybrid mode (saving both to ram and drive and resuming from the latter if battery dies) as can be done with the s2both feature of uswsusp.
In suspend mode I would like my computer to detect when the battery level gets critical and then hibernate.
Didn't know about s2both, etc. but what you want can not universally be done, AFAICT.
Suspend - cpu goes into S3 power saving state = is dead. It needs an interrupt to wake it.
ACPI stuff won't do it - Catch 22. It needs a cpu. If the battery critical signal can be mapped to a hardware interrupt, just maybe. With the sys interface, the battery critical signal is extremely difficult to find as it comes too late to use for a big wake up then compress & disk write.
You don't need s2both to have mixed suspend/hibernate, you can use pm-tools for that, the command is pm-suspend.hybrid. That would be the only option that I think would work, for the reasons business_kid already pointed out. I would suspect that Unity's power-manager just uses hybrid suspend by default.
You don't need s2both to have mixed suspend/hibernate, you can use pm-tools for that, the command is pm-suspend.hybrid.
You mean pm-suspend-hybrid? Tried that before installing uswsusp and thereby s2both. It works but seems to do exactly the same as pm-suspend. I tried taking the battery out after executing the command and it just started up again like after normal power-down (eg. the swap image wasn't restored ...)
The man page says that: "s2both(8) is an hybrid-suspend implementation." I take that do mean that is the only implementation. Am I wrong?
OK, I think I got it now:
- the default pm-suspend-hybrid command suspends and after a given time wakes up and hibernates. Can be set like this.
- s2both offer another implementation in which the computer both suspend to disk and ram, and resumes from disk only if it can't resume from ram (that is, if the computer has been powered down in the meantime).
So they are to different methods of combining suspension and hibernation. Am I right?
- the default pm-suspend-hybrid command suspends and after a given time wakes up and hibernates.
Nope. From the pm-utils manpage:
Hybrid-suspend is the process where the system does everything it needs to hibernate, but suspends instead of
shutting down. This means that your computer can wake up quicker than for normal hibernation if you do not run
out of power, and you can resume even if you run out of power.
Can be set like this.
I don't know, that link seems to be broken.
Tried that before installing uswsusp and thereby s2both. It works but seems to do exactly the same as pm-suspend. I tried taking the battery out after executing the command and it just started up again like after normal power-down (eg. the swap image wasn't restored ...)
Have you added the needed resume= parameter to your kernel command line in the boot-loader?
Thanks for the guide TobiSGD, but I think we misunderstood each other. My computer hibernates with pm-hibernate and wakes up just fine both before and after installing the package needed to s2both. pm-suspend-hybrid, though, does the exact same as pm-suspend, unless I use s2both. This is the full description of pm-suspend-hybrid from the man page:
Hybrid-suspend is the process where the system does everything it needs to hibernate, suspends instead of shutting down. This means that your computer can wake up quicker than for normal hibernation if you do not run out of power, and you can resume even if you run out of power. s2both(8) is an hybrid-suspend implementation.
I take that to mean that s2both is a way of making pm-suspend-hybrid work. The only other implementation I've found is the one in the aforementioned link that uses:
... to set a time after which suspend switches to hibernate. s2both does something else, it suspends to disk and ram, and resumes from disk only if it can't resume from ram, that is, the behavior described in the quotation from the man page.
My claim is that the only way to get this behavior is by way of s2both.
Yeah, just tried pm-suspend-hybrid right now, as follows: Ran pm-suspend-hybrid, removed psu, removed battery, replaced power & powered on.It did a fresh start, not a resume from hibernation. I really don't think it wrote the disk image (But I've an ssd, so it's hard to be sure).
pm-suspend-hybrid might works for folks having video issues or something with suspend, as it pretends to hibernate, but suspends instead.