Cannot connect to Samsung Galaxy S III

Bug #1015010 reported by Alistair Cunningham
314
This bug affects 69 people
Affects Status Importance Assigned to Milestone
libmtp (Ubuntu)
Fix Released
Medium
Unassigned
linux (Ubuntu)
Invalid
Medium
Rolf Leggewie

Bug Description

libmtp can detect a Samsung Galaxy S III (GT-I9300, also known as the Galaxy S3) but cannot connect to it:

$ mtp-detect
libmtp version: 1.1.3

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7310/P7510/N7000/I9100/Galaxy Tab 7.7/10.1/S2/Nexus/Note.
   Found 1 device(s):
   Samsung: GT-P7310/P7510/N7000/I9100/Galaxy Tab 7.7/10.1/S2/Nexus/Note (04e8:6860) @ bus 2, dev 21
Attempting to connect device(s)
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.

$ lsusb -vv -d 04e8:6860

Bus 002 Device 021: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II]
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 2.00
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 64
  idVendor 0x04e8 Samsung Electronics Co., Ltd
  idProduct 0x6860 GT-I9100 Phone [Galaxy S II]
  bcdDevice 4.00
  iManufacturer 2 SAMSUNG
  iProduct 3 SAMSUNG_Android
  iSerial 4 4df1bc903e874f25
  bNumConfigurations 2
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 39
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xc0
      Self Powered
    MaxPower 96mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 3
      bInterfaceClass 6 Imaging
      bInterfaceSubClass 1 Still Image Capture
      bInterfaceProtocol 1 Picture Transfer Protocol (PIMA 15470)
      iInterface 5 MTP
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x82 EP 2 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x01 EP 1 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 1
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x83 EP 3 IN
        bmAttributes 3
          Transfer Type Interrupt
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 14
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 105
    bNumInterfaces 3
    bConfigurationValue 2
    iConfiguration 0
    bmAttributes 0xc0
      Self Powered
    MaxPower 96mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 3
      bInterfaceClass 6 Imaging
      bInterfaceSubClass 1 Still Image Capture
      bInterfaceProtocol 1 Picture Transfer Protocol (PIMA 15470)
      iInterface 5 MTP
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x82 EP 2 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x01 EP 1 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 1
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x83 EP 3 IN
        bmAttributes 3
          Transfer Type Interrupt
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 14
    Interface Association:
      bLength 8
      bDescriptorType 11
      bFirstInterface 1
      bInterfaceCount 2
      bFunctionClass 2 Communications
      bFunctionSubClass 2 Abstract (modem)
      bFunctionProtocol 1 AT-commands (v.25ter)
      iFunction 8 CDC Serial
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 1
      bAlternateSetting 0
      bNumEndpoints 1
      bInterfaceClass 2 Communications
      bInterfaceSubClass 2 Abstract (modem)
      bInterfaceProtocol 1 AT-commands (v.25ter)
      iInterface 6 CDC Abstract Control Model (ACM)
      CDC Header:
        bcdCDC 1.10
      CDC Call Management:
        bmCapabilities 0x00
        bDataInterface 2
      CDC ACM:
        bmCapabilities 0x02
          line coding and serial state
      CDC Union:
        bMasterInterface 1
        bSlaveInterface 2
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x86 EP 6 IN
        bmAttributes 3
          Transfer Type Interrupt
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x000a 1x 10 bytes
        bInterval 9
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 2
      bAlternateSetting 0
      bNumEndpoints 2
      bInterfaceClass 10 CDC Data
      bInterfaceSubClass 0 Unused
      bInterfaceProtocol 0
      iInterface 7 CDC ACM Data
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x85 EP 5 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x04 EP 4 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
Device Qualifier (for other device speed):
  bLength 10
  bDescriptorType 6
  bcdUSB 2.00
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 64
  bNumConfigurations 2
Device Status: 0x0000
  (Bus Powered)

