# Can't suspend laptop complains about usbcore, 2.6.18-suspend

## fintan

Hi I'm having problems getting my laptop to suspend. I've followed the HowTo on the wiki with no joy. Here's my info

emerge packages

```

* sys-apps/suspend2-userui

     Available versions:  0.6.3-r1 ~0.6.4 ~0.6.4-r1

     Installed:           0.6.3-r1

     Homepage:            http://www.suspend2.net

     Description:         User Interface for Software Suspend 2

* sys-kernel/suspend2-sources

     Available versions:  2.6.16-r8:2.6.16-r8 ~2.6.16-r12:2.6.16-r12 ~2.6.17-r5:2.6.17-r5 ~2.6.17-r6:2.6.17-r6 ~2.6.18:2.6.18

     Installed:           2.6.17-r4 2.6.18

     Homepage:            http://dev.gentoo.org/~dsd/genpatches http://www.suspend2.net

     Description:         Software Suspend 2 + Gentoo patchset sources

* sys-power/hibernate-script

     Available versions:  1.12-r1 1.93-r6

     Installed:           1.93-r6

     Homepage:            http://www.suspend2.net/

     Description:         Hibernate script supporting multiple suspend methods

```

Output from lsmod

```

Module                  Size  Used by

wlan_tkip              11776  2

usbhid                 40672  0

ipx                    22564  2

p8023                   2560  1 ipx

snd_pcm_oss            34976  0

snd_mixer_oss          13696  1 snd_pcm_oss

snd_seq_dummy           3716  0

snd_seq_oss            26496  0

snd_seq_midi_event      6656  1 snd_seq_oss

snd_seq                41680  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event

snd_seq_device          6924  3 snd_seq_dummy,snd_seq_oss,snd_seq

ohci_hcd               16772  0

irtty_sir               7168  0

sir_dev                13188  1 irtty_sir

irda                  156988  2 irtty_sir,sir_dev

crc_ccitt               2944  1 irda

parport_pc             32740  0

parport                31304  1 parport_pc

floppy                 48932  0

nvidiafb               38684  0

i2c_algo_bit            8328  1 nvidiafb

i2c_i801                7436  0

ehci_hcd               23944  0

usb_storage            61376  0

uhci_hcd               18824  0

snd_hda_intel          13972  2

snd_hda_codec         135808  1 snd_hda_intel

snd_pcm                59524  3 snd_pcm_oss,snd_hda_intel,snd_hda_codec

snd_timer              17668  2 snd_seq,snd_pcm

snd                    39268  13 snd_pcm_oss,snd_mixer_oss,snd_seq_oss,snd_seq,snd_seq_device,snd_hda_intel,snd_hda_codec,snd_pcm,snd_timer

soundcore               8032  1 snd

snd_page_alloc          7944  2 snd_hda_intel,snd_pcm

intel_agp              18972  1

rtc                     7568  0

usbcore                96644  6 usbhid,ohci_hcd,ehci_hcd,usb_storage,uhci_hcd

truecrypt             149380  0

wlan_scan_sta          11648  1

ath_pci                74272  0

ath_rate_sample        12032  1 ath_pci

wlan                  156124  5 wlan_tkip,wlan_scan_sta,ath_pci,ath_rate_sample

ath_hal               190544  3 ath_pci,ath_rate_sample

nvidia               6810708  32

agpgart                24268  2 intel_agp,nvidia

i2c_core               16384  4 nvidiafb,i2c_algo_bit,i2c_i801,nvidia

joydev                  8128  0

dm_mirror              16976  0

sata_mv                15496  0

ata_piix               10760  0

ahci                   13316  0

sata_qstor              7684  0

sata_vsc                6788  0

sata_uli                5764  0

sata_sis                6276  0

sata_nv                 8452  0

sata_via                7556  0

sata_sil                8840  0

sbp2                   19208  0

ohci1394               27824  0

ieee1394               74072  2 sbp2,ohci1394

```

It gets as far as Doing atomic copy, then craps out.

hibernate

```

/bin/bash: dcop: command not found

/bin/bash: dcop: command not found

 * Service net.ath0 stopping

 * Service netmount stopping

 * Service sshd stopping

 * Service netmount stopped

 * Service sshd stopped

 * Service net.ath0 stopped

hibernate: Suspend reported the following errors:

 - Suspend was aborted (see dmesg).

 - Some devices refused to suspend (see dmesg).

 * Service net.ath0 starting

 * WARNING:  net.ath0 has started but is inactive

```

relevant dmesg

