I tried to use Darktable on Linux to control a Canon 5DII. It nearly worked but crashed a couple of times. Now the camera won’t connect properly to that computer. It appears on the USB bus but can’t be mounted so its files are inaccessible. It still works OK on a different Linux computer.
Has anyone else experienced this?
probably a config problem I’d try to delete (or move for eventual later restoration) gphoto and darktable config files then reboot the machine and try again. (~/.gphoto and ~/.config/darktable)
You can’t rule out that something with the usb controller of the computer itself went wrong but it’d be more likely coincidental as then eventuality of a software bug breaking some usb controller is to me very remote at best.
Did you try to reboot this computer? Does the camera connect correctly after reboot?
I have two different USB cards in my system in addition to the on-board USB support. I have some USB sticks working without any problem with two of the three cards, but hanging at the third or even crashing the driver.
Possibly use another port (or card, if available) to connect the camera.
Thanks for the replies. I have tried restarting the computer and resetting the camera but it just doesn’t work any more. The camera does connect via USB but it no longer appears as a “block device with” a file system. Otherwise, the USB works with everything else. As a work around I can always remove the memory card and transfer images directly. A Lumix camera still connects to the computer so perhaps there is some subtle fault in the Canon camera.
Did you check the USB operation mode of your camera? My Sony has three different modes :
- mass storage mode (connect as block storage device)
- MTP mode (Media Transfer Protocol)
- tries to automatically find the “correct” mode (whatever that means, never used it)
Canon could use other terms or modes but you should find something similar.
There is no reference to different USB modes in the 5D mk II manual, It is left up to the computer to sort it out, which my computer did until now.
Right, but did you also move the config files out of the way?
The camera does connect via USB
If it connects : did you try to mount the usb device (camera) from the command line ?
See for example https://linuxconfig.org/howto-mount-usb-drive-in-linux for a how-to.
Or, if that fails for any reason, simply remove the memory card from the camera and use a card reader, that’s my preferred procedure.
It only does PTP (Picture Transfer Protocol). But considering how slow that USB port is, using a USB3 card reader is much preferable, if you ask me.
I tried moving the configuration files and also manual mounting. That is how I found out that the camera presented as “not a block device”. I suspect it is now time to give up and just read the memory card directly - or, perhaps, upgrade to a MKiV and use ftp. They seem to be readily available second hand. at well below the new price even with low shutter counts.
I finally discovered that Darktable had somehow damaged libgphoto2 and I found a link to a way to repair this by upgrading and reinstalling:
That doesn’t make a lot of sense, but if it worked for you, good.
I agree, it seems improbable but there is something about Darktable and controlling the camera that damages gphoto2 on my system if any problem occurs and the Darktable session end is forced. Knowing how to restore it, I tried again, crashed, and gphoto2 was damaged.
Is your gphoto2 installed in a user-writeable directory? I see no reason why darktable would modify other executables, though.
Or is its config updated (damaged) when you use darktable? If yes, you should track down where that config is, and what modification creates the problem, then report an issue so it can be fixed.
And just to double-check: you don’t run darktable as root, right?
This all sounds quite weird.
darktable is build against libgphoto2 (required version >= 2.5), mine is build with 2.5.27 for example. I assume your darktable is started from a user account (not root). How should darktable damage this library (usually in /usr/lib/x86_64-linux-gnu/libgphoto2/ (root !) at runtime?
To my understanding gphoto2 (the command line client for libgphoto2) is not used by darktable at all. I have not installed it in my system at all.
In my system I cannot find any configuration that could be assigned to libgphoto2.
Its perfectly possible that I have been chasing my tail with this. My explanation doesn’t seem to make sense when you take the file permissions into account. Nonetheless crashing out of Darktable while controlling an Eos5D ( mkii and mk iv) has twice made usb cameras inaccessible to gphoto2. I was only able to correct this by recompiling and reinstalling libgphoto2. Maybe the real effect of that was the rewriting of configurations - but surely they should also have been protected by the file permissions.
This loss no longer seems to happen with the 5Dmk iv although tethered shooting via Darktable is very flaky and crashes too easily to be worth bothering with.
I have Darktable running as a child of a (non-root) bash process that opens it in a new dedicated workspace and then waits for it to exit before removing the workspace. I can’t see that as having any effect on the program.
If you run Darktable as a normal user, it do not have privileges to alter any library, just configuration files.
Perhaps it wasn’t Darktable and just a coincidence that the ability to read the 5D over USB was lost on two occasions after Darktable crashes while controlling the camera. But there were no upgrades of the kernel or any photo software at the time of loss and many reboots. The loss was only restored as described above. The camera remained fully accessible on another linux computer.
Did you read (and follow) the tethering → troubleshooting section in the manual ?
https://darktable-org.github.io/dtdocs/en/tethering/troubleshooting
Yes, the camera is supported and can download images using the command line. There just seems to be little error trapping so that it is easy to crash the Darktable session.