Photo import stopped working with Canon PowerShot A520

Bug #103439 reported by dierre
36
Affects Status Importance Assigned to Milestone
libgphoto2 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: libgphoto2-2

I am no more able to download images from my Canon PowerShot A520 camera.

When I plug in the camera the usual dialog asking if I want to download the images appears.
When I answer that I wish to download them, the dialog the allows to select the thumbnails
appears, but instead of the thumbnails the following appears:

An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Operation not permitted). Make sure no other program or kernel module (such as sdc2xx, stv680, spca50x) is using the device and you have read/write access to the device.

This appears with libgphoto2-2 version 2.3.0-0ubuntu4 -- if I revert to 2.2.1-2ubuntu4 the problem disappears.

From /var/log/messages when the camera is plugged:
Apr 5 21:19:44 maggie kernel: [17181104.492000] usb 1-1: new full speed USB device using uhci_hcd and address 2
Apr 5 21:19:44 maggie kernel: [17181104.648000] usb 1-1: configuration #1 chosen from 1 choice

From /var/log/daemon when the camera is plugged:
Apr 5 21:19:44 maggie NetworkManager: <debug info>^I[1175800784.938694] nm_hal_device_added (): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_4a9_30c1_noserial').
Apr 5 21:19:44 maggie NetworkManager: <debug info>^I[1175800784.988926] nm_hal_device_added (): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_4a9_30c1_noserial_if0').
Apr 5 21:19:44 maggie NetworkManager: <debug info>^I[1175800784.989925] nm_hal_device_added (): New device added (hal udi is '/org/freedesktop/Hal/devices/usb_device_4a9_30c1_noserial_usbraw').

List of kernel modules from lsmod:
Module Size Used by
aes 28864 3
ieee80211_crypt_ccmp 9088 3
vmnet 41900 13
vmmon 118380 0
binfmt_misc 13448 1
rfcomm 42260 0
l2cap 27136 5 rfcomm
bluetooth 53476 4 rfcomm,l2cap
ipv6 272288 18
speedstep_centrino 9760 1
cpufreq_userspace 5408 0
cpufreq_stats 7744 0
freq_table 6048 2 speedstep_centrino,cpufreq_stats
cpufreq_powersave 2944 0
cpufreq_ondemand 8876 2
cpufreq_conservative 8712 0
video 17540 0
tc1100_wmi 8324 0
sbs 16804 0
sony_acpi 6412 0
pcc_acpi 14080 0
i2c_ec 6272 1 sbs
hotkey 11556 0
dev_acpi 12292 0
button 7952 0
battery 11652 0
container 5632 0
ac 6788 0
asus_acpi 17688 0
vfat 14720 0
fat 56348 1 vfat
af_packet 24584 8
parport_pc 37796 0
lp 12964 0
parport 39496 2 parport_pc,lp
pcmcia 40380 0
ipw3945 124576 1
joydev 11200 0
nvidia 6830836 16
snd_hda_intel 20116 1
snd_hda_codec 164608 1 snd_hda_intel
tsdev 9152 0
ieee80211 35272 1 ipw3945
snd_pcm_oss 47360 0
ieee80211_crypt 7552 2 ieee80211_crypt_ccmp,ieee80211
gspca 651984 0
sg 37404 0
b44 26764 0
sr_mod 18212 0
cdrom 38944 1 sr_mod
snd_mixer_oss 19584 1 snd_pcm_oss
yenta_socket 28812 1
rsrc_nonstatic 15360 1 yenta_socket
mii 6912 1 b44
sdhci 20108 0
mmc_core 32136 1 sdhci
videodev 10752 1 gspca
pcmcia_core 43924 3 pcmcia,yenta_socket,rsrc_nonstatic
i2c_core 23424 2 i2c_ec,nvidia
snd_pcm 84612 3 snd_hda_intel,snd_hda_codec,snd_pcm_oss
snd_timer 25348 1 snd_pcm
snd 58372 8 snd_hda_intel,snd_hda_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore 11232 1 snd
snd_page_alloc 11400 2 snd_hda_intel,snd_pcm
evdev 11392 2
psmouse 41352 0
serio_raw 8452 0
shpchp 42144 0
pci_hotplug 32828 1 shpchp
intel_agp 26012 1
agpgart 34888 2 nvidia,intel_agp
ext3 142856 1
jbd 62228 1 ext3
ehci_hcd 34696 0
uhci_hcd 24968 0
usbcore 134912 4 gspca,ehci_hcd,uhci_hcd
ide_generic 2432 0
sd_mod 22656 3
generic 6276 0
ata_piix 11780 2
libata 74892 1 ata_piix
scsi_mod 144648 4 sg,sr_mod,sd_mod,libata
thermal 15624 0
processor 31560 2 speedstep_centrino,thermal
fan 6020 0
fbcon 41504 0
tileblit 3840 1 fbcon
font 9344 1 fbcon
bitblit 7168 1 fbcon
softcursor 3328 1 bitblit
vesafb 9244 0
capability 5896 0
commoncap 8704 1 capability

Revision history for this message
Gerd Flaig (gefla+launchpad) wrote :

It seems the permissions for USB devices are not set properly. I got exactly the same error message here with a PowerShot A70, so I investigated.

After applying the following patch, it worked.

--- /tmp/45-libgphoto2.rules 2007-04-08 21:38:44.000000000 +0200
+++ 45-libgphoto2.rules 2007-04-08 21:39:57.000000000 +0200
@@ -1,7 +1,7 @@
 # udev rules file for libgphoto2 devices (udev < 0.98)
 #
-BUS!="usb*", GOTO="libgphoto2_rules_end"
 ACTION!="add", GOTO="libgphoto2_rules_end"
+SUBSYSTEM!="usb_device", GOTO="libgphoto2_rules_end"

 SYSFS{idVendor}=="0553", SYSFS{idProduct}=="0202", MODE="0660", GROUP="plugdev"
 SYSFS{idVendor}=="06bd", SYSFS{idProduct}=="0403", MODE="0660", GROUP="plugdev"

Javier Jardón (jjardon)
Changed in libgphoto2:
status: Unconfirmed → Confirmed
Revision history for this message
Thom Pischke (thom-pischke) wrote :

Confirming this regression. The suggested fix is only partially effective. This camera worked fine in Edgy, and was broken by an update at some point, and remains broken in Feisty.

-BUS!="usb*", GOTO="libgphoto2_rules_end"
+SUBSYSTEM!="usb_device", GOTO="libgphoto2_rules_end"

The above change does restore the camera import, but the camera will mysteriously shut itself off during the import after a minute or so, ruining any in-progress import. This did not happen under edgy, where the camera would stay on for the entire import.

Revision history for this message
Lorenzo De Tomasi (lorenzo-detomasi) wrote :

I have a Canon Powershot A430 and I have a similar problem: after updating to the last version of ubuntu when I connect the camera the import window appears, but it shows for a long time the icon "No camera found", the "Loading camera drivers from /usr/lib/libgphoto2/2.3.0" is displayed, but it seems crashed (no working feedback). After abut 5 minutes it displays the error message "PTP I/O Error" and the Import button doesn't work.

Thank you

Revision history for this message
Marc Guillemot (mguillemot) wrote :

I have the same regression with a Canon Powershot S2 IS.

In my case reverting to 2.2.1-2ubuntu4 doesn't seem to fix the problem: I get the import dialog and then nothing happens.

Revision history for this message
Donald Douwsma (donaldd) wrote :

Thom Pischke said on 2007-05-03:
...but the camera will mysteriously shut itself off during the import after a minute or so, ruining any in-progress import.

This sounds like the Auto Power Down feature of the A520. I found I have to disable it to get a full import (even in edgy).
My camera occasionally resets to its default settings, most recently last week, so this is an ongoing problem.

Revision history for this message
Marc Guillemot (mguillemot) wrote :

On my laptop import works just fine with libgphoto 2.3.0-0ubuntu4 what means that this library is not the cause of the problem (or at least not alone).

Revision history for this message
Thom Pischke (thom-pischke) wrote :

This is now working in Feisty using the suggested fix. Problem was on a friend's computer and he reported that one day everything just started working great.

I can only assume that some update came through, but probably the USB fix was necessary as well, assuming the update didn't overwrite that config file.

Revision history for this message
David Hillman (hillman-planet-torque) wrote :

I have a Canon Powershot SD550 that was working beautifully with Edgy Eft. I "upgraded" to Feisty Fawn yesterday, and now the camera is not recognized at all. I applied the patch above, but that failed.

Had I known how many things were going to need to be redone after installing FF, I never would've bothered.

Revision history for this message
Marc Guillemot (mguillemot) wrote :

This is now working for me again. I suppose that some update fixed the issue but I can't say which one as I haven't tested again after each update.

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

Closing again as per Marc's comment.

Changed in libgphoto2:
status: Confirmed → Fix Released
Revision history for this message
Thom Pischke (thom-pischke) wrote :

*Was* a fix released? Don't really remember seeing a gphoto update come through....

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.