MTP not working/very slow on Bionic

Bug #1792085 reported by Lancillotto on 2018-09-12
66
This bug affects 12 people
Affects Status Importance Assigned to Milestone
libmtp
New
Undecided
Unassigned
gvfs (Ubuntu)
High
Unassigned

Bug Description

Hi, unfortunately (for me) MTP android devices no more work on Ubuntu 18.04.

I have used MTP on 16.04 without problems, but on 18.04 it does not work. When I connect my Android devices (Samsung A5 and Samsung J3) and I try to list directories with many files (e.g. /DCIM/Camera) the window hangs until I disconnect the device. Same issue if I try to post the command "ls /var/run/1000/gvfs/<MTP-FOLDER>".

I have installed Ubuntu 18.04 on two different machines - an older HP laptop and a recent DELL laptop - and the issue is present on the all of them.

I suspect a defect on the "libmtp". I tried many alternative solutions suggested by the net (e.g. jmtpfs and so on) but anyone worked.

That's all!

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: gvfs-fuse 1.36.1-0ubuntu1.1
ProcVersionSignature: Ubuntu 4.15.0-29.31-generic 4.15.18
Uname: Linux 4.15.0-29-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
CasperVersion: 1.394
CurrentDesktop: ubuntu:GNOME
Date: Wed Sep 12 06:20:07 2018
LiveMediaBuild: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gvfs
UpgradeStatus: No upgrade log present (probably fresh install)

Lancillotto (antonio-petricca) wrote :
description: updated
Lancillotto (antonio-petricca) wrote :

The hang occurs when file names contain '('. The workaround is to rename that files by the Android file manager.

Launchpad Janitor (janitor) wrote :

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

Changed in gvfs (Ubuntu):
status: New → Confirmed
tomaskCZ (tomaskcz4) wrote :

I just switched to Ubuntu 18.04 and I have the same problem. Unable to list files on my android phone, specifically pictures from camera. It just hangs after clicking the DCIM dir - there are no '(' file names. It works without problem on Ubuntu 16.04.

It is broken, lots of similar reports over internet, no clear solution.

Eddy White (myubu17) wrote :

I literally waited an HOUR to get to my Camera directory on my Samsung S7 (Android 9) and FINALLY got to the files. I did not have any parenthesis error as mentioned above.

HOWEVER, this was EXTREMELY slow... wow. Just to do file copies. still took a while to pull 2Gb of pics and vids. But the HOUR WAIT? Ridiculous. This this the 21st Century. This basic need should not even been a bug.

ferranb (ferranb) wrote :

Exactly the same happens to me. It's a huge issue to me because I need constantly copy files from android to ubuntu.

ferranb (ferranb) wrote :

I've tried a live ubuntu 16.04.5 LTS desktop 64 and works perfectly. The results of dpkg -s gvfs on the working ubuntu is:

Package: gvfs
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 622
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Multi-Arch: same
Version: 1.28.2-1ubuntu1~16.04.2
Depends: libc6 (>= 2.14), libglib2.0-0 (>= 2.45.7), gvfs-daemons (>= 1.28.2-1ubuntu1~16.04.2), gvfs-daemons (<< 1.28.2-1ubuntu1~16.04.2.1~), gvfs-libs (= 1.28.2-1ubuntu1~16.04.2), gvfs-common (= 1.28.2-1ubuntu1~16.04.2)
Suggests: gvfs-backends
Description: userspace virtual filesystem - GIO module
 gvfs is a userspace virtual filesystem where mounts run as separate
 processes which you talk to via D-Bus. It also contains a gio module
 that seamlessly adds gvfs support to all applications using the gio
 API. It also supports exposing the gvfs mounts to non-gio applications
 using fuse.
 .
 This package contains the GIO module that lets applications use gvfs
 mounts.
Homepage: https://wiki.gnome.org/Projects/gvfs
Original-Maintainer: Debian GNOME Maintainers <email address hidden>

The dpkg -s gvfs in the not working 18.04.1 LTS:

Package: gvfs
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 368
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Multi-Arch: same
Version: 1.36.1-0ubuntu1.2
Depends: libc6 (>= 2.14), libglib2.0-0 (>= 2.49.3), gvfs-daemons (>= 1.36.1-0ubuntu1.2), gvfs-daemons (<< 1.36.1-0ubuntu1.2.1~), gvfs-libs (= 1.36.1-0ubuntu1.2), gvfs-common (= 1.36.1-0ubuntu1.2)
Suggests: gvfs-backends
Description: userspace virtual filesystem - GIO module
 gvfs is a userspace virtual filesystem where mounts run as separate
 processes which you talk to via D-Bus. It also contains a gio module
 that seamlessly adds gvfs support to all applications using the gio
 API. It also supports exposing the gvfs mounts to non-gio applications
 using fuse.
 .
 This package contains the GIO module that lets applications use gvfs
 mounts.
Homepage: https://wiki.gnome.org/Projects/gvfs
Original-Maintainer: Debian GNOME Maintainers <email address hidden>

Sebastien Bacher (seb128) wrote :

Thank you for your bug report. Seems like there are different issues described there
- slowness
- filenames with a '('
- hang

Could those having the issue give some details on whether waiting works for them and it if happens only in directory with lot of files? Could you also add your journalctl log from the session/time of the issue?

Changed in gvfs (Ubuntu):
importance: Undecided → High
status: Confirmed → Incomplete
summary: - MTP no more working on Bionic
+ MTP not working/very slow on Bionic
Martin Schroeder (hedaurabesh) wrote :

Hi everyone.

The slow access is also observed by me on Xubuntu 18.04. It affects all tools using MTP (Thunar, Shotwell) when opening folders with many files.

In all cases the application stops responding and some (like Thunar) eventually crash entirely.
Neither disabling nor enabling previews in Thunar has any effect.

As reported by the others, it works just fine with Xubuntu 16.04.

Also, the output of "dmesg -w" shows no issue. It shows that the device connects fine -- once after hooking it up to USB and the second time after allowing the MTP access on Android.

I will try to get the "journalctl" log output on Sunday, when I get access to the affected machine again.

Yuriy Vidineev (adeptg) wrote :

Same/similar issue here.
Ubuntu 16.04 + Samsung Galaxy Note 8 - works
Ubuntu 18.04 + Samsung Galaxy Note 8 - doesn't: very slow, lost devices. Completely impossible to move photos via MTP
KDE Neon 18.04 - doesn't works as well

I think that it's something with mtp-tools/libmtp

For me only one reliable way to transfer photos via MTP - Android File Transfer for Linux https://www.omgubuntu.co.uk/2017/11/android-file-transfer-app-linux

Sebastien Bacher (seb128) wrote :

Could those having that issue maybe try for a 18.10 liveCD to see if the issue is resolved there?

Michael Kuster (user240) wrote :

I can confirm, the bug exists in Ubuntu 18.10

I tested the behaviour many times by enabling and disabling the USB-Tethering from Android phone.

I found out, than if there are more than 7 pictures on the phone, the MTP connection is VERY slow => bug
If I delete some photos, less than 7 pictures, MTP then works, but if I make some new photos MTP it is very slow again => bug

tomaszko (kossut) wrote :

any hacker can estimate when patch will be released ?
>Cheers,
tk

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers