LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 03-15-2007, 01:30 AM   #1
davidsrsb
Member
 
Registered: Oct 2003
Location: Kuala Lumpur, Malaysia
Distribution: Slackware 13.37 current
Posts: 770

Rep: Reputation: 33
slow usb key detection


When I insert my flash key onto a Slackware 11.0 machine I get very slow installation.
this happens with both 2.4.33 and huge 2.6 kernels.
var/log/messages shows

ar 15 13:38:27 pisang -- MARK --
Mar 15 13:53:37 pisang kernel: usb 1-1: new full speed USB device using uhci_hcd and address 19
Mar 15 13:53:38 pisang kernel: usb 1-1: new full speed USB device using uhci_hcd and address 20
Mar 15 13:53:38 pisang kernel: usb 1-1: new full speed USB device using uhci_hcd and address 21
Mar 15 13:53:39 pisang kernel: usb 1-1: new full speed USB device using uhci_hcd and address 22
Mar 15 13:53:39 pisang kernel: usb 1-1: new full speed USB device using uhci_hcd and address 23
repeats
Mar 15 13:54:31 pisang kernel: usb 1-1: new full speed USB device using uhci_hcd and address 125
Mar 15 13:54:31 pisang kernel: usb 1-1: new full speed USB device using uhci_hcd and address 126
Mar 15 13:54:32 pisang kernel: usb 1-1: new full speed USB device using uhci_hcd and address 127
Mar 15 13:54:32 pisang kernel: usb 1-1: new full speed USB device using uhci_hcd and address 2
Mar 15 13:54:33 pisang kernel: usb 1-1: new full speed USB device using uhci_hcd and address 3
repeats
Mar 15 13:54:52 pisang kernel: usb 1-1: new full speed USB device using uhci_hcd and address 42
Mar 15 13:54:53 pisang kernel: usb 1-1: new full speed USB device using uhci_hcd and address 43
Mar 15 13:54:53 pisang kernel: usb 1-1: new full speed USB device using uhci_hcd and address 44
Mar 15 13:54:54 pisang kernel: usb 1-1: new full speed USB device using uhci_hcd and address 45
Mar 15 13:54:54 pisang kernel: usb 1-1: configuration #1 chosen from 1 choice
Mar 15 13:54:54 pisang kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Mar 15 13:54:59 pisang kernel: Vendor: Kingston Model: DataTraveler 2.0 Rev: 6.16
Mar 15 13:54:59 pisang kernel: Type: Direct-Access ANSI SCSI revision: 00
Mar 15 13:54:59 pisang kernel: SCSI device sda: 2004991 512-byte hdwr sectors (1027 MB)
Mar 15 13:54:59 pisang kernel: sda: Write Protect is off
Mar 15 13:54:59 pisang kernel: SCSI device sda: 2004991 512-byte hdwr sectors (1027 MB)
Mar 15 13:54:59 pisang kernel: sda: Write Protect is off
Mar 15 13:54:59 pisang kernel: sda: sda1
Mar 15 13:54:59 pisang kernel: sd 2:0:0:0: Attached scsi removable disk sda
Mar 15 13:54:59 pisang kernel: sd 2:0:0:0: Attached scsi generic sg0 type 0










;
 
Old 03-15-2007, 03:20 AM   #2
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,752

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
How long does all that take? Usually when you first insert the device it will take about 3 seconds for the kernel to first catch the event. Then hotplug starts to load the modules after a 3 second sleep. About that time the usb drivers have finfished registering and the scsi drivers start registering. It can take another 10-15 seconds (or more) for this to happen, especially if the device has more than one partition.
It looks as if your device is USB-1.1 so it will natuarlly be slower and the usb driver has to figure that out and start 'masquerading' as usb-1.1.

These problems also occur with other OS's (windows takes just as long to register usb devices) as they are problems with usb the protocol itself.
 
Old 03-15-2007, 06:15 AM   #3
davidsrsb
Member
 
Registered: Oct 2003
Location: Kuala Lumpur, Malaysia
Distribution: Slackware 13.37 current
Posts: 770

Original Poster
Rep: Reputation: 33
It takes a couple of minutes. Trying all of the possible addresses a few times at one per second takes a long time
 
Old 03-17-2007, 02:50 AM   #4
davidsrsb
Member
 
Registered: Oct 2003
Location: Kuala Lumpur, Malaysia
Distribution: Slackware 13.37 current
Posts: 770

Original Poster
Rep: Reputation: 33
Now the key is never loaded, the messages file shows that the process is cycling through addresses indefinitely.
This happens on a few machines with different hardware.

Trying a different key works ok.

Googling shows several people reporting the same problem with keys, usb disk drives and cameras on several Linux distributions.
 
Old 03-17-2007, 07:51 AM   #5
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 743

Rep: Reputation: 50
I haven't got an answer for you, but I did a bit of digging around.
Basically I think gnashley is spot on, but I found an interesting thing.

https://lists.ubuntu.com/archives/ke...st/020583.html

if you look here, you will find your problem exactly. But see this line:
usb 1-3: new high speed USB device using ehci_hcd and address 7

It is your device down to the revision number.
It is loading successfully as a high-speed device, using the ehci driver.

So can you check if your device and the hub you are plugging it in are both high speed (USB2.0)?

Note that as gnashley said, "full speed USB" is the slower speed. You need to see "high speed" for USB2.0

Usb suppport seems to improve with every new kernel version. If this problem is really bugging you, I think compiling your own up-to-date kernel (with usb drivers as modules) is the way to go. Also you may wish to check that you have the latest versions of hotplug and udev.

tobyl
 
Old 03-17-2007, 08:01 AM   #6
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 13.37 Android 4.0
Posts: 2,248

Rep: Reputation: 46
If a different key loads well, or faster, it's likely the device itself that's the problem. My 1GB thumb drive loads very quickly.

How old is this device? They do have a limited life span and perhaps this one is simply "wearing out"? Also, as gnashly said, if it's a 1.1 device it's going to take longer.

Do you have an fstab entry for a device like this? I found that creating an entry in fstab sped up the mounting process for the device.

/dev/sda1 /mnt/thumb auto noauto,user 0 0
 
Old 03-17-2007, 09:43 AM   #7
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,752

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
If the device is not high-speed, then the high-speed driver has to figure out which of the other drivers to use and revert to that, which may consume more time. Also as suggested make sure your hubs and extensions are all compatible. (having a usb-2 card with a usb-1 extension or hub will usually not work for usb-2 disks, even if they claim to be comatible.)
 
Old 03-17-2007, 11:12 PM   #8
davidsrsb
Member
 
Registered: Oct 2003
Location: Kuala Lumpur, Malaysia
Distribution: Slackware 13.37 current
Posts: 770

Original Poster
Rep: Reputation: 33
The key is usb2
Most of the the PCs are definitely usb 1.1 generation
 
Old 03-18-2007, 12:08 AM   #9
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 13.37 Android 4.0
Posts: 2,248

Rep: Reputation: 46
Trying to use a usb2 device on a 1.1 box is going to slow things down. Try pluggin it into a box with a modern usb port and see what happens.
 
Old 03-18-2007, 03:56 AM   #10
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,752

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
It may help to manually load the right kernel module instead of making the kernel figure it out.
 
  


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 detection sajith Programming 3 03-09-2007 10:24 AM
Re: USB detection SPo2 Linux - General 2 01-16-2007 07:28 AM
hardware detection slow..? yapp Suse/Novell 12 07-05-2005 02:41 AM
USB detection raysr Linux - Hardware 7 07-03-2005 09:29 PM
USB LexarMedia 32MB Data-Key + KDE 3.2=USB/HD Access problems that_guy Slackware 0 02-03-2005 08:27 AM


All times are GMT -5. The time now is 04:22 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration