Bug #11804

Tether: Darktable loses connection to Canon EOS 80D

Added by Markus Dörschmidt about 1 year ago. Updated 10 months ago.

Target version:
Start date:
Due date:
% Done:


Affected Version:
hardware architecture:


My EOS 80D is connected via USB. I can switch to Tether mode in Darktable, so the camera is detected.

When I press the shutter button to take a picture, Darktable shows "connection with camera lost, exiting tethering mode" and switches back to lighttable mode.

Running Darktable 2.2.5 on Ubuntu 17.10 (x86, 64bit), Gnome 3 Shell

eos80d.log Magnifier (743 KB) Markus Dörschmidt, 12/02/2017 07:45 PM


#1 Updated by Tobias Ellinghaus about 1 year ago

Please try running darktable with -d camctl. Does that tell why it fails?

#2 Updated by Markus Dörschmidt about 1 year ago

Here is the output from Darktable, when connection is lost:

[camera_control] Camera configuration change event, lets update internal configuration cache.
[camera_control] executing set camera config job iso=1600
[camera_control] executing set camera config job aperture=5.6
[camera_control] executing set camera config job shutterspeed=1/60
[camera_control] gphoto2 error: PTP General Error
[camera_control] disabling tether mode
[camera_control] camera control un-locked for camera 0x7f1070009860
[camera_control] unregistering listener 0x35f8e90
[camera_control] unregistering listener 0x3d6dbc0
[camera_control] disabling tether mode
[camera_control] camera control un-locked for camera (nil)
[camera_control] unregistering listener 0x35f8e90
[camera_control] exiting camera thread.
[camera_control] loaded 36 port drivers.
[camera_control] 1 cameras connected

#3 Updated by Tobias Ellinghaus 12 months ago

"PTP General Error" sounds vague. No idea what's happening. Just to make sure that it's not a bad USB connection, please try wiggling the cable and see if it will drop the connection. Yes, I am grasping at straws here.

#4 Updated by Tobias Ellinghaus 12 months ago

After talking to a gphoto2 dev here's the next thing to test: Run the standalone gphoto2 tool.

gphoto2 --capture-tethered --debug --debug-logfile=xx.log

Then press the shutter button. I'd also like to know what version of (lib)gphoto2 you have installed.

#5 Updated by Markus Dörschmidt 12 months ago

USB connection / cable is OK, tried with different cables and notebooks.
The logfile is attached.

Following Ubuntu packages and versions are installed:

ii  gphoto2                                      2.5.14-1                                    amd64        digital camera command-line client
ii  libgphoto2-6:amd64                           2.5.14-1                                    amd64        gphoto2 digital camera library
ii  libgphoto2-port12:amd64                      2.5.14-1                                    amd64        gphoto2 digital camera port library

#6 Updated by Tobias Ellinghaus 11 months ago

Thanks for the log. It seems that the initial problem is somewhere up the chain, gphoto2 or USB driver or who knows where. Of course, dt should handle that more graceful.

#7 Updated by Markus Dörschmidt 11 months ago

I'm not sure, if this would be enough. If the error occurs, you have to disconnect and reconnect the camera.
Here a short update:

After a view days without an error, it got worse yesterday:
The error occured always when I try to take the first picture after connecting or reconnecting the camera.
Disconnecting and reconnecting the camera helped to get the camera detected again, but after a view attempts, the camera was locked. Pressing the shutter button showed me "Err" in the viewfinder. I had to remove the battery to get the camera working again.

I played around with gphoto2 itself (no Darktable) and I got the same result. For now it seems that this is not a bug in Darktable itself.

By the way: It doesn't matter, if there is a SD card inserted or not. The error occurs in both cases.

#8 Updated by Tobias Ellinghaus 11 months ago

Wow, that is bad. If you have to disconnect the camera for Linux to see it again there is probably not much we can do.

#9 Updated by Peter Budai 11 months ago

Could you maybe upgrade your libgphoto2 to 2.5.16? I have had some conversation with Marcus, and he has mentioned that there were some problems in the prior release with Canon EOS cameras:

#10 Updated by Markus Dörschmidt 10 months ago

Sorry for my delayed answer...

I compiled libgphoto2-2.5.16 from sources. When running gphoto2 with

LD_LIBRARY_PATH=<path-to-lib> gphoto2 --capture-tethered --debug --debug-logfile=xx.log

it shows me, that libgohoto2-2.5.16 is used, but the error remains.

Also available in: Atom PDF