Nokia Lumia 620 (WP8) fails to mount reliably via gvfs-mtp in nautilus

Bug #1247572 reported by Benjamin Tegge
80
This bug affects 19 people
Affects Status Importance Assigned to Milestone
Nautilus
New
Undecided
Unassigned
gvfs
Fix Released
Medium
gvfs (Ubuntu)
Confirmed
Low
Unassigned
nautilus (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Summary: You have to run mtp-detect in terminal until you get output similar to the excerpt in the steps to reproduce section, then you can connect via nautilus as usual.

-----

I just got a Nokia Lumia 620 as a backup phone. I'd say I can mount my Nexus 4 reliably with Ubuntu via nautilus using gvfs-mtp. Users with Android devices like the Nexus 4 still get error messages on a regularly basis of the device not being able to mount, but replugging the device mostly fixes the issue.

However, the experience with the Lumia 620 is far worse (the desktop sometimes freezes) and the workaround I found to get the device to work very crude.

I was prompted with a apport-collector window when nautilus froze during testing and send a report (this happend twice), but it didn't take me to Launchpad to open a report. I can also seen no bug regarding that topic that I am subscribed to.

The Lumia 620 itself was added to libmtp with this report: http://sourceforge.net/p/libmtp/bugs/780/

## Steps to reproduce:

1. Reboot (or cold boot) computer and phone. Login to computers destop and unlock the phone by entering PIN.
2. Plug the phone via USB into the computer. (Cable works with Nexus 4 or another Android device.) The phone will give a signal that it is connected to the computer.
3. Try to open the phone in Nautilus. My desktop either freezes (cold boot) here or nautilus hangs (reboot).

3.a) If nautilus hangs: Open a terminal with Ctrl+Alt+T and kill nautilus with xkill.
3.b) If your desktop froze: Go to a virtual terminal with Ctrl+Alt+F1.
3.c) If you just get an error message: Open a terminal with Ctrl+Alt+T and go to step 4.

4. Execute 'mtp-detect' (from mtp-tools package) from terminal (either via Dektop or virtual terminal). If you get one of the following messages wait a few seconds and try again.

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

  Listing raw device(s)
  Device 0 (VID=0421 and PID=0661) is a Nokia Nokia Lumia WP8.
     Found 1 device(s):
     Nokia: Nokia Lumia WP8 (0421:0661) @ bus 2, dev 22
  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
  LIBMTP PANIC: failed to open session on second attempt
  Unable to open raw device 0
  OK.

---

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

  Listing raw device(s)
  Device 0 (VID=0421 and PID=0661) is a Nokia Nokia Lumia WP8.
     Found 1 device(s):
     Nokia: Nokia Lumia WP8 (0421:0661) @ bus 2, dev 22
  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.

---

Repeat this until you get a long list of scrolling text that ends with something similar to this:

  MTP-specific device properties:
     Friendly name: Windows Phone
     Synchronization partner: (NULL)
     Battery level 74 of 100 (74%)
  libmtp supported (playable) filetypes:
     Folder
     Text file
     ISO MPEG-1 Audio Layer 3
     Audio Video Interleave
     JPEG file
     Microsoft Windows Media Audio
     Advanced Audio Coding (AAC)/MPEG-2 Part 7/MPEG-4 Part 3
     Microsoft Windows Media Video
     Abstract Album file
     Abstract Playlist file
     GIF bitmap file
     JFIF file
     Portable Network Graphics
     TIFF bitmap file
     BMP bitmap file
     MPEG-4 Part 14 Container Format (Audio+Video Emphasis)
     MPEG-4 Part 14 Container Format (Audio Emphasis)
     DOC file
     XLS file
     PPT file
  OK.

---

5. Go to a virtual terminal and do 'sudo service lightdm restart'. Login again, you hear the phone reconnecting to your computer and should now be able to open your phone in nautilus seeing the phones internal storage and the SD card (if there is) als sub devices.

6. Unplug the phone from the computer and start with step 2 if you want to connect the phone again.

## Additional information

$ lsb_release -rd
Description: Ubuntu 13.10
Release: 13.10

$ apt-cache policy gvfs gvfs-backends mtp-tools
gvfs:
  Installed: 1.18.2-0ubuntu1
  Candidate: 1.18.2-0ubuntu1
  Version table:
 *** 1.18.2-0ubuntu1 0
        500 http://de.archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages
        100 /var/lib/dpkg/status
gvfs-backends:
  Installed: 1.18.2-0ubuntu1
  Candidate: 1.18.2-0ubuntu1
  Version table:
 *** 1.18.2-0ubuntu1 0
        500 http://de.archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages
        100 /var/lib/dpkg/status
mtp-tools:
  Installed: 1.1.6-2
  Candidate: 1.1.6-2
  Version table:
 *** 1.1.6-2 0
        500 http://de.archive.ubuntu.com/ubuntu/ saucy/universe amd64 Packages
        100 /var/lib/dpkg/status

description: updated
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug to the developers of the software by following the instructions at https://wiki.ubuntu.com/Bugs/Upstream/GNOME. If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

