Bug 150582 - KDE cannot initiate communication with Canon Powershot G3 camera
Summary: KDE cannot initiate communication with Canon Powershot G3 camera
Status: RESOLVED NOT A BUG
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-07 23:20 UTC by Andrew Derrick
Modified: 2008-11-24 12:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
output from env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt -L (35.54 KB, text/plain)
2007-10-09 22:07 UTC, Andrew Derrick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Derrick 2007-10-07 23:20:10 UTC
Version:            (using KDE KDE 3.5.7)
Installed from:    SuSE RPMs
OS:                Linux

When connecting the camera to the Linux box via USB cable the camera is switched on to PC mode and KDE launches a dialogue box, but neither Konqueror or digiKam can initiate communication with the camera.
Comment 1 Andrew Derrick 2007-10-08 19:28:24 UTC
Forgot to mention I have just up-graded from Suse 10.1 to 10.3, the camera worked fine in this environment. I believe Suse 10.1 used KDE 3.5.4.  Also under Suse 10.3 the camera USB interface works under the Gnome desktop.
Comment 2 Marcus Meissner 2007-10-08 22:08:14 UTC
does the command line "gphoto2" (in gphoto RPM) work? (gphoto2 -L)
Comment 3 Andrew Derrick 2007-10-09 22:07:17 UTC
Created attachment 21784 [details]
output from env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt -L
Comment 4 Andrew Derrick 2007-10-09 22:09:58 UTC
output from gphoto2 -L was:

Detected a 'Canon:PowerShot G3 (normal mode)'.
*** Error (-114: 'OS error in camera communication') ***

For debugging messages, please use the --debug option.
Debugging messages may help finding a solution to your problem.
If you intend to send any error or debug messages to the gphoto
developer mailing list <gphoto-devel@lists.sourceforge.net>, please run
gphoto2 as follows:

    env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt -L

Please make sure there is sufficient quoting around the arguments.

Output from --debug option is in the attachment in additional comment 3.
Comment 5 Vasilis Vasaitis 2007-11-21 18:57:46 UTC
OK, I'm having problems with my camera in combination with KDE too lately; I was about to file a separate bug, but the lovely wizard directed me to this one, which looks quite similar.

Here's what happens: If I'm not running KDE, the Linux kernel recognises my camera (a Panasonic Lumix DMC-FZ7) just fine, and you can see kernel messages like these:

usb 2-6: new full speed USB device using ohci_hcd and address 10
usb 2-6: configuration #1 chosen from 1 choice
scsi14 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 10
usb-storage: waiting for device to settle before scanning
scsi 14:0:0:0: Direct-Access     MATSHITA DMC-FZ7          0100 PQ: 0 ANSI: 2
sd 14:0:0:0: [sdc] 1999872 512-byte hardware sectors (1024 MB)
sd 14:0:0:0: [sdc] Write Protect is off
sd 14:0:0:0: [sdc] Mode Sense: 04 00 00 00
sd 14:0:0:0: [sdc] Assuming drive cache: write through
sd 14:0:0:0: [sdc] 1999872 512-byte hardware sectors (1024 MB)
sd 14:0:0:0: [sdc] Write Protect is off
sd 14:0:0:0: [sdc] Mode Sense: 04 00 00 00
sd 14:0:0:0: [sdc] Assuming drive cache: write through
 sdc: sdc1
sd 14:0:0:0: [sdc] Attached SCSI removable disk
sd 14:0:0:0: Attached scsi generic sg3 type 0
usb-storage: device scan complete

This works fine when X is not running, or when it is running with twm for example, and regardless of driver (nv or nvidia). However, when X is running with KDE and I connect the camera, I get this instead:

usb 2-6: new full speed USB device using ohci_hcd and address 11
usb 2-6: configuration #1 chosen from 1 choice
scsi15 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 11
usb-storage: waiting for device to settle before scanning
ttyS1: LSR safety check engaged!
ttyS1: LSR safety check engaged!

So the camera is not recognised properly, and then obviously fails to cooperate. I've no idea whatsoever why this could be happening. By the way, when the camera is connected KDE seems to be launching these:

 5683 ?        S      0:00 kio_media [kdeinit] media /tmp/ksocket-mod/klauncher9cxlvb
 5685 ?        S      0:00 kio_system [kdeinit] system /tmp/ksocket-mod/klauncher9cxl
 5686 ?        S      0:00 kio_file [kdeinit] file /tmp/ksocket-mod/klauncher9cxlvb.s
 5687 ?        S      0:00 kio_media [kdeinit] media /tmp/ksocket-mod/klauncher9cxlvb
 5688 ?        S      0:00 kio_kamera [kdeinit] camera /tmp/ksocket-mod/klauncher9cxl
 5689 ?        S      0:00 kio_kamera [kdeinit] camera /tmp/ksocket-mod/klauncher9cxl

Oh, also, all the above tests are shown with the camera connected in UMS mode. But the same behaviour is exhibited in PTP mode too.

Any other information you want, I can gladly provide.

Thanks,
Vasilis
Comment 6 Vasilis Vasaitis 2007-11-21 18:58:30 UTC
Oh, forgot to say, I'm running KDE 3.5.8 on Debian unstable.
Comment 7 Vasilis Vasaitis 2007-11-28 22:02:13 UTC
OK, with the help of the Linux kernel people I think I've identified the cause of this. Have a look at the bug report I filed on the kernel bugzilla:

http://bugzilla.kernel.org/show_bug.cgi?id=9458

The executive summary is this: When a camera is connected, even if it's a UMS (USB Mass Storage) device, kio_kamera disconnects it from the usb-storage kernel module and tries to... handle it as if it were a PTP device? Probably something like that. The result is that neither kio_kamera can access it, nor any other device that expects to find a UMS device to mount as a filesystem.
Comment 8 Marcus Meissner 2007-11-28 22:27:37 UTC
we released a opensuse 10.3 libgphoto2 update which does not detach the mass storage driver anymore.

please test it
Comment 9 Vasilis Vasaitis 2007-11-28 23:37:28 UTC
Ah, good to hear. For those of us who don't use SuSE, is the patch easy to obtain from somewhere? Or alternatively can it be pushed to the next version of upstream fairly soon?

Thanks,
Vasilis
Comment 10 Andrew Derrick 2007-11-29 20:56:11 UTC
Installed opensuse 10.3 libgphoto2 update which fixed the issue (required re-start of kernel not just X), many thanks, Andrew.
Comment 11 FiNeX 2008-11-24 12:33:59 UTC
Bug closed. Thanks all for the feedback!