LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Requirements for Suspend to RAM (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/requirements-for-suspend-to-ram-463801/)

kushalkoolwal 07-13-2006 05:40 PM

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

kushalkoolwal 07-14-2006 05:13 PM

Anyone?????:scratch:

kushalkoolwal 07-17-2006 04:53 PM

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?????????

avheretic 07-18-2006 01:02 PM

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.

kushalkoolwal 07-19-2006 03:21 PM

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.

avheretic 07-20-2006 05:09 AM

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.

kushalkoolwal 07-20-2006 05:23 PM

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

biophysics 07-22-2006 07:46 AM

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.

avheretic 07-23-2006 10:39 PM

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.

cathectic 07-24-2006 06:03 AM

Have you tried "noapic" on your append line? It seems to be recommended for a lot of machines to get them to resume correctly.

bfc 07-24-2006 07:16 PM

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...

kushalkoolwal 08-09-2006 08:07 PM

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

Crossa 08-10-2006 04:30 AM

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
}
~
~



avheretic 08-11-2006 02:49 AM

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 ?

avheretic 08-14-2006 09:49 PM

It works. Finally !!!!
 
--- Oops, double posted. ---


All times are GMT -5. The time now is 02:52 AM.