Workaround for USB digital camera photo download problems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gphoto2 (Ubuntu) |
Invalid
|
Medium
|
MOTU | ||
libgphoto2 (Ubuntu) |
Fix Released
|
Undecided
|
Hubert Figuiere |
Bug Description
When plugging a digital camera (Canon IXUS 700) GNOME starts an application to allow download of pictures. On my system (Ubuntu
5.10 on an IBM X32 Thinkpad running an Emperor Linux 2.6.12 Kernel) the download doesn't work. The workaround is to log out of GNOME before plugging the camera, then use gphoto as root from a command-line login to do the download. E.g.:
sudo gphoto2 --camera "Canon Digital IXUS 700 (PTP mode)" -P
Changed in gphoto2: | |
assignee: | nobody → motu |
Aanjhan Ranganathan (aanjhan) wrote : | #1 |
SVAKSHA (svaksha) wrote : | #2 |
Thank you for reporting this bug.
Can you reproduce this problem with the latest Dapper source. Can you, if possible, attach the file causing the crash? The beta release of Dapper is scheduled for next Thursday, 20060420 and we would like to fix bugs before the beta is publicized. -Thanks!
Changed in gphoto2: | |
status: | Unconfirmed → Needs Info |
Hamish Cunningham (hamishagain) wrote : Re: [Bug 6602] Re: Workaround for USB digital camera photo download problems | #3 |
Hi,
Could you tell me the synaptic repository settings that I need to
download the latest gphoto2? Then I can test it.
Best
Hamish
Svaksha wrote:
>Thank you for reporting this bug.
>Can you reproduce this problem with the latest Dapper source. Can you, if possible, attach the file causing the crash? The beta release of Dapper is scheduled for next Thursday, 20060420 and we would like to fix bugs before the beta is publicized. -Thanks!
>
>
>** Changed in: gphoto2 (Ubuntu)
> Status: Unconfirmed => Needs Info
>
>
_______
Yahoo! Photos � NEW, now offering a quality print service from just 7p a photo http://
JamesNorris (jiminorris) wrote : | #4 |
could this be realted to bug 33310
soulds like a similar problem to me. But 33310 has the added problem of the Canon PowerShot 520 being detected as an IXUS in the first place.. Which might mean this is not just for your camera but IXUS ones in general
Hubert Figuiere (hub) wrote : | #5 |
if it works as root but not as a standard user, then it is a permission problem.
The libgphoto2 package is supposed to take care of that, and any "PTP camera" is detected properly. Works fine in Dapper. Did you try with Dapper?
The version in 5.10 (Breezy) is a bit very old.
Hubert Figuiere (hub) wrote : | #6 |
not a gphoto2 problem anyway
Changed in gphoto2: | |
status: | Needs Info → Rejected |
Hubert Figuiere (hub) wrote : | #7 |
but eventually libgphoto2.
Changed in libgphoto2: | |
assignee: | nobody → hub |
status: | Unconfirmed → Needs Info |
Hamish Cunningham (hamishagain) wrote : Re: [Bug 6602] Re: Workaround for USB digital camera photo download problems | #8 |
thanks; I will try it in dapper when I get around to upgrading
best
h
Hubert Figuiere wrote:
>if it works as root but not as a standard user, then it is a permission problem.
>The libgphoto2 package is supposed to take care of that, and any "PTP camera" is detected properly. Works fine in Dapper. Did you try with Dapper?
>The version in 5.10 (Breezy) is a bit very old.
>
>** Also affects: libgphoto2 (Ubuntu)
> Importance: Untriaged
> Status: Unconfirmed
>
>
>
_______
Yahoo! Messenger - with free PC-PC calling and photo sharing. http://
Florent Mertens (givre) wrote : | #9 |
- Libgphoto_error_permission_problem Edit (70.0 KiB, text/plain)
I can confirm that it works for dapper but no more for edgy.
It is a permission problem. When i run digikam as root, i can import my photos, but not as a simple user.
I ran gphoto to have some debug information, and i get this error :
0.018045 gphoto2-port(2): Opening USB port...
0.018093 gphoto2-port(0): Could not query kernel driver of device.
0.018115 gphoto2-port(0): 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.
0.018152 context(0): 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.
*** Error ***
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.
*** Error (-53: 'Could not claim the USB device') ***
I attach the all output i get with the command :
env LANG=C gphoto2 --debug --camera "USB PTP Class Camera" -P 2> error_gphoto
Tormod Volden (tormodvolden) wrote : | #10 |
Please somebody with such a camera, run these two commands in a terminal just after plugging in the camera:
eval `grep PHYSDEVPATH= /var/log/udev`
more /sys$PHYSDEVPATH/* > camera-sys.txt
And attach the file camera-sys.txt here.
Dan Bishop (danbishop) wrote : | #11 |
- camera-sys.txt Edit (1.5 KiB, text/plain)
I have a PowerShot A630 and have the same problem.
I have done as requested and attached camera-sys.txt
Tormod Volden (tormodvolden) wrote : | #12 |
Thanks, Dan. But something went wrong, this looks more like a sound card than a camera :) Can you try to check inside /var/log/udev yourself (probably towards the end) and see if you can find the PHYSDEVPATH corresponding to your camera? If this is difficult, attach your /var/log/udev file here. We are interested in what is added to it after plugging in the camera.
Then, copy the right PHYSDEVPATH= line to the command line and do the "more" line again.
Dan Bishop (danbishop) wrote : | #13 |
Tormod Volden (tormodvolden) wrote : | #14 |
Please check with: tail -f /var/log/udev
(and then plug in your camera) to see if anything at all get added when you plug the camera.
Dan Bishop (danbishop) wrote : | #15 |
No, nothing is added.
Tormod Volden (tormodvolden) wrote : | #16 |
Can you try "tail -f /var/log/syslog" and then plug it, and attach what comes out.
Dan Bishop (danbishop) wrote : | #17 |
That produces the following:
Oct 22 21:54:19 lime kernel: [17196414.940000] usb 2-9: new high speed USB device using ehci_hcd and address 11
Oct 22 21:54:19 lime kernel: [17196415.096000] usb 2-9: configuration #1 chosen from 1 choice
Tormod Volden (tormodvolden) wrote : | #18 |
Can you attach the output from "cat /proc/bus/
Dan Bishop (danbishop) wrote : | #19 |
Is it not just some sort of permission error since everything works fine as root?
here are the outputs as asked for:
lsusb
Bus 002 Device 012: ID 04a9:313a Canon, Inc.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 004: ID 046d:0a01 Logitech, Inc.
Bus 001 Device 003: ID 04b8:0005 Seiko Epson Corp. Stylus Printer
Bus 001 Device 002: ID 046d:c513 Logitech, Inc.
Bus 001 Device 001: ID 0000:0000
cat /proc/bus/
T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh=10
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.17-10-generic ehci_hcd
S: Product=EHCI Host Controller
S: SerialNumber=
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=256ms
T: Bus=02 Lev=01 Prnt=01 Port=08 Cnt=01 Dev#= 12 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=04a9 ProdID=313a Rev= 0.02
S: Manufacturer=Canon Inc.
S: Product=Canon Digital Camera
S: SerialNumber=
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=(none)
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=64ms
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh=10
B: Alloc= 4/900 us ( 0%), #Int= 2, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.17-10-generic ohci_hcd
S: Product=OHCI Host Controller
S: SerialNumber=
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=046d ProdID=c513 Rev=32.00
S: Manufacturer=
S: Product=USB Receiver
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr= 98mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=8ms
I: If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=8ms
T: Bus=01 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=04b8 ProdID=0005 Rev= 1.00
S: Manufacturer=EPSON
S: Product=USB Printer
S: SerialNumber=
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 2mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
T: Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=046d ProdID=0a01 Rev= 0.21
S: Manufacturer=
S: Product=Logitech USB Headset
C:* #Ifs= 3 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=
I: If#= 1 Alt= 0 #EPs= 0 Cls=...
Tormod Volden (tormodvolden) wrote : | #20 |
Thanks. Yes, it is a permission problems. Usually, the /etc/udev/
However my lack of knowledge about PTP stops me here, I don't know how the PTP code tries to access the device, nor how udev is proceeding when there is no kernel driver claiming the device.
Joachim Beckers (jbeckers) wrote : | #21 |
- camera-sys.txt for eos 400D Edit (1.5 KiB, text/plain)
I have this bug with a canon eos 400D, which makes me think this is a general bug that applies to every possible camera.
I'm attaching the files asked for.
Hubert Figuiere (hub) wrote : | #22 |
given that my 20D works without a glitch in PTP....
make sure you are in the "plugdev" group.
Dan Bishop (danbishop) wrote : | #23 |
There doesn't seem to be such a group on my computer? I am a member of all existing groups though.
Hubert Figuiere (hub) wrote : | #24 |
define all.
what does "id" return?
Joachim Beckers (jbeckers) wrote : | #25 |
Joachim Beckers (jbeckers) wrote : | #26 |
Joachim Beckers (jbeckers) wrote : | #27 |
Joachim Beckers (jbeckers) wrote : | #28 |
output from id:
uid=1000(joachim) gid=1000(joachim) groups=
Tormod Volden (tormodvolden) wrote : | #29 |
Hubert, how can we verify that Joachim's camera device has group access for plugdev?
Dan Bishop (danbishop) wrote : | #30 |
Here is the output of id, plugdev is there.
uid=1000(dan) gid=1000(dan) groups=
Hubert Figuiere (hub) wrote : | #31 |
ls -lR /proc/bus/usb
Dan Bishop (danbishop) wrote : | #32 |
Tormod Volden (tormodvolden) wrote : | #33 |
Hubert, does the PTP code talk directly to /proc/bus/usb, and not via some /dev device? AFAIK, udev only sets permissions on /dev devices.
Hubert Figuiere (hub) wrote : | #34 |
Sorry it is /dev/bus/usb
I get lost when they change everything.
Tormod Volden (tormodvolden) wrote : | #35 |
So, if dmesg or syslog reports for instance "usb 5-6: new high speed USB device using ehci_hcd and address 7", we should look up "5" and "7" like this: ls -l /dev/bus/
And the group should be "plugdev" and not "root". Can everybody try this, please?
Tormod Volden (tormodvolden) wrote : | #36 |
From what I can see in the /proc/bus/
find /sys/devices -name bInterfaceClass -print|xargs grep 06
Alternatively, if anyone is able to find their camera in /sys/devices, please tell us what's in the bInterfaceClass file (of the subdevice).
Tormod Volden (tormodvolden) wrote : | #37 |
- /lib/udev/check_ptp_camera from Dapper Edit (140 bytes, text/plain)
Sorry I didn't see this before, but I was sitting on a Dapper machine without access to Edgy. Back on a Edgy machine, things are getting clearer: There is no check_ptp_camera script on Edgy, and the print-camera-list does not seem to produce anything equivalent. It's that simple, print-camera-list is broken^Wreduced in Edgy.
In Dapper, the old "print-udev-rules" produced this line: "PROGRAM=
Now what would be interesting is if someone can add the above line to /etc/udev/
Tormod Volden (tormodvolden) wrote : | #38 |
A little quotation mark slipped into that line in the previous comment, it should be:
PROGRAM=
Spano (fauxlklore45) wrote : | #39 |
- 45-libgphoto2.rules Edit (45.0 KiB, text/plain)
Hello,
I had this bug with an HP Photosmart R607.
I am running Edgy Beta currently. Tried what Mr. Volden suggested above and added
PROGRAM=
to the file /etc/udev/
/lib/udev It works for me! Attached is my modified /etc/udev/
Swapped location of group and mode, but don't know if that matters. New line is at very end of file.
Also had camera problem in Debian Etch. Attached are notes for hack that worked in Etch and Edgy Beta.
Regards,
Dan
Spano (fauxlklore45) wrote : | #40 |
- work around notes. Edit (800 bytes, text/plain)
Also had camera problem in Debian Etch. Attached are notes for hack that worked in Etch and Edgy Beta.
Tormod Volden (tormodvolden) wrote : | #41 |
Spano, the order of GROUP and MODE doesn't matter. Thanks for testing it out!
Joachim Beckers (jbeckers) wrote : | #42 |
I did the check_ptp_camera stuff, and nothing seems to have changed.
some more info:
root@madkeunnen
...
[17180265.340000] usb 4-4: new high speed USB device using ehci_hcd and address 8
[17180265.508000] usb 4-4: configuration #1 chosen from 1 choice
root@madkeunnen
crw-rw---- 1 root plugdev 189, 391 Oct 25 14:40 /dev/bus/
root@madkeunnen
/sys/devices/
root@madkeunnen
06
Marcus Meissner (meissner) wrote : | #43 |
argh, dont tell me yoiu have an extra binary...
udev supports als interface class matches which should work here.
The print-camera-list helper in 2..2.1 supports it, if you have older versions use:
SYSFS{bInterfac
or:
ATTRS{bInterfac
for udev >= 0.98
Ciao, Marcus
Joachim Beckers (jbeckers) wrote : | #44 |
I just found out something really weird. It seems that I/g-s-t has reset the list of groups I'm in. So while id said I was in plugdev, I really wasn't.
Still that doesn't seem to be the issue. I've added myself to plugdev again, but the error is still there.
But, as a positive sign: the check_ptp_camera hack does fix something, since I can access my camera again. gtkam even transfers thumbnails from it. On the other hand, it seems I can't download the full pictures...
Marcus Meissner (meissner) wrote : | #45 |
if it can download thumbnails it can download images too.
if it can't its a gtkam bug ;)
Dan Bishop (danbishop) wrote : | #46 |
Any chance some of these fixes will get into edgy or are we going to have to wait 6months to be able to use our cameras properly? :(
Hubert Figuiere (hub) wrote : | #47 |
for edgy-updates, I don't know. I'm not even sure there is one.
FWIW, mine works fine. both are canon
Tormod Volden (tormodvolden) wrote : | #48 |
Joachim, your usb device has now got the right permissions:
root@madkeunnen
crw-rw---- 1 root plugdev 189, 391 Oct 25 14:40 /dev/bus/
Did you log in again after adding yourself to the plugdev group?
Marcus, do you have the possibility to verify the rules vs. versions in Edgy? I think the rules made on Edgy only check Class="6" and not bInterfaceClass
Marcus Meissner (meissner) wrote : | #49 |
i am not a Ubuntu user, just a GPHOTO developer, sorry :)
Tormod Volden (tormodvolden) wrote : | #50 |
In Edgy the rules are already like Marcus suggested:
SYSFS{bInterfac
But they don't seem to work. udev is 0.93. OTOH the script check_ptp_camera apparently works, and consists of this one-liner:
grep -q -F 06 /sys/$PHYSDEVPA
Is the problem that udev doesn't match on the interfaces?
Jon Leighton (jonleighton) wrote : | #51 |
I am affected by this bug. I have a Canon EOS 400D. Tormod Volden's fix works for me, but not always. It seems I can connect to the camera and import photos (using F-Spot) initially, but if I try to do a second import I get the error. A workaround for this is to turn the camera off and on again, effectively resetting the connection.
Let me know if I can provide any info.
Jordy Potman (jordypotman) wrote : | #52 |
I see the same thing as Jon Leighton with my Fuji FinePix F30. After applying Tormod Volden's fix importing pictures works, without it I also get the error. I can also import only one time in F-Spot, but I think that might be an F-Spot bug because after closing and opening F-Spot I can import one time again (probably F-Spot bug http://
Hamish Cunningham (hamishagain) wrote : | #53 |
Hi,
I originally opened this bug in relation to 5.10 / Breezy with
a Canon IXUS 7. Just thought I'd let you know that this works fine
for me under 6.06/Dapper.
Probably too late to be any use :-(
Best
Hamish Cunningham
Send instant messages to your online friends http://
Hubert Figuiere (hub) wrote : | #54 |
then since it works for reporter, consider released
for the other, please file new bugs.
Changed in libgphoto2: | |
status: | Needs Info → Fix Released |
Tormod Volden (tormodvolden) wrote : | #55 |
I believe these problems (all but the original reporter's) are taken care of in bug #63473.
Joachim Beckers (jbeckers) wrote : | #56 |
I can confirm that the check_ptp_camera workaround fixes this bug.
Scott Lewin (sclewin) wrote : | #57 |
My HP M22 also does not work under Edgy. It is identified correctly, but upon trying to get the pictres I get this error message:
"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."
If I select disk drive under the camera's setting on the camera, Edgy sees the camera as a pictre storage device and I am able to get the pictures from the camera.
----
Scott
Hubert Figuiere (hub) wrote : | #58 |
this is ultimately a dupe of bug 67532
Need some more info. What happens when you try to download pics?