MTP devices are visible in file manager after disconnecting

Everything about X, Gnome, KDE, ... and everything running on it

MTP devices are visible in file manager after disconnecting

Postby giaur » 2017-11-16 05:34

Debian Sid, Cinnamon. I'm, getting annoying issue. Scenario:
- connect any Android Phone in MTP mode. Device mounted, all ok.
- unmount phone, disconnect USB cable. Device is still visible in file manager, can't be mounted or removed
- connect phone again. New device is added to file manager. Disconnect phone - 2 dead devices visible

... and so on. Every time I connect my phone, new device appears. I need to restart computer to remove dead items. Do you know any workaround for this annoying bug? It seems to be related to MTP only, if I connect usb disk/pendrive, it disappears correctly after disconnectiong.

So I'm looking some workaround, or even any way to clear dead device items without reboot my computer.
Last edited by giaur on 2017-11-16 07:41, edited 2 times in total.
giaur
 
Posts: 56
Joined: 2013-03-08 07:03

Re: MTP devices are visible in file manager after disconnect

Postby Dai_trying » 2017-11-16 07:21

As you are using Sid and have found a bug you should report it to let the developers fix it, that would give you a real solution rather than a "workaround".
Dai_trying
 
Posts: 339
Joined: 2016-01-07 12:25

Re: MTP devices are visible in file manager after disconnect

Postby giaur » 2017-11-16 07:39

Agree, but I'm not sure where to report. I need to know specific package to report bug about. I suspect something related to gvfs (since file manager used does not matter). Also, please can anybody confirm issue?
giaur
 
Posts: 56
Joined: 2013-03-08 07:03

Re: MTP devices are visible in file manager after disconnect

Postby pylkko » 2017-11-16 08:21

What does this first hit on google say about when you don't know the package name?

https://www.debian.org/Bugs/Reporting
User avatar
pylkko
 
Posts: 1213
Joined: 2014-11-06 19:02

Re: MTP devices are visible in file manager after disconnect

Postby giaur » 2017-11-16 11:52

I know all of these. However, I must know if I need to report bug in Nautilus, mtp tools etc. I need to know some internals. Of course, exact package name is not a problem. I hope you can understand what I mean.
giaur
 
Posts: 56
Joined: 2013-03-08 07:03

Re: MTP devices are visible in file manager after disconnect

Postby debiman » 2017-11-17 06:01

giaur wrote:I must know if I need to report bug in Nautilus, mtp tools etc. I need to know some internals.

exactly.
i'm sure you can check yourself if it's a nautilus bug (look if some dirs/files in the tree reflect the problem. if they do, it's not nautilus).
my guess is it's the backend. start with gvfs, work your way down.

all in all, i'm wondering why you use sid...
User avatar
debiman
 
Posts: 1626
Joined: 2013-03-12 07:18

Re: MTP devices are visible in file manager after disconnect

Postby giaur » 2017-11-20 06:49

Don't wonder. Sid is pretty stable (except some small bugs like this one, from time to time) and it has always newest software. From other hand, if any bug is present in Testing, you will need to wait much longer for fix.

P.S. I know how to report bug. Reason why I created this topic here is to ask if anybody can confirm issue. So, anybody?
giaur
 
Posts: 56
Joined: 2013-03-08 07:03

Re: MTP devices are visible in file manager after disconnect

Postby Barracuda72 » 2017-11-22 19:16

So, anybody?

Yes, I can confirm this issue. It's SO ANNOYING that I even registered on this forum just to write this message.
Unfortunately, the bug isn't Debian-specific. I'm running Gentoo GNU/Linux on my two machines:
1) Kernel 4.12, libusb 1.0.19, gvfs 1.30.4, libmtp 1.1.13 - no issues, works fine
2) Kernel 4.14, libusb 1.0.19, gvfs 1.30.4, libmtp 1.1.13 - same problem as yours
After upgrading second machine to libusb 1.0.21, gvfs 1.32.1, libmtp 1.1.14 problem still exists. So it's not
related to these 3 components. I doubt that it is related to kernel, as
Code: Select all
mtp-detect
correctly shows no attached devices, it's
Code: Select all
gvfs-mount -li
that lists all those "dead" ones. So it's definitely some bug around some this things.
Reloading udev rules doesn't help either; the only way I managed to get around that is by killing
Code: Select all
gvfs-mtp-volume-monitor

and restarting it again by hand (it's in /usr/libexec, BTW). VERY, VERY annoying bug, especially if you have damaged cable that
makes your device reconnect every so often... Dozens of dead labels, AAARGGGH!
P.S.: Your report was FIRST that I found on this problem, so it should be very recent regression. It's much easier to catch problems
"in hot pursuit" (as with criminals), so please report this issue as soon as possible.
Barracuda72
 
Posts: 2
Joined: 2017-11-22 19:01

Re: MTP devices are visible in file manager after disconnect

Postby debiman » 2017-11-23 04:53

well i am NOT seeing this behavior with my single android device (4.4.2), pcmanfm (1.2.5) using gvfs (1.34.1) backends on archlinux (4.9.63-1-lts).
the phone has a micro sd card, and whenever i plug the phone in i see first 2, then (after clicking = mounting) 3 devices pop up in pcmanfm's sidebar, but they all disappear again after unplugging. this is 100% reproducible.

quick stab in the dark:
maybe volume management has something to do with the problem you're seeing?
i.e. try to disable automount, make it click-to-mount?

personally i find mtp on linux flaky and much prefer to use adb, e.g. with this.
User avatar
debiman
 
Posts: 1626
Joined: 2013-03-12 07:18

Re: MTP devices are visible in file manager after disconnect

Postby giaur » 2017-11-23 06:33

Barracuda72 wrote:
So, anybody?

Yes, I can confirm this issue. It's SO ANNOYING that I even registered on this forum just to write this message.
Unfortunately, the bug isn't Debian-specific. I'm running Gentoo GNU/Linux on my two machines:
1) Kernel 4.12, libusb 1.0.19, gvfs 1.30.4, libmtp 1.1.13 - no issues, works fine
2) Kernel 4.14, libusb 1.0.19, gvfs 1.30.4, libmtp 1.1.13 - same problem as yours
After upgrading second machine to libusb 1.0.21, gvfs 1.32.1, libmtp 1.1.14 problem still exists. So it's not
related to these 3 components. I doubt that it is related to kernel, as
Code: Select all
mtp-detect
correctly shows no attached devices, it's
Code: Select all
gvfs-mount -li
that lists all those "dead" ones. So it's definitely some bug around some this things.
Reloading udev rules doesn't help either; the only way I managed to get around that is by killing
Code: Select all
gvfs-mtp-volume-monitor

and restarting it again by hand (it's in /usr/libexec, BTW). VERY, VERY annoying bug, especially if you have damaged cable that
makes your device reconnect every so often... Dozens of dead labels, AAARGGGH!
P.S.: Your report was FIRST that I found on this problem, so it should be very recent regression. It's much easier to catch problems
"in hot pursuit" (as with criminals), so please report this issue as soon as possible.


Hi,
Good to see I'm not alone. I have already reported this to Debian: https://bugs.debian.org/cgi-bin/bugrepo ... bug=882213 so, guys, please vote and comment.
giaur
 
Posts: 56
Joined: 2013-03-08 07:03

Re: MTP devices are visible in file manager after disconnect

Postby Barracuda72 » 2017-11-23 16:54

Hi,
Good to see I'm not alone. I have already reported this to Debian: https://bugs.debian.org/cgi-bin/bugrepo ... bug=882213 so, guys, please vote and comment.

OK, I managed to figure out the problem. It's in the Udev itself, or probably in some communication between gvfs-mtp and udev. For me, as Gentoo user, solution was pretty
simple: installation of udev version 233 instead of default Gentoo's EUdev demolished the problem.
Barracuda72
 
Posts: 2
Joined: 2017-11-22 19:01

Re: MTP devices are visible in file manager after disconnect

Postby giaur » 2017-11-24 06:18

So, do you mean, that specific udev version solves the problem? Pretty old. I'm sure I don't even want to try downgrading on Debian, bunch of dependencies to latest version
giaur
 
Posts: 56
Joined: 2013-03-08 07:03


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable