Ubuntu

GIMP: Could not mount Canon Digital Camera

Reported by Christopher Barton on 2012-12-31
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
libgphoto
New
Undecided
Unassigned
gimp (Ubuntu)
Undecided
Unassigned

Bug Description

Objective: To access raw photo image files from my Canon 400D digital camera, using a USB connection.

Result: GIMP (and UFRaw) produce the following error message:

          Could not mount Canon Digital Camera
          Error initialising camera: -1: Unspecified error

To explain my route to this error within GIMP, I went to FIle -> Open -> Canon Digital Camera, at which point it then hangs, eventually producing the above error within a popup message.

The exact same error is produced when trying to select the Canon Digital Camera when using UFRaw.

(Related is the fact that the RawTherapee application crashes when trying to select the camera device using its own folder list.)

I have searched for a solution of the above, but have only found that this problem may somehow be related to USB 3.0. If so, then this is a problem for me as I only have USB 3 (rather than USB 2) ports on my Asus UX31A.

lsb_release -rd
Description: Ubuntu 12.10
Release: 12.10

(Note I am using XUBUNTU 12.10)

apt-cache policy gimp
gimp:
  Installed: 2.8.2-1ubuntu1.1
  Candidate: 2.8.2-1ubuntu1.1
  Version table:
 *** 2.8.2-1ubuntu1.1 0
        500 http://be.archive.ubuntu.com/ubuntu/ quantal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ quantal-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.8.2-1ubuntu1 0
        500 http://be.archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: gimp 2.8.2-1ubuntu1.1
ProcVersionSignature: Ubuntu 3.5.0-21.32-generic 3.5.7.1
Uname: Linux 3.5.0-21-generic x86_64
ApportVersion: 2.6.1-0ubuntu9
Architecture: amd64
Date: Mon Dec 31 14:43:21 2012
InstallationDate: Installed on 2012-12-12 (18 days ago)
InstallationMedia: Xubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.1)
MarkForUpload: True
SourcePackage: gimp
UpgradeStatus: No upgrade log present (probably fresh install)

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gimp (Ubuntu):
status: New → Confirmed

I have this problem too, but the problem isn't really in gimp, it's in gphoto2 (or possibly deeper, in the USB stack). This will get you some diagnostics:

gphoto2 --debug --debug-logfile=gphoto.log -L

You may need to install gphoto2 first:

sudo apt-get install gphoto2

gphoto doesn't have a bug tracker, because the 1980s called and wants its [bugs] mailing list back:
http://gphoto.10949.n7.nabble.com/gphoto-bugs-gphoto-Bugs-3523295-PTP-I-O-error-with-Canon-on-2nd-command-tt11114.html

For the record, I get the same symptoms as reported upstream - gphoto2 fails with:

1.801756 ptp2/usbread(2): Clearing halt on IN EP and retrying once.
1.802082 gphoto2-port(2): Clear halt...
1.802348 ptp2/usb_getresp(0): request code 0x1002 getting resp error 0x02ff
1.802558 ptp2/camera_init(0): ptp_opensession returns 2ff
1.802809 ptp2/device_reset_request(2): sending reset
1.803009 gphoto2-port(2): Writing message (request=0x66 value=0x0 index=0x0 size=0=0x0)...
1.803218 gphoto2-port(3): No hexdump (NULL buffer)
1.807272 ptp(2): PTP: Opening session
1.807557 gphoto2-port(2): Writing 16=0x10 bytes to port...
1.807761 gphoto2-port(3): Hexdump of 16 = 0x10 bytes follows:
0000 10 00 00 00 01 00 02 10-00 00 00 00 01 00 00 00 ................

1.808007 ptp2/ptp_usb_getresp(2): reading response
1.808210 ptp2/ptp_usb_getpacket(2): getting next ptp packet
1.808411 gphoto2-port(2): Reading 512=0x200 bytes from port...

I have a Canon 60D, Ubuntu 12.04 on a ZAReason, USB 2, and dpkg:

ii libusb-0.1-4 2:0.1.12-20 userspace USB programming library
ii libusb-0.1-4:i386 2:0.1.12-20 userspace USB programming library
ii libusb-1.0-0 2:1.0.9~rc3-2ubuntu1 userspace USB programming library
ii gphoto2 2.4.11-2 The gphoto2 digital camera command-line client
ii libgphoto2-2 2.4.13-1ubuntu1.2 gphoto2 digital camera library
ii libgphoto2-2:i386 2.4.13-1ubuntu1.2 gphoto2 digital camera library
ii libgphoto2-l10n 2.4.13-1ubuntu1.2 gphoto2 digital camera library - localized messages
ii libgphoto2-port0 2.4.13-1ubuntu1.2 gphoto2 digital camera port library
ii libgphoto2-port0:i386 2.4.13-1ubuntu1.2 gphoto2 digital camera port library

tags: added: precise

Same problem with a Canon 40D on Ubuntu 12.04, 12.10, and the latest 13.04 build. Worked fine under 32-bit Ubuntu. Seems to be an amd64 problem. gphoto logfile is attached.

(Need to clarify my previous comment - seems to be a problem in gphoto that only shows itself in 64-bit builds.)

Marcus Meissner (meissner) wrote :

Check if camera is attached to USB 3 port. ... if yes, switch it to a USB 2 port for now and try again.

The logfile shows that the camera does not respond to any commands.

Same problem with a USB 2 port (this is on a Sony VAIO laptop that has two USB3 and one USB2 ports).

Here is the log, taken from Ubuntu 13.04 using USB2.

Btw, I've opened a ticket for this on SF as well: https://sourceforge.net/p/gphoto/bugs/944/

Johannes Konow (itix) wrote :

I am getting the same problem with my Canon EOS 1100D and Toshiba Z930 that also has mixed USB 2.0 and 3.0 ports (and AMD64).

Marcus Meissner (meissner) wrote :

also check for the gvfs gphoto2 slave, it occasionaly conflicts with other libgphoto2 based accesses

Michael P. Jung (bikeshedder) wrote :

I was finally able to access my camera (Canon EOS 40D) with my Ubuntu 12.10 x86_64 by killing the process /usr/lib/gvfs/gvfs-gphoto2-volume-monitor before starting Shotwell. The import works fine then. Previously I was getting the same error message as in the bug description.

Michael P. Jung (bikeshedder) wrote :

Update: after killing gvfs-photo2-volume-monitor and setting IsNative=true in /usr/share/gvfs/remote-volume-monitors/gphoto2.monitor I can download the preview images but importing still fails with the error. My previous comment was a bit too overhasty.

Dave English (dave-english3) wrote :

Does not work with Nikon Coolpix P5000 either.

l0b0 (victor-engmark) wrote :

Same error with Canon 7D on Ubuntu 13.04 x64. Using a different USB port worked.

Michael Stenta (mstenta) wrote :

Same issue with Canon 40D on Ubuntu 13.04 x64, on both USB 2 and 3 of Acer Aspire V5-571.

Killing the process /usr/lib/gvfs/gvfs-gphoto2-volume-monitor removes the camera from the Nautilus sidebar, but makes no difference in Shotwell or any other programs.

Attached is the debug log from gphoto2.

Michael Stenta (mstenta) wrote :

A new clue:

I noticed that if I run "gphoto2 --summary" immediately after inserting the USB, it works as expected! But if I then run it a second time right after that, I get the same old error message.

In fact, I was also able to run "gphoto2 --get-all-photos" to download all the photos from the camera using the same method.

So it definitely seems that some other software is hijacking the camera when it is plugged in, and the only way to get access to the camera is to beat it to the punch. It only works once, though, and then you have to unplug+replug, or turn it off an on again to do it again.

Instead of killing gvfs-gphoto2-volume-monitor (which keeps coming back), I removed its executable flag - that fixed the problem for good. Now I can reliably download images via Shotwell.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers