# usb_storage slooow

## pazz

Hi!

I recently renewed my gentoo system and everything went well exept for the usb_storage thing:

My ipod shuffle is a USB 2.0 flash drive that worked well with the other sys. i changed NOTHING in the kernel,

since i copied the .config file and tried the old one as well. But now it seems like a lifetime copying files to the ipod:

```
# hdparm -t /dev/sda

/dev/sda:

 Timing buffered disk reads:   10 MB in  3.12 seconds =   3.20 MB/sec

```

from messages

```

..

Aug  7 02:17:09 markI usb 1-6: new high speed USB device using ehci_hcd and address 6

Aug  7 02:17:09 markI usb 1-6: configuration #1 chosen from 2 choices

Aug  7 02:17:09 markI scsi0 : SCSI emulation for USB Mass Storage devices

Aug  7 02:17:09 markI usb-storage: device found at 6

Aug  7 02:17:09 markI usb-storage: waiting for device to settle before scanning

Aug  7 02:17:11 markI hald[6626]: Timed out waiting for hotplug event 1002. Rebasing to 1004

Aug  7 02:17:11 markI usb.agent[7336]: Keeping default configuration with /sys//devices/pci0000:00/0000:00:10.4/usb1/1-6

Aug  7 02:17:15 markI kobject_register failed for usb_storage (-17)

Aug  7 02:17:15 markI [<c025a4f3>] kobject_register+0x67/0x75

Aug  7 02:17:15 markI [<c0130af3>] mod_sysfs_setup+0x50/0xa8

Aug  7 02:17:15 markI [<c0131e2c>] load_module+0xa15/0xb69

Aug  7 02:17:15 markI [<c013200b>] sys_init_module+0x68/0x20d

Aug  7 02:17:15 markI [<c0103035>] syscall_call+0x7/0xb

Aug  7 02:17:15 markI Vendor: Apple     Model: iPod              Rev: 2.70

Aug  7 02:17:15 markI Type:   Direct-Access                      ANSI SCSI revision: 04

Aug  7 02:17:15 markI SCSI device sda: 2032640 512-byte hdwr sectors (1041 MB)

Aug  7 02:17:15 markI sda: Write Protect is off

Aug  7 02:17:15 markI sda: Mode Sense: 64 00 00 08

Aug  7 02:17:15 markI sda: assuming drive cache: write through

Aug  7 02:17:15 markI SCSI device sda: 2032640 512-byte hdwr sectors (1041 MB)

Aug  7 02:17:15 markI sda: Write Protect is off

Aug  7 02:17:15 markI sda: Mode Sense: 64 00 00 08

Aug  7 02:17:15 markI sda: assuming drive cache: write through

Aug  7 02:17:15 markI sda: sda1

Aug  7 02:17:15 markI Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0

Aug  7 02:17:15 markI Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0

Aug  7 02:17:15 markI usb-storage: device scan complete

Aug  7 02:17:17 markI scsi.agent[7410]: disk at /devices/pci0000:00/0000:00:10.4/usb1/1-6/1-6:1.0/host0/target0:0:0/0:0:0:0

Aug  7 02:17:18 markI fstab-sync[7480]: added mount point /media/IPOD for /dev/sda1

```

well, has anybody got an idea where to start?

thanks!

pazz

----------

## pazz

Hell I'm confused now.

my other usb device (USB1) gives an even lamer result. 

Am i just too drunk tonight? are my results ok after all?

it just feels slow you know?

ok, is it possible that hdparm gives me results that are ok for usb2 (i think mine are not too bad after googeling around a bit)

but as a user it does the copying not as fast as the device can do?

gtkpod tells me to wait another 45 minutes for 300M thats definitely not a 3M/s is it?

maybe there is somthing about my group settings or sth that i forgot about?

thx,

pazz

----------

## clarence

Have you emerged udev-0.6.5? I'm having the same problem and i think it might have something to do with that version of it. Though i have yet to really look into it. 

Then again I might also not know what the heck I'm talking about either  :Wink: 

----------

## Stolz

Try adding (if you haven't done yet) the next option to your kernel

```
  Device Drivers --> USB Support --> [*] Full speed ISO transactions
```

It helped me a lot with the speed of my drive (a 512MB BUFFALO ClipDrive Rev: 2.00)

```
# hdparm -t /dev/sdb

/dev/sdb:

 Timing buffered disk reads:   24 MB in  3.10 seconds =   7.74 MB/sec
```

Hope it helps.

----------

## pazz

thx for your reply, Stolz,

but i already had this option in my kernel.

I did not inlclude any kernel configs because i am sure it has nothing to do with it since it worked with exactly this config.

it might have to do with another libusb version or changes i made in the udev/hotplug configs.

I can't remember what i did there but something with sync flags in the fstab or sth. *arg* /me <-- dumbass

pazz

----------

## pazz

ok, i got it. 

yes, clarence, i have udev-065 installed.

anyhow, this looks like a dirty hack but it did the trick for me:

Its all about the "sync" option in the /etc/fstab. hald or fstab-sync adds it to the autogenerated entry for the usb device:

```
$tail -n 1 /etc/fstab

/dev/sda1               /media/IPOD             vfat    user,exec,noauto,utf8,noatime,sync,managed 0 0

```

i followed the intructions in this post that is:

edit /usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi

change the sync boolean from true to false in line163 or simply use this patch:

```
patch -p0 <storage-policy.patch
```

now remount

```
 mount -o remount /media/IPOD/
```

i know its not pretty, but at least it's not like waiting two hours to get this mp3stick filled up at a rate of 0,1 Mbit/s anymore  :Smile: 

cheers' 

pazz

----------

## pleusicles

Are you using a 2.6.12 kernel? If so, have a look at bugme.osdl.org. It seems that sync was not really used on fat before.

----------

## pazz

yes, i do.

from  bugme.osdl.org:

 *Quote:*   

> 
> 
> Without "sync" the performance seems to be fine although it is dangerous since 
> 
> it is a removable media. 

 

you know what? i don't think i'm the only one to use fat that way if it's 1000x faster! :}

pazz

----------

## mazirian

Thanks for solving my problem with my shuffle. This was really pissing me off and I'm surprised it's not in a gtkpod documentation by now.

----------

## Deathwing00

Moved from Multimedia to Kernel & Hardware.

----------

## seventhguardian

Hi!

It should solve the problem for me  :Smile:  I was getting crazy! My internet connection was down the whole weekend..

Have you already posted  a bug report? This sort of thing deserves being taken car of real quick on the "official" side  :Smile:  Just count the posts on the forum and you'll see why..

Anyway THANKS!

----------

