Fwd: Using HAL to disable USB hub "wakeup" setting
Dan Streetman
ddstreet at us.ibm.com
Fri Mar 20 10:44:35 PDT 2009
On Fri, Mar 20, 2009 at 11:39 AM, Andrey Borzenkov <arvidjaar at mail.ru> wrote:
> I have been doing similar things in udev; something like
>
> ACTION=="add" SUBSYSTEM=="usb" ATTR{product}=="OHCI Host Controller"
> ATTR{power/autosuspend}="0"
I was temporarily using udev also with
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device",
ENV{TYPE}=="9/*", ATTR{power/wakeup}="disabled"
but HAL seems to me to be more appropriate because the above udev rule
doesn't check the system model type (from SMBios) nor does it check
the specific info about the special hubs where wakeup needs to be
disabled (there are also "standard" USB ports in the system that do
not have the problem, and where the wakeup shouldn't be disabled). I
looked to HAL because all this info is readily available, while with
udev it's much harder (but not impossible) to write a rule that
matches on all those variables - system model type and manufacturer
and specific USB hub location info.
So the udev rule I was using, above, works fine if I am ok with
manually dropping it on each system where it needs to be, and
disabling all the hubs' remote wakeup. But I'm part of the Linux
enablement team for this hardware, this isn't a personal system, so I
need this be part of a standard package (like HAL) so all Linux
distros work out-of-the-box on the hardware.
>> If HAL is the right place to handle this I'll send a patch in.
>>
>
> Frankly, HAL seems to be overkill for a simple "echo".
Well, the "echo" isn't the hard part, the hard part is knowing *when*
to do the echo, which is where the power of HAL comes in ;-)
More information about the hal
mailing list