Bug 249649 - digikam failed to connect to the camera
Summary: digikam failed to connect to the camera
Alias: None
Product: Fedora
Classification: Fedora
Component: digikam (Show other bugs)
(Show other bugs)
Version: 7
Hardware: i686 Linux
Target Milestone: ---
Assignee: Marcin Garski
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2007-07-26 03:48 UTC by Claus Olesen
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-07-29 20:24:11 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Claus Olesen 2007-07-26 03:48:10 UTC
Description of problem:
Download of pictures from digital camera no longer works but fails with popup 
message "Failed to connect to the camera. Please make sure it is connected 
properly and turned on. Would you like to try again?"

Version-Release number of selected component (if applicable):
digiKam 0.9.2-final

How reproducible:

Steps to Reproduce:
0. login as ordinary user
1. launch digikam from K menu
2. connect and turn on camera
3. select the camera in the list under digiKams main menu option "Camera"
Actual results:
digiKam launches a popup titled "Conenction Failed - digiKam" saying
"Failed to connect to the camera. Please make sure it is connected properly 
and turned on. Would you like try again?" with "Retry" and "Abort" as the 
possible inputs. Clicking "Retry" relaunches the same popup.

Expected results:
digiKam used to show a panel of thumbnails of the pictures in the camera.

Additional info:
This appears to be a (device) permission issue. Because the issue disappears 
if digiKam is launched from the commandline using sudo rather than from the 
K-menu as ordinary user. Except that the downloaded pictures are then owned by 

Comment 1 Christian Krause 2007-07-29 15:51:22 UTC
Hi Claus,

yesterday, I had exactly the same problem. I've tried to use the gphoto2 command
line tool to retrieve the photos to get some more debug output - same issue.

strace revealed, that the program could not access the usb-device:
(No such file or directory)
open("/proc/bus/usb/007/014", O_RDWR)   = -1 EACCES (Permission denied)

It looks like, that the access to /prob/bus/usb is some kind of fallback if
/dev/bus/usb is not available.

For some other reason I had to reboot, and after that it just started to work
fine again.

The difference is, that now /dev/bus/usb is available again, and in this
directory the user had write access:

ls -la /dev/bus/usb/007/010 
crw-rw-r--+ 1 root root 189, 777 2007-07-29 17:34 /dev/bus/usb/007/010

getfacl /dev/bus/usb/007/010 
getfacl: Removing leading '/' from absolute path names
# file: dev/bus/usb/007/010
# owner: root
# group: root

Sure, the question is now: Why was /dev/bus/usb not available when the problem

My assumption is, that during the various regular updates of Fedora 7 (without
any reboots) for whatever reason /dev/bus/usb vanished (probably hal/udev
update, kernel update or something like this).

Claus, please can you try first, whether a reboot helps?
If not:
- use lsusb to figure out at which usb port your camera is connected
- check the permissions of the according /dev/bus/usb/aaa/bbb entry with "ls -l"
and "getfacl"
- try using gphoto2 with "strace -eopen -o /tmp/gphoto2trace gphoto2 -l" and
check, whether the usb device files can be accessed

Hope that helps.

Best regards,

Comment 2 Claus Olesen 2007-07-29 20:23:04 UTC
Hi Christian,
Thank you for your comment and hints. I just retested and the problem has now 
vanished - on its own. I'll close this bug report if I can.

Since posting then according to
$ rpm -qa --dump --last
I have gotten the following updates

kernel-headers-                Fri 27 Jul 2007 05:40:06 PM PDT
bind-utils-9.4.1-8.P1.fc7                     Fri 27 Jul 2007 05:40:05 PM PDT
kmod-nvidia-100.14.11-       Fri 27 Jul 2007 05:40:03 PM PDT
kernel-devel-                  Fri 27 Jul 2007 05:39:55 PM PDT
kernel-                        Fri 27 Jul 2007 05:37:43 PM PDT
bind-libs-9.4.1-8.P1.fc7                      Fri 27 Jul 2007 05:37:25 PM PDT
adobe-release-i386-1.0-1                      Thu 26 Jul 2007 05:30:29 PM PDT

Might the kernel update have fixed this? The changelog for the kernel update 
according to
$ rpm -q --changelog kernel-
doesn't say.

The computer is turned off when not in use i.e. at least every night. On the 
day of posting I got these updates

libXi-devel-1.1.1-1.fc7                       Wed 25 Jul 2007 06:26:27 PM PDT
kde-settings-kdm-3.5-30.fc7                   Wed 25 Jul 2007 06:26:26 PM PDT
kde-settings-3.5-30.fc7                       Wed 25 Jul 2007 06:26:25 PM PDT
ntfs-3g-1.710-1.fc7                           Wed 25 Jul 2007 06:26:24 PM PDT
anthy-9100-1.fc7                              Wed 25 Jul 2007 06:26:07 PM PDT
kdesdk-3.5.7-7.fc7                            Wed 25 Jul 2007 06:25:46 PM PDT
evolution-data-server-          Wed 25 Jul 2007 06:25:39 PM PDT
fuse-2.7.0-3.fc7                              Wed 25 Jul 2007 06:25:36 PM PDT
libXi-1.1.1-1.fc7                             Wed 25 Jul 2007 06:25:35 PM PDT
fuse-libs-2.7.0-3.fc7                         Wed 25 Jul 2007 06:25:13 PM PDT

but can't remember if I rebooted after that update before using digiKam. 
Besides, none of those ring a bell with me as candidates for being able to 
make a difference.

I've retested all USB ports with all other USB devices plugged-in and -out - 
and can't make the problem reappear. That is without going to extremes. I can 
make the problem happen by this sequence

1. Cancel the KDE popup that shows when the camera is turned on.
2. Right click the KDE Desktop digiKam icon and select "digiKam Detect and 
3. Quickly dismiss the digiKam popup window by clicking "X" in the window 
border or using KDEs Alt-F4 before digiKam starts downloading from the camera.
4. repeat from step 2 (without closing digiKam) and digiKam shows the "Failed 
to connect to the camera..." popup but only until after some clicks on 
the "Retry" button after which digiKam starts downloading from the camera and 
everything is fine.

This is a constructed and extreme case and not a bug. My point with mentioning 
this is that a usb device permission issue is not the only possible candidate 
as cause of the problem.

I don't know if SELinux could be the cause but if so then it shouldn't be 
because I have never had it enabled.

At this point I'm at a loss on how to explain why it now works again.

The tools tip popup as well as the right click Properties->Meta Info of the 
KDE Desktop camera icon says
Base URL: camera://USB PTP Class Camera@[usb:002,008]/
ls -l /dev/bus/usb/002/008
crw-rw-r--+ 1 root root 189, 135 2007-07-29 11:01 /dev/bus/usb/002/008

Perhaps that last line read
crw-------+ 1 root root ...

at the time of the problem. I'll check for that if the problem should happen 

Note You need to log in before you can comment on or make changes to this bug.