LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-07-2002, 06:34 AM   #1
Slasher
Member
 
Registered: Oct 2002
Location: Norway
Distribution: Gentoo
Posts: 36

Rep: Reputation: 15
Hibernation and suspend to disk


Using Linux (Redhat 8.0) on my laptop, hibernation or suspend to disk where the OS writes everything in RAM to disk and then shuts completely off, is an important feature. I've searched the web, this forum, linux-laptop.net and several other resources, and I'm still stumped.

Main questions are:

Does hibernation/suspend2disk require a supend-partition (primary?) or is a hibernation file (like Windoze uses) sufficient?

I've read that it's not possible to hibernate linux if your bootloader (grub in my case) is located in MBR (also my case), and only possible if it's located on /boot. Is this the case, and if, how do I move my bootloader from MBR to /boot?

Assuming the above problems are solved, what exactly do I have to do to make my linux hibernate? Is there a utility available to make all the appropriate arrangement?

As you've probably understood by now, hibernation/suspend2disk is something I really want to make work, and if anyone have any input at all, it'll be greatly appreciated.

Sorry about the bad english (not my native language), and thanks for reading!
 
Old 11-07-2002, 07:10 AM   #2
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
Hello Slasher, welcome to LQ.org

Firstly, in your profile on this forum, it's best to include what distro you're using I know you say it's redhat but as this post gets further down the page, people will have to scroll up and down.

I have grub in the MBR and hibernation works fine. I close the lid to my laptop and it goes into standby. It wakes when I open it and starts the cardbus up too.

It has to be enabled in your kernel. Redhat 8.0 includes it by default I believe, so if your BIOS has it, it should be enabled. What laptop are you running?
 
Old 11-07-2002, 07:18 AM   #3
vladkrack
Member
 
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334

Rep: Reputation: 30
Hi Slasher,

You could use a program called apm (Advanced Power Management daemon) It can watch your notebook's battery and warn all users when the battery is low, and suspend activi ty too.

I belive grub in MBR has nothing to to with but you could check the man to have sure.

It's in a theres a package called apmd-<version>.

I hopes this help you...
 
Old 11-07-2002, 07:26 AM   #4
Slasher
Member
 
Registered: Oct 2002
Location: Norway
Distribution: Gentoo
Posts: 36

Original Poster
Rep: Reputation: 15
Hi, thanks for replying Bert and vladkrack.

Forgot to metion, but suspend and apm works fine, I can suspend the machine manually, automaticly or by closing the lid.

The difference between suspend and suspend to disk is that suspend never shut down the entire machine, i.e keeping information in ram (draws power), while suspend to disk copies everything to disk and shuts down completely.

Sorry if I caused any misunderstanding.

Edit: The machin is a Dell Inspiron 4100, I830M.

Last edited by Slasher; 11-07-2002 at 07:33 AM.
 
Old 11-15-2002, 02:49 AM   #5
gig103
LQ Newbie
 
Registered: Aug 2002
Posts: 11

Rep: Reputation: 0
I am looking to do a "hibernate" feature with linux so i can dump winxp (right now its just so conveninent to be running in 15sec). can i do this with Red Hat 7.3?? If so, how? If not, how can i do it in Red hat 8 .. .which I could download :-)

-Mike
 
Old 12-19-2002, 10:41 AM   #6
linowes
Member
 
Registered: Sep 2002
Location: New Hampshire
Distribution: RH8.0
Posts: 55

Rep: Reputation: 15
Slasher, did you ever get this to work? I too would like to get hibernate working on my Portege 7200.
 
Old 12-19-2002, 04:17 PM   #7
Slasher
Member
 
Registered: Oct 2002
Location: Norway
Distribution: Gentoo
Posts: 36

Original Poster
Rep: Reputation: 15
No, never found out how. Still searching....
 
Old 12-19-2002, 05:04 PM   #8
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
These folks have a few suggestions, and a few got it working ...

Bert
 
Old 12-19-2002, 05:09 PM   #9
Slasher
Member
 
Registered: Oct 2002
Location: Norway
Distribution: Gentoo
Posts: 36

Original Poster
Rep: Reputation: 15
True, checked it out som time ago. But I got the impression that it wasn't One good solution, but more tweaking and tuning to get it to work. And it isn't clear whether it's necessary to have a hibernation partition or not. That's why I'm still searching
 
Old 12-24-2002, 09:19 AM   #10
linowes
Member
 
Registered: Sep 2002
Location: New Hampshire
Distribution: RH8.0
Posts: 55

Rep: Reputation: 15
I've read about "swsusp" patches for the Linux kernel, which is "suspend to disk", I think is the same as hibernate (?).

