LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-27-2007, 06:43 AM   #1
synapse
Member
 
Registered: Jan 2004
Location: On Planet Earth.
Distribution: Slackware 12
Posts: 244

Rep: Reputation: 30
Can more power be diverted to usb port ??


Hi

Interesting problem here. I have extended a usb cable by a few meters. Now if I plug the cable into the linux box dmesg reports that there is a cable error. (There is a max limit on cable length that i am aware of )

I plug the same cable into the windows box and it works fine but I notice that the power consumption of the usb port goes way up to compensate for the extention of the cable ( You can usually find this if you right click on my computer > properties > Hardware > Device Manager > Universal Serial Bus Controllers > USB Root Hub > Properties > Power etc ) Also there is a total amount of bandwidth that usb devices need to share.

The question here is is it possible for me to control the power usage of the usb devices.( It just bites when doze can do something and linux cant tch tch tch )

Not expecting to many answers here but any help would be good.

Thanx
 
Old 11-27-2007, 07:24 AM   #2
kotnik
Member
 
Registered: Nov 2004
Location: Novi Sad, Serbia
Distribution: Debian, Slackware, Gentoo, openSuSE
Posts: 254

Rep: Reputation: 31
You can't control power allocated for USB on any operating system, as far as I know. Maybe it could be tweaked with LinuxBIOS, but I'm not sure.
 
Old 11-27-2007, 07:51 AM   #3
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
As kotnik says, the amount of power supplied by a USB device is limited by the specification. It might well be that the Windows box has something (in the BIOS or elsewhere) that will allow extra power to go out. It might also be that later USB standards allow more power as well as more bandwidth.

But the cable length and power requirements are both defined in the USB specs. If you want to extend the cable beyond the limit (5m for USB2 and 3m for USB1) then you will need a powered hub every 5m (or 3m for USB1). You can have up to five of these for USB2.

Also, the cable length affects electrical interference as well as power, so massive cables probably aren't a great idea.

Source: http://www.usb.org/about/faq/ans5/

Hope that helps,

—Robert J Lee
 
Old 11-27-2007, 02:03 PM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Try 'cat/proc/bus/usb/devices', here's an example:

Code:
T:  Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs=  1
P:  Vendor=054c ProdID=0069 Rev= 1.90
S:  Manufacturer=Sony
S:  Product=USB Memory Stick Slot
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=200mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=05 Prot=00 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   2 Ivl=1ms


T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0458 ProdID=006a Rev= 0.00
S:  Manufacturer=KYE
S:  Product=NAVIGATOR 535
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=1ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
Now, I don't know of a way to route more power to a device from the OS. I would think such a thing is dealt with by the BIOS. However, are you using APM are ACPI ? Maybe switching from one to the other will do the trick, maybe not.
 
Old 11-27-2007, 02:34 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
just skimming and have no facts...

I would assume that the limitation is in the circuitry in the USB interface---not something you can change with BIOS settings, etc.
A powered hub can (I assume) act as a repeater to get longer cable runs.
 
Old 11-27-2007, 02:47 PM   #6
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Still it doesn't explain why usb power consumption goes up in windows (and windows and linux use the same bios, so it shouldn't make difference). You could ask at ReactOS forums, they're reversing windows so probably could know some goodies.
 
Old 11-27-2007, 05:28 PM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,922
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Hi,

Just a few links to look at;

USB_hub - Universal Serial Bus - Wikipedia


Documentation for USB power management


Putting a lid on USB power

USB-IF Device Class Documents

USB Hub Design and Windows


Universal Serial Bus Revision 2.0 specification
<- zip file with technical details

As for the power control for a specific device, you can basically power on/wakeup, level is either "on", "auto", or "suspend".

The only thing I can think of is that the on device currents will be accumulative to the amount the hub can provide. The voltages are fixed by the power supply therefore the power in watts used will depend on the total current used by device/hub. You won't have proportional power control on the hub/port.

Quote:
from
USB Hub Design and Windows
;

Windows Operating Systems and USB Hub Designs

High-power, bus-powered devices can draw up to 500mA after they are configured by host system software, but must not draw more than 100mA until they are configured (USB Specification, Version 1.1, Section 7.2.1). The device circuitry and self-descriptive information that the host system software requires to enumerate the device are available to the host in this low-power mode.

If the user who is running Microsoft Windows 98 plugs a high-power bus-powered device into a port on a bus-powered hub, the device will not work - and little information will be available to help the user understand why. Windows 98 shows the device as disabled in Device Manager, but does not warn the user with a message, for example, at the time of the hot-plug event.
Windows 98 Second Edition, Windows Me, Windows 2000, and Windows XP give the user more help in such a situation. The device is shown as disabled in Device Manager and the user is also presented with a message that indicates why the device is not operating. However, it is still up to the user to locate an unused port on the PC platform or on a self-powered hub connected to the PC platform. Then the user must disconnect the high-power bus-powered device from the bus-powered hub and reconnect it to a port that will supply enough power.

Last edited by onebuck; 11-27-2007 at 05:49 PM. Reason: add 2.0 specs
 
Old 11-27-2007, 07:36 PM   #8
saulgoode
Member
 
Registered: May 2007
Distribution: Slackware
Posts: 288

Rep: Reputation: 155Reputation: 155
Throwing out a wild hypothesis based upon a very limited and rudimentary knowledge of USB and OS drivers:

Perhaps the Linux driver sees the device as USB2.0 and, when configuring, the configuration fails and the user notified. This would be because a device operating at high-speed (USB2.0) should be expected to use more power than when running at low-speed (USB1.1).

The Windows driver attempts to configure the device as USB2.0 and it also fails; however (and again, I am guessing), Windows decides to try to configure the device using one of its deprecated drivers (I have heard that Windows retains four different USB drivers for purposes of backwards compatibility) and this driver successfully sets up the device to run in USB1.1 mode (using less power) even though it is a USB2.0 device.

Of course it is also possible that Windows is just failing to recognize a warning status reported by the device which Linux appropriately tests.

Last edited by saulgoode; 11-27-2007 at 07:38 PM.
 
Old 11-27-2007, 10:10 PM   #9
FreakboY
Member
 
Registered: Jun 2002
Location: TX, USA
Distribution: Slackware
Posts: 385

Rep: Reputation: 32
i've seen hard drive that use a "Y" usb cable. the two ends connect to the usb ports and the other end to the hard drive. and that is how the portable harddrive gets is power... well at least that is my understanding... good luck!
 
Old 11-28-2007, 12:28 AM   #10
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Thanks onebuck.

From: http://www.reactos.org/generated/dox...sb_8h.html#a55
Quote:
USB devices may support one or more configurations, which affect power consumption and the functionality available. For example, the default configuration is limited to using 100mA of bus power, so that when certain device functionality requires more power, and the device is bus powered, that functionality will be in some non-default device configuration. Other device modes may also be reflected as configuration options, such as whether two ISDN channels are presented as independent 64Kb/s interfaces or as one bonded 128Kb/s interface.

From: http://en.wikipedia.org/wiki/USB_hub#Power
Quote:
However, there are many non compliant hubs on the market which announce themselves to the host as self powered despite really being bus powered. Equally there are plenty of noncompliant devices that use more than 100mA without announcing this fact (or indeed sometimes without identifying as USB devices at all). These hubs and devices do allow more flexibility in the use of power (in particular many devices use far less than 100mA and many usb ports can supply more than 500mA before going into overload shutoff) but they are likely to make power problems harder to diagnose

Question is: where do you plug that cable? (bus-powered USB hub or USB port)

Last edited by Alien_Hominid; 11-28-2007 at 12:30 AM.
 
