Hibernate: Difference between revisions
Merge-delete (talk | contribs) No edit summary |
(major rewrite + hibernating from console) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
In Slackware, hibernation works out-of-the-box and can be easily done from KDE's menu. Resuming from hibernation, however, is not set up, so when you turn on your computer again, it starts as normal. That is, if your hardware supports it and if you've set up a swap space larger than your RAM. | In Slackware, hibernation works out-of-the-box and can be easily done from KDE's menu or XFCE logout dialog. Resuming from hibernation, however, is not set up, so when you turn on your computer again, it starts as normal. That is, if your hardware supports it and if you've set up a swap space larger than your RAM. | ||
== | == Hibernating in lightweight windows managers == | ||
In case you aren't using KDE, XFCE or other desktop environments, you can hibernate your system from console. | |||
=== pm-utils === | |||
As root, you can hibernate via <tt>pm-hibernate</tt> command. | |||
=== As regular user === | |||
==== HAL ==== | |||
Since HAL is deprecated and removed from Slackware 14.0, this works for older Slackware releases. | |||
$ dbus-send --system --print-reply --dest="org.freedesktop.Hal" \ | |||
/org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Hibernate | |||
==== UPower ==== | |||
dbus-send --system --print-reply --dest="org.freedesktop.UPower" \ | |||
/org/freedesktop/UPower org.freedesktop.UPower.Hibernate | |||
== Booloader configuration == | |||
=== Non-LVM setup === | |||
==== LILO configuration ==== | |||
To tell your kernel where to resume from, you need to write the info to ''lilo.conf'': | To tell your kernel where to resume from, you need to write the info to ''lilo.conf'': | ||
Line 9: | Line 34: | ||
Replace ''/dev/sda6'' with your actual swap space. Swap partitions are perfect, I think swap files should work too. If you don't know where your swap lies, look at ''/proc/swaps''. | Replace ''/dev/sda6'' with your actual swap space. Swap partitions are perfect, I think swap files should work too. If you don't know where your swap lies, look at ''/proc/swaps''. | ||
== | === LVM setup === | ||
to | LILO doesn't support booting from LVM, therefore you have to create initial ramdisk (initrd). You need one even though your kernel has build-in support for LVM. | ||
You don't have to adjust ''lilo.conf'' because you can set everything resume-related in initrd. | |||
mkinitrd -c -k <kernel-version> -f <fs_type> -m <fs_type> -r <root_partition> -h /dev/volumegroup/swap -L | |||
* -h set your hibernation/swap logical volume | |||
* -L activate LVM | |||
Afterwards, run lilo. | Afterwards, run lilo. | ||
Line 29: | Line 49: | ||
== Further reading == | == Further reading == | ||
* Hibernate to encrypted swap - [http://slackware.osuosl.org/slackware-13.1/README_CRYPT.TXT REAME_CRYPT.TXT] | * Hibernate to encrypted swap - [http://slackware.osuosl.org/slackware-13.1/README_CRYPT.TXT REAME_CRYPT.TXT] | ||
[[Category:Tutorials]] | [[Category:Tutorials]] |
Latest revision as of 21:47, 17 August 2012
In Slackware, hibernation works out-of-the-box and can be easily done from KDE's menu or XFCE logout dialog. Resuming from hibernation, however, is not set up, so when you turn on your computer again, it starts as normal. That is, if your hardware supports it and if you've set up a swap space larger than your RAM.
Hibernating in lightweight windows managers
In case you aren't using KDE, XFCE or other desktop environments, you can hibernate your system from console.
pm-utils
As root, you can hibernate via pm-hibernate command.
As regular user
HAL
Since HAL is deprecated and removed from Slackware 14.0, this works for older Slackware releases.
$ dbus-send --system --print-reply --dest="org.freedesktop.Hal" \ /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Hibernate
UPower
dbus-send --system --print-reply --dest="org.freedesktop.UPower" \ /org/freedesktop/UPower org.freedesktop.UPower.Hibernate
Booloader configuration
Non-LVM setup
LILO configuration
To tell your kernel where to resume from, you need to write the info to lilo.conf:
append=" resume=/dev/sda6"
Replace /dev/sda6 with your actual swap space. Swap partitions are perfect, I think swap files should work too. If you don't know where your swap lies, look at /proc/swaps.
LVM setup
LILO doesn't support booting from LVM, therefore you have to create initial ramdisk (initrd). You need one even though your kernel has build-in support for LVM.
You don't have to adjust lilo.conf because you can set everything resume-related in initrd.
mkinitrd -c -k <kernel-version> -f <fs_type> -m <fs_type> -r <root_partition> -h /dev/volumegroup/swap -L
- -h set your hibernation/swap logical volume
- -L activate LVM
Afterwards, run lilo.
Further reading
- Hibernate to encrypted swap - REAME_CRYPT.TXT