21

I'm trying to mount one of the new nexus 5x phones on my laptop via mtp. When I plug it in, nautilus recognizes it as a nexus 5x and an option appears on the left. However, when I click on it, the area where files normally appear is blank even though there should be files there, and I'm unable to create files. Interestingly, lsusb returns:

Bus 004 Device 002: ID 8087:8000 Intel Corp. 
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 8087:8008 Intel Corp. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 5986:055c Acer, Inc 
Bus 001 Device 002: ID 0cf3:3004 Atheros Communications, Inc. 
Bus 001 Device 023: ID 18d1:4ee1 Google Inc. Nexus 4
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Oddly, lsusb thinks it's a nexus 4, while nautilus correctly sees the 5x. Maybe it's just not supported yet? I found the following in my syslog:

Oct 27 20:26:25  kernel: [584014.476624] usb 1-3: new high-speed USB device number 23 using xhci_hcd
Oct 27 20:26:25  kernel: [584014.606208] usb 1-3: New USB device found, idVendor=18d1, idProduct=4ee1
Oct 27 20:26:25  kernel: [584014.606217] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct 27 20:26:25  kernel: [584014.606221] usb 1-3: Product: Nexus 5X
Oct 27 20:26:25  kernel: [584014.606225] usb 1-3: Manufacturer: LGE
Oct 27 20:26:25  kernel: [584014.606228] usb 1-3: SerialNumber: 0067460eb26d49e8
Oct 27 20:26:25  systemd-udevd[13357]: failed to execute '/lib/udev/socket:@/org/freedesktop/hal/udev_event' 'socket:@/org/freedesktop/hal/udev_event': No such file or directory
Oct 27 20:26:25  org.gtk.vfs.Daemon[3123]: PTP: reading event an error 0x02ff occurredUnable to open ~/.mtpz-data for reading, MTPZ disabled.
Oct 27 20:26:25  org.gtk.vfs.Daemon[3123]: Device 0 (VID=18d1 and PID=4ee1) is a Google Inc (for LG Electronics/Samsung) Nexus 4/5/7/10 (MTP).
Oct 27 20:26:25  org.gtk.vfs.Daemon[3123]: Error 1: Get Storage information failed.
Oct 27 20:22:10  gnome-session[3211]: (deja-dup-monitor:4213): GLib-CRITICAL **: Source ID 3199 was not found when attempting to remove it
Oct 27 20:26:26  gnome-session[3211]: (nautilus:13398): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
Oct 27 20:26:26  gnome-session[3211]: (nautilus:13398): GLib-GObject-WARNING **: invalid (NULL) pointer instance
Oct 27 20:26:26  gnome-session[3211]: (nautilus:13398): GLib-GObject-CRITICAL **: g_signal_connect_object: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
Oct 27 20:26:26  dbus[2053]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Oct 27 20:26:26  systemd[1]: Starting Hostname Service...
Oct 27 20:26:26  systemd-udevd[13404]: failed to execute '/lib/udev/socket:@/org/freedesktop/hal/udev_event' 'socket:@/org/freedesktop/hal/udev_event': No such file or directory
Oct 27 20:26:26  org.gtk.Private.GPhoto2VolumeMonitor[3123]: (process:3493): GVFS-GPhoto2-WARNING **: device (null) has no BUSNUM property, ignoring
Oct 27 20:26:26  dbus[2053]: [system] Successfully activated service 'org.freedesktop.hostname1'
Oct 27 20:26:26  systemd[1]: Started Hostname Service.

I'm using Ubuntu 15.04 on a Eurocom Electra 2.

Also, can somebody with more reputation than me create the nexus-5x tag? thanks @KGIII

Edit: I've tried mounting with mtpfs; errors are similar to what I saw in the logs, and the mount doesn't happen.

$ mtpfs nexus5x/
Unable to open ~/.mtpz-data for reading, MTPZ disabled.
Listing raw device(s)
Device 0 (VID=18d1 and PID=4ee1) is a Google Inc (for LG Electronics/Samsung) Nexus 4/5/7/10 (MTP).
   Found 1 device(s):
   Google Inc (for LG Electronics/Samsung): Nexus 4/5/7/10 (MTP) (18d1:4ee1) @ bus 1, dev 25
Attempting to connect device
ignoring libusb_claim_interface() = -6PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
Android device detected, assigning default bug flags
Error 1: Get Storage information failed.
Error 2: PTP Layer error 02fe: get_handles_recursively(): could not get object handles.
Error 2: Error 02fe: PTP: Protocol error, data expected
Listing File Information on Device with name: (NULL)
LIBMTP_Get_Storage() failed:-1

I have also attempted to download the newest libmtp from source, but it still does not appear to work--I say appear to because I'm not entirely sure what should happen. I tried mtp-files:

libmtp version: 1.1.10

Device 0 (VID=18d1 and PID=4ee1) is a Google Inc (for LG Electronics/Samsung) Nexus 4/5/7/10 (MTP).
mtp-files: Successfully connected
Android device detected, assigning default bug flags
Listing File Information on Device with name: (NULL)
Error 1: Get Storage information failed.
OK.
  • Tag added - edit will (probably) take a little bit to be approved. – KGIII Oct 28 '15 at 01:53
  • Have you installed the gvfs-backends package? It's only recommended as a dependency to nautilus, so it may not be installed. Also, apparently many phones in the same "family" can use the same entry in the way Linux identifies the phones on USB, so I wouldn't be too concerned about it getting the absolutely correct name everywhere. You might also install mtp-tools and mtpfs and investigate from the command line. – RobertL Oct 28 '15 at 02:15
  • Robert is right, some devices belong to a family of devices that all use the same product and vendor ID, since these Nexus 4 and 5x are made by LG it's either the same ID or it's detected by a regex in udev or mtp. I suggest you look at this Q&A I wrote for such cases. Another alternative is Android File Transfer For Linux. – LiveWireBT Oct 28 '15 at 12:57
  • I have the same problem with Ubuntu 14.04. Empty folder. I have gvfs-backends and it was working great with all other older Nexus such as 5, 7, 9... – gregoiregentil Oct 28 '15 at 22:05
  • @RobertL I have gvfs-backends, mtp-tools, and mtpfs installed. I've tried mounting via the command line, but the simple things didn't work. Any more detailed suggestions? – leptogenesis Oct 29 '15 at 02:24
  • @LiveWireBT looking at the links, it seems libmtp does not list the nexus 5x on the supported devices. Should I file a bug report? – leptogenesis Oct 29 '15 at 02:25
  • @leptogenesis Nexus typical VID=18d1 and PID=4ee1 are already included, so that is not the issue. Try to build libmtp from the current git head, check that the phone is set to the correct mode for MTP, try different cables (yes I had a broken USB cable that made a USB audio interface work in an odd way) and different ports (I still don't understand why some USB3 ports behave different than USB2) to rule out that it's not an issue with your hardware or something that is already fixed in a development version. If mtp-detect still gives you error messages then you should file a bug, yes. – LiveWireBT Oct 29 '15 at 09:01
  • @LiveWireBT, Nexus 5X is USB 2.0. The port it type-C but it's independent of USB speed. Worse is that chip can support USB 3.0 but they didn't wire it on the PCB. It was only 4 more traces. Scandalous... – gregoiregentil Oct 31 '15 at 00:22
  • @gregoiregentil I'm aware of the USB type-C / USB SuperSpeed[+] confusion, which is similar to USB 2.0 Full Speed vs High Speed. ;) (I could have mentioned that, but I was out of characters for this comment.) The different behavior I was talking about was about my experience with my C5D stuttering on USB2 ports on my T530 while it performs flawless on USB3 ports, which is kind of the opposite of what other users have with certain USB devices. I don't know all the details, it's just a heads up for things to check before filing a bug. – LiveWireBT Oct 31 '15 at 00:35
  • @LiveWireBT I tried downloading libmtp from sourceforge and compiling, but the resulting binaries also don't seem to be able to read from the device. I have both USB 2.0 and 3.0 ports on my computer, but it does not seem to make a difference. – leptogenesis Oct 31 '15 at 20:37
  • Has anyone found a fix? Start to be painful to adb each time I want a file – gregoiregentil Nov 05 '15 at 05:50
  • Discussion might continue here: https://productforums.google.com/forum/#!topic/nexus/DW2MnHVIZZo;context-place=forum/nexus – gregoiregentil Nov 05 '15 at 06:26

1 Answers1

33

Actually, it's working!

When you connect the N5X (screen unlocked) to your Linux box the N5X will default to USB charging (a security feature I think). The N5X will appear in your Linux file manager but won't show internal storage. If you pull down the notification shade on the N5X you should see it showing USB charging. If you select that you should be offered other options, including MTP for file transferring, PTP for photo transferring and MIDI.

Thanks to davharuk.

EDIT I definitely agree with the comments. COMPLETELY confusing. I was too.

  • 4
    It's a bit confusing that there is no popup on the phone or even any icon. You must pull down the menu to see the option! Since it didn't work like this previously, it's a badly rolled out feature IMO. – vinni_f Nov 06 '15 at 09:30
  • 2
    This was it--I didn't even notice the option in the menu. This at least gets me a list of files and the ability to transfer to and from the device. However, it still seems to be flaky--notably, many files I can see on the device's file manager are missing in nautilus. – leptogenesis Nov 06 '15 at 14:05