Changed in gvfs (Ubuntu):
importance: Undecided → Low
Changed in nautilus (Ubuntu):
status: New → Invalid
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gvfs (Ubuntu):
status: New → Confirmed
Changed in gvfs:
importance: Undecided → Unknown
status: New → Unknown
description: updated
Changed in gvfs:
importance: Unknown → Medium
status: Unknown → New
Changed in gvfs:
status: New → Incomplete
Changed in gvfs:
status: Incomplete → Fix Released
Revision history for this message
NoBugs! (luke32j) wrote :

Same on Lumia 521. This is a popular phone, and it doesn't show the internal storage or sd at all, just freezes!

For me mtp-detect gives:

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

Listing raw device(s)
Device 0 (VID=0421 and PID=0661) is a Nokia Nokia Lumia WP8.
   Found 1 device(s):
   Nokia: Nokia Lumia WP8 (0421:0661) @ bus 3, dev 3
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
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.

Trying again gives:
Unable to open ~/.mtpz-data for reading, MTPZ disabled.libmtp version: 1.1.6

Listing raw device(s)
Device 0 (VID=0421 and PID=0661) is a Nokia Nokia Lumia WP8.
   Found 1 device(s):
   Nokia: Nokia Lumia WP8 (0421:0661) @ bus 3, dev 4
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
Error 2: PTP Layer error 02ff: get_all_metadata_fast(): could not get proplist of all objects.
Error 2: Error 02ff: PTP: I/O error
Error 2: PTP Layer error 02ff: get_handles_recursively(): could not get object handles.
Error 2: Error 02ff: PTP: I/O error
Error 2: PTP Layer error 02ff: get_handles_recursively(): could not get object handles.
Error 2: Error 02ff: PTP: I/O error
USB low-level info:
   bcdUSB: 512
   bDeviceClass: 0
   bDeviceSubClass: 0
   bDeviceProtocol: 0
   idVendor: 0421
   idProduct: 0661
   IN endpoint maxpacket: 512 bytes
   OUT endpoint maxpacket: 512 bytes
   Raw device info:
      Bus location: 3
      Device number: 4
      Device entry info:
         Vendor: Nokia
         Vendor id: 0x0421
         Product: Nokia Lumia WP8
         Vendor id: 0x0661
         Device flags: 0x00000000
Device info:
   Manufacturer: NOKIA
   Model: Lumia 521
   Device version: 8.0.10517.0
 .... and serial number and other info.

Revision history for this message
Kiori (kiori) wrote :

another solution is to simply connect the device, ---then turn on the pc. it worked for me. It still doesnt work with the pc already on.(without workarounds)

Revision history for this message
Reece (reece) wrote :

Kiori's solution didn't work for me.

I ran mtp-detect 10 times, always failing with the same LIBMTP PANIC message as above.

Ubuntu 14.04, libmtp 1.1.6, Sansa Clip Zip (appropriate libmtp rules already present).

Revision history for this message
alampi (alampi) wrote :

Lubuntu 14.04, unable to connect Lumia 630.

Running 'mtp-detect'/'sudo service lightdm restart' doesn't work. Updated gvfs as suggested in crash report, no luck.

Booting with device connected doesn't work either.

$ lsb_release -rd
Description: Ubuntu 14.04.2 LTS
Release: 14.04

$ apt-cache policy gvfs gvfs-backends mtp-tools
gvfs:
  Installed: 1.20.3-0ubuntu1
  Candidate: 1.20.3-0ubuntu1
  Installed:
 *** 1.20.3-0ubuntu1 0
        500 http://fi.archive.ubuntu.com/ubuntu/ trusty-updates/main i386 Packages
        100 /var/lib/dpkg/status
     1.20.1-1ubuntu1 0
        500 http://fi.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages
gvfs-backends:
  Installed: 1.20.3-0ubuntu1
  Candidate: 1.20.3-0ubuntu1
  Installed:
 *** 1.20.3-0ubuntu1 0
        500 http://fi.archive.ubuntu.com/ubuntu/ trusty-updates/main i386 Packages
        100 /var/lib/dpkg/status
     1.20.1-1ubuntu1 0
        500 http://fi.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages
mtp-tools:
  Installed: 1.1.6-20-g1b9f164-1ubuntu2
  Candidate: 1.1.6-20-g1b9f164-1ubuntu2
  Installed:
 *** 1.1.6-20-g1b9f164-1ubuntu2 0
        500 http://fi.archive.ubuntu.com/ubuntu/ trusty/universe i386 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Benjamin Tegge (livewirebt) wrote :

The Lumia 630/730 devices are not related to this bug, they have a different USB ID that is not included in the latest releases (1.1.8) but patches have been committed to the development version of libmtp. I just received a Lumia 730, which seems to have the same USB ID as the 630 and looked the info up myself.

Revision history for this message
Alexander Trufanov (truf) wrote :

I have solved this problem for my device (Lumia 1020 WP8.1 Denim) and Kubuntu 15.04 by persuading the maintainer of [Android File Transfer For Linux](https://github.com/whoozle/android-file-transfer-linux) to add WP8 support. After few months he managed to do this. His project is a library analogical to libmtp but not depending on it. So I think whoever want to fix this WP issue in his own project could consult with him or take a look in his library code. Inpatient ones may just use the project for transferring data via USB. It has simple Qt GUI.

To post a comment you must log in.
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.