2007-08-03 15:26:45

by Adam Kropelin

[permalink] [raw]
Subject: Re: [linux-usb-devel] [PATCH] USB: Only enable autosuspend by default on certain device classes

Dave Jones wrote:
> On Fri, Aug 03, 2007 at 04:43:16PM +0200, Jiri Kosina wrote:
>> On Fri, 3 Aug 2007, Matthew Garrett wrote:
>>
>>> Windows will autosuspend hubs, bluetooth devices, HID devices
>>
>> Hi Matthew,
>>
>> are you sure about windows suspending the HID devices in runtime? I
>> have never seen LEDs of USB keyboard connected to windows host to go
>> off after some time of not using it.
>
> Not so sure about keyboards, but I've seen the LEDs on USB mice dim
> or go off after a few seconds of inactivity under Windows, but under
> Linux they stay on.
>
>> We have been playing with runtime autosuspend of HID devices, are
>> currently postponed the full support, as it turns out that many
>> devices don't support this feature properly (probably due to not
>> being tested in Windows).
>
> Interesting. Which devices did you notice failing?
> Was it a case that they would sleep and not come back out of that
> state?

Although I have no proof immediately at hand, I suspect at a minimum HID
power class devices should be blacklisted from autosuspend. Given the
spotty USB implementations on many such devices I'd be surprised if
suspend worked reliably. Plus if you're connected to such a device for
monitoring purposes you're probably powered by it as well, so you have
little to gain from suspend even if it works.

--Adam


2007-08-03 15:34:06

by Jiri Kosina

[permalink] [raw]
Subject: Re: [linux-usb-devel] [PATCH] USB: Only enable autosuspend by default on certain device classes

On Fri, 3 Aug 2007, Adam Kropelin wrote:

> Although I have no proof immediately at hand, I suspect at a minimum HID
> power class devices should be blacklisted from autosuspend. Given the
> spotty USB implementations on many such devices I'd be surprised if
> suspend worked reliably.

I agree here.

> Plus if you're connected to such a device for monitoring purposes you're
> probably powered by it as well, so you have little to gain from suspend
> even if it works.

I currently don't have any HID UPS by hand to verify, but I'd be surprised
if they would advertise remote wakeup capability ... ?

Thanks,

--
Jiri Kosina

2007-08-03 15:49:32

by Dave Jones

[permalink] [raw]
Subject: Re: [linux-usb-devel] [PATCH] USB: Only enable autosuspend by default on certain device classes

On Fri, Aug 03, 2007 at 05:31:52PM +0200, Jiri Kosina wrote:

> > Plus if you're connected to such a device for monitoring purposes you're
> > probably powered by it as well, so you have little to gain from suspend
> > even if it works.
>
> I currently don't have any HID UPS by hand to verify, but I'd be surprised
> if they would advertise remote wakeup capability ... ?

Looks like mine does..

Bus 001 Device 004: ID 051d:0002 American Power Conversion Back-UPS Pro 500/1000/1500
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x051d American Power Conversion
idProduct 0x0002 Back-UPS Pro 500/1000/1500
bcdDevice 1.06
iManufacturer 3 APC
iProduct 1 Back-UPS ES 500 FW:801.e6.D USB FW:e6
iSerial 2 AB0530291763
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA

...

Dave


--
http://www.codemonkey.org.uk

2007-08-03 16:49:40

by David Brownell

[permalink] [raw]
Subject: Re: [linux-usb-devel] [PATCH] USB: Only enable autosuspend by default on certain device classes

On Friday 03 August 2007, Dave Jones wrote:
> ?> > Plus if you're connected to such a device for monitoring purposes you're
> ?> > probably powered by it as well, so you have little to gain from suspend
> ?> > even if it works.
> ?>
> ?> I currently don't have any HID UPS by hand to verify, but I'd be surprised
> ?> if they would advertise remote wakeup capability ... ?
>
> Looks like mine does..

Makes sense. You don't want to force the host to ignore all
power events. As with a laptop, you might want servers to
cleanly hibernate before the (UPS) battery runs out...

- Dave