LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices

Reply
 
LinkBack Search this Thread
Old 02-14-2008, 03:21 PM   #1
ruppertus
Member
 
Registered: Jun 2007
Location: Poland
Distribution: Debian Sid
Posts: 40

Rep: Reputation: 15
Hibernation vs suspend2disk and suspend2ram


I'm trying to set up hibernation (suspend2disk ?) and suspend2ram in my HP NX7300 laptop using the newest kernel (2.6.24.2). Actually I'm not sure if hibernation and suspend2disk is the same. I've read that suspend2 is a software mode operation and hibernation is native one supported by kernel. Am I right?

I've found the following comment in the kernel 2.6.24 changelog:
http://www.kernel.org/pub/linux/kern...angeLog-2.6.24

Quote:
> I guess it is time to clarify that suspend and hibernation are separate
> things, and add Rafael as a maintainer. Plus, people blame us for suspend
> problems, anyway, I guess it is fair to mark us as suspend maintainers, too.
What does it mean? What is better to configurate?
I use Debian lenny/testing disribution.

Can you help me, please?
 
Old 02-14-2008, 04:53 PM   #2
biophysics
Member
 
Registered: Jan 2002
Location: Germany
Distribution: Kubuntu
Posts: 444

Rep: Reputation: 30
Generally hibernation and suspend-to-disk are the same.
I have used the word ^^^^^^^^^^^^^^^ (-to-) instead of number "2" to avoid confusion.
Suspend to RAM is suspending to RAM :-)

The above two are already inside kernel.

suspend2 (is now called as tuxonice) uses different methodology/algorithm to do the same. One interesting thing with tuxonice is that it can first freeze the system and write to disk and the write to RAM and wait. This way if you have battery power the machine will resume in 2-3 sec (in my HP laptop) but if I run out of battery it takes upto 10 sec - but data is not lost.

tuxonice has also several features but one has to patch kernel for now.
 
Old 02-15-2008, 05:32 AM   #3
ruppertus
Member
 
Registered: Jun 2007
Location: Poland
Distribution: Debian Sid
Posts: 40

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by biophysics View Post
suspend2 (is now called as tuxonice) uses different methodology/algorithm to do the same. One interesting thing with tuxonice is that it can first freeze the system and write to disk and the write to RAM and wait. This way if you have battery power the machine will resume in 2-3 sec (in my HP laptop) but if I run out of battery it takes upto 10 sec - but data is not lost.

tuxonice has also several features but one has to patch kernel for now.
I've read in the kernel documentation (or just in a module docs) that the s2both (s2disk and s2ram) do the same.

What's better in your opinion and what whould you recommended? I use 2.6.24.2 kernel and I don't know if I find the patch for the newest version.

I've read as well as that in both method I need to install (in debian)
hibernation package to get /etc/hibernation.conf (don't remember a whole path) script.

What should I change in that scripts to make my HP NX7300 works. I've read lots of articules about that but in most cases they are out of date I suppose because there are lots of new features and bug fixes in the newest kernel.

Last edited by ruppertus; 02-15-2008 at 05:33 AM.
 
Old 02-15-2008, 10:10 AM   #4
biophysics
Member
 
Registered: Jan 2002
Location: Germany
Distribution: Kubuntu
Posts: 444

Rep: Reputation: 30
I use tuxonice and found it works better even with strange hardware.

http://www.tuxonice.net and choose a stable release for the first time and download the corresponding kernel.

1. Just patch your vanilla kernel
2. change the initramfs
3. install hibernate script (not mandatory but recommended)
4. Start using

See wiki.tuxonice.net for info.

BTW which distro are you using ?
 
Old 02-15-2008, 11:40 AM   #5
ruppertus
Member
 
Registered: Jun 2007
Location: Poland
Distribution: Debian Sid
Posts: 40

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by biophysics View Post
1. Just patch your vanilla kernel
Right now there is only a patch just for 2.6.24 kernel and I use 2.6.24.2.

Quote:
Originally Posted by biophysics View Post
2. change the initramfs
I have disabled support for initramfs. Should I enable it?
Code:
INITRAMFS_ROOT_GID [=]
INITRAMFS_ROOT_UID [=]
INITRAMFS_SOURCE [=]
Quote:
Originally Posted by biophysics View Post
BTW which distro are you using ?
I use Debian lenny/testing distribution.

I enabled s2ram. It works great. Suspend to disk (s2disk) works but I can't resume.

How should /boot/grub/menu.lst look like?
Code:
(...)
title Debian 2.6.24.2
root (hd0,4)
kernel /boot/bzImage root=/dev/sda5 vga=0x318

title Hibernate
root (hd0,4)
kernel /boot/bzImage root=/dev/sda5 vga=0x318 resume=swap:/dev/sda8 ro
# other options: quiet resume2=

Last edited by ruppertus; 02-15-2008 at 11:43 AM.
 
Old 02-15-2008, 08:46 PM   #6
ruppertus
Member
 
Registered: Jun 2007
Location: Poland
Distribution: Debian Sid
Posts: 40

Original Poster
Rep: Reputation: 15
OK, I patched 2.6.24 kernel and have installed:
Code:
apt-get install hibernate tuxonice-userui
I've checked the /usr/sbin/hibernate script without any changes in /etc/hibernate.conf
Just wifi (iwl3945) doesn't work after resume. But I didn't have time to take care about that.

1. How to start suspended mode which will hibernate when the battery level will go down to a minimal level?

2. How can I make menu.lst in grub automatic? Should I write my own script or ist there any other way (have heard about update-grub).

3. Who knows when will be the suspend2 module jointed to a kernel?
 
Old 02-16-2008, 09:33 AM   #7
biophysics
Member
 
Registered: Jan 2002
Location: Germany
Distribution: Kubuntu
Posts: 444

Rep: Reputation: 30
Quote:
Originally Posted by ruppertus View Post
OK, I patched 2.6.24 kernel and have installed:
Code:
apt-get install hibernate tuxonice-userui
I've checked the /usr/sbin/hibernate script without any changes in /etc/hibernate.conf
Just wifi (iwl3945) doesn't work after resume. But I didn't have time to take care about that.

1. How to start suspended mode which will hibernate when the battery level will go down to a minimal level?

2. How can I make menu.lst in grub automatic? Should I write my own script or ist there any other way (have heard about update-grub).

3. Who knows when will be the suspend2 module jointed to a kernel?
1. /etc/hibernate/suspend2.conf change the powerdownmethod to 3 (note down the current setting first). It does not shift from a suspend to hibernate when the battery goes low. changing it to 3 above does _both_ at the same time - and machine is stopped. Now if you have battery then resumes from RAM (very fast); if no battery then resumes from disk.

2. Why do you want to do this ? (if you are sharing partition just unmount before doing a hibernate with tuxonice

3. There was big debate... search google
 
  


Reply

Tags
debian, hibernation, s2ram, suspend2ram


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Suspend2Disk & "Freeing memory..." how to do it faster? lovetek Suse/Novell 1 01-22-2006 05:23 AM
suspend2disk alma Suse/Novell 1 01-18-2006 09:14 AM


All times are GMT -5. The time now is 08:20 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration