# Suspend/hibernate 2.6.18

## kupo

I just upgraded to 2.6.18(vanilla, directly from kernel.org) and suddenly software suspend/hibernation stopped working.

I use echo disk > /sys/power/state to suspend.

When I do that I just get back to the console, and dmesg says something about "unable to shutdown all process" or something. I'm in another kernel right now so I cant't look.

How can I fix this?

----------

## kupo

this says dmesg:

```
Stopping tasks: =====================|

Shrinking memory... done (0 pages freed)

Class driver suspend failed for cpu0

Could not power down device @Ï>À: error -22

Some devices failed to power down, aborting suspend

PCI: Enabling device 0000:00:1d.0 (0000 -> 0001)

PCI: Found IRQ 6 for device 0000:00:1d.0

PCI: Sharing IRQ 6 with 0000:00:02.0

PCI: Setting latency timer of device 0000:00:1d.0 to 64

PCI: Enabling device 0000:00:1d.1 (0000 -> 0001)

PCI: Found IRQ 6 for device 0000:00:1d.1

PCI: Sharing IRQ 6 with 0000:02:02.0

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

PCI: Enabling device 0000:00:1d.2 (0000 -> 0001)

PCI: Found IRQ 6 for device 0000:00:1d.2

PCI: Sharing IRQ 6 with 0000:00:1f.1

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

PCI: Enabling device 0000:00:1d.7 (0000 -> 0002)

PCI: Found IRQ 10 for device 0000:00:1d.7

PCI: Setting latency timer of device 0000:00:1d.7 to 64

PM: Writing back config space on device 0000:00:1d.7 at offset f (was 400, writing 40a)

PM: Writing back config space on device 0000:00:1d.7 at offset 4 (was 0, writing e0100000)

PM: Writing back config space on device 0000:00:1d.7 at offset 1 (was 2900006, writing 2900106)

usb usb1: root hub lost power or was reset

ehci_hcd 0000:00:1d.7: debug port 1

PCI: cache line size of 32 is not supported by device 0000:00:1d.7

ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004

PM: Writing back config space on device 0000:00:1e.0 at offset 7 (was 22803030, writing 2803030)

PCI: Setting latency timer of device 0000:00:1e.0 to 64

PCI: Enabling device 0000:00:1f.5 (0000 -> 0003)

PCI: Found IRQ 10 for device 0000:00:1f.5

PCI: Sharing IRQ 10 with 0000:00:1f.3

PCI: Sharing IRQ 10 with 0000:00:1f.6

PCI: Sharing IRQ 10 with 0000:02:04.0

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

PM: Writing back config space on device 0000:02:06.0 at offset 1 (was 2100000, writing 2100007)

PCI: Found IRQ 10 for device 0000:02:06.0

pnp: Failed to activate device 00:06.

pnp: Failed to activate device 00:07.

Restarting tasks...<3>hub 1-0:1.0: over-current change on port 1

 done

hub 1-0:1.0: over-current change on port 2

```

----------

## beatryder

emerge suspend2-sources

2.6.18-suspend2 is now in portage

Have fun

----------

## kupo

```
Suspend2 2.2.8: Initiating a software suspend cycle.

Free:52819(52819). Sets:4328(4328),3994(3994). Header:4. Nosave:2-0=2. Storage:0/8826(130518). Needed:-48046|-121692|0.

Free:52819(52819). Sets:4328(4328),3994(3994). Header:4. Nosave:2-0=2. Storage:0/8826(130518). Needed:-48046|-121692|0.

Free:51985(51985). Sets:4328(4328),3994(3994). Header:4. Nosave:836-834=2. Storage:8822/8826(130518). Needed:-47629|-121692|0.

20%...40%...60%...80%...100%...done.

ACPI: PCI interrupt for device 0000:02:06.0 disabled

ACPI: PCI interrupt for device 0000:00:1f.5 disabled

ACPI: PCI interrupt for device 0000:00:1d.7 disabled

ACPI: PCI interrupt for device 0000:00:1d.2 disabled

ACPI: PCI interrupt for device 0000:00:1d.1 disabled

ACPI: PCI interrupt for device 0000:00:1d.0 disabled

Class driver suspend failed for cpu0

>À: error -22er down device 

Some devices failed to power down, aborting suspend

PCI: Enabling device 0000:00:1d.0 (0000 -> 0001)

ACPI: PCI Interrupt 0000:00:1d.0[A] -> Link [LNKA] -> GSI 6 (level, low) -> IRQ 6

PCI: Setting latency timer of device 0000:00:1d.0 to 64

PCI: Enabling device 0000:00:1d.1 (0000 -> 0001)

ACPI: PCI Interrupt 0000:00:1d.1[B] -> Link [LNKD] -> GSI 6 (level, low) -> IRQ 6

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

PCI: Enabling device 0000:00:1d.2 (0000 -> 0001)

ACPI: PCI Interrupt 0000:00:1d.2[C] -> Link [LNKC] -> GSI 6 (level, low) -> IRQ 6

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

PCI: Enabling device 0000:00:1d.7 (0000 -> 0002)

ACPI: PCI Interrupt 0000:00:1d.7[D] -> Link [LNKH] -> GSI 10 (level, low) -> IRQ 10

PCI: Setting latency timer of device 0000:00:1d.7 to 64

PM: Writing back config space on device 0000:00:1d.7 at offset f (was 400, writing 40a)

PM: Writing back config space on device 0000:00:1d.7 at offset 4 (was 0, writing e0100000)

PM: Writing back config space on device 0000:00:1d.7 at offset 1 (was 2900006, writing 2900106)

usb usb4: root hub lost power or was reset

ehci_hcd 0000:00:1d.7: debug port 1

PCI: cache line size of 32 is not supported by device 0000:00:1d.7

ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004

PM: Writing back config space on device 0000:00:1e.0 at offset 7 (was 22803030, writing 2803030)

PCI: Setting latency timer of device 0000:00:1e.0 to 64

PCI: Enabling device 0000:00:1f.5 (0000 -> 0003)

ACPI: PCI Interrupt 0000:00:1f.5[B] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10

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

PM: Writing back config space on device 0000:02:06.0 at offset 1 (was 2100000, writing 2100007)

ACPI: PCI Interrupt 0000:02:06.0[A] -> Link [LNKE] -> GSI 10 (level, low) -> IRQ 10

hub 4-0:1.0: over-current change on port 1

Suspend2 debugging info:

- SUSPEND core   : 2.2.8

- Kernel Version : 2.6.18-suspend2

- Compiler vers. : 3.4

- Attempt number : 1

- Parameters     : 2049 16400 0 1 0 0

- Overall expected compression percentage: 0.

- Swapwriter active.

  Swap available for image: 130518 pages.

- I/O speed: Write 27170 KB/s.

- Extra pages    : 0 used/500.

hub 4-0:1.0: over-current change on port 2

```

----------

## kupo

Same problem with suspend2-sources.

----------

## beatryder

http://gentoo-wiki.com/HOWTO_Software_Suspend_v2

have read there, it looks like you need the hibernate script. Which is recommended in every peice of documentation Ihave seen for swsup2

----------

## kupo

That's what I used. Those were installed at the same time I installed suspend2-sources.

But I will read that howto...

----------

## beatryder

 *kupo wrote:*   

> That's what I used. Those were installed at the same time I installed suspend2-sources.
> 
> But I will read that howto...

 

Uhmm thats not what you said in your original post:

 *kupo wrote:*   

> 
> 
> I use echo disk > /sys/power/state to suspend.
> 
> 

 

So what are you using? echo? or the hibernate script? If you are using

```

echo disk > /sys/power/state

```

Its not surprising, as that is not suspend2. 

It is ill advised to go suspending things willy-nilly, there are some modules that need to be unloaded before you can suspend. Thats where the hibernate script comes in; it has a blacklist of modules to unload on suspend and reload on resume.

----------

## kupo

First of all, you can echo disk > /sys/power/state if you config suspend2 to override swsusp. Which I have done.

Second of all, if you read further down you will see output from dmesg confirming that I'm using suspend2  :Smile: 

----------

## beatryder

 *kupo wrote:*   

> First of all, you can echo disk > /sys/power/state if you config suspend2 to override swsusp. Which I have done.
> 
> Second of all, if you read further down you will see output from dmesg confirming that I'm using suspend2 

 

Ooops, yeah you're right. My bad, however that does not change the fact that you need to deal with the modules.

----------

## kupo

Yea, but first I'm going to try this : http://gentoo-wiki.com/HOWTO_Software_Suspend_v2#Troubleshooting

----------

## kupo

Well, that didn't help...

```
# hibernate

FATAL: Module lzf not found.

Warning: Chosen Suspend2 compressor (lzf) is not available. Compression disabled.

hibernate: Suspend reported the following errors:

 - Suspend was aborted (see dmesg).

 - Some devices refused to suspend (see dmesg).
```

```
Suspend2 2.2.8: Initiating a software suspend cycle.

Free:33791(33791). Sets:16951(16951),10389(10389). Header:4. Nosave:2-0=2. Storage:8852/27844(130518). Needed:-25904|-102674|0.

Free:33791(33791). Sets:16951(16951),10389(10389). Header:4. Nosave:2-0=2. Storage:8852/27844(130518). Needed:-25904|-102674|0.

Free:26729(26729). Sets:16951(16951),10389(10389). Header:4. Nosave:7064-7062=2. Storage:27840/27844(130518). Needed:-22373|-102674|0.

20%...40%...60%...80%...100%...done.

ACPI: PCI interrupt for device 0000:02:06.0 disabled

ACPI: PCI interrupt for device 0000:00:1f.5 disabled

ACPI: PCI interrupt for device 0000:00:1d.7 disabled

ACPI: PCI interrupt for device 0000:00:1d.2 disabled

ACPI: PCI interrupt for device 0000:00:1d.1 disabled

ACPI: PCI interrupt for device 0000:00:1d.0 disabled

Class driver suspend failed for cpu0

Could not power down device ³=À: error -22

Some devices failed to power down, aborting suspend

PCI: Enabling device 0000:00:1d.0 (0000 -> 0001)

ACPI: PCI Interrupt 0000:00:1d.0[A] -> Link [LNKA] -> GSI 6 (level, low) -> IRQ 6

PCI: Setting latency timer of device 0000:00:1d.0 to 64

PCI: Enabling device 0000:00:1d.1 (0000 -> 0001)

ACPI: PCI Interrupt 0000:00:1d.1[B] -> Link [LNKD] -> GSI 6 (level, low) -> IRQ 6

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

PCI: Enabling device 0000:00:1d.2 (0000 -> 0001)

ACPI: PCI Interrupt 0000:00:1d.2[C] -> Link [LNKC] -> GSI 6 (level, low) -> IRQ 6

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

PCI: Enabling device 0000:00:1d.7 (0000 -> 0002)

ACPI: PCI Interrupt 0000:00:1d.7[D] -> Link [LNKH] -> GSI 10 (level, low) -> IRQ 10

PCI: Setting latency timer of device 0000:00:1d.7 to 64

PM: Writing back config space on device 0000:00:1d.7 at offset f (was 400, writing 40a)

PM: Writing back config space on device 0000:00:1d.7 at offset 4 (was 0, writing e0100000)

PM: Writing back config space on device 0000:00:1d.7 at offset 1 (was 2900006, writing 2900106)

usb usb4: root hub lost power or was reset

ehci_hcd 0000:00:1d.7: debug port 1

PCI: cache line size of 32 is not supported by device 0000:00:1d.7

ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004

PCI: Setting latency timer of device 0000:00:1e.0 to 64

PCI: Enabling device 0000:00:1f.5 (0000 -> 0003)

ACPI: PCI Interrupt 0000:00:1f.5[B] -> Link [LNKB] -> GSI 10 (level, low) -> IRQ 10

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

PM: Writing back config space on device 0000:02:06.0 at offset 1 (was 2100000, writing 2100007)

ACPI: PCI Interrupt 0000:02:06.0[A] -> Link [LNKE] -> GSI 10 (level, low) -> IRQ 10

hub 4-0:1.0: over-current change on port 1

Suspend2 debugging info:

- SUSPEND core   : 2.2.8

- Kernel Version : 2.6.18-suspend2

- Compiler vers. : 3.4

- Attempt number : 2

- Parameters     : 2049 16400 0 1 0 0

- Overall expected compression percentage: 0.

- Swapwriter active.

  Swap available for image: 130518 pages.

- I/O speed: Write 25216 KB/s.

- Extra pages    : 0 used/500.

hub 4-0:1.0: over-current change on port 2

```

And no modules were loaded at the time.

----------

## Cottonee

Suspend2 for 2.6.18 is version 2.2.8 which requires hibernate-script version 1.93 at least.  

 :Smile: 

----------

## kupo

 *Cottonee wrote:*   

> Suspend2 for 2.6.18 is version 2.2.8 which requires hibernate-script version 1.93 at least.  
> 
> 

 

That's what I'm using.

----------

## Cottonee

 *kupo wrote:*   

>  *Cottonee wrote:*   Suspend2 for 2.6.18 is version 2.2.8 which requires hibernate-script version 1.93 at least.  
> 
>  
> 
> That's what I'm using.

 

So, I assume that you had suspend2 work with previous kernel before right? Did you double-check on hibernate-script files? if you upgrading from script v1.12 to 1.93 then you have to edit script files again cause it been split script into modules.  That was the steps I used for upgrade suspend2 kernel from 2.6.17 to 2.6.18. Anyways, I never call "echo disk > /sys/power/state" before. I always used hibernate-script to take care all unload modules & etc..

----------

## kupo

No, in previous kernels I have always used the native thingy.

----------

## phorn

This may be the bad part of your dmesg:

```
Class driver suspend failed for cpu0

Could not power down device ³=À: error -22

Some devices failed to power down, aborting suspend 
```

You might also want to enable compression and encription Library Routines in the kernel config, and enable lzw.

You can try unplugging all the USB devices (if possible).

Maybe try disabling ACPI, and then manually turning the computer off after a hibernate.

You might want to look at hibernation settings (I believe software suspend 2 had a config file that had things like how to suspend, and what compression library to use).

Other than that, I'm not sure how one might fix this.

----------

## kupo

I solved it by removing speedstep from the kernel(which wasn't working anyway).

acpi's throttling will have to do

----------

## dambacher

though speedstep worked for me (dell inspiron 6100), suspend and speedstep don't work in 2.6.18.

disabling  speedstep completely worked, now it suspends nicely.

----------

