The Hibernate script can be downloaded from the Suspend2.net download page: http://www.suspend2.net/downloads/
Please file any bug reports or feature requests in Bugzilla at http://bugzilla.suspend2.net/.
User-contributed scriptlets
These scriptlets have been written by users to extend the functionality of the hibernate script. I declined some scriptlets from being included, in order to keep it to a minimum to minimise the script's "startup time" (which it really shouldn't have). These are generally application-specific or hardware-specific scriptlets, which will be of interest to others using those applications or hardware.
upload yours here
kopete Kopete reconnect - Disconnects and reconnects Kopete accounts - PatDouble
kded KDED restart - Restart KDED on resume - DirkHusemann
ati ATI binary driver - Enables connected monitors on resume - PatDouble
auto_if_down_and_up - Slightly smarter than the stock networking scriptlets, uses the /etc/network/run/ifstate file (works on Debian, possibly distro-specific) to tell if an interface is up, and only then brings it down on a suspend and up upon the resume. Designed as a simple method to get stubborn wireless devices to recognize new environments, but only if they're already on and connected. -- SukantHajra
sleep_power_loss_logging - Wonder how much power your system uses when it ACPI S3 sleeps? This script reads /proc/acpi/battery/BAT0/state, does some calculations and reports to /var/log/battery.log upon each suspend/resume cycle. Make sure to integrate this logging into your logrotate package, so that the file doesn't grow too big. -- SukantHajra
I915 - If you are using 915resolution you are likely to need this. This script reconfigures VGA resolution so that X can start properly. -- dotCOMmie
Note to scriptlet submitters - please upload your scriptlet as an attachment to this page.
Features that would be nice (please don't add more here)
- I would like an option to use hibernate to ask APM to go to standby-to-RAM (I have an old Dell laptop that doesn't play well with ACPI). This is useful because I'd like to kill/restore the same processes and modules in both the suspend-to-disk and suspend-to-RAM cases. Some ways of doing this seem to be:
* Set apmd's "proxy" to be effectively empty, and replace DoSwsusp2 with an equivalent DoAPM (which calls apm -s or apm -S).
- * Change hibernate to allow --do-suspend and --do-resume, which only do the suspend actions or the resume actions (not both, as it currently does). Then the hibernate script can be used for apmd's proxy.
User-contributed configuration files for specific hardwares
Since kernel 2.6.11 and according to Documentation/power/video.txt the wiki link for how to suspend on various laptops is https://wiki.ubuntu.com//HoaryPMResults . Unfortunately, only a few of them are using HibernateScript. It might be because they don't know how to write configuration files specific to their hardware, kernel and method used (standard swsusp or swsusp2).
Could we use this wiki to let users detail their configuration files according to their specific hardware? Let us try.
We are naming susptoram.conf and susptodisk.conf the configuration files corresponding to suspension to ram and suspension to disk respectively. Aliases like hibernate -F /etc/hibernate/susptodisk.conf have to be created. Usually another script is used to link both commands on specific keys or ACPI events.
Sony Z1 RMP with a radeon video card, kernel 2.6.12
File /etc/susptoram.conf (standard swsusp) linked to Fn+Esc key
UseSysfsPowerState mem
Verbosity 1
LogFile /var/log/hibernate.log
LogVerbosity 1
UnloadModules ehci-hcd
LoadModules auto
EnableVbetool yes
RestoreVbeStateFrom /var/lib/vbetool/vbestate
VbetoolPost yes
File /etc/hibernate/susptodisk.conf (standard swsusp) linked to Fn+F12 key
UseSysfsPowerState disk
PowerdownMethod shutdown
Verbosity 1
LogFile /var/log/hibernate.log
LogVerbosity 1
SaveClock restore-only
UnloadModules usbhid usblp ehci-hcd uhci-hcd battery ac
LoadModules auto
StopServices mysqld laptop-mode
StartServices usb laptop-mode
Please feel free to add more hardwares and comments. - NicolasBrouard




