Bug 476355 - Camera inaccessible - PTP errors (used to work fine on older Fedoras)
Camera inaccessible - PTP errors (used to work fine on older Fedoras)
Product: Fedora
Classification: Fedora
Component: gphoto2 (Show other bugs)
All Linux
low Severity urgent
: ---
: ---
Assigned To: Jindrich Novy
Fedora Extras Quality Assurance
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2008-12-13 08:47 EST by An. N
Modified: 2015-02-12 02:34 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-12-18 02:16:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
gphoto2 error log (20.80 KB, text/plain)
2008-12-13 08:48 EST, An. N
no flags Details
gphoto2 debug log (289.38 KB, text/plain)
2008-12-21 14:26 EST, Jonathan Kamens
no flags Details
gphoto2 error log (2.4.4) (20.76 KB, text/plain)
2009-02-01 18:39 EST, An. N
no flags Details
Patch to change canon timeout values (1.06 KB, application/octet-stream)
2009-03-31 14:51 EDT, Russell Harrison
no flags Details

  None (edit)
Description An. N 2008-12-13 08:47:53 EST
Description of problem:
When plugging in a digital camera, I get the error:

"Unable to mount <cameraname> (PTP mode). Error initializing camera: -1: Unspecified error"

The camera appears in nautilus but is inaccessible.. This used to work on Fedora 6 and Fedora 7 with the same hardware and the same digital camera.

I've attached a log of "env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt -l"

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

How reproducible:

Steps to Reproduce:
1. Plug in a digital camera via USB (in my case canon Ixus 50)
Actual results:
The mentioned error message is displayed

Expected results:
Camera is mounted and works ok

Additional info:
usb 2-4: new high speed USB device using ehci_hcd and address 7
usb 2-4: configuration #1 chosen from 1 choice
usb 2-4: New USB device found, idVendor=04a9, idProduct=310e
usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-4: Product: Canon Digital Camera
usb 2-4: Manufacturer: Canon Inc.

Bus 002 Device 008: ID 04a9:310e Canon, Inc. Digital IXUS 50 (PTP mode)
Comment 1 An. N 2008-12-13 08:48:41 EST
Created attachment 326817 [details]
gphoto2 error log
Comment 2 Vaclav "sHINOBI" Misek 2008-12-14 06:24:55 EST
Can you try to update gvfs and gvfs-gphoto2 from updates-testing? With these versions it seems to be working for me, although with different camera model.
Comment 3 An. N 2008-12-14 11:36:01 EST
It doesn't work with those packages from updates-testing. I think that gphoto2 doesn't communicate with the camera properly so this is most likely not a gvfs specific bug.
Comment 4 Vaclav "sHINOBI" Misek 2008-12-15 12:50:51 EST
Please can you try to download images with the root privileges? In the past I have similar experience and when su - and gthumb I was able to import images correctly. Thanks a lot.
Comment 5 An. N 2008-12-15 17:36:44 EST
Have you read the description and error log that I have provided?

This is not a privilege problem, this is a communication problem at the protocol level. Citing from the log:

2.170189 ptp2/usbread(2): Clearing halt on IN EP and retrying once.
2.170318 gphoto2-port(2): Clear halt...
2.389947 ptp2/usb_getresp(0): request code 0x1002 getting resp error 0x02ff
2.390131 ptp2/camera_init(0): ptp_opensession returns 2ff
2.390158 ptp2/device_reset_request(2): sending reset
2.390183 gphoto2-port(2): Writing message (request=0x66 value=0x0 index=0x0 size=0=0x0)...
2.390214 gphoto2-port(3): No hexdump (NULL buffer)
2.489467 context(0): PTP I/O error
2.489608 gphoto2-port(2): Closing port...
2.491759 context(0): An error occurred in the io-library ('Unspecified error'): No error description available

To be absolutely sure I tried your suggestion and no - it did not work. The application returns this error:

"An error occurred in the io-library ('Unspecified error'): No error description available"
Comment 6 Vaclav "sHINOBI" Misek 2008-12-16 01:01:49 EST
Yes, I read it, but I just wanted to be absolutely sure it's not this problem as the privilege problem behaved quite the same way.
Comment 7 Jonathan Kamens 2008-12-21 14:26:19 EST
Also broken in rawhide with Canon Powershot A710 IS.  Will attach gphoto2 debug log.
Comment 8 Jonathan Kamens 2008-12-21 14:26:50 EST
Created attachment 327592 [details]
gphoto2 debug log
Comment 9 Jonathan Kamens 2008-12-21 14:31:05 EST
Tried downgrading to gphoto2 from Fedora 9, but it didn't solve the problem, so I assume that the problem is not in gphoto2 itself but rather in something lower in the food chain.
Comment 10 An. N 2009-01-30 16:44:24 EST
Is there any news on this bug? It's been over 6 weeks and it's REALLY annoying when your desktop system can't do the basic things properly...

