View previous topic :: View next topic |
Author |
Message |
Gabriel_Blake Guru
Joined: 16 Sep 2007 Posts: 362
|
Posted: Tue Apr 06, 2010 2:33 pm Post subject: USB FAT32 drives operate ridiculously slow |
|
|
A few kernel updates ago every thing was fine. Now ALL my flash drives and memory cards accessed via USB work slow and act strange. Example: when writing 300MB to a pendrive, the progress shows that the first 60MB are copied in an instant, but the following take ages. The data is written correctly. The pendrive has a rated min 9MB/s write and that is true on other computers.
What's wrong ??
Example with 2GB flash card inside a mobile phone:
dmesg output(with mount-unmount-mount):
Code: | usb 5-2: new full speed USB device using uhci_hcd and address 2
usb 5-2: configuration #1 chosen from 1 choice
scsi5 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
scsi 5:0:0:0: Direct-Access Nokia Nokia 5310 Xpres 0000 PQ: 0 ANSI: 4
sd 5:0:0:0: Attached scsi generic sg2 type 0
usb-storage: device scan complete
sd 5:0:0:0: [sdb] Adjusting the sector count from its reported value: 3842049
sd 5:0:0:0: [sdb] 3842048 512-byte logical blocks: (1.96 GB/1.83 GiB)
sd 5:0:0:0: [sdb] Write Protect is off
sd 5:0:0:0: [sdb] Mode Sense: 04 00 00 00
sd 5:0:0:0: [sdb] Assuming drive cache: write through
sd 5:0:0:0: [sdb] Adjusting the sector count from its reported value: 3842049
sd 5:0:0:0: [sdb] Assuming drive cache: write through
sdb:
sd 5:0:0:0: [sdb] Adjusting the sector count from its reported value: 3842049
sd 5:0:0:0: [sdb] Assuming drive cache: write through
sd 5:0:0:0: [sdb] Attached SCSI removable disk
sky2 eth0: enabling interface
ADDRCONF(NETDEV_UP): eth0: link is not ready
sky2 eth0: Link is up at 100 Mbps, full duplex, flow control both
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
usb 5-2: USB disconnect, address 2
VFS: busy inodes on changed media or resized disk sdb
usb 5-2: new full speed USB device using uhci_hcd and address 3
usb 5-2: configuration #1 chosen from 1 choice
usb 5-2: USB disconnect, address 3
FAT: Directory bread(block 471) failed
FAT: Directory bread(block 472) failed
FAT: Directory bread(block 473) failed
FAT: Directory bread(block 474) failed
FAT: Directory bread(block 475) failed
FAT: Directory bread(block 476) failed
FAT: Directory bread(block 477) failed
FAT: Directory bread(block 478) failed
FAT: Directory bread(block 479) failed
FAT: Directory bread(block 480) failed
FAT: Directory bread(block 481) failed
FAT: Directory bread(block 482) failed
FAT: Directory bread(block 483) failed
FAT: Directory bread(block 484) failed
FAT: Directory bread(block 485) failed
FAT: Directory bread(block 486) failed
FAT: Directory bread(block 487) failed
FAT: Directory bread(block 488) failed
FAT: Directory bread(block 489) failed
FAT: Directory bread(block 490) failed
FAT: Directory bread(block 491) failed
FAT: Directory bread(block 492) failed
FAT: Directory bread(block 493) failed
FAT: Directory bread(block 494) failed
FAT: Directory bread(block 495) failed
FAT: Directory bread(block 496) failed
FAT: Directory bread(block 497) failed
FAT: Directory bread(block 498) failed
FAT: Directory bread(block 499) failed
FAT: Directory bread(block 500) failed
FAT: Directory bread(block 501) failed
FAT: Directory bread(block 502) failed
FAT: Directory bread(block 471) failed
FAT: Directory bread(block 472) failed
FAT: Directory bread(block 473) failed
FAT: Directory bread(block 474) failed
FAT: Directory bread(block 475) failed
FAT: Directory bread(block 476) failed
FAT: Directory bread(block 477) failed
FAT: Directory bread(block 478) failed
FAT: Directory bread(block 479) failed
FAT: Directory bread(block 480) failed
FAT: Directory bread(block 481) failed
FAT: Directory bread(block 482) failed
FAT: Directory bread(block 483) failed
FAT: Directory bread(block 484) failed
FAT: Directory bread(block 485) failed
FAT: Directory bread(block 486) failed
FAT: Directory bread(block 487) failed
FAT: Directory bread(block 488) failed
FAT: Directory bread(block 489) failed
FAT: Directory bread(block 490) failed
FAT: Directory bread(block 491) failed
FAT: Directory bread(block 492) failed
FAT: Directory bread(block 493) failed
FAT: Directory bread(block 494) failed
FAT: Directory bread(block 495) failed
FAT: Directory bread(block 496) failed
FAT: Directory bread(block 497) failed
FAT: Directory bread(block 498) failed
FAT: Directory bread(block 499) failed
FAT: Directory bread(block 500) failed
FAT: Directory bread(block 501) failed
FAT: Directory bread(block 502) failed
FAT: Directory bread(block 471) failed
FAT: Directory bread(block 472) failed
FAT: Directory bread(block 473) failed
FAT: Directory bread(block 474) failed
FAT: Directory bread(block 475) failed
FAT: Directory bread(block 476) failed
FAT: Directory bread(block 477) failed
FAT: Directory bread(block 478) failed
FAT: Directory bread(block 479) failed
FAT: Directory bread(block 480) failed
FAT: Directory bread(block 481) failed
FAT: Directory bread(block 482) failed
FAT: Directory bread(block 483) failed
FAT: Directory bread(block 484) failed
FAT: Directory bread(block 485) failed
FAT: Directory bread(block 486) failed
FAT: Directory bread(block 487) failed
FAT: Directory bread(block 488) failed
FAT: Directory bread(block 489) failed
FAT: Directory bread(block 490) failed
FAT: Directory bread(block 491) failed
FAT: Directory bread(block 492) failed
FAT: Directory bread(block 493) failed
FAT: Directory bread(block 494) failed
FAT: Directory bread(block 495) failed
FAT: Directory bread(block 496) failed
FAT: Directory bread(block 497) failed
FAT: Directory bread(block 498) failed
FAT: Directory bread(block 499) failed
FAT: Directory bread(block 500) failed
FAT: Directory bread(block 501) failed
FAT: Directory bread(block 502) failed
usb 5-2: new full speed USB device using uhci_hcd and address 4
usb 5-2: configuration #1 chosen from 1 choice
scsi6 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
usb 5-2: USB disconnect, address 4
usb 5-2: new full speed USB device using uhci_hcd and address 5
usb 5-2: configuration #1 chosen from 1 choice
scsi7 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
scsi 7:0:0:0: Direct-Access Nokia Nokia 5310 Xpres 0000 PQ: 0 ANSI: 4
sd 7:0:0:0: Attached scsi generic sg2 type 0
sd 7:0:0:0: [sdc] Adjusting the sector count from its reported value: 3842049
sd 7:0:0:0: [sdc] 3842048 512-byte logical blocks: (1.96 GB/1.83 GiB)
sd 7:0:0:0: [sdc] Write Protect is off
sd 7:0:0:0: [sdc] Mode Sense: 04 00 00 00
sd 7:0:0:0: [sdc] Assuming drive cache: write through
usb-storage: device scan complete
sd 7:0:0:0: [sdc] Adjusting the sector count from its reported value: 3842049
sd 7:0:0:0: [sdc] Assuming drive cache: write through
sdc:
sd 7:0:0:0: [sdc] Adjusting the sector count from its reported value: 3842049
sd 7:0:0:0: [sdc] Assuming drive cache: write through
sd 7:0:0:0: [sdc] Attached SCSI removable disk
|
|
|
Back to top |
|
|
Mad Merlin Veteran
Joined: 09 May 2005 Posts: 1155
|
Posted: Tue Apr 06, 2010 6:23 pm Post subject: |
|
|
The initial 60M going fast is because the kernel will buffer that much data and return (fast) before actually syncing it to the media (slow). However, the errors in your log there look like that particular flash drive is dying on you, have you tried a different one? _________________ Game! - Where the stick is mightier than the sword! |
|
Back to top |
|
|
Gabriel_Blake Guru
Joined: 16 Sep 2007 Posts: 362
|
Posted: Wed Apr 07, 2010 8:09 am Post subject: |
|
|
It's the same on all flash devices. Even really new ones. I have 2 pendrives, 2 micro-SD cards (accessed via reader), 1 SD card (accessed via reader) and 1 MP3 player with build in memory (accessed via USB).
ALL WORK BADLY !
What's more, they work flawlessly on other computers and systems :/
Any ideas ?? |
|
Back to top |
|
|
depontius Advocate
Joined: 05 May 2004 Posts: 3526
|
Posted: Wed Apr 07, 2010 12:23 pm Post subject: |
|
|
I seem to remember there being something in the kernel config about 2 different ways to access USB memory. There was some sort of old, slow way that, if enabled, would be used by default. Then there are the newer ways, which are faster. I don't remember much more than this, but you might want to review your kernel config, and be sure to read the help text. I don't have a flash stick handy at the moment, or I'd try to get some more information for you. _________________ .sigs waste space and bandwidth |
|
Back to top |
|
|
Link31 Apprentice
Joined: 17 Apr 2006 Posts: 200 Location: France
|
Posted: Sat Apr 10, 2010 2:33 pm Post subject: |
|
|
It looks like your kernel is using UHCI, which is actually USB 1.0/1.1.
On my system, USB keys use the EHCI driver (USB 2). So there is something wrong with your kernel configuration. Either you forgot to enable EHCI, or both drivers are enabled but UHCI takes priority (the issue depontius is talking about). Or your USB controller is USB1 only... |
|
Back to top |
|
|
Gabriel_Blake Guru
Joined: 16 Sep 2007 Posts: 362
|
Posted: Wed Apr 14, 2010 11:11 pm Post subject: |
|
|
lsusb
Quote: | Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 05a9:2640 OmniVision Technologies, Inc. OV2640 Webcam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 002: ID 046d:c526 Logitech, Inc.
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub |
lsusb -v -d 1d6b:0001
Quote: | Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0001 1.1 root hub
bcdDevice 2.06
iManufacturer 3 Linux 2.6.31-gentoo-r10 uhci_hcd
iProduct 2 UHCI Host Controller
iSerial 1 0000:00:1d.0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0002 1x 2 bytes
bInterval 255
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 2
wHubCharacteristic 0x000a
No power switching (usb 1.0)
Per-port overcurrent protection
bPwrOn2PwrGood 1 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0100 power
Port 2: 0000.0100 power
Device Status: 0x0003
Self Powered
Remote Wakeup Enabled
|
lsusb -v -d 1d6b:0002 Quote: | Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 0 Full speed (or root) hub
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0002 2.0 root hub
bcdDevice 2.06
iManufacturer 3 Linux 2.6.31-gentoo-r10 ehci_hcd
iProduct 2 EHCI Host Controller
iSerial 1 0000:00:1a.7
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 25
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 0mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 9 Hub
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0 Full speed (or root) hub
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0004 1x 4 bytes
bInterval 12
Hub Descriptor:
bLength 9
bDescriptorType 41
nNbrPorts 4
wHubCharacteristic 0x000a
No power switching (usb 1.0)
Per-port overcurrent protection
bPwrOn2PwrGood 10 * 2 milli seconds
bHubContrCurrent 0 milli Ampere
DeviceRemovable 0x00
PortPwrCtrlMask 0xff
Hub Port Status:
Port 1: 0000.0503 highspeed power enable connect
Port 2: 0000.0100 power
Port 3: 0000.0100 power
Port 4: 0000.0100 power
Device Status: 0x0003
Self Powered
Remote Wakeup Enabled
|
So I guess you're write right about UHCI. However this is a fairly new machine and it MUST have USB 2.0, especially that it worked fine in the past. My kernel has UHCI, OHCI and EHCI. So it's probably a priority error. I'll try to throw out the UHCI driver.
___________________________________________
EDIT
So without the driver, the USB ports aren't working at all. I'm SURE that they are 2.0 and have been working as 2.0. However now something went wrong.... Any ideas what it could be ?? |
|
Back to top |
|
|
Erlend Guru
Joined: 26 Dec 2004 Posts: 493
|
Posted: Sat May 15, 2010 9:29 am Post subject: |
|
|
Gabriel_Blake wrote: |
So without the driver, the USB ports aren't working at all. I'm SURE that they are 2.0 and have been working as 2.0. However now something went wrong.... Any ideas what it could be ?? |
I get the same problem. It's very strange, I've seen it in a few different machines (all running gentoo). It tends to be the front USB ports which have the issue. _________________ Thunar-thumbnailers
Raw-thumbnailer
http://brainstorm.ubuntu.com/idea/6878/image/1/ |
|
Back to top |
|
|
|