After disabling USB-host current still flows into USB device! Proof: device status LED still on. [bu


porg

Active Member
Joined
Oct 6, 2008
Messages
792
Location
Vienna, Austria
porg filed bug #317 on 2013-05-01:

On my Pandora, due to bad internal WiFi, I use an Edimax EW-7811Un USB WiFi adapter, which has a status-LED, flickering according to the network activity.
After disabling USB-host through the settings menu, the WiFi functionality is gone, but the device's LED is still on. So some current must still flow into the USB device.
The LED now has a permanent light, no flickering! This lack of "device intelligence" indicates that the device was indeed turned off, just current flowing directly to the LED circuit unaltered).

I can repeat the aforementioned steps many times, the behavior is the same.
As soon as I then first physically unplug and reinsert the device, the LED remains off eventually.
From then on, every further issuing of "Disable USB-host" through the settings menu turns the device LED completely off.

Smells like a kernel bug to me! As it requires one real un/re-plugging, from then on works ok.
neelix replied on 2013-05-02 0030:

That's a hardware issue. The wifi dongle will start drawing current as soon as you plug it in, regardless of whether the kernel module is enabled. The reason the LED remains off when you first plug it in is because it is only lit once initialised by the dongle's firmware, which doesn't happen until the OS interacts with it. 

Now I answer here, because the bug tracker still has no ability to attach files to it:

Neelix: The reason the LED remains off when you first plug it in is because it is only lit once initialised by the dongle's firmware, which doesn't happen until the OS interacts with it.
Thanks for the explanation, on how a USB device firmware works.

 


Neelix:  The wifi dongle will start drawing current as soon as you plug it in, regardless of whether the kernel module is enabled. 
Really??? I always left my USB WiFi adapter plugged, and assumed the USB port is completely shut down if USB host is disabled and that the device only starts consuming power if USB host gets enabled, the port getting powered only then.

 

And I did 2 test runs and monitored with sysinfo, and my assumption was proven right!

 

openpandora--usb-host-on-off-1.png openpandora--usb-host-on-off-2.png openpandora--usb-host-on-off--logs+plots.zip

Note: To read that graph chronologically, you must read from bottom to top.

Could not do it better, sysinfo does yet not support timed comments, I had to do that manually.

 

Graph interpretation: The baseline for the power consumption in state "unplugged" and "USB host disabled" is the same! Except if the bug occurs (LED on although USB host disabled). In that case, the consumtion is higher.
 

Attachments

  • openpandora--usb-host-on-off--logs+plots.zip
    362.2 KB · Views: 221
Last edited by a moderator:
Yes, this is how I charge my phone without connecting to it. I love this feature even if it's a "bug".
 
Is this really a bug ? Can't remember anything in the USB specifications that says that a plugged in device has to be electrically seperated from the power supply if the controller is "shut down"
 
Is this really a bug ? Can't remember anything in the USB specifications that says that a plugged in device has to be electrically seperated from the power supply if the controller is "shut down"
I'd say this falls under the "good power management" category.  On a mobile device, if you shut off external USB it would be nice if *no* power consumption happened because of external USB.  It's especially unpleasant here because to avoid the battery hit you have to pull off the device, which consumes the limited expected insertion cycle lifespan of that large USB connector.
 
If this was so by design, I'd say it makes the internal wifi issues even more painful!

If you have to use an external wifi adapter it:

  • costs's you some extra money (only ~10-20 EUR, but still)
  • consumes more power compared to internal wifi
  • and it even consumes power if USB-host is disabled
    so in order to really prevent it from sucking power, you must unplug it and carry it separately, and fear to not loose that tiny piece
All together: Even less comfortable!
 
Last edited by a moderator:
Is this really a bug ? Can't remember anything in the USB specifications that says that a plugged in device has to be electrically seperated from the power supply if the controller is "shut down"
I'd say this falls under the "good power management" category.  On a mobile device, if you shut off external USB it would be nice if *no* power consumption happened because of external USB.  It's especially unpleasant here because to avoid the battery hit you have to pull off the device, which consumes the limited expected insertion cycle lifespan of that large USB connector.

If this was so by design, I'd say it makes the internal wifi issues even more painful!

If you have to use an external wifi adapter it:

  • costs's you some extra money (only ~10-20 EUR, but still)
  • consumes more power compared to internal wifi
  • and it even consumes power if USB-host is disabled
    so in order to really prevent it from sucking power, you must unplug it and carry it separately, and fear to not loose that tiny piece
All together: Even less comfortable!
This is all true, what both of you are saying. But don't forget that a USB2 Host was never designed to "live" in a mobile device - its a goddam polling bus - which was already a stupid idea from the past when it was designed.

So while this is not comfortable or sensible for a mobile device, it probably is something no one could do anything about - hence it maybe be not a bug, technically.

As it was more than 5 years ago when I last skimmed my way through USB2 design documents I maybe talking complete bullocks here.

Edit: Forgot, have you done any measurements regarding the power consumption if the stick remains plugged in, but is in an "dormant" state ?
 
Last edited by a moderator:
FYI: If the dongle sits at the port with USB-hosting disabled it consumes about 2mA. (measured with sysinfo). Not much, but still something. Worth knowing.
 
FYI: If the dongle sits at the port with USB-hosting disabled it consumes about 2mA. (measured with sysinfo). Not much, but still something. Worth knowing.
Thanks for getting back to my question. But your answer leaves me with two other questions:

  • has technology advanced that far that you can measure a 2mA deviation without precision instruments
  • how does this additional constant consumption affect battery life
 
Last edited by a moderator:
how does this additional constant consumption affect battery live
2mA*5v = 0.01W against our 15Wh battery means the constant consumption would drain the battery in about 1500 hours. Estimate double the drain for inaccuracies and inefficiency and it drains the battery in 750 hours. If normal playtime is 10 hours, the extra 4mA will pull that down to 9.86 hours: 1.4% or 8.4 minutes every 10 hours. The actual effect will be half that if that 2mA is actually accurate.Personally I wouldn't worry about that 1.4% but I understand why some people might.
 
Last edited by a moderator:
2mA*5v = 0.01W against our 15Wh battery means the constant consumption would drain the battery in about 1500 hours. Estimate double the drain for inaccuracies and inefficiency and it drains the battery in 750 hours. If normal playtime is 10 hours, the extra 4mA will pull that down to 9.86 hours: 1.4% or 8.4 minutes every 10 hours. The actual effect will be half that if that 2mA is actually accurate.
Personally I wouldn't worry about that 1.4% but I understand why some people might.
I was more interested in real live experience (I did the math too), but thanks anyway
 
Last edited by a moderator:
Real life: Almost unnoticeable, except if you consciously do the maths.


Changing screen brightness just by one bit already has more noticeable effect.
 
Back
Top