gvfsd-gphoto2 locks camera

Bug #388712 reported by pascal germroth
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gvfs (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

After plugging in a camera, gvfsd-gphoto2 launches and locks the camera.
This prevents gphoto2 from doing its job, since it does not acces the camera via GVFS/GIO:

Steps to reproduce:

1) Plug in the camera.
2) 'ps x | grep gphoto' shows gvfsd-gphoto2 and/or gvfs-gphoto2-volume-monitor running
3) 'gphoto2 --auto-detect --capture-image-and-download' fails with "Error (-60: 'Could not lock the device'"
4) 'killall gvfsd-gphoto2 gvfs-gphoto2-volume-monitor'
5) rerun (3), and have your picture taken and downloaded.

I don't know if the daemon is only locking the camera as soon as some process starts accessing it. (well, maybe nautilus does acces it). It would be great, if it could release the lock as soon as possible, or (don't know about the locking) don't lock for read-only access.

Martin Pitt (pitti)
affects: libgphoto2 (Ubuntu) → gvfs (Ubuntu)
Changed in gvfs (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
bford16 (bford16) wrote :

In Karmic, with kernel 2.6.31-14, I still see the 'cannot lock device' error when connecting a digital camera. Killing 'gvfs-gphoto2-volume-monitor' stops the error. However, once I load f-spot and import the photos, the gvfs-gphoto2-volume-monitor process is started again. Also, killing this process stops Nautilus from showing the mounted camera as a separate filesystem.

I think importance should be a bit higher considering the number of bugs filed with this same behavior. This problem essentially prevents Ubuntu users from importing photos in anything like the normal manner.

gionnico (gionnico)
Changed in gvfs (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
Davi Figueiredo (dav1app) wrote :

Is there a way to stop gvfsd-gphoto2 from respawning?

Even after killing and disabling the process, blacklisting '60-glibphoto2-6.rules' from udev, GTK still respawn it:

153716 tty2 Sl+ 0:00 /usr/libexec/gvfsd-gphoto2 --spawner :1.6 /org/gtk/gvfs/exec_spaw/20

Revision history for this message
Eero Tamminen (oak-helsinkinet) wrote :

> Is there a way to stop gvfsd-gphoto2 from respawning?

It's started by the volume manager which is started by system-wide defaults for Gnome/Ubuntu systemd user session.

Tell systemd that you want that service to be disabled for your (current) user account:
  systemctl --user mask gvfs-gphoto2-volume-monitor

And stop it:
  systemctl --user stop gvfs-gphoto2-volume-monitor

Then you can kill the thing started by it, which does that bloody annoying mount preventing everything else from using the Camera (e.g. in my case, qt / libgphoto2 based Digikam, which I prefer for managing my photos instead of Gnome SW):
  killall gvfsd-gphoto2

IMHO this is upstream "gfsvd-gphoto2" bug. It should mount i.e. lock the camera USB device only when user starts some application that actually wants to use it (or user has enabled a setting asking it to index photos automatically from random connected camera-like USB devices on background).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.