Matthew Garrett ([info]mjg59) wrote,
@ 2009-06-24 14:38:00
Previous Entry  Add to memories!  Tell a Friend  Next Entry
Entry tags:advogato, fedora

I spent last week in the US, during which I discovered that my preconceptions of Albany as a post-industrial wasteland with no redeeming features were incorrect (it's actually a post-industrial wasteland with some decent bars), made minor contributions (mostly in the form of pesto) to a prize winning chalk picture and cycled on the wrong side of the road for the first time in a ridiculous number of years.

But more relevantly, I spent most of the week trapped in Westford. One of the things I've been looking into lately is USB autosuspend, a kernel feature which allows devices to be powered down when they're not in use. This is especially interesting for USB, since it's a poll-based protocol. If the end device is powered up then bus traffic will be generated, even if everything's idle. USB autosuspend allows this to be avoided and thus saves a worthwhile amount of power.

However, drivers need to support USB autosuspend before it's useful. Further, devices need to be able to cope with it. Some older kernel releases had autosuspend enabled by default, leading to all kinds of fun as people discovered that their scanners and printers had stopped working. This was fixed by leaving autosuspend disabled by default for most hardware. The first component that I'm working on is support for drivers to indicate whether or not a given piece of hardware supports autosuspend, allowing it to be enabled by default for that kernel. Handling this at a per-driver level means we shouldn't end up with obnoxious white or blacklists. The second is adding support for autosuspend to more drivers. Right now I'm concentrating on hardware that's common in laptops. There's support for autosuspend in the qcserial and uvc drivers, and some experimental (and unmerged) patches for bluetooth and some other modem drivers. Palm have just released their kernel code, which includes autosuspend support for the cdc-acm driver. I'm working on cleaning these up and getting them into a mergable state, and part of what I was doing in Westford was testing that various pieces of hardware work correctly. The good news is that they seem to, and with a bit of luck we'll try shipping support for a lot of this in F12. If that doesn't end up causing real world problems then it ought to be safe to merge it all to mainline.

The final component of this is handling autosuspend on devices with userspace drivers. Our only real choice there is for packages to ship udev fragments that enable it for working hardware. I've added support to the fprint package in rawhide, which means that fingerprint readers should now be powered down unless they're opened. Nobody seems to have complained yet, so I'm cautiously optimistic that this can be sent upstream without any problems.




(6 comments) - (Post a new comment)


[info]stsquad
2009-06-24 04:30 pm UTC (link)
One thing powertop keeps suggesting I do on my Samsung NC-10 netbook is enable autosuspend for USB. Even on Fedora 10 it keeps re-enabling itself. I wonder if this is because other devices on the netbook are hooked up internally to the USB bus?

For one thing it would be nice to tell the Bluetooth hardware to totally shutdown unless I needed it.

(Reply to this) (Thread)


[info]mjg59
2009-06-24 04:36 pm UTC (link)
Powertop actually gets this one wrong in various ways, but yeah - various things are probably hooked up via USB.

(Reply to this) (Parent)


[info]justin.bouncybouncy.net
2009-06-24 05:42 pm UTC (link)
You make it to Mahar's?

(Reply to this)

usb autosuspend (the bad old days)
(Anonymous)
2009-06-25 08:30 am UTC (link)
I remember those days *shudder*. I spent ages testing hardware so it could be blacklisted and then autosuspend was defaulted to off...

https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/85488?comments=all

(Reply to this) (Thread)

Re: usb autosuspend (the bad old days)
(Anonymous)
2009-07-08 04:26 pm UTC (link)
Yeah sounds nice. I was always wondering why usbsticks keep glowing after an "eject"/unmount on linux, while in windows they stopped glowing.

I support your opinion to first enable powersaving on typical laptop hardware, but it would also be nice seeing external harddisks to autosuspend. There is pretty much energy (from 3 to over 10 watts per disk) to safe here. And it affects laptops, desktops and also network equipment typically used by home users (routers, nas, nslu, alix, etc.)

Greetings

Rechner-Tester

(Reply to this) (Parent)(Thread)

Re: usb autosuspend (the bad old days)
(Anonymous)
2009-07-23 01:37 am UTC (link)
IIRC, most external harddrives can't be switched off by software, only the controller can be disabled. But I might be wrong.

(Reply to this) (Parent)


(6 comments) - (Post a new comment)

Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…