You are not logged in.
Hi there,
I'm using a Iomega Hard Drive, which has two USB connectors: the main one, and if it doesn't get enough power a second one.
Until now, I could use my hard drive with only the main one, but not anymore. If I plug both, it works though.
(When I say "now", I mean that I realised it today, but haven't been using my drive for a week or two, so it follows an update during that time, I guess).
Is that a normal / desired behavior?
Is it a kernel setting?
Is it possible to set the power of USB ports?
Thanks for any explanation / help.
Cheers,
Offline
Is it possible to set the power of USB ports?
Restricting my response to USB 2.0. When a device is attached, the USB port is guaranteed to supply 100mA. A newly attached device begins a negotiation with the host in which it identifies itself, what the various operating modes are, and how much current is required for each of those modes. In the end, the host enumerates the device and reaches an agreement as to how much current that device may draw. After that point, the host has the right to shut the device off, should the device break its end of the agreement by drawing too much current.
Some hosts do drop power. Others just suck it up and allow the device to use excess current. Regardless, the maximum current permitted by the 2.0 standard is 500mA, or just about 2.5W.
Many drives cheat by both drawing excess current, and by drawing current from a connector that is attached to a host, but does not actually engage in negotiation with the host.
These are both violations of the USB 2.0 standard.
The 3.0 Standard, and some new battery charging standards do have provisions for high current modes. These may, or may not be supported by your box.
What are the last couple dozen lines of dmesg when after you attach your drive?
What is the output of lsusb -v with the drive attached and running?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Thanks, that's a usefull, detailed answer!
What are the last couple dozen lines of dmesg when after you attach your drive?
[26712.994021] usb 2-2.4: new high-speed USB device number 7 using xhci_hcd
[26713.021546] usb 2-2.4: ep 0x81 - rounding interval to 32768 microframes, ep desc says 0 microframes
[26713.021549] usb 2-2.4: ep 0x2 - rounding interval to 32768 microframes, ep desc says 0 microframes
[26713.022992] scsi11 : usb-storage 2-2.4:1.0
[26714.065198] scsi 11:0:0:0: Direct-Access SAMSUNG HM100UI PQ: 0 ANSI: 2 CCS
[26714.065796] sd 11:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
[26714.066628] sd 11:0:0:0: [sdb] Write Protect is off
[26714.066633] sd 11:0:0:0: [sdb] Mode Sense: 28 00 00 00
[26714.067553] sd 11:0:0:0: [sdb] No Caching mode page present
[26714.067557] sd 11:0:0:0: [sdb] Assuming drive cache: write through
[26714.069837] sd 11:0:0:0: [sdb] No Caching mode page present
[26714.069842] sd 11:0:0:0: [sdb] Assuming drive cache: write through
[26714.097268] sdb: sdb1 sdb2
[26714.098738] sd 11:0:0:0: [sdb] No Caching mode page present
[26714.098741] sd 11:0:0:0: [sdb] Assuming drive cache: write through
[26714.098742] sd 11:0:0:0: [sdb] Attached SCSI disk
[26724.112066] EXT4-fs (sdb1): mounting ext3 file system using the ext4 subsystem
[26724.477980] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
What is the output of lsusb -v with the drive attached and running?
Bus 002 Device 006: ID 059b:0571 Iomega Corp. Prestige Portable Hard Drive
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x059b Iomega Corp.
idProduct 0x0571 Prestige Portable Hard Drive
bcdDevice 0.00
iManufacturer 10
iProduct 11
iSerial 5
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 4
bmAttributes 0xc0
Self Powered
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 6
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
By the way, I just realise that if I plug the two usb, then remove only the one for the extra power, the device keeps working.
Thanks!
Offline
...
MaxPower 2mA
...
That is a bit odd We might want to try that again as root.
There will also be information down in the /sys structure -- someplace. I'll look into that when I get home. (I am at a stable watching my daugter ride right now)
if I plug the two usb, then remove only the one for the extra power, the device keeps working.
I beleive that. Drives suck a lot of current while spinning up.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Thanks, enjoy your dauther's ride
Offline