One thread says (I quote):
>>On many laptops, the suspend-to-disk feature is controlled by the BIOS and requires a FAT partition as the first partition on the disk. A DOS utility or its Linux equivalent "phdisk" writes a file ~ the size of the machine's RAM that's composed of contiguous sectors to this partition, then writes the location of the start and end sectors to some secret place in the NVRAM. Then you can trigger the suspend-to-disk feature with a special key sequence regardless of what OS you're running, often Fn-F12.

>>If that doesn't work, the "swsusp" patches for the Linux kernel add similar functions that take slightly longer to complete, but work everywhere.

--
but being a Linux newbie, I'm pretty intimidated by this. And I'd rather work on my laptop than have to repartition and start over.
 
Old 12-25-2002, 04:38 PM   #11
Slasher
Member
 
Registered: Oct 2002
Location: Norway
Distribution: Gentoo
Posts: 36

Original Poster
Rep: Reputation: 15
I agree. I'm probably gonna wait for a kernel with ACPI support, and hopefully every issue is gonna vanish :P
 
Old 08-24-2003, 05:06 PM   #12
gig103
LQ Newbie
 
Registered: Aug 2002
Posts: 11

Rep: Reputation: 0
It has been a while since this thread was touched, and I never got around to installing Linux because of this issue.

Now that Red Hat Linux 9.0 is out, is there any ACPI support? What about the original issue of suspend-to-disk, where the RAM contents are written to the harddrive so that the machine boots faster by restoring everything?
 
Old 08-24-2003, 05:17 PM   #13
Slasher
Member
 
Registered: Oct 2002
Location: Norway
Distribution: Gentoo
Posts: 36

Original Poster
Rep: Reputation: 15
gig103, to get ACPI in RH 9, one needs to compile it afterwards, there is no generic ACPI support in RH 9.0 (at least to my knowledge). The next RH release will be based on kernel 2.4.21 (I think), which has much better ACPI support (most of the ACPI work done for kernel 2.5 and 2.6 have been inkluded in 2.4.21). Think I got that correct

Anyways, if ACPI is a key issue, and you don't vant to compile the lot on your own, it would be wise to either wait for the next RH release or consider another distro.
 
Old 09-01-2003, 09:54 AM   #14
browny_amiga
Member
 
Registered: Dec 2001
Location: /mnt/UNV/Mlkway/Earth/USA/California/Silicon Valley
Distribution: Kubuntu, Debian Buster Stable, Windoze 7
Posts: 684

Rep: Reputation: 56
I just found these links on the subject.

http://sourceforge.net/projects/swsusp
http://fchabaud.free.fr/English/defa...p&FILE2=Swsusp

In case somebody wants to make it work, here is a path how.

I for myself still have to figure out how to apply a diff patch to a kernel.
 
Old 09-01-2003, 11:23 AM   #15
raylpc
Member
 
Registered: Jun 2003
Location: Canada
Distribution: Red Hat 9
Posts: 94

Rep: Reputation: 15
just as a reminder, the swsusp patch needs a plain vanilla kernel; it won't work with the RH9 kernel source.

A really brief howto:
1. download a vanilla kernel source from www.kernel.org.
2. su to root.
3. cd /usr/src
4. tar -zxvf kerelxxxxx.gz or tar -jxvf kernelxxxxx.bz2
5. ln -s /usr/src/the_new_kernel /usr/src/linux
6. download the current swsusp patch from http://sourceforge.net/project/showf...group_id=25964.
7. bzip2 -dc < /path_to_the_swsusp_patch | patch -p1
8. make xconfig, enable the software suspend in the general setup section. (plus properly configuring ur kernel, you can find more help from the forum)
9. make dep clean bzImage
10. install the new kernel.
11. download the suspend script from http://sourceforge.net/project/showf...group_id=25964.
12. install the script.
13. append "resume=your swap partion" to ur kernel parameters in grub or lilo.

This is just a very brief summary. For more information, please refer to the swsusp's doc.

P.S.
1. There might be some risk trying that out.
2. before applying a patch, it's a good idea to run with --dry-run option to see if the patch applied cleanly.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Suspend to disk possible on desktop? captainfreedom Mandriva 1 04-09-2005 09:09 AM
apm suspend-to-disk m00t00 Linux - Laptop and Netbook 0 11-24-2004 03:21 PM
Can't suspend to disk. tfc Linux - General 2 11-14-2004 03:25 PM
how to suspend to disk. ? qwijibow Linux - Software 7 10-07-2004 06:56 PM
Suspend to Disk (Possible with LVM?) dino9832 Linux - Laptop and Netbook 1 10-05-2004 09:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration