In the last few days, my MTP connection was deadly slow again. I'm still on 18.04 and can't upgrade to 20.04 just yet (I'm working on devices that require 18.04).
The first I encountered the problem, I was able to find a file with parenthesis and deleted that file and things went back to normal. Until now. I really need to have fast access to my pictures as I use that feature for my work, so I looked further... and found out that there is a fix available as expected in the launchpad bug report.
Here is a copy of the specific entry that fixed it for me:
I have just tried installing libmtp-1.1.17-2 on 18.04 from here:
https://launchpad.net/ubuntu/+source/libmtp/1.1.17-2/+build/18694144
files:
- libmtp-common_1.1.17-2_all.deb
- libmtp-runtime_1.1.17-2_amd64.deb
- libmtp9_1.1.17-2_amd64.deb
(disconnect phone and after installation log out and log in back to the system or reboot for new libraries to be loaded)
Now listing files is quick and I can actually transfer files.
The following are the commands I ran:
wget https://launchpad.net/ubuntu/+source/libmtp/1.1.17-2/+build/18694144/+files/libmtp-common_1.1.17-2_all.deb
wget https://launchpad.net/ubuntu/+source/libmtp/1.1.17-2/+build/18694144/+files/libmtp-runtime_1.1.17-2_amd64.deb
wget https://launchpad.net/ubuntu/+source/libmtp/1.1.17-2/+build/18694144/+files/libmtp9_1.1.17-2_amd64.deb
sudo dpkg -i libmtp9_1.1.17-2_amd64.deb libmtp-common_1.1.17-2_all.deb libmtp-runtime_1.1.17-2_amd64.deb
In my case, I had to reboot anyway, so I rebooted. But as the poster on launchpad said, you should at least log out and back in from your X11 session. I then took a few pictures, reconnected the phone as usual and it was instantaneously connected and worked as expected. No pause between the connection and the availability of the gvfs
file system.
Note: The files are for Focal Fossa (20.04) but you can safely install them on Bionic Beaver (18.04) and it works. It would be great if they would make an upgrade to fix the problem in 18.04, though. Oh well...
gvfs-daemons
package and rebooted and it works now.