digikam doesn't detect camera due to libgphoto2 error

Bug #205417 reported by Bremm
22
Affects Status Importance Assigned to Milestone
libgphoto2 (Ubuntu)
Fix Released
High
Martin Pitt

Bug Description

Binary package hint: libgphoto2-2

Running digikam from console, just plugged my Canon S3 IS, unplugged and replugged it to gather this result.

digikam: Failed to autodetect camera!
digikam: Libgphoto2 error: No error (0)
kbuildsycoca running...
Reusing existing ksycoca
digikam: Dirty: /
digikam: Failed to initialize camera!
digikam: Libgphoto2 error: Could not claim the USB device (-53)

Output at /var/log/messages

Mar 23 02:05:30 host kernel: [355324.410107] usb 2-4: new high speed USB device using ehci_hcd and address 21
Mar 23 02:05:30 host kernel: [355324.480419] usb 2-4: configuration #1 chosen from 1 choice
Mar 23 02:10:30 host kernel: [355480.336675] usb 2-4: USB disconnect, address 21
Mar 23 02:12:38 host kernel: [355546.711459] usb 2-4: new high speed USB device using ehci_hcd and address 22
Mar 23 02:12:38 host kernel: [355546.781542] usb 2-4: configuration #1 chosen from 1 choice

Additional information:

Description: Ubuntu hardy (development branch)
Release: 8.04

libgphoto2-2:
  Installed: 2.4.0-8ubuntu5
  Candidate: 2.4.0-8ubuntu5
  Version table:
 *** 2.4.0-8ubuntu5 0
        500 http://archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status

digikam:
  Installed: 2:0.9.3-1build2
  Candidate: 2:0.9.3-1build2
  Version table:
 *** 2:0.9.3-1build2 0
        500 http://archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status

Related branches

Revision history for this message
Marcus Meissner (meissner) wrote :

"could not claim device" usually means permission problem.

Attach lshal output with camera attached please.

Revision history for this message
Bremm (bremm) wrote :

OK, there it goes. :)

Revision history for this message
Bremm (bremm) wrote :

I just tested running digikam with kdesu and it worked fine, which means you're right, Meissner. But I didn't figure out what happens, since I didn't touch the device ownership and my flash card reader at same usb port works well.

That's weird, I'll might take a look again later. Thank you for the useful tip.

Revision history for this message
Bremm (bremm) wrote :

Just checked the device permissions.

1. With camera plugged on:

$ LANG=C ls -l /dev/us*
crw-rw---- 1 root root 253, 0 Mar 15 11:45 /dev/usbdev1.1_ep00
crw-rw---- 1 root root 253, 1 Mar 15 11:45 /dev/usbdev1.1_ep81
crw-rw---- 1 root root 253, 6 Mar 15 11:45 /dev/usbdev1.3_ep00
crw-rw---- 1 root root 253, 7 Mar 15 11:45 /dev/usbdev1.3_ep81
crw-rw---- 1 root root 253, 8 Mar 15 11:45 /dev/usbdev1.4_ep00
crw-rw---- 1 root root 253, 9 Mar 15 11:45 /dev/usbdev1.4_ep81
crw-rw---- 1 root root 253, 10 Mar 15 11:45 /dev/usbdev1.4_ep82
crw-rw---- 1 root root 253, 4 Mar 22 18:41 /dev/usbdev1.9_ep00
crw-rw---- 1 root root 253, 5 Mar 22 18:41 /dev/usbdev1.9_ep81
crw-rw---- 1 root root 253, 2 Mar 15 11:45 /dev/usbdev2.1_ep00
crw-rw---- 1 root root 253, 3 Mar 15 11:45 /dev/usbdev2.1_ep81
crw-rw---- 1 root root 253, 11 Mar 24 00:20 /dev/usbdev2.30_ep00
crw-rw---- 1 root root 253, 13 Mar 24 00:20 /dev/usbdev2.30_ep02
crw-rw---- 1 root root 253, 12 Mar 24 00:20 /dev/usbdev2.30_ep81
crw-rw---- 1 root root 253, 14 Mar 24 00:20 /dev/usbdev2.30_ep83

/dev/usb:
total 0
crw-rw---- 1 root root 180, 96 Mar 22 18:41 hiddev0

2. And here with flash card reader (camera unplugged before):

$ LANG=C ls -l /dev/us*
crw-rw---- 1 root root 253, 0 Mar 15 11:45 /dev/usbdev1.1_ep00
crw-rw---- 1 root root 253, 1 Mar 15 11:45 /dev/usbdev1.1_ep81
crw-rw---- 1 root root 253, 6 Mar 15 11:45 /dev/usbdev1.3_ep00
crw-rw---- 1 root root 253, 7 Mar 15 11:45 /dev/usbdev1.3_ep81
crw-rw---- 1 root root 253, 8 Mar 15 11:45 /dev/usbdev1.4_ep00
crw-rw---- 1 root root 253, 9 Mar 15 11:45 /dev/usbdev1.4_ep81
crw-rw---- 1 root root 253, 10 Mar 15 11:45 /dev/usbdev1.4_ep82
crw-rw---- 1 root root 253, 4 Mar 22 18:41 /dev/usbdev1.9_ep00
crw-rw---- 1 root root 253, 5 Mar 22 18:41 /dev/usbdev1.9_ep81
crw-rw---- 1 root root 253, 2 Mar 15 11:45 /dev/usbdev2.1_ep00
crw-rw---- 1 root root 253, 3 Mar 15 11:45 /dev/usbdev2.1_ep81
crw-rw---- 1 root root 253, 11 Mar 24 00:23 /dev/usbdev2.31_ep00
crw-rw---- 1 root root 253, 12 Mar 24 00:23 /dev/usbdev2.31_ep01
crw-rw---- 1 root root 253, 13 Mar 24 00:23 /dev/usbdev2.31_ep82

/dev/usb:
total 0
crw-rw---- 1 root root 180, 96 Mar 22 18:41 hiddev0

As I said above, flash card reader works well.

Revision history for this message
Hubert Figuiere (hub) wrote : Re: [Bug 205417] Re: digikam doesn't detect camera due to libgphoto2 error

On Mon, 2008-03-24 at 03:33 +0000, Bremm wrote:
> As I said above, flash card reader works well.

Flash card reader are mounted by the kernel. Mount use root privilege.
Unlike the camera.

Hub

Revision history for this message
Martin Pitt (pitti) wrote :

If that happened recently, I know the reason. hal recently deprecated the "info.bus" property, thus libgphoto2 (and libsane, too, see bug 205496) need to generate FDIs with "info.subsystem", not "info.bus".

Changed in libgphoto2:
assignee: nobody → pitti
importance: Undecided → High
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libgphoto2 - 2.4.0-8ubuntu6

---------------
libgphoto2 (2.4.0-8ubuntu6) hardy; urgency=low

  * Add debian/patches/72_deprecated_hal_key.dpatch: Replace the deprecated
    hal property "info.bus" with "info.subsystem" in the hal FDI generation
    tool. This fixes cameras to work with current hal without using deprecated
    keys. (LP: #205417)

 -- Martin Pitt <email address hidden> Tue, 25 Mar 2008 16:32:03 +0100

Changed in libgphoto2:
status: In Progress → Fix Released
Revision history for this message
Bremm (bremm) wrote :

Gentlemen,

After an "sudo apt-get update; sudo apt-get upgrade" everything is working fine. I just tested it.

Preparing to replace libgphoto2-port0 2.4.0-8ubuntu5
(using .../libgphoto2-port0_2.4.0-8ubuntu6_amd64.deb) ...
Unpacking replacement libgphoto2-port0 ...
Preparing to replace libgphoto2-2 2.4.0-8ubuntu5
(using .../libgphoto2-2_2.4.0-8ubuntu6_amd64.deb) ...
Unpacking replacement libgphoto2-2 ...

I think we have one more bug squished. Many thanks. :)

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Confirmed. This last upload fixed it for me too.

Revision history for this message
Spot (greg-spotx) wrote :

Sorry Guys it aint fixed for me

I have added info to another report but this appears to be the same thing
installed are
libgphoto2-2 2.4.0-8ubuntu6 gphoto2 digital camera library
and
digikam 2:0.9.3-2ubuntu1 digital photo management application for KDE
please see
https://bugs.launchpad.net/ubuntu/+source/digikam/+bug/213658/comments/4

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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