Is any other information needed?
Comment 11 Jindrich Novy 2009-01-31 03:33:50 EST
gphoto2 and libgphoto2 is now recently updated to 2.4.4. It contains many fixes. Could you give it a try? I could then release Fedora updates for 9,10.
Comment 12 James 2009-01-31 12:25:33 EST
(In reply to comment #11)
> gphoto2 and libgphoto2 is now recently updated to 2.4.4. It contains many
> fixes. Could you give it a try? I could then release Fedora updates for 9,10.

Please submit Fedora 10 builds for these to Koji for testing, there are only Fedora 11 packages there at the moment.
Comment 13 Jindrich Novy 2009-02-01 04:02:02 EST
Here is the F10 libgphoto2:

and here the F9 one:
Comment 14 An. N 2009-02-01 18:38:41 EST
No improvement, same error (I'm referring to the rpm from koji). What do you suggest that we do?

Comment 15 An. N 2009-02-01 18:39:28 EST
Created attachment 330564 [details]
gphoto2 error log (2.4.4)
Comment 16 Jindrich Novy 2009-02-02 03:03:28 EST
Upstream suggests to upgrade to kernel or better. It is not directly (lib)gphoto2 fault, but kernel failure:

Comment 17 Marcus Meissner 2009-02-02 03:12:59 EST
2.6.28 and are known bad. should be good again
Comment 18 An. N 2009-02-02 11:07:01 EST
The kernel I was using was I take it that it's broken as well?

Anyway, shouldn't this be filed as a bug against the Fedora kernel then?

Comment 19 An. N 2009-02-02 14:41:59 EST
I've checked this with - doesn't work, same symptoms.

Either is also affected, or it's not a kernel issue?
Comment 20 Jindrich Novy 2009-02-03 05:45:40 EST
Ok, reopening until we are completely sure it is not a bug of (lib)gphoto2.
Comment 21 An. N 2009-02-21 19:51:12 EST
It seems that the authors don't think it's a kernel issue. Should I be bugging them or you about this, then?

My camera still doesn't work in Linux.
Comment 22 An. N 2009-02-22 09:04:32 EST
I manually changed the canon ptp2 timeout to 1500 (and another timeout in the canon lib from 175 to 500)
recompiled, reinstalled

Seems to work now. Self-support is the way to go I guess :-(

There's still a bug in fedora gphoto2 as far as I'm concerned, though.
Comment 23 Marcus Meissner 2009-02-22 12:43:39 EST
which time out exactly?

if you mail me the lines I integrate ity upstream.
Comment 24 Marcus Meissner 2009-02-25 17:33:19 EST
i guessed and have applied both changes to libgphoto2 upstream.
Comment 25 An. N 2009-02-27 08:30:07 EST
Sorry for the late reply.

Here are the changes:
I'm not so sure about the first one.

//#define CANON_FAST_TIMEOUT 175

#define USB_CANON_START_TIMEOUT 1500    /* 0.5 seconds */
Comment 26 Russell Harrison 2009-03-31 14:51:03 EDT
Created attachment 337388 [details]
Patch to change canon timeout values

I rebuilt libgphoto2 changing the values in this bug and can confirm they do fix the problem with my camera.  This is the patch file I used to rebuild the rpm and could be used to fix the problem until the next upstream version is out with the fix.
Comment 27 Fedora Update System 2009-04-01 09:33:25 EDT
libgphoto2-2.4.4-1.fc10 has been submitted as an update for Fedora 10.
Comment 28 Jindrich Novy 2009-04-01 09:44:44 EDT
Applied in rawhide and testing updates to F10 are prepared. Please test it and give it positive carma so that they get moved to stable :) Thanks.

Comment 29 Jindrich Novy 2009-04-02 01:05:00 EDT
Please disregard this update. We would break gphoto2-2.4.3 in F10 if we release libgphoto2-2.4.4 and koji says that chain builds are not enabled for dist-f10-updates-candidate :/ so it doesn't seem to be possible to build gphoto2-2.4.4 on top of it and release update.
Comment 30 Tore Anderson 2009-04-18 17:16:24 EDT
I have an Canon IXUS 800 IS and experienced this error today, for the first time.

Applying Andrzej Nowak's changes successfully works around the problem.  The actual cause seems to have been that the memory card had too many pictures on it for the camera to respond in time - after inserting another memory card with few pictures on it the unpatched version worked fine again.

Comment 31 Duncan Innes 2009-08-19 16:43:56 EDT
Have a Canon PowerShot G9 and have experienced this error with several versions of Fedora including a fresh install of F11 today.  The install was done with the internet repositories enabled, and all updates have been applied.

Have done the chmod 777 /dev/bus/usb fix and it's working.

But this is getting really silly.  Is there something upstream that doesn't know about one of the most obvious uses of Linux (connecting to home digital cameras) failing at the first hurdle?

Just to confirm - this bug still exists in the latest F11 code.  Changing the directory permissions of /dev/bus/usb allows things to work for the moment.

Comment 32 Jindrich Novy 2009-08-20 01:57:22 EDT
Any luck with the new libgphoto2-2.4.7 ?

Comment 33 Bug Zapper 2009-11-18 04:26:55 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 34 Bug Zapper 2009-12-18 02:16:55 EST
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 35 Turgut Kalfaoglu 2015-02-12 02:34:08 EST
LOL -- same error, Fedora 21!

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