- Configuring uswsusp
- Reconfiguring Boot
- Suspend-hybrid Setup
- KDE Power Management Setup
- Conclusion
- Troubleshooting Resources
Suspend-hybrid Setup
uswsusp supports "suspend-to-both," also known as "suspend-hybrid," which first suspends in suspend-to-disk mode and then in suspend-to-RAM mode. With this technique, if your computer runs out of power while suspended, you can continue where you left off, working from disk with minimal delay and an intact filesystem.
As of this writing, no option to set this (even if installed) exists in System Settings > Advanced > Power Management. A discussion in reported KDE bug 188233 explains why: The original intent was to make suspend-hybrid the default and have suspend be the fallback setting, but the developers couldn't get it ready in time for KDE 4.2.x. It will be ready for KDE 4.3.
This is what you do instead. First, test the pmi-suspend-hybrid script (see Figure 2):
$ sudo pmi-suspend-hybrid
Figure 2 Suspend-hybrid hibernation.
What should happen is hibernation followed by the computer going into suspend, instead of shutting down via s2both. To verify that it saved DRAM contents to hibernate, use this command:
$ nano /var/log/pm-suspend.log
Here are the initial command-line parameters:
Thu May 28 14:26:43 PDT 2009: Running hooks for suspend. /usr/lib/pm-utils/sleep.d/000record suspend suspend_hybrid: success.
If you see anything else, pmi-suspend-hybrid isn't working correctly. I confirmed this by running pmi-suspend-hybrid and then unplugging the AC power and battery (see Figure 3).
Figure 3 Testing suspend-hybrid.
The battery is next to the netbook. The odd fuzzy patches in the shot are Velcro pieces I use to attach my netbook to a lap desk/cooler. My system passed the test with flying colors by resuming perfectly after power was restored.
If it worked, and you use GNOME, see whether gnome-power-manager currently supports suspend-hybrid (which might be called suspend-to-both or hibernate-suspend) from the GUI. Set it to use this feature when the lid is closed or suspend is activated from the shutdown menu (see Figure 4).
Figure 4 Resume password prompt.
Once you're sure that hibernate (and suspend-hybrid, we hope) will work, you can configure the Power Management GUI (see Figure 5).
Figure 5 Power management capability display.
As Figure 5 shows, hybrid suspend is not picked up in the KDE 4.2.2 Power Management GUI, even when installed. If you have KDE 4.3, which you will if you install Kubuntu 9.10 and update it after installation (as the installer requests), simply make sure that hybrid-suspend works from the pm-suspend-hybrid script, and verify that the OS is actually using it instead of pm-suspend.