gphoto / libgphoto2

The libgphoto2 camera access and control library.
GNU Lesser General Public License v2.1
989 stars 316 forks source link

(Canon) PTP timeout on a EOS 1000D #979

Closed Isharfoxat closed 3 weeks ago

Isharfoxat commented 3 weeks ago

Describe the bug As soon I try a command meant to actually drive the DSLR, it takes a few seconds then gphoto2 throws an error (hereafter retranslated from french). I don't get what is happening, as everything was fine and today, with absolutely no change made, everything goes bad! The closest solved issue I have seen here suggested it was the gvfs library messing with the communication. I already had deactivated gvfs for gphoto2 (through chmod -x, works like a charm), so the ps auxw|grep gphoto gives nothing, as expected. DSLR is a Canon EOS 1000D plugged in a Raspberry Pi 4 running an up-to-date Debian 11 with kernel 6.1.21-v8+

pi@louppi:~ $ gphoto2 --summary

*** Error ***
PTP Timeout

*** Error ***
An error occurred in the io-library ('Timeout reading or writing on the port'): Error description unavailable
*** Error (-10 : « Time out reading or writing on the port ») ***

Commands that don't seem affected:

gphoto2 --reset
gphoto2 --auto-detect
gphoto2 --version

(see below)

Name the camera

pi@louppi:~ $ gphoto2 --auto-detect
Modèle                        Port                                             
----------------------------------------------------------
Canon EOS 1000D                usb:001,007

libgphoto2 and gphoto2 version

pi@louppi:~ $ gphoto2 --version
gphoto2 2.5.27

Copyright (c) 2000-2021 Marcus Meissner and others

gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of gphoto2 under the terms of the GNU General Public
License. For more information about these matters, see the files named COPYING.

This version of gphoto2 is using the following software versions and options:
gphoto2         2.5.27         gcc, popt(m), exif, cdk, aa, jpeg, readline
libgphoto2      2.5.27         standard camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0         iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, ltdl, EXIF, USB, serial without locking

To Reproduce I would LOVE to be able to determine what caused this. Right now, anything from gphoto2 --summary to gphoto2 --capture-image-and-download triggers the error.

Attached is the debug file gphoto-logfile.txt

Any help would be great!

Isharfoxat commented 3 weeks ago

Solved!

What happened: for some reason, after a power failure, gvfs went back up. Disabling it through kill and chmod was a good thing but not enough!

The camera stays locked in some weird gvfs mode that a gphoto2 --reset will NOT disable.

You must turn the camera off then on again, physically! Yes, even if your camera is located in a rather inaccessible place.

May my misadventure help anybody ...