# Standby with Suspend to RAM

## mrknowitall

Hi Folks,

I want suspend to RAM on my machine, but it doesn't seem to work and don't have a clue where to look. I've done that several times on other boxes, but with this one, I don't know, maybe I missed something. I hope you have a nice advice...

kernel: tuxonice 2.6.31-r9: suspend to ram is enabled

desktop: kde 4.3 with powerdevil running (suspend to disk aka hibernation works...) 

is it something with the bios??? or the motherboard (GA-965P-DQ6)???

any hint appreciated!!!

cheers!

alex

----------

## patrikas

Hi,

Have you followed the Power Management Guide ? What exactly happens after 'hibernate-ram' ?

----------

## mrknowitall

hi patrikas,

thanks for reply!

this is the output of hibernate-ram:

```

hibernate-ram: No suitable suspend methods were found on your machine.

hibernate-ram: You need to install a kernel with support for suspending to

hibernate-ram: disk or RAM and reboot, then try again.

```

and this is kernel section regarding power-management:

```

[*] Power Management support      

[ ]     Power Management Debug Support                                                                                    

[*] Suspend to RAM and standby                                                                                                    

[*] Hibernation (aka 'suspend to disk')                                                                                           

(/dev/mapper/isw_cdgbhbhedi_Volume06) Default resume partition                                                              

<*>   Enhanced Hibernation (TuxOnIce)  --->                                                                               

[*]  ACPI (Advanced Configuration and Power Interface) Support  --->                                                             

< > APM (Advanced Power Management) BIOS support  --->                                                                             

      CPU Frequency scaling  --->                                                                                                 

-*-  CPU idle PM support

```

the relevant grub section:

```

title Gentoo(TOI)

root (hd0,0)

kernel /boot/kernel-genkernel-x86-2.6.31-tuxonice-r10 rootfstype=ext4 root=/dev/ram0 real_root=/dev/mapper/isw_cdgbhbhedi_Volume05 init=/linuxrc ramdisk=8192 dodmraid udev video=uvesafb:ywrap,pmipal,1680x1050-32@60,mtrr:3 splash=silent,fadein,theme:livecd-2007.0 console=tty1 quiet resume=/dev/mapper/isw_cdgbhbhedi_Volume06 acpi_sleep=s3_bios

initrd /boot/initramfs-genkernel-x86-2.6.31-tuxonice-r10

```

any ideas, where to look?

merci!

alex

----------

## patrikas

Strange issue as you have kernel support compiled for it. I'd try to play around with BIOS ACPI options and those in /etc/hibernate, probably check how it goes without acpi_sleep kernel parameter, but this shouldn't make a difference. 

PS: Is CONFIG_HOTPLUG_CPU enabled ?

Have you tried 'echo mem > /sys/power/state' ?

----------

## dmpogo

Can you try to delete all options from the grub kernel option line related to that, especially ones about S3 state ?

----------

## mrknowitall

Sorry for taking so long, but my harddisk crashed in the meantime. I'll never ever do a SW-Raid0 (stripping)... Fortunatelly, I had a backup. I can absolutely recommend rdiff-backup!

Concerning the orignal problem with the standby, I found a switch in the BIOS where I can switch from using S1 to S3. After turning on S3, the suspend to RAM option was available. After a short moment of success, I found myself in trouble again.

When I use the suspend to RAM button (KDE4) the system goes down immediatelly, unfortunatelly, I doesn't come up again. Just a weird noise from the PC-speaker. (Probably some sort of complaining about something noise). And I have to unplug the PC completely to be able to boot again.

Any ideas?

----------

## xaviermiller

Hello,

Have you emerged pm-utils ?

----------

## mrknowitall

yup, it's already installed

----------

## Mad Merlin

Are you using any binary blobs? x11-drivers/nvidia-drivers or x11-drivers/ati-drivers would probably be the only likely candidates there, but they sometimes often don't play nicely with suspend to RAM.

----------

## DirtyHairy

To nail down the problem, I'd first try suspending without X running. For diagnostic purposes, you can also trigger a suspend completely manually by writing to /sys/power/state via

```
echo -n mem > /sys/power/state
```

If it suspends and wakes up without X running, then your graphics driver is the culprit. If not, you can start removing modules prior to suspend and see whether this helps. As a last resort, you can try to find out whether your BIOSes  DSDT is broken and try to fix it; also, a BIOS update might help.

P.S.: You could also try different kernel version, including non-tux-on-ice ones (I personally never had to use tux-on-ice to make my machines standby / suspend / hibernate properly).

----------

## mrknowitall

i don't think it's an X issue respectivley nvidia.

i did tried the hibernation from console. then the system seems to turn off completely, as there is no flashing of power led. then, when i try to restart the system, the complaining sound of the motherboard occurs and i have to try several times till the system is bootable again.

i think the powermanagment-settings of my MB are somewhat confusing:

* ACPI Suspend Type: 

** S1(POS): Set ACPI suspend type to "Power On Suspend" (default) --> if set, I don't have suspend to RAM offered

** S3(STR): Set ACPI suspend type to "Suspend to RAM" --> Suspend to RAM is offered

* Soft-Off by PWR-BTTN

** Instant-Off: Press power button then Power off instantly (default)

** Delay 4 Sec.: Press power button 4 sec. to Power off. Enter suspend if button is pressed less than 4 sec.

* PME Event Wake Up

** Disabled: Disable this function

** Enable PME Event Wake up. (default)

I tried various combinations, but nothing seems to work. Any ideas?

Gracias!

Alex

----------

## Ric95

I found a bug report that led me to fix this. 

https://bugs.gentoo.org/show_bug.cgi?format=multiple&id=205564

The suspend script gets pulled in when hal is emerged with the 'laptop' use flag. 

```
use="laptop" emerge --newuse sys-apps/hal
```

It now works for me   :Smile:   ( although insead of oneshoting it, I put " sys-apps/hal laptop" in /etc/portage/package.use )

----------

