Ubuntu 9.10:connect a device via PTP/MTP mode failed with 'Could not lock the device' error
Submitted by cai..@..63.com
Assigned to gvf..@..e.bugs
Link to original bug (#623809)
Description
Created attachment 165457 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.