Copying photos from camera stalls - how to track down issue?
When I copy files from my camera (connected via USB) to the SSD in my laptop a few files get copied and then the copy stalls. I'm not sure why, any ideas or things to investigate appreciated, or bug reports to go and look at.
I have read this answer - the camera (Canon 40D in case that matters) mounts fine using gvfs. I can see the photos in Nautilus, or in the terminal (in /run/user/username/gvfs/...
) and I can copy a few photos, but not many. Using the terminal or Nautilus the process hangs until the camera goes to sleep. Digikam fails to copy any at all, as does Rapid Photo Downloader. Shotwell did manage it in the end, but that is very much a work around for me.
I have disabled thumbnail generation by nautilus. Load average stays about 1 while this is happening, while CPU usage is half idle, half wait (and a little user/sys for other programs). None of the programs at the top of the cpu list in top
are related to copying photos. There is not much in the logs - from /var/log/syslog
Dec 2 16:20:52 mishtop dbus[945]: [system] Activating service name='org.freedesktop.UDisks' (using servicehelper)
Dec 2 16:20:52 mishtop dbus[945]: [system] Successfully activated service 'org.freedesktop.UDisks'
Dec 2 16:21:24 mishtop kernel: [ 2297.180130] usb 2-2: new high-speed USB device number 4 using ehci_hcd
Dec 2 16:21:24 mishtop kernel: [ 2297.314272] usb 2-2: New USB device found, idVendor=04a9, idProduct=3146
Dec 2 16:21:24 mishtop kernel: [ 2297.314278] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Dec 2 16:21:24 mishtop kernel: [ 2297.314283] usb 2-2: Product: Canon Digital Camera
Dec 2 16:21:24 mishtop kernel: [ 2297.314287] usb 2-2: Manufacturer: Canon Inc.
Dec 2 16:21:24 mishtop mtp-probe: checking bus 2, device 4: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-2"
Dec 2 16:21:24 mishtop mtp-probe: bus: 2, device: 4 was not an MTP device
This problem has only started recently and I've had all the hardware for ages. I have also recently upgraded to 12.10, though I'm not sure if the problem started when I upgraded or after the upgrade. I also note this similar question but it is currently unanswered and I'm providing more detail
Solution 1:
I suggest you change the USB mode from PTP to mass storage. It should simplify connection problems since USB mass storage is more widely supported.
I had similar problems with Ubuntu 12.10 and a camera which only had PTP mode.
WORKAROUND: If your camera doesn't support mass storage mode, maybe it would be easier to transfer files by removing your memory card from the camera and use a card reader if your computer doesn't have a built-in reader.
Solution 2:
The bug mdr mentions in his comment (https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1075923) is now fixed, and a gvfs update that fixes the problem was pushed out on 2013-10-03 (http://launchpad.net/ubuntu/+source/gvfs/1.16.1-0ubuntu1.1). So all you need to do at this point to fix this problem is update your ubuntu gvfs package.
Solution 3:
I am having similar issues but with copying files over SMB from my NAS. I researched some more and it seems the current version of gvfs (in (X)ubuntu 12 LTS) cannot handle too much data (in my case copying hangs after a few hundred megabytes).
I also noticed this was logged as a bug but the latest update I saw was that they are in need for a SMB/gvfs expert to fix this.
See this: https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1075923
A workaround for file servers is to do the copying over FTP, but I guess that doesn't work for cameras.
Solution 4:
I suggest you also try to copy your files directly from your memory card (removing it from your digital camera and inserting it in a card reader). If it's working fine, than it's an issue with your camera. If not, than your card is either too slow or it has some kind of a defect. By doing so you can narrow your problem down to "Is it an USB-issue?" or "Is it a memory card issue?". I also suggest you try using another card in your camera and USB-cable (do combinations: old card-new cable, new card-old cable, new card-new cable), which will definitely point you into the right direction.
EDIT:
You can also ask your friends to use their computers as lab rats. It shouldn't be difficult to find two people - one with 12.04 and the other with 12.10. :)
The other thing to do (in case you have enough free space on your hard drive) is to install Ubuntu 12.04 alongside Ubuntu 12.10. One thing to remember here is to carefully handle the /home directory. If you have mounted it on a separate partition it is possible to use it as home in both installation. This however might result in overwriting configuration files etc., which is obviously not a good thing to happen. Install the second Ubuntu in such a way that it is self-contained - all directories are in the same partition, where you install it. By doing this dual boot you can see if the upgrade to 12.10 is the source of your problem. Sadly it often happens that an upgrade from one version to another results in some weird behaviour (which is also often present when you do a fresh install :D).