After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 623809 - Ubuntu 9.10:connect a device via PTP/MTP mode failed with 'Could not lock the device' error
Ubuntu 9.10:connect a device via PTP/MTP mode failed with 'Could not lock the...
Status: RESOLVED OBSOLETE
Product: gvfs
Classification: Core
Component: gphoto backend
unspecified
Other Windows
: Normal major
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2010-07-08 07:17 UTC by caihuanut
Modified: 2018-09-21 17:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
error dialog when connect device (436.11 KB, image/x-png)
2010-07-08 07:17 UTC, caihuanut
Details

Description caihuanut 2010-07-08 07:17:53 UTC
Created attachment 165457 [details]
error dialog when connect device

i have a device which support PTP/MTP and can be mounted by gvfsd-gphoto2 backend
everytime, when i connect my device with Ubuntu 9.10, there will be a dialog popup, saying'Unable to mount ...,error initializing camera:-60:could not lock device' (for details, see attached picture).after seeing this error, the device still can be used normally, i mean, you can browse its contents in file browser, send some files from PC to the device via PTP/MTP.


tested another device which only report one drive when connect via PTP/MTP mode, no such problem.

My concern is: could gvfs only launch one 'gvfsd-gphoto2' process for a device with multi drives, since the device will only be mount once.

also, i want to know who is responsible to launch the 'gvfsd-gphto2' backend when a PTP/MTP device is conneced with PC, thanks.

i did some investigation about this, below is my analysis:
when plug in device, 'gvfsd-gphto2' process will be invoked, if there are multi drives on the device, there will be more than one 'gvfsd-gphoto2' running, one copprespond to one drive. each of this process will do the mount job, which include open the usb port. When open the usb port, it will check currently 'usbfs' driver has been bound to the device or not, if not, then claim the interface and the mount can be successful. The problem is that, after the first 'gvfsd-gphoto2' process successfully mount the device, the other 'gvfsd-gphto2' processes can not mount it, because the device already mounted. thus it returns the error 'GP_ERROR_IO_LOCK' and show the attached error dialog.
Comment 1 caihuanut 2010-07-09 02:17:46 UTC
after showing the 'Could not lock device' dialog, in fact, all the drives on the device can be used. so i wonder could gvfs do not popup this error dialog since this might mislead user. or for a better solution, one device just show one icon on the desktop,by click the device icon, user can see all available drives on the device, this is what Windows platform behaves.
Comment 2 zoubidoo 2010-12-18 17:57:36 UTC
I can confirm this problem. And I believe it affects many others and needs some urgent attention.

As caihuanut points out it occurs with cameras that have two drives.  This is very common with many cameras having a small internal drive as well as an additional memory card that is much larger.

Here are some reports:
http://ubuntuforums.org/showthread.php?t=1163070
http://www.google.com/search?sclient=psy&hl=en&safe=off&rls=ig&site=webhp&q=%22Error+initializing+camera:+-60%3A+Could+not+lock+the+device%22&aq=f&aqi=&aql=&oq=&gs_rfai=&pbx=1&cad=h
Comment 3 GNOME Infrastructure Team 2018-09-21 17:04:48 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gvfs/issues/151.