Old 11-28-2007, 12:46 AM   #11
synapse
Member
 
Registered: Jan 2004
Location: On Planet Earth.
Distribution: Slackware 12
Posts: 244

Original Poster
Rep: Reputation: 30
Hi

Thanx for all the answers and links. Am looking through all the details.

I am currently plugging the device into a usb port on the pc box itself.

Will get a chance to take some readings tonight and post if anything interesting turns up.

Once again

Thanx
 
Old 11-28-2007, 03:55 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
You mentioned two seperate computers and might not be software related at all. The actual USB hardware on the linux box could be marginal. If the extension cable is slightly high impedence wise the signal could be bad by the time it actualy gets to the device. What is the total length of the USB cable.

On the other hand the windows box USB hardware does not have any problems with the extra impedence load of the extension cable.

Last edited by michaelk; 11-28-2007 at 04:04 PM.
 
Old 12-05-2007, 06:50 AM   #13
synapse
Member
 
Registered: Jan 2004
Location: On Planet Earth.
Distribution: Slackware 12
Posts: 244

Original Poster
Rep: Reputation: 30
Hi


I found a solution to the above, As it is if I disconnect a few other usb devices this enables the camera to work efectively on the longer cable. Simple solution I know but it works and is good enough for the time being.

Thanx for the help

On another note : Has anyone been able to get the built in mic on the camera working using the gspca drivers ??
 
Old 12-05-2007, 07:31 AM   #14
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,922
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Hi,

Quote:
Originally Posted by synapse View Post
Hi
I found a solution to the above, As it is if I disconnect a few other usb devices this enables the camera to work efectively on the longer cable. Simple solution I know but it works and is good enough for the time being.

Thanx for the help

On another note : Has anyone been able to get the built in mic on the camera working using the gspca drivers ??
You have increased the available current to the device and decreased the load on the HUB. The match(impedance) of the device to the HUB has changed. You didn't state the cable manufacture or type to give us an indicator of the level of connection.

People who plug and unplug their devices don't realize that the wipe on the contacts for their 'gold plated copper contacts' will wear. This wear depends on the thickness of the plating and matching of the connectors. This does assume the contacts are 'gold' plated. The alignment can cause the wear to be worse if not proper. This wear will change the match of the impedance of the cable to the device therefore the impedance of the system. The signal will be affected by this degradation.
 
Old 12-07-2007, 03:02 AM   #15
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
Quote:
Originally Posted by synapse View Post
Hi

Interesting problem here. I have extended a usb cable by a few meters. Now if I plug the cable into the linux box dmesg reports that there is a cable error. (There is a max limit on cable length that i am aware of )

I plug the same cable into the windows box and it works fine but I notice that the power consumption of the usb port goes way up to compensate for the extention of the cable ( You can usually find this if you right click on my computer > properties > Hardware > Device Manager > Universal Serial Bus Controllers > USB Root Hub > Properties > Power etc ) Also there is a total amount of bandwidth that usb devices need to share.
No, Windows doesn't raise the amount of power. That figure that you're looking at is "Power Required". If you exceed what the port can supply (by using an unpowered hub) your devices will not work properly. This most definitely does not mean that's the amount of power successfully consumed by the devices. Linux is pickier about this than Windows because it has some sense--we know that, for instance, plugging a thumbdrive or sdcard reader into an unpowered hub port where not enough power is available is rather likely to result in media integrity problems.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB IR receivers supporting power on/off via mb power header dblade Linux - Hardware 0 09-16-2007 01:22 AM
which debian port for power edge 1800? kpachopoulos Debian 5 08-31-2007 12:11 PM
Parallel Port Power Off pete1234 Linux - General 4 03-02-2007 06:59 PM
2 MX records, mail diverted branden_burger Linux - Networking 3 12-08-2005 05:07 AM
no power to USB port? HailKingPhil Slackware 14 08-20-2004 09:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration