# Can't resume after suspending to ram

## pielgrzym

Hello,

I'm fighting this for several hours now. I haven't found any similar problem in gentoo forums. I have the latest kernel .21. Here is my Kernel config.gz. My acpi sleep is enabled (as well as hot plugable cpu). Suspending works ok, but when I try to resume, I can hear hdds spin up and all vital fans spin up, but computer is totally dead (keyboard has leds on, but my usb mouse is dead (laser is off)). All I can do i reboot  :Sad:  It doesn't matter if I use the echo method or the hibernate-ram - the effect is the same. 

In dmesg I can see: 

```

ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) -> IRQ 17

PCI: Setting latency timer of device 0000:00:1f.2 to 64

ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0x33 impl SATA mode

ahci 0000:00:1f.2: flags: 64bit ncq ilck stag pm led clo pmp pio slum part 

ata1: SATA max UDMA/133 cmd 0xf8832900 ctl 0x00000000 bmdma 0x00000000 irq 17

ata2: SATA max UDMA/133 cmd 0xf8832980 ctl 0x00000000 bmdma 0x00000000 irq 17

ata3: DUMMY

ata4: DUMMY

ata5: SATA max UDMA/133 cmd 0xf8832b00 ctl 0x00000000 bmdma 0x00000000 irq 17

ata6: SATA max UDMA/133 cmd 0xf8832b80 ctl 0x00000000 bmdma 0x00000000 irq 17

scsi0 : ahci

Device driver host0 lacks bus and class support for being resumed.

ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

ata1.00: ATA-7: WDC WD2500KS-00MJB0, 02.01C03, max UDMA/133

ata1.00: 488397168 sectors, multi 0: LBA48 

ata1.00: configured for UDMA/133

scsi1 : ahci

Device driver host1 lacks bus and class support for being resumed.

ata2: SATA link down (SStatus 0 SControl 300)

scsi2 : ahci

Device driver host2 lacks bus and class support for being resumed.

scsi3 : ahci

Device driver host3 lacks bus and class support for being resumed.

scsi4 : ahci

Device driver host4 lacks bus and class support for being resumed.

```

The hibernate.log looks like this:

```

Starting suspend at sob maj 12 17:32:43 CEST 2007

hibernate-ram: [01] Executing CheckLastResume ... 

hibernate-ram: [01] Executing CheckRunlevel ... 

hibernate-ram: [01] Executing LockFileGet ... 

hibernate-ram: [01] Executing NewKernelFileCheck ... 

hibernate-ram: [10] Executing EnsureSysfsPowerStateCapable ... 

hibernate-ram: [11] Executing XHacksSuspendHook1 ... 

hibernate-ram: [59] Executing RemountXFSBootRO ... 

hibernate-ram: [89] Executing SaveKernelModprobe ... 

hibernate-ram: [91] Executing LockGnomeScreensaver ... 

hibernate-ram: [91] Executing ModulesUnloadBlacklist ... 

Unloading blacklisted modules listed /etc/hibernate/blacklisted-modules

Module version for ipw2100 is 

Module version for ipw2200 is 

Module version for ndiswrapper is 

hibernate-ram: [91] Executing ModulesUnloadBlacklist ... 

Unloading blacklisted modules listed /etc/hibernate/blacklisted-modules

Module version for ipw2100 is 

Module version for ipw2200 is 

Module version for ndiswrapper is 

hibernate-ram: [95] Executing XHacksSuspendHook2 ... 

xhacks: changing console from 3 to 15

hibernate-ram: [98] Executing CheckRunlevel ... 

hibernate-ram: [99] Executing DoSysfsPowerStateSuspend ... 

hibernate-ram: Activating sysfs power state mem ...

```

My computer is asus p5b (Intel ICH8 for sata, Jmicron for pata), dual core pentium d. Somebody please, please help me  :Sad: 

----------

## frenkel

Try this:

Stop X. Just use plain console to test it. Create a script, that unloads your usb modules, then suspend, and then reloads the modules again. If that doesn't work either, you probably need to pass something like acpi_sleep=s3_bios to the kernel. Just search on google for acpi_sleep and you will find loads of stuff about it.

----------

## pielgrzym

I think it's not related to graphics board (already checked the acpi_sleep params, which should help for cprappy gfx). I forgot to mention that I already tested it from tty3 with same effect (with X off). This drives me crazy. I forgot to mention that I can wake up only using the power button, since the keyboard is dead  :Sad: 

----------

## pielgrzym

*shameless bump*

----------

## frenkel

 *pielgrzym wrote:*   

> I think it's not related to graphics board (already checked the acpi_sleep params, which should help for cprappy gfx). I forgot to mention that I already tested it from tty3 with same effect (with X off). This drives me crazy. I forgot to mention that I can wake up only using the power button, since the keyboard is dead 

 

Keyboard can't be used to resume by a lot of computers, that has something to do with your moterhboard. Did you try both s3_bios and s3_mode as acpi_sleep=? I had exactly your problem, and it was solved by one of those parameters.

----------

## pielgrzym

I tried both with the same effect - system doesn't resume, it's inaccessible via ssh, lighttpd doesn't seem to work, I can't ping it  :Sad: 

----------

## pielgrzym

*homo bumpicus*

----------

## pielgrzym

There has got to be a way  :Wink: 

----------

## frenkel

 *pielgrzym wrote:*   

> There has got to be a way 

 

Stop bumping, start searching yourself. There are a lot of problems with resuming from suspend, especially on newer hardware like yours.

----------

## Evincar

What is your hardware, anyway? In the gentoo-wiki, there is a parameter that you must add to your grub.conf for hibernate-ram to work. Other than that...difficult to tell w/o knowing what you are using.

----------

## pielgrzym

frenkel, I already made a research before posting. People have various problems, but the solutions are usually the same (kernel parameter etc.). Sorry for being rude  :Smile: 

Evincar, here are my detailed specs:

Mobo: Asus P5B (two pata disks connected to JMicron controller and one SATA drive connected to ICH8 Intel controller)

CPU: Intel Pentium D 915 (system running in 32bit though)

RAM: 1GB dual channel - Kingston

HDD: pata(WD400JB 40GB, WD1600JB 160GB), sata(WD_forgot_the_name 250GB)

GPU: Nvidia 7100 by Gigabyte

PCI: ata controller based on sil680 chip with one pata DVD-RW connected

USB mouse(Razer Viper), PS2 keyboard

I'll ommit usb connected stuff and power supplies  :Wink:  Hope my specs will help  :Smile: 

And here is again my kernel config

----------

## frenkel

 *pielgrzym wrote:*   

> frenkel, I already made a research before posting. People have various problems, but the solutions are usually the same (kernel parameter etc.). Sorry for being rude 
> 
> Evincar, here are my detailed specs:
> 
> Mobo: Asus P5B (two pata disks connected to JMicron controller and one SATA drive connected to ICH8 Intel controller)
> ...

 

With that, I meant, that a lot of people don't get it to work, so you will probably have to wait till some kernel update fixes your problem.

----------

## unexist

I tried suspend-to-ram with 2.6.21 this morning and can't figure out why it doesn't work. After a few annoying tries I switched back to 2.6.19 and it works completely. Maybe I will try again after a few more gentoo kernel versions.  :Wink: 

----------

## pielgrzym

Mine computer can't resume on any kernel I've tried (2.18-2.21)  :Sad:  I think it's due to devs focus on mobile computer (which is the way it should be)  :Smile: 

----------

## Evincar

 *unexist wrote:*   

> I tried suspend-to-ram with 2.6.21 this morning and can't figure out why it doesn't work. After a few annoying tries I switched back to 2.6.19 and it works completely. Maybe I will try again after a few more gentoo kernel versions. 

 

Seems 2.6.21 has a ACPI issue, I am afraid you will have to forget about Suspend-to-RAM for the moment  :Sad: .

----------

## devsk

 *Evincar wrote:*   

>  *unexist wrote:*   I tried suspend-to-ram with 2.6.21 this morning and can't figure out why it doesn't work. After a few annoying tries I switched back to 2.6.19 and it works completely. Maybe I will try again after a few more gentoo kernel versions.  
> 
> Seems 2.6.21 has a ACPI issue, I am afraid you will have to forget about Suspend-to-RAM for the moment .

 Then that issue must be with newer mobos and bios'es only because I suspend-to-ram on my Abit AN8-SLI mobo everyday and it works with 2.6.21.

----------

## Evincar

 *devsk wrote:*   

>  *Evincar wrote:*    *unexist wrote:*   I tried suspend-to-ram with 2.6.21 this morning and can't figure out why it doesn't work. After a few annoying tries I switched back to 2.6.19 and it works completely. Maybe I will try again after a few more gentoo kernel versions.  
> 
> Seems 2.6.21 has a ACPI issue, I am afraid you will have to forget about Suspend-to-RAM for the moment . Then that issue must be with newer mobos and bios'es only because I suspend-to-ram on my Abit AN8-SLI mobo everyday and it works with 2.6.21.

 

Does an Intel ICH7 count as "newer"?

I don't know, maybe I messed up with some config, but I haven't found anything pointing that, and 2.6.18 used to work, plus I have read some other people saying the same, so I am leaning towards an ACPI issue...[/topic]

----------

## devsk

ICH7 and AN8 are same age siblings. So, it should work. Some driver needs to be unloaded maybe? I unload everything that I don't need to resume.

----------

## RoundsToZero

Try vbetool and make sure all the blacklisted-modules in the hibernate package are actually able to be unloaded.  I mean, if hibernate-ram is trying to unload something that you have compiled into the kernel, you may have a problem.  Look at the blacklisted-modules and find them in kernel config and make sure they're compiled as modules.

----------

## Ingmarv

 *pielgrzym wrote:*   

> GPU: Nvidia 7100 by Gigabyte

 

Using 'nvidia-driver' or using the opensource 'nv' driver ?

If you're using proprietary driver, try the nv driver and test.

Also, don't use agpgart if you want to suspend, use nvidia_agp. so get agpgart out of your kernel, and put this in your xorg.conf, _if_ you use the opensource driver:

 *Quote:*   

>         # this replaces /dev/agpgart to make suspend to RAM work
> 
>         # 0 disables AGP; 1 NvAGP; 2 AGPGART
> 
>         Option          "NvAGP" "1"
> ...

 

I'm not sure if those steps are enough to accomplish the AGP-part, google around a bit to find out.

----------

## devsk

NVIDIA has fixed their suspend problems for a long time now.

----------

## Roman_Gruber

hi,

I am using hibernate to disk.

I  have to change some kernel settings and also the script. Look at the gentoo wiki page for it.

----------

## Evincar

Well, many thanks for the tips. I am currently revising my kernel and found out that psmouse and serio_i8042 are built in!

Now, the problem is, I can put psmouse as a module, but I can't find i8042 at all!  :Sad: .

```
rep SERIO ./.config

CONFIG_SERIO=y

CONFIG_SERIO_I8042=y

# CONFIG_SERIO_SERPORT is not set

# CONFIG_SERIO_CT82C710 is not set

# CONFIG_SERIO_PCIPS2 is not set

CONFIG_SERIO_LIBPS2=y

# CONFIG_SERIO_RAW is not set

```

But behind serio, there is Serio_serport, not I8042. Maybe it is imposed by something else?

----------

## Evincar

