Slackware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
03-10-2006, 02:50 AM
|
#1
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Rep:
|
Mini HOW-TO: Hibernate and resume
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.
Good luck
|
|
|
03-10-2006, 07:56 AM
|
#2
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
|
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.
|
|
|
03-10-2006, 08:01 AM
|
#3
|
Senior Member
Registered: Nov 2003
Distribution: Slackʍɐɹǝ
Posts: 1,488
|
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.
|
|
|
03-10-2006, 09:55 PM
|
#4
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Original Poster
Rep:
|
Quote:
Originally Posted by Hangdog42
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.
Thanks for the 'Thumbs Up' on this.
|
|
|
03-10-2006, 10:13 PM
|
#5
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Original Poster
Rep:
|
OK...been trying 'suspend' and it won't resume. I'll work on it, but in the meantime, I think I'll keep this thread as "Hibernate and Resume"
When I get 'suspend' to work, I'll try to make a new mini how-to
|
|
|
03-11-2006, 12:36 AM
|
#6
|
LQ Veteran
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642
Rep:
|
You might want to consider submitting this as a Linux Answer tutorial.
|
|
|
03-11-2006, 02:32 AM
|
#7
|
Member
Registered: Mar 2005
Location: chennai(madras), India
Distribution: slackware ofcourse
Posts: 654
Rep:
|
about the script in the previous thread??
what about sleeping, after some time if the system remains idle (as in xp)
and u can fix the time also
Last edited by rkrishna; 03-11-2006 at 02:43 AM.
|
|
|
03-11-2006, 02:41 AM
|
#8
|
Member
Registered: Mar 2005
Location: chennai(madras), India
Distribution: slackware ofcourse
Posts: 654
Rep:
|
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
|
|
|
03-11-2006, 12:07 PM
|
#9
|
Member
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761
Rep:
|
Quote:
Then download software suspend 2 patches by searching it in slack packages.
|
You don't need Suspend2 to suspend - only if swusp with the kernel doesn't work for you.
Also, you may well need to fiddle with kernel options in the append line to get suspend/ resume working properly.
e.g.
My Acer Aspire 5021WLMi requires a 2.6.16-rc kernel and the append line "noapic pci=routeirq" to suspend and resume properly.
|
|
|
03-11-2006, 01:26 PM
|
#10
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Original Poster
Rep:
|
Quote:
Originally Posted by cathectic
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.....
|
|
|
03-11-2006, 03:34 PM
|
#11
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Original Poster
Rep:
|
Well, still having problems getting this old laptop to suspend. It's no big deal, hibernate is my preference anyways.
Actually, now that I think about it, it never suspended in XP either...Maybe the hardare is just not up to the task.
Thanks for the ideas...
Next step: Format/reload with all my notes, etc, to get this thing dead on where I want it, with nothing extra....
|
|
|
03-13-2006, 04:44 PM
|
#12
|
Senior Member
Registered: Nov 2003
Distribution: Slackʍɐɹǝ
Posts: 1,488
|
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.
Last edited by enine; 03-13-2006 at 04:49 PM.
|
|
|
03-13-2006, 04:54 PM
|
#13
|
Moderator
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
|
Since the Tutorial is here and it has it's own Discussion Thread, I have closed this one.
|
|
|
All times are GMT -5. The time now is 01:59 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|