ubuntu-server 7.10, what might be preventing my USB drive from sleeping?

NoOp glgxg at sbcglobal.net
Wed Apr 23 18:30:34 UTC 2008


On 04/23/2008 07:07 AM, Chris G wrote:
> I have a new ubuntu server 7.10 installation used as a NAS system in
> my garage.  It has a 500Gb external USB drive connected to it.
> 
> Something is preventing the external USB drive from going into sleep
> mode, i.e. something is accessing the USB drive at intervals such that
> it thinks it shouldn't power down.  Previously when I used the network
> drive via its ethernet interface (not from the ubuntu server system)
> it did go into sleep mode.
> 
> The ubuntu server installation was done without the USB drive even
> connected so there's nothing apart from backups on the external drive.
> 
> Can anyone suggest what might be keeping the USB drive awake and/or
> ways of diagnosing what's keeping it awake?
> 

There have been considerable problems with USB
suspend/resume/autosuspend/ehci_hcd, see:

https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/88746
[start around the Feb 08 postings unless you're bored :-)]
https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/85488

The jist of those were to turn off autosuspend, so perhaps that is what
has happened on your drive?

This might help:

<http://www.nabble.com/USB-Problems-with-Ubuntu---workaround-to12123128.html>
<quote>
>> - a sysfs attribute has been added to USB devices that allows turning
>> off the USB autosuspend feature on a per-device basis. This attribute
>> can be found under /sys/bus/usb/devices/*/power/level.
>>
>> By doing echo on > /sys/bus/usb/devices/<device id>/power/level, it is
>> possible to disable the USB autosuspend feature (and wake the scanner
>> up if it's suspended).
>>
>> By doing echo suspend > /sys/bus/usb/devices/<device id>/power/level,
>> it is possible to force a device into suspend mode (and it won't be
>> waken up automatically).
>>
>> By doing echo auto > /sys/bus/usb/devices/<device id>/power/level, the
>> default behaviour of automatically suspending the device can be
>> restored. 

[Note: I know the last is in reference to scanners, but you
enable/disable by device_id, so you should be able to use it for your
hard drive as well.]

http://lwn.net/Articles/253587/
[Documentation for USB power management]






More information about the ubuntu-users mailing list