# usb flash far too slow

## punkmikey

I've just bought a nice shiney new integral USB 2.0 flash drive, which is rather nice. Unfortunatly, when transfering data across, its unacceptable slow. The file copy dialog that appears in KDE shows the transfer speed between 12 - 64kbs. Which is far too slow. Takes about 3-4 mins for a few megs! I know its not a hardware problem as I managed to bring myself to boot XP and it works fine.

```
usb 1-5: new high speed USB device using ehci_hcd and address 2

scsi4 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 2

usb-storage: waiting for device to settle before scanning

  Vendor: Samsung   Model: Mighty Drive      Rev: PMAP

  Type:   Direct-Access                      ANSI SCSI revision: 00

SCSI device sdc: 1006592 512-byte hdwr sectors (515 MB)

sdc: Write Protect is off

sdc: Mode Sense: 23 00 00 00

sdc: assuming drive cache: write through

SCSI device sdc: 1006592 512-byte hdwr sectors (515 MB)

sdc: Write Protect is off

sdc: Mode Sense: 23 00 00 00usb 1-5: new high speed USB device using ehci_hcd and address 2

scsi4 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 2

usb-storage: waiting for device to settle before scanning

  Vendor: Samsung   Model: Mighty Drive      Rev: PMAP

  Type:   Direct-Access                      ANSI SCSI revision: 00

SCSI device sdc: 1006592 512-byte hdwr sectors (515 MB)

sdc: Write Protect is off

sdc: Mode Sense: 23 00 00 00

sdc: assuming drive cache: write through

SCSI device sdc: 1006592 512-byte hdwr sectors (515 MB)

sdc: Write Protect is off

sdc: Mode Sense: 23 00 00 00

sdc: assuming drive cache: write through

 sdc: sdc1

Attached scsi removable disk sdc at scsi4, channel 0, id 0, lun 0

usb-storage: device scan complete

sdc: assuming drive cache: write through

 sdc: sdc1

Attached scsi removable disk sdc at scsi4, channel 0, id 0, lun 0

usb-storage: device scan complete
```

Kinfocenter shows tha drive as being connected at 480 Mbit/s and I have not such issues tranfering mp3's onto my Zen Touch. So um, any ideas guys?

----------

## Tanisete

I've experienced the same problems you have. It's related to hal automount options with vfat. I don't know exactly how to change this behaviour (having options in the mount that slow everything), so i wrote a custom udev rule for the device, and i wrote a line in fstab as a workaround, like this:

```
/dev/kingston1          /media/kingston         vfat    defaults,noauto,users   0 0
```

This way, it works like a charm. If anyone know how to erase options in hal in 95userpolicy directory, tell me, because i have this, and it doesn't work (hal mounts it with utf-8 option):

```
<match key="volume.fstype" string="vfat">

          <<merge key="volume.policy.mount_option.iocharset=utf8" type="bool">false</merge>

    </match>
```

I hope this may help in the meantime!!

----------

## punkmikey

Cool, thanks!

I added the line:

```
/dev/sdc1          /mnt/usb         vfat    defaults,noauto,users   0 0
```

to /etc/fstab, and it works a treat! It also works for my new K750i phone  :Very Happy: 

Where can I find how to make these use the same device names, such as /dev/sdc1 for the flash drive and /dev/sdd1 for my phone? I'm assuming this is where writing the custom udev rule comes into play? Also, how safe is it to just walk up to these devices and unplug them without having to bother opening up a terminal and unmounting? If at all?

----------

## el_compa

This problem I also experienced, I fixed it by not using the "sync" mount option. For drives with less than 2GB of space, it uses the sync option.

Here's the relevant code in 95-userpolicy:

```

          <!-- Use noatime and sync options for all hotpluggable or removable

               volumes smaller than 2GB -->

          <match key="volume.size" compare_lt="2147483648">

            <match key="@block.storage_device:storage.hotpluggable" bool="true">

              <merge key="volume.policy.mount_option.sync" type="bool">false</merge>

              <merge key="volume.policy.mount_option.noatime" type="bool">true</merge>

            </match>

            <match key="@block.storage_device:storage.removable" bool="true">

              <merge key="volume.policy.mount_option.sync" type="bool">false</merge>

              <merge key="volume.policy.mount_option.noatime" type="bool">true</merge>

            </match>

          </match>

```

----------

## Tanisete

You can follow this guide in the gentoo wiki: http://gentoo-wiki.com/HOWTO_Customizing_UDEV

Cheers!

----------

## punkmikey

Cool, I'll have a look at that over the weekend. Cheers  :Smile: 

Assuming I don't drink myself stupid at the seaside tomorrow.... lol.

----------