The phone is the blue 16GB version running Android 4.0.4 and linux kernel 3.0.15-554452-user.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libmtp9 1.1.3-1
ProcVersionSignature: Ubuntu 3.2.0-25.40-generic-pae 3.2.18
Uname: Linux 3.2.0-25-generic-pae i686
ApportVersion: 2.0.1-0ubuntu8
Architecture: i386
Date: Tue Jun 19 10:29:54 2012
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
ProcEnviron:
 LANGUAGE=en_GB:en
 TERM=xterm
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
RelatedPackageVersions:
 hal 0.5.14-8
 udev 175-0ubuntu9
SourcePackage: libmtp
UpgradeStatus: Upgraded to precise on 2012-04-27 (53 days ago)

Revision history for this message
Alistair Cunningham (acunningham) wrote :
summary: - Cannot connect to Samsung Galaxy S3
+ Cannot connect to Samsung Galaxy S III
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libmtp (Ubuntu):
status: New → Confirmed
Revision history for this message
Sam Volojiy (svolo) wrote :

This bug is NOT a duplicate of bug #696301.
This one affects libmtp 1.1.3 and Galaxy S3 and displays a different pattern than libmtp 1.0.3 for Galaxy S2 (bug #696301).

Don't ignore, fix it. S3 is now in the pockets of many, many people!

Revision history for this message
Jonathan Kamens (jik) wrote :

I am using Fedora, but I suspect this is equally applicable to both Ubuntu and Fedora...

If I (a) ensure that nothing else, e.g., gvfs-gphoto2, mounts my Galaxy S III, and (b) connect to it using libmtp _within about three seconds of when I plug it in_, then the connection is successful.

If, however, something else has already connected to it, e.g., gvfs2-gphoto2-volume-monitor mounts it and then I eject it, OR if I wait three seconds or more after plugging it in before trying to connect to it via libmtp, then the connection fails as shown above.

Revision history for this message
hoover (uwe-schuerkamp) wrote :

I have the same problem on my new Galaxy S3 set to "mtp device":

Fehler beim Initialisieren der Kamera: -60: Konnte das Gerät nicht alleinig reservieren

mtp-detect output:

$ mtp-detect
libmtp version: 1.1.3

Listing raw device(s)
Device 0 (VID=04e8 and PID=6865) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
   Found 1 device(s):
   04e8:6865 @ bus 2, dev 7
Attempting to connect device(s)
ignoring usb_claim_interface = -6ignoring usb_claim_interface = -5PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.

Revision history for this message
Simone Lussardi (simone-lussardi) wrote :

Confirmed here too. I get some sort of "write only capabilities" on mine, probably because is rooted and with custom ROM. But I can never read any data from it, including photos, which is quite annoying.

Revision history for this message
Jonathan Kamens (jik) wrote :

If you're using a custom ROM, then this bug is unlikely to have anything to do with you, since (a) every Android version is going to have different behaviors, and (b) Samsung implemented a proprietary MTP stack for their version of Android that isn't going to be present on any open-source Android version you might install on the phone.

Revision history for this message
doom0r (doomveteran) wrote :

This appears to be fixed upstream a few days after the revision of the source used to build the current precise-updates package.

See http://libmtp.git.sourceforge.net/git/gitweb.cgi?p=libmtp/libmtp;a=commit;h=9aca3434f6316b75eed6c8c7f3ea7c7471fbdb1a

Revision history for this message
Arai Quantum Krafart (krafart) wrote :

I have tried the Quantal package (1.1.3-35-g0ece104-2ubuntu1) of libmtp on my lubuntu 12.04.1 which include the patch for the S3.

$mtp-detect
libmtp version: 1.1.3

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y.
   Found 1 device(s):
   Samsung: GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y (04e8:6860) @ bus 1, dev 16
Attempting to connect device(s)

PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.

The description now include "I9300/S3" but still can't connect and timeout with the same error.

However it's work for me now ! I have noticed that if you launch mtp-detect right after plugging the USB cable (after the sound on the S3) then you can connect. I don't know if the upgrade help but maybe not.

The same is right with gmtp. You plug the USB cable and just after the sound, you click on "connect". I was able to browse all the file system and download file.

Revision history for this message
98cwitr (brettm) wrote :

Confirmed here as well

mtp-detect
libmtp version: 1.1.3

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7310/P7510/N7000/I9100/Galaxy Tab 7.7/10.1/S2/Nexus/Note.
   Found 1 device(s):
   Samsung: GT-P7310/P7510/N7000/I9100/Galaxy Tab 7.7/10.1/S2/Nexus/Note (04e8:6860) @ bus 2, dev 2
Attempting to connect device(s)
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.

Revision history for this message
98cwitr (brettm) wrote :

Found a fix!

Run this: sudo apt-get install libusb-dev gmtp

reboot...should work!

Revision history for this message
98cwitr (brettm) wrote :

Still causes Rhythmbox to crash though :/

Revision history for this message
Phill Coxon (phill-getresults) wrote :

I can confirm that if I hit the connect button in gmtp immediately after plugging in my Galaxy S3 it will recognise and give me access to my phone. Still no luck access via the "file manager" through Available Devices.

I also upgraded libmtp to the Quantal package (1.1.3-35-g0ece104-2ubuntu1) and did the sudo apt-get install libusb-dev gmtp as suggested above. I'm not sure if either of those helped enable access so I'd suggest testing each step in turn.

Revision history for this message
Bob (bob-mroczka) wrote :

I have not upgraded libmtp to the Quantal package but I was able to connect if I hit connect in gmtp immediately after plugging in my galaxy s3.

Revision history for this message
Abram Arbizo (aye) wrote :
Download full text (6.3 KiB)

abe@Monkeybone41:~$ lsusb -vv -d 04e8:6860

Bus 001 Device 022: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II]
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 2.00
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 64
  idVendor 0x04e8 Samsung Electronics Co., Ltd
  idProduct 0x6860 GT-I9100 Phone [Galaxy S II]
  bcdDevice 4.00
  iManufacturer 2 SAMSUNG
  iProduct 3 SAMSUNG_Android_SGH-T999
  iSerial 4 fe185906
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 137
    bNumInterfaces 4
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xc0
      Self Powered
    MaxPower 96mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 3
      bInterfaceClass 6 Imaging
      bInterfaceSubClass 1 Still Image Capture
      bInterfaceProtocol 1 Picture Transfer Protocol (PIMA 15470)
      iInterface 5 MTP
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x81 EP 1 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x01 EP 1 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0200 1x 512 bytes
        bInterval 1
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x82 EP 2 IN
        bmAttributes 3
          Transfer Type Interrupt
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x001c 1x 28 bytes
        bInterval 6
    Interface Association:
      bLength 8
      bDescriptorType 11
      bFirstInterface 1
      bInterfaceCount 2
      bFunctionClass 2 Communications
      bFunctionSubClass 2 Abstract (modem)
      bFunctionProtocol 1 AT-commands (v.25ter)
      iFunction 8 CDC Serial
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 1
      bAlternateSetting 0
      bNumEndpoints 1
      bInterfaceClass 2 Communications
      bInterfaceSubClass 2 Abstract (modem)
      bInterfaceProtocol 1 AT-commands (v.25ter)
      iInterface 6 CDC A...

Read more...

Revision history for this message
Abram Arbizo (aye) wrote :

libmtp version: 1.1.3

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7310/P7510/N7000/I9100/Galaxy Tab 7.7/10.1/S2/Nexus/Note.
   Found 1 device(s):
   Samsung: GT-P7310/P7510/N7000/I9100/Galaxy Tab 7.7/10.1/S2/Nexus/Note (04e8:6860) @ bus 1, dev 2
Attempting to connect device(s)
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
inep: usb_get_endpoint_status(): No such device
outep: usb_get_endpoint_status(): No such device
usb_clear_halt() on IN endpoint: No such device
usb_clear_halt() on OUT endpoint: No such device
usb_clear_halt() on INTERRUPT endpoint: No such device
usb_open(): No such file or directory
LIBMTP PANIC: Could not init USB on second attempt
Unable to open raw device 0
OK.

Revision history for this message
Abram Arbizo (aye) wrote :

libmtp version: 1.1.3

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7310/P7510/N7000/I9100/Galaxy Tab 7.7/10.1/S2/Nexus/Note.
   Found 1 device(s):
   Samsung: GT-P7310/P7510/N7000/I9100/Galaxy Tab 7.7/10.1/S2/Nexus/Note (04e8:6860) @ bus 1, dev 7
Attempting to connect device(s)
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device

PTP was the top comment

MTP is this one when selected on the Galaxy S 3 Phone

libmtp version: 1.1.3

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7310/P7510/N7000/I9100/Galaxy Tab 7.7/10.1/S2/Nexus/Note.
   Found 1 device(s):
   Samsung: GT-P7310/P7510/N7000/I9100/Galaxy Tab 7.7/10.1/S2/Nexus/Note (04e8:6860) @ bus 1, dev 7
Attempting to connect device(s)
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device

And my system hangs there still cannot see what the files are or were they are located was not able to add my music or get music off my phone either apps were able to trasnfer from DropBox, and other storage apps so what ever drop box is using to access galaxy maybe you guys need to work together on how that is? I am stuck all Samsung Galaxy S III direct attepts are failing. I have yet to see a successful PC to Galaxy file transfer as of yet that is easy for users to just install or add via ubuntu software center or a plugin for rhythembox or clemintine i can add files tot he phone but once the phone is seperated from the pc or you change files the galaxy system changes its privacy settings and ubuntu canot find them anymore

Revision history for this message
Thomas Hotz (thotz-deactivatedaccount) wrote :

Can you please tell me if you are using Android 4 or Android 4.1?

Revision history for this message
Mark Crompton (cromptonm) wrote :

I'm using Android 4.0.4 with kernel 3.0.15-CL985643-user.

Same problem as post #1.

However, connection is successful only if attempted within 3 seconds of plugging in phone.

Revision history for this message
Marlon Costa (marlonsc) wrote :

The gmtp and mtp-detect worked for me within 3 seconds of pluggin in phone.

GMTP crashed in the secound attempt to connect. Bug reported - 1063702

Revision history for this message
Max (maxter) wrote :

confirmed
both mtp-detect and gmtp works if connected within few seconds.

Revision history for this message
humble_coffee (humblecoffee) wrote :

I'm also experiencing this problem with libmtp 1.1.3.

Nautilus can write but cannot read files off device.

I'm running Android 4.1.1.

Revision history for this message
humble_coffee (humblecoffee) wrote :

Seems to be working fine now with libmtp 1.1.4 on 12.10.

Revision history for this message
Aaron D. Campbell (aaroncampbell) wrote :

I seem to be able to access the internal storage but not the SD Card with libmtp 1.1.4.

Revision history for this message
Michael Sotnikov (stari4ek) wrote :

Doesn't work for me with limtp 1.1.4.

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y.
   Found 1 device(s):
   Samsung: GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y (04e8:6860) @ bus 1, dev 4
Attempting to connect device
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
inep: usb_get_endpoint_status(): No data available
outep: usb_get_endpoint_status(): No data available
usb_clear_halt() on IN endpoint: Protocol error
usb_clear_halt() on OUT endpoint: Protocol error
usb_clear_halt() on INTERRUPT endpoint: Protocol error
ignoring usb_claim_interface = -99LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0

Revision history for this message
Federico Bruni (fedelogy) wrote :

I have the same problem. I'm on Debian testing: current version of libmtp is 1.1.3-35-g0ece104-4
I've compiled latest version from source because some people on sourceforge said that it did work on 1.1.5
Well, this is not the case for me:

# mtp-detect
libmtp version: 1.1.5

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y.
   Found 1 device(s):
   Samsung: GT P7310/P7510/N7000/I9070/I9100/I9300 Galaxy Tab 7.7/10.1/S2/S3/Nexus/Note/Y (04e8:6860) @ bus 7, dev 3
Attempting to connect device(s)
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
inep: usb_get_endpoint_status(): No such device
outep: usb_get_endpoint_status(): No such device
usb_clear_halt() on IN endpoint: No such device
usb_clear_halt() on OUT endpoint: No such device
usb_clear_halt() on INTERRUPT endpoint: No such device
usb_open(): No such device
LIBMTP PANIC: Could not init USB on second attempt
Unable to open raw device 0
OK.

Revision history for this message
Federico Bruni (fedelogy) wrote :

I've flashed my device and I have Cyanogenmod installed now.
Now things seem to work fine.
The settings on the phone are the same as before flashing (debug mode and FTP mode enabled).

When I plug the device, I see the device "mounted" in Nautilus. Actually it's not mounted, it's just gphoto2.
Also, Clementine (media player) auto-starts and mounts the SD card.. but cannot read the files (no URI handler for MTP).

Despite this annoying automatic stuff, mtp-detect and gmtp now work fine.
So maybe the problem comes from the Android shipped within the device?

Revision history for this message
Mark Crompton (cromptonm) wrote :

Since version 1.1.4 of libmtp this works fine for me, on the standard phone OS (Android 4.0.4) on Samsung Galaxy SIII

Revision history for this message
Marius Groeger (marius-groeger) wrote :

Mark, two questions:
- do you have an external sdcard installed, and can you access both the internal and external flash memory, and with read/write?
- what exactly works: can you repeatedly do mtp-detect / does gmtp work / do you see the device in nautilus / ...

Revision history for this message
Mark Crompton (cromptonm) wrote :

@Marius:
 - I installed an external SDcard. When I press Connect on gMTP, I can select between either the phone internal memory or the SDcard. I have both read and write access to the phone memory and also the SDcard (not simultaneously of course).

 - I can repeatedly do mtp-detect. gMTP works every time. It also works if I wait more than three seconds after plugging in phone before I hit Connect.

 - I can see the device in Nautilus, but only folders, which are empty. This is why you need to use gMTP to manage files.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.7 kernel[0] (Not a kernel in the daily directory) and install both the linux-image and linux-image-extra .deb packages.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.7-rc6-raring/

Changed in libmtp (Ubuntu):
importance: Undecided → Medium
tags: added: kernel-da-key
Changed in libmtp (Ubuntu):
status: Confirmed → Incomplete
status: Incomplete → Confirmed
Changed in linux (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
Marius Groeger (marius-groeger) wrote :

Joseph, thanks a lot for the notice, but unfortunately I can't test this because all my machines run precise or quantal and also are production systems. But I'd really like to find out which kernel(!) bug should be related to this issue?! From all I know now there's two issues: 1) libmtp is being used in a wrong way to enumerate the device content 2) the gphoto gvfs driver grabs and "hogs" the device before other MTP clients get a chance to grab them. Can you tell us which kernel patch in 3.7-rc6-raring could have an impact here?

Revision history for this message
Joe le Kiffeur (joelekiffeur) wrote :

Same bug with Ubuntu 12.04 3.2.0-36-generic #57-Ubuntu SMP Tue Jan 8 21:44:52 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux.
Can't connect, wifi can't hang...

Changed in libmtp (Ubuntu):
assignee: nobody → Joe le Kiffeur (joelekiffeur)
assignee: Joe le Kiffeur (joelekiffeur) → nobody
Revision history for this message
Alexander Winizki (awinizki) wrote :

I can confirm what #14 wrote - I use Ubuntu 12.04 and Samsung Galaxy SIII + Android 4.1; installed only gmtp and its dependencies and it works with gMTP as described in #14 - but don't hit "connect" before the phone has made "beep -beep" because then it won't work either. In Nautilus, the access to the phone is still write-only.

Revision history for this message
Malte S. Stretz (mss) wrote :

I tried the packages from raring 1.1.5-42-g6e96316-1ubuntu1 (also running the raring LTS enablement kernel) and it still doesn't work against a Galaxy S3 (stock Vodafone firmware version 4.1.2). I haven't tried the quick-click workaround yet.

stretz@slpn-nb-mss:~$ mtp-detect
Unable to open ~/.mtpz-data for reading, MTPZ disabled.libmtp version: 1.1.5

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
   Found 1 device(s):
   Samsung: Galaxy models (MTP) (04e8:6860) @ bus 2, dev 7
Attempting to connect device(s)
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.
stretz@slpn-nb-mss:~$ sudo mtp-detect
[sudo] password for stretz:
Unable to open ~/.mtpz-data for reading, MTPZ disabled.libmtp version: 1.1.5

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
   Found 1 device(s):
   Samsung: Galaxy models (MTP) (04e8:6860) @ bus 2, dev 7
Attempting to connect device(s)
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.
stretz@slpn-nb-mss:~$ lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 138a:003c Validity Sensors, Inc. VFS471 Fingerprint Reader
Bus 002 Device 007: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II], GT-I9300 Phone [Galaxy S III], GT-P7500 [Galaxy Tab 10.1]
Bus 002 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 002 Device 004: ID 1bcf:2805 Sunplus Innovation Technology Inc.
Bus 002 Device 005: ID 03f0:231d Hewlett-Packard 4 GB Flash Drive
stretz@slpn-nb-mss:~$ uname -a
Linux slpn-nb-mss 3.8.0-20-generic #31~precise1-Ubuntu SMP Wed May 8 00:37:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Malte S. Stretz (mss) wrote :

