GNOME Bugzilla – Bug 610261
do not block camera for whole life time
Last modified: 2018-09-21 17:02:16 UTC
Created attachment 154034 [details] [review] gp-lifetime.patch call gp_camera_exit() after the initial setup. this frees the USB port for access by other programs, like gphoto2 commandline or specialized capture tools (or f-spot, digikam, and other tools not using gvfs yet). As soon as someone accesses the gvfs tree the camera will be grabbed and reinitialized (and then not freed again). This is also better for camera attach-lifetime management which is currently not doable with libgphoto2. Inserting / Removing Cards for cameras is not really handled and other events. The only thing where this is probably bad is for the iPhones which change the master storage prefix on every init. I opened a bug with Apple hgalf a year ago already, but its not closed yet. We could filter iPhones from calling gp_camera_exit() here.
Yes, we'd need to have a work-around for the iPhones/iPod Touches. How does it behave when other applications use the camera?
Created attachment 154045 [details] [review] better patch, checks for Apple ok, this patch (untested) runs gp_camera_exit() only on non-Apple devices.
Marcus, in your second patch, it seems that abilities never gets initialized?
Argh, sorry, I misread. *brown paperbag*
Is that patch actually meant to close the USB device? I applied it to 1.6.0 and am running it now. After plugging it in, I can still do "gphoto -l", but as soon as I open nautilus once (and even close it again), the gvfsd-gphoto2 process keeps /dev/bus/usb/NNN/MMM open.
FWIW, I haven't tested if the patch works fine or not, but the Apple work-around would only ever apply if the AFC backend wasn't compiled (as we don't mount gphoto mounts on those devices when AFC is available). (In reply to comment #5) > Is that patch actually meant to close the USB device? I applied it to 1.6.0 and > am running it now. After plugging it in, I can still do "gphoto -l", but as > soon as I open nautilus once (and even close it again), the gvfsd-gphoto2 > process keeps /dev/bus/usb/NNN/MMM open. Unless it's an iPhone or iPod Touch, it probably shouldn't do that.
(In reply to comment #6) > Unless it's an iPhone or iPod Touch, it probably shouldn't do that. No, it's a Canon PowerShot SX200 (PTP)
i am afraid it is a bit hard to test for me. gp_camera_exit() should close the usb port I thought :(
I seem to be having this problem with a Nikon D300s camera and F-spot or gphoto2 with various Ubuntu including the recent 10.04 LTS version (camera locked when user space application tries to access it). I would like to try this patch to see if it is a better solution than just killing off gvfs-gphoto2-volume-monitor permanently (e.g. with "chmod a-x ...") that could have other serious implications. Can anyone tell me where to get the source code and if it is easy enough to build it with this patch in to test?
Started this thread about my attempts to build and try the patch, as I don't think the bugzilla site is the right one: http://ubuntuforums.org/showthread.php?p=9354048
Is bug #606058 a duplicate of this one?
*** Bug 606058 has been marked as a duplicate of this bug. ***
-- 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/139.