Azimout's Linux weblog

usbcore autosuspend

with 3 comments

two issues exist about this topic:

  1. powertop’s suggestion is wrong. it asks the user to add “usbcore.autosuspend=1” to the kernel line in the grub menu; however in the kernel shipped with ubuntu, usbcore is built as a module (“grep CONFIG_USB= /boot/config-2.6.27-10-generic” gives “CONFIG_USB=m”), so the correct solution is appending options usbcore autosuspend=1 to /etc/modprobe.d/options
  2. powertop is actually detecting a non-existent problem. see ubuntu bug 136549 and debian bug 444817. if you run “grep CONFIG_USB_SUSPEND /boot/config-2.6.27-10-generic” you get “CONFIG_USB_SUSPEND=y”. furthermore, “cat /sys/bus/usb/devices/usb*/power/autosuspend” gives a value of 2 for all usb devices, and “cat /sys/module/usbcore/parameters/autosuspend” also gives a value of 2. and, finally, the kernel documentation says:



This file contains an integer value, which is the
number of seconds the device should remain idle before
the kernel will autosuspend it (the idle-delay time).
The default is 2. 0 means to autosuspend as soon as
the device becomes idle, and -1 means never to
autosuspend. You can write a number to the file to
change the autosuspend idle-delay time.

looking at powertop’s source code (file usb.c), in the function “suggest_usb_autosuspend” i see that it’s checking 2 things:
1) that /sys/bus/usb/devices/*/power/autosuspend >=0
2) that /sys/bus/usb/devices/*/power/level != “on”

on my machine, all autosuspend values are 1, but the level values are all “auto”, except for one, which is “on”; this is triggering the suggestion… that device is my usb mouse, and it’s the only “real” device (the rest are the usb root hubs)


Written by azimout

27/11/2008 at 16:20

Posted in Problems

3 Responses

Subscribe to comments with RSS.

  1. Thanks for the tip about the “options usbcore autosuspend=1” – I didn’t know that, and just ended up deleting the powertop suggestion after adding it to Grub and wondering why it never worked

    Chris Coulson

    11/12/2008 at 20:54

  2. Thanks! I’m just testing your solution to unsuspend my HDD drive conected via USB to my server.
    I hope it will work corectly :]


    15/12/2008 at 09:33

  3. Thanks a lot! powertop kept complaining, your post helped me to figure it out for my MSI Wind. And i think i learned a little.


    05/01/2009 at 20:19

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: