[systemd-devel] Udev rules hardware database

Martin Pitt martin.pitt at ubuntu.com
Thu Nov 6 23:26:31 PST 2014


Patrick Häcker [2014-11-05 16:55 +0100]:
> I you want to have permanent power saving activated for your devices, the 
> recommended way is to use udev (e.g. 
> https://wiki.archlinux.org/index.php/Power_saving#USB_autosuspend). Some 
> [...]
> - Is there already something like this?

By coincidence I recently noticed something interesting in sysfs: My
USB devices seem to have an attribute "supports_autosuspend". These
are all 1 except for my USB webcam [1] where it is 0. This sounds very
promising indeed! So apparently the kernel now already grew either a
heuristics or some black/whitelists?

At least the current state how Linux (3.16.0) and udev (215) configure
autosuspend seems a bit weird:

 - Some of my USB devices have power/autosuspend == "2": internal
   laptop webcam, USB webcam ([1] again), USB Keyboard, USB mouse.
   All others have "0". There is no udev rule or other thing on my
   system to set those, so unless it's udev or systemd itself I guess
   it's from the kernel.

 - Most of my USB devices have power/level=="auto" (i. e. suspend
   enabled), only some of them are "on" (i. e. suspend disabled).
   Curiously those which are "on" are three of above devices where
   autosuspend==2: USB webcam, USB Keyboard, USB mouse.

 - The only udev rule which I'm aware of that does autosuspend is
   42-usb-hid-pm.rules:

   ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="03", ATTRS{removable}=="fixed", TEST=="../power/control", ATTR{../power/control}="auto"

So it does not seem to be the case that we don't currently enable
autosuspend at all, but it's currently highly inconsistant and
confusing.

Martin

[1]
E: ID_MODEL=08af
E: ID_MODEL_FROM_DATABASE=QuickCam Easy/Cool
E: ID_VENDOR=046d
E: ID_VENDOR_FROM_DATABASE=Logitech, Inc.

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141107/548b0c4f/attachment.sig>


More information about the systemd-devel mailing list