Well, moduled the i8042 (it's not exactly intuitive   :Confused:  ), but no luck...

I think it's better if I follow here:

https://forums.gentoo.org/viewtopic-t-562787.html

----------

## RoundsToZero

Oh right yeah I'm not sure it's possible to do i8042.  How'd you do it, by the way?  Hopefully not by blindly editing the .config file.  :Smile: 

----------

## Evincar

Well, you have to select "EMBEDDED", I think it was the name, be very careful about not touching anything behind it  :Wink: , and then compile the atkbd as module. Then you can compile i8042 as a module too.

But that didn't help me  :Sad: . I am really puzzled about it. Interestingly, I can hear an extremely brief sound coming from the speakers ( I think) when I try to resume. After that, black screen and locked comp  :Sad: .

----------

## pielgrzym

I use nvidia_agp though the card is acutally PCI Express  :Wink:  I can't unload the driver so I just commented it out from blacklisted modules. Right after booting the system I get loads of kernel messages that my hard drives aren't resumable, so it may be the libata problem?

----------

## RoundsToZero

 *Evincar wrote:*   

> Well, you have to select "EMBEDDED", I think it was the name, be very careful about not touching anything behind it , and then compile the atkbd as module. Then you can compile i8042 as a module too.

 

Hah, that's great.  Well, suspend to RAM works fine for me and I have i8042 compiled in statically so that's probably not your problem.  :Wink: 

 *Quote:*   

> But that didn't help me . I am really puzzled about it. Interestingly, I can hear an extremely brief sound coming from the speakers ( I think) when I try to resume. After that, black screen and locked comp .

 

The sound coming from your speakers is probably just the burst of the power coming on going out your line out jack.  I assume it's a popping kind of sound, right?  Like, it's not actually playing music or anything, right?

----------

## Evincar

 *RoundsToZero wrote:*   

>  *Quote:*   But that didn't help me . I am really puzzled about it. Interestingly, I can hear an extremely brief sound coming from the speakers ( I think) when I try to resume. After that, black screen and locked comp . 
> 
> The sound coming from your speakers is probably just the burst of the power coming on going out your line out jack.  I assume it's a popping kind of sound, right?  Like, it's not actually playing music or anything, right?

 

Yeah, kinda like a minibang...but it happens a few seconds after pressing the power button. First the HDD and the fans start spinning, then that sound, then, death...

----------

## doublehp

I also had problems coming out of suspend; the only way for me was to press power button. Then, to prevent shutdown (getting init 0 just after S3 is not very nice  :Very Happy:  ) I had to comment a line somewhere in /etc/acpi.

Suspend bugs for me, but, I can now come out of it.

----------

## rickvernam

I found that if I configure my kernel to NOT have framebuffer console support, suspend to ram works just great.

I only use gentoo-sources (2.6.22) - no fancy suspend2-sources, hibernate scripts or vbetool jazz.

To suspend I just echo mem > /sys/power/state (or KDEs laptop-battery thing, which does the same thing anyway).

The framebuffer console thing seems to be at odds with the ATI Radeon 9700 in this laptop - regardless of whether I use vesafb or radeonfb.

I use the open source drivers, not ati-drivers, with full acceleration...etc.

I'm sure that just yesterday I had a kernel config that was using fbcon & was resuming form suspend-to-ram just fine...but I must have changed something and I just don't know what.

----------

## doublehp

rickvernam : always archive everything !!! genkernel put confs in /etc/kernels/ (to prevent over-write when rebuilding same k-ver, I manually alter the kernel name, thus 2.6.21-suspend2-r6-Gentoo-moon_18 )

----------

## rickvernam

 *doublehp wrote:*   

> rickvernam : always archive everything !!! genkernel put confs in /etc/kernels/ (to prevent over-write when rebuilding same k-ver, I manually alter the kernel name, thus 2.6.21-suspend2-r6-Gentoo-moon_18 )

 

EVERYthing?   :Shocked:   that might get overwhelming real quick!  I just keep stuff that is important to me.

Not having fbcon is not so important really...just a nicety.    :Smile: 

But yeah, I do that too...I keep major config changes separate, labeled and everything...

----------

## RoundsToZero

I have a Radeon 9600 laptop so I imagine it's pretty similar to yours.  And I use a framebuffer console.  You should give the hibernate script a try even if you're not going to use it with suspend2.  It does a lot of useful tweaks before eventually echoing to /sys/power/state.  You shouldn't need vbetool, but you may need acpi_sleep=s3_bios.

By the way did you use radeonfb or vesafb?  You should use vesafb.  Even the default one is good, but the vesafb-tng that comes with gentoo-sources (x86 only) or new uvesafb (cross-arch) are even better.

----------

## devsk

My suspend-to-ram stopped working after upgrade to 2.6.21-r2. gentoo-sources-2.6.21-r1 works great. So, its some patch after 2.6.21.1 that broke the suspend to ram. Try gentoo-sources-2.6.21-r1. Look at the bug here:

https://bugs.gentoo.org/show_bug.cgi?id=184852

----------

## fyzik

I have a similar problem - my Thinkpad T60p does not resume from hibernate-ram after kernel upgrade from 2.6.20-gentoo-r8 to 2.6.21-gentoo-r4

----------

## linuxexplorer

so guys, i have exactly the same problem.. suspend to ram worked fine with 2.6.20-suspend2-r6..

With 2.6.21-suspend2-r7 it doesn't work anymore..But  suspend to disk works with both..

So I think there is a problem in the kernel.. because it used the same config for both kernel..

Dell Inspiron 6400, Ati mobility x1300.., ati-drivers 

Greets, Linuxexplorer

----------

## devsk

have people having this problem tried newer kernels 2.6.22 or 2.6.23-rc2?

----------

## vespaman

Yes, I have! Actually, I was thinking about giving up on suspend to ram on my new box, when I read this thread, and are now happily using an older 2.6.20 kernal. I'm at work right now, but I think that I also tried the 2.6.23 series, and definately many variants of 22's, including the latest.

Funny enough, it works one time with the newer kernels for me, i.e. power on, 'acpisleep -s' and wake up works fine. But if I THEN 'acpisleep -s' again, the box only spins down the harddisks and gets into a undefined state, where reset is the only thing.

With the .20 kernel everything is optimal.   :Very Happy: 

----------

## devsk

 *vespaman wrote:*   

> Yes, I have! Actually, I was thinking about giving up on suspend to ram on my new box, when I read this thread, and are now happily using an older 2.6.20 kernal. I'm at work right now, but I think that I also tried the 2.6.23 series, and definately many variants of 22's, including the latest.
> 
> Funny enough, it works one time with the newer kernels for me, i.e. power on, 'acpisleep -s' and wake up works fine. But if I THEN 'acpisleep -s' again, the box only spins down the harddisks and gets into a undefined state, where reset is the only thing.
> 
> With the .20 kernel everything is optimal.  

 do you have some spare time to update that bug? Only thing required there is to take one patch (bug has directions on how to do that) out of the linux-2.6.21-r2 and prove that it resolves the suspend to ram situation. This will then get some kernel dev attention.

----------

## hug0

Hey there,

Same problem here with 2.6.22-suspend2: hibernat-ram doesn't work anymore.

(2.6.20-suspend2-r6 was fine)

Any updates on that problem?

----------

