Bug 356425 - Dolphin browsing an MTP device precludes libgphoto2's access to it until dolphin is closed
Summary: Dolphin browsing an MTP device precludes libgphoto2's access to it until dolp...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 15.08.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-09 13:50 UTC by Damon Lynch
Modified: 2017-08-18 18:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Damon Lynch 2015-12-09 13:50:50 UTC
When Dolphin has accessed the contents of an MTP device, libgphoto2 is unable to access the device, even if Dolphin browsing another location e.g. the user's home directory. The device becomes free only when Dolphin is closed.

Additionally, there is no way for the user to do the equivalent of a virtual "unmount" to ask Dolphin/Kdeinit5 via the GUI to relinquish exclusive control of the device.  There also appears to be no way using the command line either. I tried solid-hardware unmount udi (supplying the correct UDI), but solid-hardware reported the MTP device 'does not have the interface StorageAccess".

Reproducible: Always

Steps to Reproduce:
1. To confirm the MTP device is accessible by libgphoto2, plug in an unlocked android 4.0 + phone (for example), and from a terminal execute gphoto2 --list-folders
    That should work.
2. Open Dolphin and browse some folders on the phone.
3. Repeat step 1 while Dolphin is open. It fails.

It makes no difference if the device is browsed in a different Dolphin tab.
Comment 1 Frank Reininghaus 2015-12-09 20:11:51 UTC
Thanks for the bug report. 

1. Can you reproduce the problem also with the file dialog of, e.g, KWrite?
2. Does it help if you close all panels in Dolphin and have only 1 view?
Comment 2 Damon Lynch 2015-12-10 12:50:04 UTC
As I noted in bug #356424, I don't know how to open an MTP device from the file dialog of kwrite or kate. 

The problem occurs in Dolphin irrespective of how many tabs are open (I assume that's what you mean by panels). For instance, if you browse the device in one tab, close that tab, but leave Dolphin running with a tab that has not browsed to the MTP device, Dolphin still retains exclusive control of the MTP device.
Comment 3 Frank Reininghaus 2015-12-10 20:36:40 UTC
(In reply to Damon Lynch from comment #2)
> The problem occurs in Dolphin irrespective of how many tabs are open (I
> assume that's what you mean by panels).

No, I meant the Places/Information/Folders Panels. If they are shown, you can hide them with F7/F9/F11, and you can close split views with F3. I'm wondering if the problem disappears if you configure Dolphin this way and open the MTP device then.

The reason why I'm asking is that it has been reported elsewhere (bug 356084) that MTP does not work well in Dolphin, even though it works fine in the file dialog of other KDE apps and in Konqueror. This is surprising to me because everything appears to access devices in exactly the same way (namely, using KDirLister from the KIO framework). One difference could be that Dolphin may connect to the device multiple times with split views and panels, this is why I'm asking if preventing this kind of multiple access helps.
Comment 4 Damon Lynch 2015-12-11 14:24:58 UTC
I closed all the panels. The problem still persists i.e.. Dolphin must be closed to free up the device.

I also tried split view, and I had  no problems accessing the MTP device in each side of the split.
Comment 5 Nate Graham 2017-08-18 18:35:53 UTC
With your steps to reproduce, this is working for me in Dolphin 16.12.3, libgphoto 2.5.12, and gphoto2 2.5.11. Can you still reproduce with more recent software? If you can, I'll re-open the bug.