I have to correct myself: I didn't restart my KDE session so I guess the old libmtp was still used by the KDE daemons. After a new logon, mtp-detect works fine!

This might also explain why the quick-connect hack worked (just guessing): If I was quicker than the KDE daemon (whichever that is) I was able to grab the phone with new new lib, else the old version would have mis-initialized the device.

Revision history for this message
Malte S. Stretz (mss) wrote :

Another quick note: I am running precise but was using the quantal libmtp packages before.

Revision history for this message
Malte S. Stretz (mss) wrote :

I requested a backport in bug 1178999.

Revision history for this message
Angel Guzman Maeso (shakaran) wrote :

Same behaviour in Ubuntu Saucy Salamander (13.10) with mtp-detect 1.1.6

Revision history for this message
Paweł (paff) wrote :

Confirm same behaviour in Ubuntu 13.10.

$ cat /etc/udev/rules.d/99-android.rules
#SamsungI9305
SUBSYSTEM==usb, SYSFS{idVendor}==04e8, MODE=0666

$ mtp-detect
Unable to open ~/.mtpz-data for reading, MTPZ disabled.libmtp version: 1.1.6

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
   Found 1 device(s):
   Samsung: Galaxy models (MTP) (04e8:6860) @ bus 3, dev 34
Attempting to connect device(s)
ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
inep: usb_get_endpoint_status(): No such device
outep: usb_get_endpoint_status(): No such device
usb_clear_halt() on IN endpoint: No such device
usb_clear_halt() on OUT endpoint: No such device
usb_clear_halt() on INTERRUPT endpoint: No such device
libusb_open() failed!: No such device
LIBMTP PANIC: Could not init USB on second attempt
Unable to open raw device 0
OK.

$ dmesg
(...)
[ 1201.600847] usb 3-1.3: usbfs: process 5846 (mtp-detect) did not claim interface 0 before use
[ 1201.632841] usb 3-1.3: USB disconnect, device number 34
[ 1201.835855] usb 3-1.3: new high-speed USB device number 35 using xhci_hcd
[ 1201.852726] usb 3-1.3: New USB device found, idVendor=04e8, idProduct=6860
[ 1201.852737] usb 3-1.3: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[ 1201.852756] usb 3-1.3: Product: SAMSUNG_Android
[ 1201.852758] usb 3-1.3: Manufacturer: SAMSUNG
[ 1201.852759] usb 3-1.3: SerialNumber: 42f7a00e5f56af2f
[ 1201.853591] cdc_acm 3-1.3:1.1: This device cannot do calls on its own. It is not a modem.
[ 1201.853656] cdc_acm 3-1.3:1.1: ttyACM3: USB ACM device

Revision history for this message
Justin Wetherell (phishman3579) wrote :