```

Suspend2 2.2.8: Swapwriter: Signature found.

Suspend2 2.2.8: Resuming enabled.

Suspend2 2.2.8: Initiating a software suspend cycle.

Freezing cpus ...

CPU 1 is now offline

SMP alternatives: switching to UP code

CPU1 is down

Stopping tasks: ===================================================================================================================Freezing bdevs... Freezing kernel threads... ==========|

Free:516994(201806). Sets:23179(19142),180179(8345). Header:24. Nosave:2-0=2. Storage:0/208382(502029). Needed:-817885|-293647|0.

Restarting tasks... Thawing bdevs... Done

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

Free:516994(201806). Sets:23179(19142),180179(8345). Header:24. Nosave:2-0=2. Storage:0/208382(502029). Needed:-817885|-293647|0.

Restarting tasks... Thawing bdevs... Done

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

Free:497160(181972). Sets:23179(19142),180179(8345). Header:24. Nosave:19836-19834=2. Storage:208358/208382(502029). Needed:-807968|-293647|0.

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

 usbdev2.3_ep81: PM: suspend 0->1, parent 2-1:1.0 already 1

usb 2-1:1.0: PM: suspend 1-->1

usb 2-1: freeze

sd 4:0:0:0: freeze

usb-storage 5-4:1.0: freeze

usb 5-4: freeze

usb 5-2:1.0: freeze

usb 5-2: freeze

suspend_device(): usb_generic_suspend+0x0/0xe4 [[b]usbcore][/b]() returns -16

Could not suspend device 5-2: error -16

usb 5-2:1.0: resuming

usb 5-4: resuming

usb-storage 5-4:1.0: resuming

sd 4:0:0:0: resuming

usb 2-1: resuming

 usbdev2.3_ep81: PM: resume from 0, parent 2-1:1.0 still 1

Restarting tasks... Thawing bdevs... Done

Suspend2 debugging info:

- SUSPEND core   : 2.2.8

- Kernel Version : 2.6.18-suspend2

- Compiler vers. : 4.1

- Attempt number : 1

- Parameters     : 2049 16400 0 1 0 5

- Overall expected compression percentage: 0.

- Compressor is 'lzf'.

  Compressed 738013184 bytes into 366461709 (50 percent compression).

- Swapwriter active.

  Swap available for image: 502029 pages.

- Filewriter inactive.

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

- Extra pages    : 0 used/5000.

Restarting tasks... Done

Thawing cpus ...

SMP alternatives: switching to SMP code

Booting processor 1/1 eip 3000

CPU 1 irqstacks, hard=c058a000 soft=c0582000

Initializing CPU#1

Calibrating delay using timer specific routine.. 7599.11 BogoMIPS (lpj=3799558)

CPU: After generic identify, caps: bfebfbff 20100000 00000000 00000000 0000659d 00000000 00000000

CPU: After vendor identify, caps: bfebfbff 20100000 00000000 00000000 0000659d 00000000 00000000

monitor/mwait feature present.

CPU: Trace cache: 12K uops, L1 D cache: 16K

CPU: L2 cache: 2048K

CPU: Physical Processor ID: 0

CPU: After all inits, caps: bfebfbff 20100000 00000000 00000180 0000659d 00000000 00000000

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#1.

CPU1: Intel P4/Xeon Extended MCE MSRs (24) available

CPU1: Thermal monitoring enabled

CPU1: Intel(R) Pentium(R) 4 CPU 3.80GHz stepping 03

CPU1 is up

usbcore: registered new driver hiddev

input: Logitech USB Receiver as /class/input/input4

input: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-0000:00:1d.1-1

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.6:USB HID core driver

```

If I hibernate --force I get an error -22

Anyone have an idea why? Thanks

    fintan

----------

## fangorn

If you compiled the drivers as modules, you can tell hibernate-script to forced unload them before suspending and reload them after wakeup. This can get pretty tricky, AFAIK you have to unload all modules depending on a blocker before you can unload it, but it should be doable.

----------

## fintan

Thanks fangorn for the reply

Here's what I have 

```

### modules

#UnloadModules usbcore ehci-hcd ohci-hcd uhci-hcd usb-storage usbhid

UnloadModules ehci-hcd uhci-hcd ohci-hcd usbhid usb-storage usbcore

# UnloadModules snd_via82cxxx usb-ohci

# UnloadAllModules yes

UnloadBlacklistedModules yes

LoadModules auto

# LoadModulesFromFile /etc/modules

### modules-gentoo

 GentooModulesAutoload yes

```

Here's what I get if I force it

```

Class driver suspend failed for cpu0

Could not power down device firmware: error -22

Some devices failed to power down, aborting suspend

```

Should I try UnloadAllModules yes?

----------

## fangorn

I see usb_storage complaining. Do you have a usb hdd or usb flash drive plugged in when trying this? I am sure most of this gadgets do not support suspending. Try as rudimentary as possible. If it works without any external drives, keyboard, mouse, ... try adding them piece by piece to find the blocker.

----------

## fintan

I had a usb mouse connected. Will do, I'll post back with my results.

----------

