LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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
 
Search this Thread
Old 07-13-2006, 05:40 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 48
Requirements for Suspend to RAM


HI guys,

I have some very specific questions regarding the suspend to ram functionality on Linux.

Until now I was under the impression that one requires swsusp to do suspend-to-ram in linux but according to this website:
http://www.thinkwiki.org/wiki/Swsusp#Suspending

it says that we do not require swsusp.

So here is my question, to have the functionality of suspend-to-ram does the BIOS of our laptop/computer needs to have ACPI support? If yes then do we need to enable the "ACPI Support" in the Kernel configuraiton options?

Basically do we need ACPI to do Suspend-to-ram?

Note that I am NOT talking about suspend2 at all in this post.

Thanks
 
Old 07-14-2006, 05:13 PM   #2
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Anyone?????
 
Old 07-17-2006, 04:53 PM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by kushalkoolwal
HI guys,

I have some very specific questions regarding the suspend to ram functionality on Linux.

Until now I was under the impression that one requires swsusp to do suspend-to-ram in linux but according to this website:
http://www.thinkwiki.org/wiki/Swsusp#Suspending

it says that we do not require swsusp.

So here is my question, to have the functionality of suspend-to-ram does the BIOS of our laptop/computer needs to have ACPI support? If yes then do we need to enable the "ACPI Support" in the Kernel configuraiton options?

Basically do we need ACPI to do Suspend-to-ram?

Note that I am NOT talking about suspend2 at all in this post.

Thanks
Guys I need help on this?????????
 
Old 07-18-2006, 01:02 PM   #4
avheretic
Member
 
Registered: Oct 2005
Distribution: Slackware 11
Posts: 45

Rep: Reputation: 15
ACPI should do it.

Suspend to RAM(S3) is a built-in functionality in the ACPI power subsystem which enables the user to suspend to memory ala suspend in the Windows OS. The BIOS should have ACPI support, even if it does not then compiling it into the kernel will not pose a problem as Linux will automatically switch to using APM incase ACPI support isnt present.
Just make sure you have the line CONFIG_ACPI_SLEEP in your kernel config file marked as 'y'

After building the new kernel you can try suspending by typing in :
echo mem>/sys/power/state
(Need to be super-user to be able to write to the above file.)

swsusp is an application which primarily helps the user to hibernate to disk ie. Suspend to Disk functionality. The config file can be changed to suspend instead of hibernate but then if all you are looking for is Suspend to RAM then there is no use for swsusp.

Hope this helps.
 
Old 07-19-2006, 03:21 PM   #5
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by avheretic
Suspend to RAM(S3) is a built-in functionality in the ACPI power subsystem which enables the user to suspend to memory ala suspend in the Windows OS. The BIOS should have ACPI support, even if it does not then compiling it into the kernel will not pose a problem as Linux will automatically switch to using APM incase ACPI support isnt present.
Just make sure you have the line CONFIG_ACPI_SLEEP in your kernel config file marked as 'y'

After building the new kernel you can try suspending by typing in :
echo mem>/sys/power/state
(Need to be super-user to be able to write to the above file.)

swsusp is an application which primarily helps the user to hibernate to disk ie. Suspend to Disk functionality. The config file can be changed to suspend instead of hibernate but then if all you are looking for is Suspend to RAM then there is no use for swsusp.

Hope this helps.
Thanks Dude very much!!!! Your help was quite useful and it cleared lots of doubt.

So it does mean that I have to enable the ACPI and APM support in the kernel if I want to use Suspend-to-Ram or Suspend-to-disk. Is that right?

Thanks you very much.
 
Old 07-20-2006, 05:09 AM   #6
avheretic
Member
 
Registered: Oct 2005
Distribution: Slackware 11
Posts: 45

Rep: Reputation: 15
APM not quite so.

If your laptop has ACPI support then I see no reason why you need to include APM in the kernel. Just compile in ACPI and then see if Suspend to RAM works. If you want to use Suspend to Disk also then I would recomend that you download swsusp as it helps setting up the temporary swap device to write to and saves you from a lot of headaches.
 
Old 07-20-2006, 05:23 PM   #7
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by avheretic
If your laptop has ACPI support then I see no reason why you need to include APM in the kernel. Just compile in ACPI and then see if Suspend to RAM works. If you want to use Suspend to Disk also then I would recomend that you download swsusp as it helps setting up the temporary swap device to write to and saves you from a lot of headaches.
Thank you avheretic. It was really helpful to read your message.
Ok final conclusion:
For Suspend-to-ram you need:
ACPI support in BIOS
ACPI support in Kernel
echo mem>/sys/power/state command


For Suspend-to-disk you need:
ACPI support in BIOS
ACPI support in Kernel
echo platform > /sys/power/disk; echo disk > /sys/power/state command
or
hibernate script
or
swsusp

Is all the above mentioned information correct? If it is then I am sure loads of people like me will be benefited who are looking for this explanations before they step into the world of ACPI states.

Thank you
 
Old 07-22-2006, 07:46 AM   #8
biophysics
Member
 
Registered: Jan 2002
Location: Germany
Distribution: Kubuntu
Posts: 444

Rep: Reputation: 30
In addition to this you can look into something called suspend2 (http://suspend2.net) if you have litte time then you have to compile kernel and it works almost always well. Key benefits I saw was the speed of the suspend and ability to cancel the suspend instantly.

If you are not happy with compiling kernel then check out http://dagobah.ucc.asn.au/dapper-kernels/

For my kubuntu it works out of box. Must be similar with debian.

Still to facilitate easy use of echo mem>/sys/power/state download "hibernate" package from the above site. It will unload a lot of modules and make life easier.
 
Old 07-23-2006, 10:39 PM   #9
avheretic
Member
 
Registered: Oct 2005
Distribution: Slackware 11
Posts: 45

Rep: Reputation: 15
Alas, my own dont work.

Quote:
Originally Posted by biophysics
In addition to this you can look into something called suspend2 (http://suspend2.net) if you have litte time then you have to compile kernel and it works almost always well. Key benefits I saw was the speed of the suspend and ability to cancel the suspend instantly.

For my kubuntu it works out of box. Must be similar with debian.
Well suspend2 does make life a lot easier. Specially with loading / unloading kernel modules. I however have had no luck trying to get Suspend to RAM working. After building almost everything as modules and unloading them before the suspend process the laptop still fails to wake from the sleep mode ie. there is a lot of hard-disk acticity for 30 secs or so and the LCD stays off. Tried using Vbetool to force the monitor on, reading the documentation in the kernel to get suspend working for special video-instances, all to no avail. If anybody has had a similar problem and managed to get it working I would love to hear from you.

My video-card is the onboard Intel 915 and I am using 915resolution to patch it to 1280x800 resolution.
 
Old 07-24-2006, 06:03 AM   #10
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 34
Have you tried "noapic" on your append line? It seems to be recommended for a lot of machines to get them to resume correctly.
 
Old 07-24-2006, 07:16 PM   #11
bfc
LQ Newbie
 
Registered: May 2006
Distribution: Fedora FC6
Posts: 17

Rep: Reputation: 0
Quote:
Originally Posted by avheretic
Well suspend2 does make life a lot easier. Specially with loading / unloading kernel modules. I however have had no luck trying to get Suspend to RAM working. After building almost everything as modules and unloading them before the suspend process the laptop still fails to wake from the sleep mode ie. there is a lot of hard-disk acticity for 30 secs or so and the LCD stays off. Tried using Vbetool to force the monitor on, reading the documentation in the kernel to get suspend working for special video-instances, all to no avail. If anybody has had a similar problem and managed to get it working I would love to hear from you.

My video-card is the onboard Intel 915 and I am using 915resolution to patch it to 1280x800 resolution.
I'm using FC5, so YMMV.

I have a Toshiba M70 which is using onboard Intel 915 integrated graphics. Here's what I did to get suspend to ram working... attached is a portion of my xorg.conf file:

Code:
Section "Device"
        Identifier  "Videocard0"
        Driver      "i810"
        VendorName  "Videocard vendor"
        BoardName   "Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller"
        Option      "VBERestore" "true"
EndSection
I added the bolded line above.

I also modified the "functions-intel" located in /etc/pm by commenting out "/usr/sbin/vbetool post" shown bolded below

Code:
resume_video()
{
(
#       /usr/sbin/vbetool post
        /usr/sbin/vbetool vbestate restore < /var/run/vbestate
) >/dev/null 2>&1
}
After making these simple modifications, I have no issues at all with suspend to ram functionality (well at least 95% of the time!)

Hope this helps...
 
Old 08-09-2006, 08:07 PM   #12
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 48
Quote:
Originally Posted by bfc
I'm using FC5, so YMMV.

I have a Toshiba M70 which is using onboard Intel 915 integrated graphics. Here's what I did to get suspend to ram working... attached is a portion of my xorg.conf file:

Code:
Section "Device"
        Identifier  "Videocard0"
        Driver      "i810"
        VendorName  "Videocard vendor"
        BoardName   "Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller"
        Option      "VBERestore" "true"
EndSection
I added the bolded line above.

I also modified the "functions-intel" located in /etc/pm by commenting out "/usr/sbin/vbetool post" shown bolded below

Code:
resume_video()
{
(
#       /usr/sbin/vbetool post
        /usr/sbin/vbetool vbestate restore < /var/run/vbestate
) >/dev/null 2>&1
}
After making these simple modifications, I have no issues at all with suspend to ram functionality (well at least 95% of the time!)

Hope this helps...
Yeah I remember I was able to get suspend-to-ram working with the native kernel support (i.e. not using suspend2) by using the vbetool.

BUt the problem is I cannot do Suspend-to-Ram from X windows. Any ideas why?
I am using Nvidia-GeForceFX card with "nvidia" drivers in my xorg.conf file.

Thanks
 
Old 08-10-2006, 04:30 AM   #13
Crossa
LQ Newbie
 
Registered: Apr 2004
Location: china
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by kushalkoolwal
Yeah I remember I was able to get suspend-to-ram working with the native kernel support (i.e. not using suspend2) by using the vbetool.

BUt the problem is I cannot do Suspend-to-Ram from X windows. Any ideas why?
I am using Nvidia-GeForceFX card with "nvidia" drivers in my xorg.conf file.

Thanks
try this :
edit /etc/pm/functions-nvidia

requires pm-utils package
Quote:
#!/bin/bash

[ -x /usr/sbin/vbetool ] || return

suspend_video()
{
(
/usr/sbin/vbetool dpms suspend
) >/dev/null 2>&1
}

resume_video()
{
(
/usr/sbin/vbetool post
) >/dev/null 2>&1
}

lcd_on()
{
(
/usr/sbin/vbetool dpms on
) >/dev/null 2>&1
}

lcd_off()
{
(
/usr/sbin/vbetool dpms off
) >/dev/null 2>&1
}
~
~

 
Old 08-11-2006, 02:49 AM   #14
avheretic
Member
 
Registered: Oct 2005
Distribution: Slackware 11
Posts: 45

Rep: Reputation: 15
Quote:
Originally Posted by bfc
I also modified the "functions-intel" located in /etc/pm by commenting out "/usr/sbin/vbetool post" shown bolded below

Code:
resume_video()
{
(
#       /usr/sbin/vbetool post
        /usr/sbin/vbetool vbestate restore < /var/run/vbestate
) >/dev/null 2>&1
}
Well I did try the VBERestore trick but it didnt work. Another thing, is pm-utils a package included with the FC5 distro? Since I am not using it I think I will try adding the line to my suspend script.

Code:
        /usr/sbin/vbetool vbestate restore < /var/run/vbestate
Where are you getting /var/run/vbestate from ?
 
Old 08-14-2006, 09:49 PM   #15
avheretic
Member
 
Registered: Oct 2005
Distribution: Slackware 11
Posts: 45

Rep: Reputation: 15
It works. Finally !!!!

--- Oops, double posted. ---

Last edited by avheretic; 08-14-2006 at 09:52 PM.
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another suspend-to-RAM problem coldsalmon Linux - Laptop and Netbook 16 08-14-2006 09:57 PM
RH 5 or 6 RAM Requirements salmanal Red Hat 4 03-21-2006 08:13 PM
Suspend to RAM/HD question Lake-end Linux - Laptop and Netbook 6 07-05-2005 01:10 AM
suspend to ram works at last!!!! jwn7 Linux - Laptop and Netbook 4 03-31-2005 06:42 AM
Suspend to RAM in LInuX enigma82 Linux - Hardware 7 09-29-2004 04:28 AM


All times are GMT -5. The time now is 01:17 AM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration