usb-storage: waiting for device to settle before scanning

Bug #355998 reported by BeatleJoose
232
This bug affects 29 people
Affects Status Importance Assigned to Milestone
libmtp
Unknown
Unknown
libgphoto2 (Ubuntu)
Fix Released
Undecided
Martin Pitt
Nominated for Jaunty by Rick Vinyard
Nominated for Karmic by Rick Vinyard
libmtp (Ubuntu)
Fix Released
Undecided
Martin Pitt
Nominated for Jaunty by Rick Vinyard
Nominated for Karmic by Rick Vinyard
linux (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Jaunty by Rick Vinyard
Nominated for Karmic by Rick Vinyard

Bug Description

2.6.28-11-generic

Problem: mp3 player (Sansa e270) should be mounted and seen as usb storage when attached via usb. With Intrepid, a window would appear asking what to do (open with Rhythmbox, etc). After upgrade to Jaunty (and then after a fresh reinstall of Jaunty), the usb storage is not seen. Normal usb thumbdrives are, however, recognized and are mounted.

Similar to other bugs (341191) generally for older versions, but this is different as it doesn't ever get past the "waiting for device to settle" part. Also, it doesn't matter how many times I reconnect the device, it is never recognized.

[ 2004.203465] usb 2-2.1: USB disconnect, address 7
[ 2043.365473] usb 2-2.4: new full speed USB device using ohci_hcd and address 8
[ 2044.197475] usb 2-2.4: not running at top speed; connect to a high speed hub
[ 2044.215539] usb 2-2.4: configuration #128 chosen from 1 choice
[ 2044.231613] scsi10 : SCSI emulation for USB Mass Storage devices
[ 2044.231804] usb-storage: device found at 8
[ 2044.231805] usb-storage: waiting for device to settle before scanning

lsusb shows the device (008):
Bus 001 Device 004: ID 0bda:0103 Realtek Semiconductor Corp. USB 2.0 Card Reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 008: ID 0781:7421 SanDisk Corp. Sansa E200 series
Bus 002 Device 003: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 002 Device 002: ID 058f:9254 Alcor Micro Corp. Hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
MachineType: System manufacturer System Product Name
NonfreeKernelModules: nvidia
Package: linux-image-2.6.28-11-generic 2.6.28-11.40
ProcCmdLine: root=UUID=b1c9026d-8f0e-46a3-a403-479494e48422 ro quiet splash
ProcEnviron:
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.28-11.40-generic
SourcePackage: linux

Revision history for this message
BeatleJoose (dc456) wrote :
Revision history for this message
Ori Avtalion (salty-horse) wrote :

I have the same problem with the same device.

After several attempts to disconnect and reconnect it, it does mount. (And the "waiting for device to settle phase" is instantaneous).

Revision history for this message
Ori Avtalion (salty-horse) wrote :

Attached is the dmesg log.

Please note that in this case I am using the Rockbox firmware on the device, but the same behavior is occurs with the original firmware.

Revision history for this message
BeatleJoose (dc456) wrote :

I should note that I am using the Rockbox firmware as well (original poster of this bug). Thanks for the extra info, Ori, hopefully this will get fixed in an upcoming version of Ubuntu.

I'll try disconnecting and reconnecting multiple times as you mention.

Revision history for this message
Tim Kosse (tim-kosse) wrote :

Me too!

I'm also using a Rockbox (revision 20666) on a Sansa e280 v1.

Trying to connect it to my Thinkpad R52. After plugging it in it's stuck at "usb-storage: waiting for device to settle before scanning".

I do not have problems on other operating systems (Gentoo Linux, Windows XP, OS X 10.5)

Revision history for this message
Philip Macpherson (philipmac1) wrote :

I too have this problem on Jaunty. I remember having a similar problem back in a feisty development. I think I fixed it at the time by formatting it on a working computer. However this time it didn't help.

It still loads perfectly on another computer's older ubuntu. As well as a windows laptop.

I tried disconnecting and reconnecting multiple times but it didn't help.

Revision history for this message
Marcello Giordano (napopa) wrote :

I can confirm the problem.
After upgrading to Jaunty my sansa e200 with rockbox firmware is not recognized anymore...
After plugging the device in the dmesg log reports

usb-storage: waiting for device to settle before scanning

Revision history for this message
Tim Kosse (tim-kosse) wrote :

Updated Rockbox to revision 20753, no change.

After retrying many times in a row Ubuntu will eventually detect the partitions, but there doesn't be any system behind it.

My guess would be that it is most likely a timing issue.

Revision history for this message
Tim Kosse (tim-kosse) wrote :

Caused by an incorrect entry in /usr/share/hal/fdi/preprobe/10osvendor/20-libgphoto2.fdi installed by libgphoto2.

The USB product ID used by Sansa e200 running in UMS/MSC mode, both by Rockbox as well as original firmware is 0x7421. The PID for MTP mode is 0x7420.

The fdi file lists both PIDs for use with MTP which is incorrect, removing the wrong entry makes it work again.

Revision history for this message
Tim Kosse (tim-kosse) wrote :

The attached patch for libgphoto2 works for me.

With it applied, both original firmware and Rockbox work fine.

Revision history for this message
Philip Macpherson (philipmac1) wrote :

Thanks so much for the fix Tim Kosse. Do you recommend I google a way to apply the patch to fix it? Or is there a high chance it will make it into the repo's in the next few days? Thanks again.

Revision history for this message
Tim Kosse (tim-kosse) wrote :

Try these simple steps:

apt-get install build-essential debuild
apt-get build-dep libgphoto2
apt-get source libgphoto2
wget http://launchpadlibrarian.net/25783305/libgphoto_sansa.diff
patch -p0 -i libgphoto_sansa.diff
cd libgphoto2-2.4.2
debuild -uc -us
cd ..
dpkg -i libgphoto2-2_2.4.2-0ubuntu4_i386.deb

Revision history for this message
BeatleJoose (dc456) wrote :

@Tim Kosse,
Thanks for providing the steps! However, it seems that debuild is installed with devscripts, at least on my machine, making the first line of your steps:

apt-get install build-essential devscripts

Revision history for this message
Philip Macpherson (philipmac1) wrote :

Just tested my player with the patch installed and it's working. :D Thank you so much again for finding the problem and the solution

Revision history for this message
BeatleJoose (dc456) wrote :

I can confirm that the fix as outlined here works! I am running 64-bit Ubuntu, so I made another slight change to the instructions, which is obviously changing "i386" in the final line to "amd64".

Fantastic job with the patch. Thanks again.

Revision history for this message
Ori Avtalion (salty-horse) wrote :

Filed bug upstream in libmtp (which libgphoto2 uses)

Revision history for this message
Martin Pitt (pitti) wrote :

Ori, I don't understand this. Certainly the ID shouldn't be removed in both libmtp and libgphoto2? Can you please also add the patch to the upstream bug, as well as giving them a reference to this Launchpad bug, so that they can get furhter information? Thanks!

Changed in linux (Ubuntu):
status: New → Invalid
Changed in libgphoto2 (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: New → Triaged
Revision history for this message
Ori Avtalion (salty-horse) wrote :

Martin,

I have spoken with Marcus Meissner, a libgphoto2 developer, and was asked to file a bug in libmtp.
The music_player.h file is maintained in libmtp and synced in libgphoto2, as clearly evidenced in the logs:
http://gphoto.svn.sourceforge.net/viewvc/gphoto/trunk/libgphoto2/camlibs/ptp2/music-players.h?view=log

In the first line of the upstream bug, I have already linked to this one.
And now I've attached the patch there, too :)

Revision history for this message
Marcus Meissner (meissner) wrote :

libmtp and libgphoto2 both access the device via "MTP".

The user seems to want to access the device via "USB Mass Storage" instead, and removing the id
removes it from auto-starting things like gvfs, which in turn detach the Mass Storage driver.

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, now I understand. Thanks for the explanation!

Changed in libmtp (Ubuntu):
status: New → Triaged
Revision history for this message
Amr Hassan (amr-hassan) wrote :

Having same problem with jaunty and sansa e260 with rockbox.
Can someone upload this patched lib to a ppa until it's fixed upstream?

Revision history for this message
Josef Wells (josefwells) wrote :

Using a Toshiba Gigabeat MEGF-40 (tried several version of RockBox) I had the same problem.

Edited /usr/share/hal/fdi/preprobe/10osvendor/20-libgphoto2.fdi as root
Searched for Gigabeat MEGF-40
A few lines before, It has:
   <match key="usb.vendor_id" int="2352">
   <match key="usb.product_id" int="9">

the command "lsusb" showed:
Bus 001 Device 011: ID 0930:0009 Toshiba Corp. Gigabeat F/X (HDD audio player)

I changed the 2352 to 0930
Saved.

Plugged in my toshiba and it popped up on the desktop.

Thanks so much for the help, I look forward to the package in an update!

Revision history for this message
Ori Avtalion (salty-horse) wrote :

Josef, 2352 is 930 in hexadecimal, so that's more of a hack than a fix.

I think your edit simply disabled gphoto's assumption that your device runs in MTP mode (it's probably running in MSC mode).

Does your device have the option of switching between those two modes?
Can you please change it to MTP mode, connect it to the computer, and run lsusb again?

Revision history for this message
ThomasMartitz (thomas47-deactivatedaccount) wrote :

I've mailed to the libmtp ML[1] and got an answer within 1 hour.

Tim Kosse's patch got accepted, so the Sansa e200 series should be fixed in upstream.

Please note that there was a bigger bug (the bug that gphoto even tried to treat devices as MTP even if it didn't respond to MTP commands since it is in MSC/UMS which applies to all possible devices) which is fixed since a while in upstream too [2].

[1]http://sourceforge.net/mailarchive/forum.php?thread_name=49F99C5B.9050702%40htw-berlin.de&forum_name=libmtp-discuss
[2]http://gphoto.svn.sourceforge.net/viewvc/gphoto/branches/libgphoto2-2_4/libgphoto2/libgphoto2_port/usb/libusb.c?r1=12026&r2=12025&pathrev=12026.

Revision history for this message
Josef Wells (josefwells) wrote :

Ori,

Sorry didn't see your note until today. I see now the XML speifies the usb.*_id as int, so like you said, a hack, but that is fine while I wait for upstream :) Just wanted to put up more detailed instructions for people who just want it to work for now.

The rockbox firmware for the gigabeat doesn't have an MTP mode, so I can't help with that request.

I think my wife's e200 Sansa can switch modes, I'll grab it tomorrow and try it.

Revision history for this message
Ori Avtalion (salty-horse) wrote :

Hi Josef,

I'm asking about the Gigabeat specifically. Perhaps its entry in the config file is wrong. :)

Revision history for this message
Josef Wells (josefwells) wrote :

I think a non-rockbox gigabeat has MTP capability, maybe someone else can help. Or maybe it works for them, in as much as MTP can be considered working.

Revision history for this message
Ori Avtalion (salty-horse) wrote :

It's possible that Josef's problem has been fixed in:
http://gphoto.svn.sourceforge.net/viewvc/gphoto?view=rev&revision=12026

Should be tested.

Revision history for this message
oudalrich (uhkeller) wrote :

Applying the patch as described in #12 fixed the problem for me too. However, Ubuntu wants to re-install the repository's version of libgphoto2-2 each time I run an update. How can I force it to stay at the patched version until a real update is out? I tried using "Hold" in Aptitude and "Force version" in Synaptic, but since the version number of the patched version is identical to the repository's version, this did not work.

Revision history for this message
HankB (hbarta) wrote :

I have also applied the patch and can confirm that it works for the lpia architecture.

There is a duplicate of this bug filed under https://bugs.launchpad.net/ubuntu/+bug/345916

thanks for the patch and instructions for how to apply it.

Revision history for this message
Marcus Meissner (meissner) wrote :

The real issue here however is neither a libmtp nor libgphoto2 bug.

It is a RockBox bug.

It reuses a USB ID for a device but provides different functionality.

Revision history for this message
Ori Avtalion (salty-horse) wrote :

Hi Marcus,

It has been established that the bug manifests in the original Sansa e200 firmware, and that the solution solves it. (The same is true for the rockbox firmware)

Also, the USB product ID provided by the rockbox firmware is exactly the same one provided by the original firmware. I have just verified this again on my own device, and have also discussed this with rockbox developers a few weeks ago.

What may confuse you is the fact that the original Sansa firmware allows for two modes of operation: MSC and MTP. In each of those modes, a different product ID is reported. (This factoid, too, was again just verified by me)

Rockbox's firmware uses the MSC product id, since it doesn't support MTP. Thus it provides the SAME functionality as the original firmware using the same product ID.

If I have failed to convince you, please explain why you think it's a rockbox bug.

Revision history for this message
Marcus Meissner (meissner) wrote :

ah ok,

i thought it was a dual mode device with the same USB ids (as also exist)

Revision history for this message
Geistanon (phentos) wrote :

The above patch worked for me as well! Many thanks.

Revision history for this message
Josef Wells (josefwells) wrote :

Ori,

The Gigabeat has the ability to run in MTP or "USB" mode, at least with the original firmware.

http://cdgenp01.csd.toshiba.com/content/support/downloads/gigabeat-F10204060_OwnersManual3_02_US_UE.pdf
(search for MTP)

I tried to reinstall the original firmware to no avail. I do wonder what lsusb would say if you changed the "mode" in the original firmware.

If lsusb doesn't change for the modes, rockbox should update its usb id to match the original firmware.

Revision history for this message
HankB (hbarta) wrote : Re: [Bug 355998] Re: usb-storage: waiting for device to settle before scanning

On Tue, May 5, 2009 at 9:52 AM, Josef Wells
<email address hidden> wrote:
>
> http://cdgenp01.csd.toshiba.com/content/support/downloads/gigabeat-F10204060_OwnersManual3_02_US_UE.pdf
> (search for MTP)
>
> I tried to reinstall the original firmware to no avail.  I do wonder
> what lsusb would say if you changed the "mode" in the original firmware.

Here are the results with my Sansa e280. Rockbox leaves the original
firmware (OF) intact since it only recently got USB support.

Rockbox lsusb:
Bus 008 Device 005: ID 0781:7421 SanDisk Corp. Sansa E200 series

OF/MSC
Bus 008 Device 006: ID 0781:7421 SanDisk Corp. Sansa E200 series

OF/MTP
Bus 008 Device 007: ID 0781:7420 SanDisk Corp. Sansa E200 series (mtp)

I can confirm that the bug in 9.04 prevented my Sansa from being
mounted regardless of whether it was running Rockbox or OF/MSC. If I
switched the OF to MTP, it was mounted but copying files to it did not
work correctly. It appears that 8.10 will not mount it in MTP mode.
(Files appeared in the mounted FS regardless of firmware and did not
appear in the device when it was not mounted. But that's another
issue.)

--
'03 BMW F650CS - hers
'98 Dakar K12RS - "BABY K" grew up.
'93 R100R w/ Velorex 700 (MBD starts...)
'95 Miata - "OUR LC"
polish visor: apply squashed bugs, rinse, repeat
Beautiful Sunny Winfield, Illinois

Revision history for this message
Ori Avtalion (salty-horse) wrote :

Thanks for the info, Hank.

The bug was already confirmed for the Sansa (the device I have). I was asking Josef about the Gigabeat, because perhaps it had a similar bug in libmtp. (which was probably fixed already)

Perhaps you should file a new bug for the problem of copying files after mounting in MTP mode.

Martin Pitt (pitti)
Changed in libgphoto2 (Ubuntu):
status: Triaged → In Progress
Revision history for this message
mark gay (mark-gay) wrote :

I think this bug is also causing problems with my ebook reader. It is an ASTAK EZ Reader (actually a Hanlin V3) . It has 256M internal storage and a SDisk slot. When attached via USB it comes up fine under Intrepid on my laptop, but it quit being recognized from my desktop, running Jaunty, after an upgrade a few weeks back.

Revision history for this message
Randy Noseworthy (randynose) wrote :

Hey all! I've tried to use @Tim Kosse's fix / patch and I'm running into problems. I tried it first from a default terminal window, and then thought that changing to the dir where the files are might help. - it didn't. I do a...

cd /usr/share/hal/fdi/preprobe/10osvendor/
sudo apt-get install build-essential devscripts
sudo apt-get install build-essential debuild
apt-get build-dep libgphoto2

-after that's run I run into this problem:

E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
me@my-laptop:~$ sudo apt-get build-dep libgphoto2
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to find a source package for libgphoto2
me@my-laptop:~$

apt-get source libgphoto2
wget http://launchpadlibrarian.net/25783305/libgphoto_sansa.diff
patch -p0 -i libgphoto_sansa.diff
cd libgphoto2-2.4.2
debuild -uc -us
cd ..
dpkg -i libgphoto2-2_2.4.2-0ubuntu4_i386.deb

Revision history for this message
Amr Hassan (amr-hassan) wrote :

emmm.. did you enable the archive source repository?

-- Amr

On Sat, May 23, 2009 at 19:42, RandyNose <email address hidden> wrote:

> Hey all! I've tried to use @Tim Kosse's fix / patch and I'm running
> into problems. I tried it first from a default terminal window, and
> then thought that changing to the dir where the files are might help. -
> it didn't. I do a...
>
> cd /usr/share/hal/fdi/preprobe/10osvendor/
> sudo apt-get install build-essential devscripts
> sudo apt-get install build-essential debuild
> apt-get build-dep libgphoto2
>
> -after that's run I run into this problem:
>
> E: Unable to lock the administration directory (/var/lib/dpkg/), are you
> root?
> me@my-laptop:~$ sudo apt-get build-dep libgphoto2
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> E: Unable to find a source package for libgphoto2
> me@my-laptop:~$
>
>
>
> apt-get source libgphoto2
> wget http://launchpadlibrarian.net/25783305/libgphoto_sansa.diff
> patch -p0 -i libgphoto_sansa.diff
> cd libgphoto2-2.4.2
> debuild -uc -us
> cd ..
> dpkg -i libgphoto2-2_2.4.2-0ubuntu4_i386.deb
>
> --
> usb-storage: waiting for device to settle before scanning
> https://bugs.launchpad.net/bugs/355998
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>

Martin Pitt (pitti)
Changed in libgphoto2 (Ubuntu):
status: In Progress → Fix Released
Changed in libmtp (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Triaged → Fix Committed
25 comments hidden view all 105 comments
Revision history for this message
Amr Hassan (amr-hassan) wrote :

There's a v2!? Well, mine doesn't specify so it must be a v1, and I'm
running rockbox. But it fails on rockbox and the original firmware.

Revision history for this message
Matthijs De Smedt (matthijs--) wrote :

Rockbox is not yet supported on the Sansa V2's. But it's supposed to run.

Revision history for this message
nloewen (nloewen) wrote :

can we patch the karmic version so both groups work? I don't really know how this works so feel free to ignore me if my ideas don't work.

Revision history for this message
daf (davydm) wrote :

I would just like to add that the first round of patches with libgphoto_sansa.diff worked like a CHARM for me with my e260. Now I don't have to mess about with making sure that I reboot the device into the original firmware. In fact, I'm almost confident enough to tell my wife that her player works "as expected" again (:

Revision history for this message
paulderol (dr-jackal-mr-hydra) wrote :

hooray for mimicry! i too can now put files on my Sansa again, thanks be to those who solved. Any word on when i can expect to be able to do a full update without reverting back to the original version?

Revision history for this message
Martin Schwenke (martin-meltin) wrote :

paulderol, what solution worked for you? What reverts when you do a full update?

Revision history for this message
Amr Hassan (amr-hassan) wrote :

libgphoto2-2_2.4.6-1ubuntu5_i386 and libgphoto2-port0_2.4.6-1ubuntu5_i386
from karmic's packages fixed it for me on jaunty and sansa e260. wonderful.

Revision history for this message
Amr Hassan (amr-hassan) wrote :

I have filed a backport request at https://bugs.launchpad.net/jaunty-backports/+bug/390130.
Meanwhile, the packages that fixed it for me are located at http://packages.ubuntu.com/karmic/libgphoto2-2 and http://packages.ubuntu.com/karmic/libgphoto2-port0 if any one is still wondering.

Revision history for this message
Matthijs De Smedt (matthijs--) wrote :

Thanks Amr. Installing those packages fixed my Sansa e280 too.

Revision history for this message
oudalrich (uhkeller) wrote :

The packages from #73 fixed it for me too. Updates no longer revert to the "anti-Sansa" version.

Revision history for this message
smuldrew (smuldrew) wrote :

No joy for me with the karmic packages. I performed a dpkg install of the two .deb packages, but I'm still getting the "waiting for device to settle before scanning" output from the dmesg output. Maybe I'm doing something wrong.

Revision history for this message
Amr Hassan (amr-hassan) wrote :

what device are you using?

Revision history for this message
PGScooter (pgscooter) wrote :

Amr's post (73) worked for me as well for my e260. I just downloaded the 64-bit packages, ran dpkg -i xxx and it worked. Note that one of the packages depends on the other so I installed that first. thanks!

Revision history for this message
smuldrew (smuldrew) wrote :

Amr, I've got an e260 running rockbox and an e270 running the original Sansa firmware. Both players fail to mount on my current installation. I've applied the karmic packages. It must be something specific to my setup as the karmic packages seem to be fixing the issue for others. Oh well, for now I've installed fedora on a spare pc and I'm using that to sync up my podcasts and music.

Revision history for this message
Sujee Maniyam (sujee) wrote :

Guys
I tried the patch and the karmic packages.. no dice! This is driving me crazy!!

Here 'lsusb'
Bus 001 Device 009: ID 0781:7421 SanDisk Corp. Sansa E200 series

Here is '/usr/share/hal/fdi/preprobe/10osvendor/20-libgphoto2.fdi'
 <match key="usb.vendor_id" int="1921">
    <match key="usb.product_id" int="29728">
     <merge key="info.category" type="string">portable_audio_player</merge>
     <addset key="info.capabilities" type="strlist">portable_audio_player</addset>
     <merge key="portable_audio_player.access_method" type="string">user</merge>
     <merge key="portable_audio_player.type" type="string">mtp</merge>
     <append key="portable_audio_player.output_formats" type="strlist">audio/mpeg</append>
     <merge key="camera.libgphoto2.name" type="string">SanDisk Sansa e200/e250/e260/e270/e280</merge>
     <merge key="camera.libgphoto2.support" type="bool">true</merge>
    </match>
   </match>
   <match key="usb.vendor_id" int="1921">
    <match key="usb.product_id" int="29730">
     <merge key="info.category" type="string">portable_audio_player</merge>
     <addset key="info.capabilities" type="strlist">portable_audio_player</addset>
     <merge key="portable_audio_player.access_method" type="string">user</merge>
     <merge key="portable_audio_player.type" type="string">mtp</merge>
     <append key="portable_audio_player.output_formats" type="strlist">audio/mpeg</append>
     <merge key="camera.libgphoto2.name" type="string">SanDisk Sansa e260/e280 v2</merge>
     <merge key="camera.libgphoto2.support" type="bool">true</merge>
    </match>
   </match>
---

What do I have to do in FDI file?

thanks a lot!

(here is hoping 2009 becomes 'the year of linux on desktop' :)

Revision history for this message
Sujee Maniyam (sujee) wrote :

forgot to mention:
running KUbuntu 9.04
Sansa E260 (rockbox)

Revision history for this message
smuldrew (smuldrew) wrote :

For reasons external to this issue, I needed to re-installed 9.04 on my system....don't ask. Starting with a fresh 9.04 and applying only the karmic packages as outlined by Amr in an earlier post, my system now recognizes both of my Sansa players (one rockbox and one with original firmware). My earlier issues must have been related to changes I made during various failed attempts to fix the problem. Thanks!

Revision history for this message
jarviw (jarviw) wrote :

installing the two karmic i386 packages fixed the problem for me (linux 2.6.28.14, Sansa e280, Rockbox 3.3). Thanks!

Revision history for this message
Michael Rooney (mrooney) wrote :

I ran into this as well. Patching and compiling the source package fixed it, although I think this is a little too much for less experienced users to go through just to use their mp3 player. As such I've uploaded a patched version to my PPA at https://launchpad.net/~mrooney/+archive/ppa, so if anyone wants to try that and can confirm the fix, I'll add it to the description.

Revision history for this message
Tim (coacharnold) wrote :

WOW >...... I have been running 9.04 happily and using my Sansa e260
..... I ran the solutions to the external device files and everything
has been fine for a couple months....

t

On Thu, Aug 6, 2009 at 9:57 PM, Michael Rooney<email address hidden> wrote:
> I ran into this as well. Patching and compiling the source package fixed
> it, although I think this is a little too much for less experienced
> users to go through just to use their mp3 player. As such I've uploaded
> a patched version to my PPA at
> https://launchpad.net/~mrooney/+archive/ppa, so if anyone wants to try
> that and can confirm the fix, I'll add it to the description.
>
> --
> usb-storage: waiting for device to settle before scanning
> https://bugs.launchpad.net/bugs/355998
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>

--
Rollin down the road on my own two feet

Revision history for this message
pruch (diogo-pruch) wrote :

On e260 w/ original firmware:

Set the usb mode to MSC

On Ubuntu Jaunty 32bit:

Execute 'lsub':
Bus 001 Device 022: ID 0781:7421 SanDisk Corp. Sansa E200 series

Transform from hex to dec:
0781 -> 1921 (vendor)
7421 -> 29729 (product)

Look up on '/usr/share/hal/fdi/preprobe/10osvendor/20-libgphoto2.fdi':

<match key="usb.vendor_id" int="1921">
    <match key="usb.product_id" int="29729">

Comment (w/ <!-- -->) or delete the hole "match" thing

Now I can use sansa has a usb driver on nautilus!

Revision history for this message
netman74501 (netman74501) wrote :

Simply changing "true" to "false" within the match block, as stated by pruch, works for me. It was all working fine until I accidentally unplugged my Sansa without unmounting it first. Now I can do that and have no problems but, I believe that is what caused this because up until now I have had no problems. Anyway, tried it thrice now so, I'm assuming it's fixed for me. I changed it to false because I was uncomfortable with commenting it out or deleting it. Seems like if maybe a program depends on it being there, then having it set to false instead of just not being there would be better anyway...

Revision history for this message
kbrock (krbrock60) wrote :

I am not getting these fixes to work for me. Have added Michael Rooney's PPA and have also walked through the steps in Tim Kosse's #12 patch.

This is what I am seeing:

dadio@dadio-desktop:~$ sudo patch -p0 -i libgphoto_sansa.diff
[sudo] password for dadio:
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- libgphoto2-2.4.2/camlibs/ptp2/music-players.h 2009-04-20 12:14:17.714907770 +0200
|+++ libgphoto2-2.4.2/camlibs/ptp2/music-players.h 2009-04-20 12:14:47.486905889 +0200
--------------------------
File to patch:

I am a newbie to Linux and not a programmer so any suggestions would be much appreciated. I am running Ubuntu 9.04 on a an i386 machine and trying to connect a Sansa e260. Same issues as listed above, will connect in MTP but not in MSC mode. Looking to add Rockbox when I get it up and running.

Revision history for this message
Martin Schwenke (martin-meltin) wrote :

kbrock, provided you've done the previous 2 steps in comment 12 (apt-get source libgphoto2-2, wget ...) then the patch line should apply without any problems - you need to be in the directory containing the libgphoto2-2.4.2 subdirectory. It shouldn't make any difference but the only lines you need a "sudo" command for would be the the 1st 2 apt-get commands and the final dpkg commands - it is best to do as many steps as possible as you instead of as root.

If you want to retry then I'd suggest

  rm -r libgphoto*

... probably with sudo if the only files and directories are hanging around. :-)

Note that the very 1st apt-get command probably won't work. There is no package called debuild. You need devscripts instead because it contains the debuild command.

That said, building a patched package will probably do you no more good than using a package from someone's PPA...

So, when you say "Have added Michael Rooney's PPA" can you please explain the steps you did? After adding his PPA did you actually install the updated package from his PPA? :-)

Revision history for this message
kbrock (krbrock60) wrote :

Martin
Thanks so much for the suggestions. Walked through the steps again and did make it further this time but now stalled at the end. Here is the output.

test -d debian/patched || install -d debian/patched
dpatch apply-all
applying patch 10_disable_cache to ./ ... ok.
applying patch 11_hurd_no_path_max_bsdsource to ./ ... ok.
applying patch 45_increase_canon_timeout to ./ ... ok.
applying patch 60_udev_rules_are_autogenerated_notice to ./ ... ok.
applying patch 70_increase_max_entries to ./ ... ok.
applying patch deprecated_lt_dlcaller_register to ./ ... ok.
applying patch 71_disable_panasonic_2372 to ./ ... ok.
applying patch libgphoto_sansa to ./ ... failed.
make: *** [patch-stamp] Error 1
dpkg-buildpackage: failure: debian/rules build gave error exit status 2
debuild: fatal error at line 1329:
dpkg-buildpackage -rfakeroot -D -us -uc failed
dadio@dadio-desktop:~/libgphoto2-2.4.2$ cd ..
dadio@dadio-desktop:~$ sudo dpkg -i libgphoto2-2_2.4.2-0ubuntu4_i386.deb
dpkg: error processing libgphoto2-2_2.4.2-0ubuntu4_i386.deb (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 libgphoto2-2_2.4.2-0ubuntu4_i386.deb

On the other note I added the PPA to my software sources then installed the packages from launchpad (at least I think I did). I received a message that those packages were already installed so I reinstalled them.

Revision history for this message
Martin Schwenke (martin-meltin) wrote :

kbrock, the problem is that the package didn't build. I'm not sure why... but my guess is that you've actually downloaded the source from the PPA, you're patching it and then the build process is failing to patch it again. Hard to be certain though...

Let's focus on whether you have the binary package from the PPA correctly installed. What output do you see if you run the following?

  apt-cache policy libgphoto2-2

Revision history for this message
kbrock (krbrock60) wrote :

dadio@dadio-desktop:~$ apt-cache policy libgphoto2-2
libgphoto2-2:
  Installed: 2.4.2-0ubuntu5~ppa2
  Candidate: 2.4.2-0ubuntu5~ppa2
  Version table:
 *** 2.4.2-0ubuntu5~ppa2 0
        500 http://ppa.launchpad.net jaunty/main Packages
        100 /var/lib/dpkg/status
     2.4.2-0ubuntu4 0
        500 http://archive.ubuntu.com jaunty/main Packages
dadio@dadio-desktop:~$

Revision history for this message
Martin Schwenke (martin-meltin) wrote :

kbrock, it certainly looks like you have mrooney's PPA version of the package installed, so the bug should be fixed.

Is your Sansa e260 a v1 or v2? There are hints for how to tell the difference at:

   http://www.rockbox.org/twiki/bin/view/Main/SansaE200v2#How_to_identify_an_e200_v2

The current patch only affects v1 e260s. If you have a v2 then perhaps a similar patch will work?

Revision history for this message
kbrock (krbrock60) wrote :

The Settings->Info tells me 01.02.18A so looks like a v1. I am going to try to patch the USB version of Ubuntu 9.04 I am running on a laptop and see if that will work.

Revision history for this message
Martin Schwenke (martin-meltin) wrote :

kbrock, the patch works with my v1, so I'm not sure what is happening with you. However, I'm running the version from my PPA rather than Michael Rooney's PPA. They should be the same though...

Unsolved mystery... :-(

Revision history for this message
kbrock (krbrock60) wrote :

Martin,
I applied your patch to my USB and it worked perfectly. I am now able to connect to the Sansa. Must be something corrupted on the home system. I will do a back up and do a fresh install over the weekend and try again. Thanks again for all the help.

Revision history for this message
Martin Schwenke (martin-meltin) wrote :

That's great news, kbrock... you're welcome!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libmtp - 0.3.7-3ubuntu2

---------------
libmtp (0.3.7-3ubuntu2) karmic; urgency=low

  * src/music-players.h: Drop "Sansa e280" product ID 0x7421, since it's just
    the e280 in MSC mode; we already use PTP mode, and these two conflict.
    Taken from upstream CVS. (LP: #355998)

 -- Martin Pitt <email address hidden> Wed, 14 Oct 2009 12:23:45 +0200

Changed in libmtp (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Francewhoa (francewhoa) wrote :

Confirming that this bug is still present in Ubuntu 8.04.3 LTS (Hardy Heron Desktop Edition). I have a MP3 player Sansa e280. I tried both Sansa MSC mode and MTP mode. And rebooting Ubuntu each time.

Any volunteer to back port the patch?

I would be happy to contribute testing.

Changed in libgphoto2 (Ubuntu):
status: Fix Released → Fix Committed
status: Fix Committed → Fix Released
Revision history for this message
Nick B (declension) wrote :

I had hoped this would "just work" in Karmic, but no joy. Tried the patch but of course doesn't work against the newer source version of libgphoto2, seemingly as it's already been included.

However, same problem as ever here. Anybody else had any luck with Karmic?

Revision history for this message
oldos2er (oldos2er) wrote :

 No joy here either. I have a Sansa View; I upgraded to 9.10 from 9.04. I tried downgrading libgphoto2, didn't work. This is very frustrating.

Revision history for this message
Frodon (frodon) wrote :

Same here, no MP3 anymore with my sansa c250 since karmic upgrade.

Hopingfor a fix.

Revision history for this message
Norberto (gbox) wrote :

Fresh karmic install, but:
Bus 003 Device 008: ID 05c6:1000 Qualcomm, Inc.
This should be an LG KU250 mobile's mass storage device, but the only message a got is:
"usb-storage: waiting for device to settle before scanning"

I had bad experiences with this phone since jaunty...

Revision history for this message
markofealing (mark-ferns16) wrote :

I have a LG KM900, running 10.04 same problem, used to work fine under 9.10!

2010-09-18 08:08:34 Kubuntu64 kernel [ 760.880369] usb 1-4: new high speed USB device using ehci_hcd and address 111
2010-09-18 08:08:34 Kubuntu64 kernel [ 761.032803] hub 1-0:1.0: unable to enumerate USB device on port 4
2010-09-18 08:08:35 Kubuntu64 kernel [ 761.570053] usb 2-4: new full speed USB device using ohci_hcd and address 95
2010-09-18 08:08:35 Kubuntu64 kernel [ 762.172532] usb 2-4: device not accepting address 95, error -62
2010-09-18 08:08:35 Kubuntu64 kernel [ 762.232558] hub 2-0:1.0: unable to enumerate USB device on port 4
2010-09-18 08:08:36 Kubuntu64 kernel [ 762.670343] usb 1-4: new high speed USB device using ehci_hcd and address 112
2010-09-18 08:08:36 Kubuntu64 kernel [ 762.822158] usb 1-4: configuration #1 chosen from 1 choice
2010-09-18 08:08:36 Kubuntu64 kernel [ 762.823250] scsi262 : SCSI emulation for USB Mass Storage devices
2010-09-18 08:08:36 Kubuntu64 kernel [ 762.823511] usb-storage: device found at 112
2010-09-18 08:08:36 Kubuntu64 kernel [ 762.823517] usb-storage: waiting for device to settle before scanning
2010-09-18 08:08:36 Kubuntu64 kernel [ 762.888846] usb 1-4: USB disconnect, address 112
2010-09-18 08:08:36 Kubuntu64 kernel [ 763.290587] usb 1-4: new high speed USB device using ehci_hcd and address 113
2010-09-18 08:08:36 Kubuntu64 kernel [ 763.440356] hub 1-0:1.0: unable to enumerate USB device on port 4
2010-09-18 08:08:37 Kubuntu64 kernel [ 763.980085] usb 2-4: new full speed USB device using ohci_hcd and address 97
2010-09-18 08:08:37 Kubuntu64 kernel [ 764.197360] usb 2-4: not running at top speed; connect to a high speed hub
2010-09-18 08:08:37 Kubuntu64 kernel [ 764.215596] usb 2-4: configuration #1 chosen from 1 choice
2010-09-18 08:08:37 Kubuntu64 kernel [ 764.255031] scsi263 : SCSI emulation for USB Mass Storage devices
2010-09-18 08:08:37 Kubuntu64 kernel [ 764.268847] usb-storage: device found at 97
2010-09-18 08:08:37 Kubuntu64 kernel [ 764.268854] usb-storage: waiting for device to settle before scanning
2010-09-18 08:08:38 Kubuntu64 kernel [ 764.602896] usb 1-4: new high speed USB device using ehci_hcd and address 114
2010-09-18 08:08:38 Kubuntu64 kernel [ 765.202539] usb 1-4: device not accepting address 114, error -71
2010-09-18 08:08:38 Kubuntu64 kernel [ 765.320051] usb 1-4: new high speed USB device using ehci_hcd and address 115

Others are also reporting problems http://ubuntuforums.org/showthread.php?t=871678

Revision history for this message
Munchkinguy (10068660) wrote :

I am having a similar problem with my Sansa Clip+.

When I look in the file /usr/share/hal/fdi/information/10freedesktop/10-usb-music-players.fdi , it says at line 512:

"<!-- Sansa Clip and Fuze versions 1 and 2.
               Older devices require a firmware upgrade to support all
               output formats, but we can't detect that via USB ID. -->"

Does this mean I need to downgrade my Sansa Clip+ firmware in order to make the device work?

Displaying first 40 and last 40 comments. View all 105 comments or add a comment.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.