[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howtos:hibernation [2012/09/19 23:30 (UTC)] – Added the hibernate lock trick zithro | howtos:hibernation [2012/09/25 02:46 (UTC)] (current) – moved to the howtos:slackware_admin section mfillpot | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Hibernation ====== | ||
- | Hibernation (also known as suspend-to-disk) is a method used to power down a computer while preserving the state of the operating system. Once powered up, the operating system will be in the exact state as it was at the time of hibernation. | ||
- | |||
- | In Slackware, hibernation works out-of-the-box. However, in order to resume successfully from a hibernated state, you need to configure the bootloader so it knows where to locate the resume data. | ||
- | |||
- | ===== Hibernating ===== | ||
- | |||
- | ==== Desktop Environments ==== | ||
- | |||
- | KDE, XFCE and other [[slackware: | ||
- | |||
- | ==== lightweight windows managers ==== | ||
- | |||
- | You can hibernate your system from console. Either as root via pm-utils or D-Bus with additional programs as regular user. | ||
- | |||
- | === pm-utils === | ||
- | |||
- | Hibernation is done via '' | ||
- | |||
- | === D-Bus === | ||
- | |||
- | Slackware offers two services to control power management in it's recent releases. UPower and HAL. Since HAL is deprecated in Slackware 14.0, use HAL in older Slackware releases (from 12.0 to 13.37), otherwise use UPower. | ||
- | |||
- | Use one of these command to hibernate your system. | ||
- | |||
- | == UPower == | ||
- | |||
- | <code bash> | ||
- | $ dbus-send --system --print-reply --dest=" | ||
- | / | ||
- | </ | ||
- | |||
- | == HAL == | ||
- | |||
- | <code bash> | ||
- | $ dbus-send --system --print-reply --dest=" | ||
- | / | ||
- | </ | ||
- | |||
- | ===== Bootloader configuration ===== | ||
- | |||
- | ==== Non-LVM setup ==== | ||
- | |||
- | === LILO configuration === | ||
- | |||
- | To tell your kernel where to resume from, you need to write the info to '' | ||
- | < | ||
- | append=" | ||
- | </ | ||
- | Replace ''/ | ||
- | |||
- | ==== LVM setup ==== | ||
- | |||
- | LILO doesn' | ||
- | |||
- | You don't have to specially adjust '' | ||
- | < | ||
- | mkinitrd -c -k < | ||
- | </ | ||
- | * -h set your hibernation/ | ||
- | * -L activate LVM | ||
- | |||
- | Next step is to make sure your '' | ||
- | < | ||
- | image = / | ||
- | root = /dev/sdaX | ||
- | initrd = / | ||
- | label = Slackware | ||
- | read-only # Partitions should be mounted read-only | ||
- | </ | ||
- | |||
- | Afterwards, run '' | ||
- | < | ||
- | $ lilo | ||
- | </ | ||
- | |||
- | ===== Lock your computer upon resuming ===== | ||
- | |||
- | You may have noticed that when your computer resumes, there is no protection to ensure no one can use your computer. As '' | ||
- | <note warning> | ||
- | |||
- | ==== With pm-utils ==== | ||
- | |||
- | === From the command line === | ||
- | If you dont have an X session open, the only way to lock your computer is to logout from your session before hibernation. You can use the following command: | ||
- | < | ||
- | It's important to logout from every tty prior to hibernation! '' | ||
- | < | ||
- | |||
- | === From an X session === | ||
- | If you want to lock the computer prior hibernation, | ||
- | < | ||
- | You can also create the following script: | ||
- | <code bash># | ||
- | echo ' | ||
- | xlock & | ||
- | sleep 5 | ||
- | pm-hibernate</ | ||
- | '' | ||
- | <note warning> | ||
- | |||
- | ===== Further reading ===== | ||
- | |||
- | * Hibernate to encrypted swap - [[http:// | ||
- | |||
- | ===== Sources ===== | ||
- | * Original source: [[http:// | ||
- | * Original author unknown - original submissions [[http:// | ||
- | * Otherwise [[http:// | ||
- | |||
- | {{tag> |