Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#25174 - [libmtp] mtp-detect throws PTP_ERROR_IO on Samsung Galaxy S2 (GT I9100)

Attached to Project: Arch Linux
Opened by Eric (wazyk) - Tuesday, 19 July 2011, 13:25 GMT
Last edited by Tom Gundersen (tomegun) - Tuesday, 13 November 2012, 12:57 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No

Details

Description: mtp-detect fails to execute successfully on Samsung Galaxy S2 (GT I9100). Detected as GT-P7510/Galaxy Tab 10.1 with PTP_ERROR_IO error.


Additional info:
* libmtp version: 1.1.0

Steps to reproduce:
1- Plug device on USB cable
2- Launch mtp-detect command

Output:
libmtp version: 1.1.0

Listing raw device(s)
libusb couldn't open USB device /dev/bus/usb/005/002: Permission denied.
libusb requires write access to USB device nodes.
Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1.
Found 1 device(s):
Samsung: GT-P7510/Galaxy Tab 10.1 (04e8:6860) @ bus 1, 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
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.

File /lib/udev/rules.d/52-libmtp.rules contains the following: (please attach, do not inline super long files)

Changes in this file has no effect.

Problem seems to come from somewhere else.
This task depends upon

Closed by  Tom Gundersen (tomegun)
Tuesday, 13 November 2012, 12:57 GMT
Reason for closing:  None
Additional comments about closing:  plesae report upstream if still a problem
Comment by Dan McGee (toofishes) - Tuesday, 19 July 2011, 19:51 GMT
Attach relevant files please, rather than pollute a way too long bug details section.
Comment by Eric (wazyk) - Wednesday, 20 July 2011, 07:30 GMT
52-libmtp.rules file added
Comment by Gregory Anderson (MisterAnderson) - Wednesday, 26 October 2011, 10:53 GMT
I updated to libmtp 1.1.1 from sourceforge (arch hasn't got it yet?) and it now gives this result:

sudo mtp-detect
libmtp version: 1.1.1

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1/S2.
Found 1 device(s):
Samsung: GT-P7510/Galaxy Tab 10.1/S2 (04e8:6860) @ bus 2, dev 32
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.
Comment by Dave Reisner (falconindy) - Saturday, 24 December 2011, 03:57 GMT
Please test with 1.1.1 in extra.
Comment by Gregory Anderson (MisterAnderson) - Friday, 30 December 2011, 17:06 GMT
Tested again with current libmtp in extra.

$ sudo mtp-detect
libmtp version: 1.1.1

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1/S2.
Found 1 device(s):
Samsung: GT-P7510/Galaxy Tab 10.1/S2 (04e8:6860) @ bus 1, dev 4
Attempting to connect device(s)
ignoring usb_claim_interface = -34PTP_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.
Comment by Dave Reisner (falconindy) - Friday, 30 December 2011, 17:09 GMT Comment by Eric (wazyk) - Saturday, 31 December 2011, 13:16 GMT
Same for me too with 1.1.1 version from extra.
Dunno if it is related to Samsung's implementation of MTP... Does it work for some other GS2 owners ?

BTW, happy new year for you all!
Comment by Gregory Anderson (MisterAnderson) - Sunday, 01 January 2012, 04:42 GMT
EDIT: Sorry, accidental repost.
Comment by Praveen Thivari (praveenthivari) - Monday, 30 January 2012, 17:34 GMT
Wat is the work around for this. I am not able to connect my Galaxy S2 because of this.
Comment by Guillaume ALAUX (galaux) - Sunday, 12 February 2012, 16:43 GMT
Just to bring my experience: mine "works". 'sudo mtp-detect' gives me a full list of technical details http://pastebin.com/DZkZfyCX BUT does not mount anything and detects my Samsung Galaxy S2 as a Galaxy Tab.
libusb 1.0.8-2
libmtp 1.1.0-1
Dmesg gives the following issues http://pastebin.com/Vbc7gmn9
Comment by Gregory Anderson (MisterAnderson) - Thursday, 01 March 2012, 09:33 GMT
please update to the latest version before posting. current version is 1.1.1
Comment by Guillaume ALAUX (galaux) - Saturday, 03 March 2012, 10:41 GMT
Well actually that was the point: to show a configuration that does not have this issue.

With libmtp 1.1.1-1:

# mtp-detect
libmtp version: 1.1.1

Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung GT-P7510/Galaxy Tab 10.1/S2.
Found 1 device(s):
Samsung: GT-P7510/Galaxy Tab 10.1/S2 (04e8:6860) @ bus 1, dev 3
Attempting to connect device(s)
LIBMTP PANIC: Unable to find interface & endpoints of device
Unable to open raw device 0
OK.
Comment by Guillaume ALAUX (galaux) - Saturday, 03 March 2012, 10:43 GMT
Same result if I downgrade to libmtp 1.1.0-1.
Comment by Guillaume ALAUX (galaux) - Saturday, 03 March 2012, 11:03 GMT
After reading this post [0] from our forum and related external posts, I see that the Samsung Galaxy S2 just does not use MTP (Media Transfer Protocol) but instead uses UMS (USB mass-storage). (This could be different with Ice Cream Sandwich on the device, could not say as I have not installed it yet). Now that I think about it, I recall a friend of mine telling me about this! So as I understand it, it is perfectly normal that mtp-detect just fails.

Close bug?

@OP: the link posted by Praveenthivari on the forum works fine to connect the device to Arch.

[0] https://bbs.archlinux.org/viewtopic.php?id=134727
Comment by Phil Schaf (flying-sheep) - Tuesday, 20 March 2012, 09:15 GMT
no. even on gingerbread, you have to specifically enter mass-storage mode, during which the device can’t do anything else (as it’s mounted as block device and the pc can directly edit the filesystem)

falconindy in the thread you linked to explains the following:

> your device doesn't use MTP as libmtp understands it. It's a custom stack by Samsung and you're sort of just screwed.

so what you said is false: it doesn’t use mass storage mode, it can be put in mass storage mode, and is in samsung-mtp-mode per default. it’s not my decision if libmtp should support samsung’s MTP variant, but that decision is the future of this bug.
Comment by Phil Schaf (flying-sheep) - Tuesday, 20 March 2012, 09:19 GMT
also we should note that some ICS devices¹ won’t come with usb mass storage mode, so samsung MTP is afaik our only bet if we want to transfer files from/to these devices via usb.
________________________
¹ http://www.engadget.com/2011/11/21/ice-cream-sandwich-supports-usb-mass-storage-after-all-galaxy-n/
Comment by Gregory Anderson (MisterAnderson) - Wednesday, 21 March 2012, 05:56 GMT
Just connect my brother's Galaxy Nexus and it appears to work with libmtp 1.1.2 and mtp-detect: http://pastebin.com/mEanB10s

I could also view songs on the phone in Clementine, but did not try transferring anything as it's not my phone.
Comment by G R (gururise) - Wednesday, 11 April 2012, 19:47 GMT
I can confirm this bug on a Samsung Galaxy Tab 10.1 running HoneyComb.

It's very annoying that Samsung devices behave differently than any other android device. Mtp works fine on my ASUS Transformer TF101 running ICS; however, it fails on my Galaxy Tab 10.1

I am using libmtp 1.1.2
Comment by Ng Oon-Ee (ngoonee) - Wednesday, 25 April 2012, 03:13 GMT
Just updated my on Galaxy S2 to ICS and ran into this. Surprisingly (and against my common sense), installing gvfs-gphoto2 allows nautilus (and I think thunar) to mount/unmount the device successfully in MTP mode where mtp-detect will get stuck as above. I won't pretend to understand anything that's going on in the background here though....
Comment by Eric (wazyk) - Tuesday, 15 May 2012, 21:09 GMT
Got my SGS2 in ICS. Using libmtp 1.1.3. Not much luck.
As previously said, I think that Samsung uses a MTP protocol variant that is not (yet ?) supprted by libmtp ...
Comment by trusktr (trusktr) - Monday, 25 June 2012, 19:46 GMT
I've upgraded my Galaxy S2 (SII) to Ice Cream Sandwich (ICS) and now have this problem. I've installed gvfs-gphoto2 and Nautilus still shows nothing. mtpfs errors out like described in this bug, and USB Mass Storage mode does nothing either. It looks like Google are forcing developers to move away from USB Mass Storage mode (UMS) to MTP... And to make things worse, like mentioned above, Samsung's MTP implementation is non-standard. What the...?
Comment by trusktr (trusktr) - Monday, 25 June 2012, 20:30 GMT
Correction: I restarted and now I don't get those errors... Be sure to restart!
Comment by trusktr (trusktr) - Monday, 25 June 2012, 20:33 GMT
Be sure to reboot Arch Linux I mean.
Comment by trusktr (trusktr) - Monday, 25 June 2012, 21:05 GMT
In case anyone runs into this problem, see here for the minimal steps that got it working for me: https://bbs.archlinux.org/viewtopic.php?pid=1121607#p1121607

EDIT: Oops, sorry, I see the edit button now too.

Loading...