Same problem with Ubuntu 13.10 and Samsung S4-mini...

Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
inep: usb_get_endpoint_status(): No such device
outep: usb_get_endpoint_status(): No such device
usb_clear_halt() on IN endpoint: No such device
usb_clear_halt() on OUT endpoint: No such device
usb_clear_halt() on INTERRUPT endpoint: No such device
libusb_open() failed!: No such file or directory
LIBMTP PANIC: Could not init USB on second attempt
ERROR: Could not close session!
inep: usb_get_endpoint_status(): No such device
outep: usb_get_endpoint_status(): No such device
usb_clear_halt() on IN endpoint: No such device
usb_clear_halt() on OUT endpoint: No such device
usb_clear_halt() on INTERRUPT endpoint: No such device

Revision history for this message
Mark Jones (mark0978) wrote :

I'm seeing the same behavior on a freshly updated 14.04

mark@ender:~$ mtp-detect
Unable to open ~/.mtpz-data for reading, MTPZ disabled.libmtp version: 1.1.6

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
Device 1 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
   Found 2 device(s):
   Samsung: Galaxy models (MTP) (04e8:6860) @ bus 2, dev 11
   Samsung: Galaxy models (MTP) (04e8:6860) @ bus 2, dev 10
Attempting to connect device(s)

At this point it hangs and you have to use ^C to get the terminal prompt back.

These two devices worked perfectly fine with Mint15 on the same hardware just a few hours before.

Using sudo does not change things so it does not appear to be a permissions issue.

mtp-detect -d generates this kind of output adnauseum

        0000: 0c00 0000 0300 0120 990c 0000 ....... ....
        0000: 1000 0000 0100 0810 9a0c 0000 3a93 0100 ............:...
        0000: 2401 0000 0200 0810 9a0c 0000 0100 0100 $...............
        0010: 0030 0000 6c00 0200 0000 0000 0000 0000 .0..l...........
        0020: 0000 0000 0000 0000 0000 0000 0000 1800 ................
        0030: 0000 e192 0100 0000 6e00 7400 0000 0000 ........n.t.....
        0040: 4e38 0033 0042 0030 0034 0044 0041 0033 N8.3.B.0.4.D.A.3
        0050: 002e 0063 006c 006f 0075 0064 0066 0072 ...c.l.o.u.d.f.r
        0060: 006f 006e 0074 005f 0061 0073 0073 0065 .o.n.t._.a.s.s.e
        0070: 0074 0073 005f 0073 0074 0069 0074 0063 .t.s._.s.t.i.t.c
        0080: 0068 0065 0072 005f 0063 006f 006d 005f .h.e.r._.c.o.m._
        0090: 006e 0065 0077 0073 0069 0074 0065 006d .n.e.w.s.i.t.e.m
        00a0: 0069 006d 0061 0067 0065 0073 005f 0034 .i.m.a.g.e.s._.4
        00b0: 0038 0030 0078 0032 0037 0030 005f 0039 .8.0.x.2.7.0._.9
        00c0: 0033 0035 0035 005f 006a 0070 0067 002e .3.5.5._.j.p.g..
        00d0: 0069 006d 0061 0067 0065 0000 0011 3200 .i.m.a.g.e....2.
        00e0: 3000 3100 3400 3000 3700 3100 3100 5400 0.1.4.0.7.1.1.T.
        00f0: 3200 3300 3200 3300 3300 3400 2e00 0000 2.3.2.3.3.4.....
        0100: 1132 0030 0031 0034 0030 0037 0031 0031 .2.0.1.4.0.7.1.1
        0110: 0054 0032 0033 0032 0033 0033 0034 002e .T.2.3.2.3.3.4..
        0120: 0000 0000 ....

Revision history for this message
John Leach (johnleach) wrote :

This now works, tested in Ubuntu 15.04 vivid.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Alistair, can you confirm the fix as reported by John in #43?

Changed in linux (Ubuntu):
assignee: nobody → Rolf Leggewie (r0lf)
Rolf Leggewie (r0lf)
Changed in libmtp (Ubuntu):
status: Confirmed → Fix Released
Changed in linux (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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