SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Problem: You have a system that you need to put to sleep, for whatever reason ( Need to conserve power on a laptop, or want a possibly quicker 'shutdown and reboot').
Solution: Hibernate. It saves everything (Hopefully!) to a file on your hard drive, and when you bring it back up, it was just as you left it.
Sound good? Well, it can be. It can also drive you insane.
I'm going to talk about one route to possible success
Successful hibernation requires a few things in Linux:
An ACPI compliant system (BIOS, HDD,etc) Well beyond the scope of this post. Check on the web, or take it up with your system manufacturer.
A newer kernel (Can be done with older kernels, but the benifits outweigh the drawbacks. Get it, compile it, love it)
A place to store the 'image' at (It defaults to the first swapspace it finds, whether it's a file or partition)
A small addition to lilo (I don't use grub, and since Slackware ships with lilo, and I'm trying to keep this simple, I'll stick with lilo).
A program to start the hibernation with. (I use KDE, and has KLaptop builtin. And it works)
Let's take a look in more depth:
Config the kernel
Do a search in this forum, and you'll find as many ways to configure a kernel as there are feathers on a chicken. Find one you like, and use that. For the purposes of this mini how-to, I'll only tell you what is needed for hibernation/ACPI to usually work.
First, you need to enable as much as you can in the ACPI section. Here is my ACPI section from my actual config file:
Code:
#
# Power management options (ACPI, APM)
#
CONFIG_PM=y
CONFIG_PM_LEGACY=y
# CONFIG_PM_DEBUG is not set
CONFIG_SOFTWARE_SUSPEND=y
CONFIG_PM_STD_PARTITION=""
#
# ACPI (Advanced Configuration and Power Interface) Support
#
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_SLEEP_PROC_FS=y
CONFIG_ACPI_SLEEP_PROC_SLEEP=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=y
# CONFIG_ACPI_HOTKEY is not set
CONFIG_ACPI_FAN=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_THERMAL=y
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_IBM is not set
# CONFIG_ACPI_TOSHIBA is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
# CONFIG_ACPI_CONTAINER is not set
Mine works, so you can use it as a guide.
Go ahead and configure/make/install and reboot.
Edit /etc/lilo.conf
Add the following to your lilo.conf:
Code:
append="resume=/dev/hda3"
Substitute your swap partition or file for '/dev/hda3'
Example: append="/dev/sdd5" or append="/usr/swapfile"
Save, run 'lilo'
Start the process:
I already had KLaptop configured for Hibernation. It's in the ACPI tab. You'll need to know the root password to get the 'Helper Applications' working.
Now if you right click on Klaptop in the system tray, one option is 'Hibernate'
Click it. Your system SHOULD saave everthing, then turn off.
To restart, just press your power button. It will start the regular boot process, but will veer off into the resume.
As I said, this is a MINI how-to. There are programs to get you hibernating from the command line, and other utilities to do the same in your Desktop Enviornment as Klaptop.
Nice piece of work! Have you submitted it to the Tutorials section? I know this is somewhat Slackware specific, but having this in Tutorials (or maybe the Wiki) would make it harder to lose.
Should add info on how to setup suspend as well. I don't like to wait for the hibernation file to write and read from the drive so I stick with suspend unless I'm going to be away from power for a long time. I've gottne mine to where it will boot just about as fast as reading the hibernation file.
Have you submitted it to the Tutorials section? I know this is somewhat Slackware specific, but having this in Tutorials (or maybe the Wiki) would make it harder to lose.
Not yet, because of the following ommision:
Quote:
Originally Posted by enine
Should add info on how to setup suspend as well.
The ONLY reason that I have not is that I haven't tried/worked it out yet. Maybe this weekend.
this is one of my friends mail to me --for using suspend
-------
I use suspend with slack on my la top. You need to download the source
for
the latest 2.6.xx kernel. Then download software suspend 2 patches by
searching it in slack packages. You need to compile the kernel after
applying
the patch. For this, I attach a .config file that I use on my laptop.
Put it
in the source directory. type make oldconfig and then run make
menuconfig.
You must then edit the suspend2 path with the path of the swap
partition on
your disk at two places in the menuconfig suspend2 subitem menu. Make
sure to
apply the patch before copying the .config file.
-------------
if i need to post the .config i can, i have it with me
My Acer Aspire 5021WLMi requires a 2.6.16-rc kernel and the append line "noapic pci=routeirq" to suspend and resume properly.
That's the type of thing I'm trying to accomplish- Getting stuff to work 'out-of-the-box', without downloading new things (with the exception of the kernel. It's a required thing for most new hardware to work, anyway).
Not that I have an aversion to new software, but I want to push the limits on what is already on the stock install.....
mine suspends fine with linux but using just apm instead of acpi.
I've never tried hibernate in linux, never carded to wait for it to read the hibernation file in windows, took forever.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.