Re: Power off USB port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 23 Apr 2012, Carles Pina i Estany wrote:

> Hello,
> 
> On Apr/23/2012, Alan Stern wrote:
> > On Mon, 23 Apr 2012, Carles Pina i Estany wrote:
> 
> > > I've tried a variety of things to
> > > /sys/bus/usb/devices/usb2|2-2.../power/level and power/control, but my
> > > understanding is that it changed in the last kernels, and seems that now
> > > is not possible to do. Am I trying the impossible?
> > > Any workaround in the kernel / user level side?
> > 
> > No workarounds.  The circuitry in the USB hardware commonly used in
> > desktop and laptop computers is not capable of turning off power to
> > USB ports.
> 
> :-(
> 
> > The same is true of many hubs.  There are some hubs which _can_ turn
> > off power to ports, but relatively few brands support this.  I don't
> > know which ones do.
> > 
> > Here is a link to a program which attempts to turn turn port power on
> > and off.  You can at least use it for testing.
> > 
> > 	http://marc.info/?l=linux-usb&m=127162615232234&w=2
> 
> I've done some tests with two results.
> 
> ** The good:
> Connecting a USB card reader (without any card inside):
> pinux:/home/carles/down# ./hubpower 1:1 status
> Port  1 status: 0100  Power-On
> Port  2 status: 0501  High-Speed Power-On Connected
> Port  3 status: 0100  Power-On
> Port  4 status: 0100  Power-On
> Port  5 status: 0100  Power-On
> Port  6 status: 0100  Power-On
> Port  7 status: 0100  Power-On
> Port  8 status: 0100  Power-On
> pinux:/home/carles/down# 
> 
> (if I remove the card reader: the "High-Speed Power-On Connected"
> changes to "Power-On")
> 
> pinux:/home/carles/down# ./hubpower 1:1 power 2 off
> Port  2 status: 0503  High-Speed Power-On Enabled Connected
> 
> Then the LED of the card reader is off (before was blinking/on all the
> time)

This doesn't mean the card reader is receiving no power.  Probably the 
port was disabled but the power remained on.

> pinux:/home/carles/down# ./hubpower 1:1 bind
> Bind-driver request sent to the kernel
> 
> Led is on again :-)
> 
> In 2006 I achieved the same or similar with a mouse. I don't know if the
> port had some power in or not, but the led was on/off (wich echo's into
> /proc or /sys, I don't know).
> 
> ** The bad:
> Then the "bad" part: I tried the same with a USB dumb device. Sadly is
> not a fan that I'd know in one moment :-( but it's a USB aroma device.
> It's so dumb that connecting it to the same physical USB port and doing
> lsusb or ./hubpower 1:1 status is not showing anything (for 2 or 3
> dollars I was expecting it :-) )
> 
> And doing ./hubpower 1:1 power 2 off is not switching off, in terms that
> it doesn't get cold.
> 
> I guess that this is what you expected and not possible to fix software
> wise (fans, USB aromas?)

Right.

> (any cheap but a bit smarter USB aroma device that I could control using
> software? Or some easy work around to switch off and on devices like
> fans or these things?)

Try doing a web search for terms like USB power switching.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux