Canon USB Camera A810 Not Detected

After upgrading to openSUSE 13.1 (KDE), the USB camera is not recognized :frowning: This is what I got from lsusb -v:

Bus 001 Device 002: ID 04f2:b057 Chicony Electronics Co., Ltd integrated USB webcam
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x04f2 Chicony Electronics Co., Ltd
  idProduct          0xb057 integrated USB webcam
  bcdDevice            8.18
  iManufacturer           2 
  iProduct                1 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          523
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower               98mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 Video
      bFunctionSubClass       3 Video Interface Collection
      bFunctionProtocol       0 
      iFunction               5 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      1 Video Control
      bInterfaceProtocol      0 
      iInterface              5 
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdUVC               1.00
        wTotalLength          103
        dwClockFrequency       15.000000MHz
        bInCollection           1
        baInterfaceNr( 0)       1
      VideoControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             2
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               5
        iTerminal               0 
      VideoControl Interface Descriptor:
        bLength                26
        bDescriptorType        36
        bDescriptorSubtype      6 (EXTENSION_UNIT)
        bUnitID                 4
        guidExtensionCode         {7033f028-1163-2e4a-ba2c-6890eb334016}
        bNumControl             8
        bNrPins                 1
        baSourceID( 0)          3
        bControlSize            1
        bmControls( 0)       0x0f
        iExtension              0 
      VideoControl Interface Descriptor:
        bLength                26
        bDescriptorType        36
        bDescriptorSubtype      6 (EXTENSION_UNIT)
        bUnitID                 5
        guidExtensionCode         {3fae1228-d7bc-114e-a357-6f1edef7d61d}
        bNumControl             8
        bNrPins                 1
        baSourceID( 0)          4
        bControlSize            1
        bmControls( 0)       0x01
        iExtension              0 
      VideoControl Interface Descriptor:
        bLength                18
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Camera Sensor
        bAssocTerminal          0
        iTerminal               0 
        wObjectiveFocalLengthMin      0
        wObjectiveFocalLengthMax      0
        wOcularFocalLength            0
        bControlSize                  3
        bmControls           0x00000000
      VideoControl Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      5 (PROCESSING_UNIT)
  

You did not post with the output what command you used to get that output. We allways like the prompt, the command, the output and the next prompt to be copied/pasted complete. In any case, this about is about a webcam.

To see if a device is “detected” use

lsusb

which gives you all USB devices. When it is not there, it is indeed not detected. When it is there, you could then use lsusb on that USB port to get more verbose information.

To see whatthe system did when you connected the device, look at the end of

dmesg

asap after the conection. Do not post the complete dmesg output, but only the relevant last 20-30 lines.

Thank you for your reply, Henk.
This is the output of lsusb (it seems that it is detected after all, but no pop-up on KDE and I can’t see any “removable device” listed on My Computer/ Desktop):

lsusb
Bus 001 Device 004: ID 04a9:323f Canon, Inc. PowerShot A810
Bus 001 Device 003: ID 04f2:b057 Chicony Electronics Co., Ltd integrated USB webcam
Bus 002 Device 002: ID 045e:00d2 Microsoft Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Here’s the output of dmesg:

  895.879095] usb 1-3: new high-speed USB device number 4 using ehci-pci
  895.994917] usb 1-3: New USB device found, idVendor=04a9, idProduct=323f
  895.994929] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
  895.994936] usb 1-3: Product: Canon Digital Camera
  895.994943] usb 1-3: Manufacturer: Canon Inc.
  895.994949] usb 1-3: SerialNumber: 83838379thisisgarbage83899u753809

Thanks again for your help!

So it is detected, bt it is not advertizing itself as a mass storage device.

The cameras I have all advertize themselves as mass-storage devices and consquently let the desktop show the popup and let the user then use the file system on it (mount through the desktop, etc.)

I do not know why your camera doesn’t. Could be a “switch” (hardware of software) on the camera in the wrong position. IIRC I have seen threads here that tell about an alternative way to connect. I find in the manual of one of my cameras: MSC (Mass Storage Class) vs. PTP (Picture Transfer Protocol).

(BTW, when applicable, please copy/paste complete: the prompt, the command, the output and the next prompt. That will tell others/me who you were, where you were, what you typed, what you got and that it is complete. All with one sweep of your mouse and without you having to type additional information like: This is the output of lsusb. In the above case that would apply to the lsb case. Maybe not for the dmesg case, where you copied/pasted part of the output.)

Many cameras use the MTP and PTP data transfer protocols for communication, so my question is does the KDE device notifier announce the discovery of the camera when plugged in? If you open Dolphin (with location bar displayed), can you examine the photos using ‘camera:/’ (part of kio_kamera)?

The only problem is the KDE device notifier that doesn’t work. Yes, I can examine them using ‘camera:/’.

Have you tried configuring the notifier? Right-click on the icon, and select ‘Device Notifier Settings’? There, it should be possible to set it to notify about ‘Removable devices’, along with various actions (which can also be added to if required).

I saw that. In the “Device Actions” tab there was an option “Open with File Manager - Camera” and I tried editing it, the command for opening it was “kioclient exec camera:/”, but it still doesn’t work, no pop-up. In the “Removable Devices” tab I enabled “Enable automatic mounting of removable media”, but no luck, still no pop-up. :frowning:

Now that I’ve had a chance to play, I find that your problem is now mine too :frowning: (I was sure that it was working a week or so ago when I first installed openSUSE 13.1, so maybe a recent update is the cause of this). I have a Canon powerShot A1000 and a PowerShot SX150 IS.

Anyway, I’ve found a bug report that may be relevant

https://bugzilla.novell.com/show_bug.cgi?id=852551

Although the OP in that bug report is referring to a USB mass storage device, it appears to affect PTP cameras as well, so it would be a good idea for us to add to it.

I’m also reminded of a recent similar thread I participated in

https://forums.opensuse.org/english/get-technical-help-here/hardware/492789-problem-mounting-camera-v13-1-a-2.html

Using

solid-hardware listen

I could previously capture the event when the camera was annunciated. Not now however.

So, this could be a problem with solid-hardware, or perhaps a udev regression?

I am observing the following when my camera is plugged in

udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[15785.802706] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-6 (usb)
KERNEL[15785.802775] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-6/2-6:1.0 (usb)
UDEV  [15785.812709] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-6 (usb)
UDEV  [15785.813865] add      /devices/pci0000:00/0000:00:1d.7/usb2/2-6/2-6:1.0 (usb)

so the kernel’s uevent is being captured at least.

Can any other KDE users (openSUSE 13.1) confirm this issue with knotify and PTP camera devices?

I attempted to reliably produce this anomalous behavour, but I failed. I attempted on my openSUSE-13.1 Toshiba Z930 ultrabook (which has not been updated for a while) and it just worked with my Panasonic DMC-TZ30 camera using the USB interface and using the camera’s ‘pc’ mode (see image below).

I also tried on my main desktop which has since yesterday a brand new install of openSUSE-13.1 (with all recent updates) and the camera was not at first identified in a KDE popup (but it did show up in ‘lsusb’ and also in ‘fdisk -l’ ). That was using what the camera called ‘pc’ mode (see image below). I then tried again with ‘PictBridge(ptp)’ mode, and the camera worked with KDE/digiKam. I then obtained a KDE digiKam error saying the camera was not detected, but I noted the camera was detected and in the digiKAM drop down menu, where I selected the camera and it worked (in PTP mode).
http://thumbnails104.imagebam.com/29752/4f2050297518914.jpg](http://www.imagebam.com/image/4f2050297518914)
[click on above image for a larger version of image]

I then tried the camera again on my Toshiba Ultrabook, and it ‘just worked’ in ‘pc’ mode. So I then tried again on my desktop (with the newopenSUSE-13.1 install) in PC mode, and this time it ‘just worked’.

These are my camera’s settings when a USB cable is plugged in :

http://thumbnails112.imagebam.com/29752/eee3e0297518674.jpg](ImageBam)

On my openSUSE-13.1 desktop PC, I tired looking at the /var/log/messages, but it was too confusing to try and separate the messages when it worked, and when it did not work.

I am wondering if it could be related to a Camera file storage not being ‘unmounted’ correctly initially, and then later after being umounted correctly it worked. But that is speculation that I myself don’t believe. There is some behaviour here that I can not reliably reproduce.

I attempted to reliably produce this anomalous behavour, but I failed. I attempted on my openSUSE-13.1 Toshiba Z930 ultrabook (which has not been updated for a while) and it just worked with my Panasonic DMC-TZ30 camera using the USB interface and using the camera’s ‘pc’ mode (see image below).

I also tried on my main desktop which has since yesterday a brand new install of openSUSE-13.1 (with all recent updates) and the camera was not at first identified in a KDE popup (but it did show up in ‘lsusb’ and also in ‘fdisk -l’ ). That was using what the camera called ‘pc’ mode (see image below). I then tried again with ‘PictBridge(ptp)’ mode, and the camera worked with KDE/digiKam. I then obtained a KDE digiKam error saying the camera was not detected, but I noted the camera was detected and in the digiKAM drop down menu, where I selected the camera and it worked (in PTP mode).

From your description (and a bit of googling), I think ‘PC’ mode presents the memory as a USB storage device, so this works as expected. When you selected ‘PictBridge(PTP)’ mode, I assume the notifier did not get triggered. That is what is being reported in this thread. Some cameras only provide PTP connectivity.

You could compare the two modes with

solid-hardware listen

I suspect the PTP mode will not get reported (as it did with openSUSE 12.x). This is consistent with the notifier not annunciating PTP devices.

However, I can also use ‘camera:/’ in Dolphin, or digiKam without issue - it is specifically the regression with the notifier which would usually present options to view the photos via Dolphin, gwenview, or digikam.

Apologies for my lack of clarity.

I actually saw the opposite. PC mode did NOT initially work (and I tried a few times), but ‘PictrBridge(PTP)’ mode did work every time. Currently both modes work. I can’t explain why it started working other than a successful unmount of the camera on a separate PC being between the unsuccessful functionality and the successful functionality.

This is exceeding my current technical knowledge - and I would need to surf more to come up to ‘snuff’ (ie more knowledgeable) here.
.

Ok, but that was possibly due to mass storage device not being unmounted properly (as you allude to). The point is also that the KDE notifier (knotify4) automatically detected the camera connectivity.

‘PictrBridge(PTP)’ mode did work every time. Currently both modes work.

PTP communication works for me (and others in this thread too). What doesn’t work is the automatic detection. Not a big deal, but knotify4 does not act as it has done previously.

If you run the following in a terminal

solid-hardware listen

then plug in your camera (in PTP mode), you’ll note no system messages, (although dmesg and ‘udevadm monitor’ will detect the camera connection as expected).

If you repeat the above in ‘PC’ (mass storage mode), the connectivity event is reported by solid-hardware, and knotify4 works as expected too.

Anyway, I note an old KDE bug report describing similar

https://bugs.kde.org/show_bug.cgi?id=297734

I may re-open it.

I have just discovered the definitive cause of the issue with PTP device discovery in openSUSE 13.1. I have libghoto2 installed, and there is a utility that can be used to generate udev rules for cameras (’/usr/lib64/libgphoto2/print-camera-list’).

I had done following it (as root)

/usr/lib64/libgphoto2/print-camera-list udev-rules version 0.98 group video mode 0666 > /etc/udev/rules.d/90-gphoto.rules

However, these rules are insufficient to have the device handled by Solid. (PTP devices are ignored.) After a lot of reading online, and careful examination of the working udev rules, I finally stumbled across an earlier version of gphoto rules, which included the following environment variables being set


ENV{ID_USB_INTERFACES}=="", IMPORT{program}="usb_id --export %p"
ENV{ID_USB_INTERFACES}=="*:08*:*", GOTO="libgphoto2_usb_end"
ENV{ID_USB_INTERFACES}=="*:060101:*", ENV{ID_GPHOTO2}="1", ENV{GPHOTO2_DRIVER}="PTP", 
GOTO="libgphoto2_usb_end"

I have now manually edited 90-gphoto2.rules like so

# udev rules file for libgphoto2 devices (for udev 0.98 version)
# Created from this library:
#   libgphoto2      2.5.2.1        all camlibs, gcc, ltdl, EXIF
#   libgphoto2_port 0.10.0         gcc, ltdl, USB, serial lockdev locking
#
# this file is autogenerated, local changes will be LOST on upgrades
ACTION!="add", GOTO="libgphoto2_rules_end"
SUBSYSTEM!="usb|usb_device", GOTO="libgphoto2_usb_end"

ENV{ID_USB_INTERFACES}=="", IMPORT{program}="usb_id --export %p"
ENV{ID_USB_INTERFACES}=="*:08*:*", GOTO="libgphoto2_usb_end"
ENV{ID_USB_INTERFACES}=="*:060101:*", ENV{ID_GPHOTO2}="1", ENV{GPHOTO2_DRIVER}="PTP", 
GOTO="libgphoto2_usb_end"

ATTRS{idVendor}=="0979", ATTRS{idProduct}=="0227", MODE="0666", GROUP="video"
ATTRS{idVendor}=="0502", ATTRS{idProduct}=="33c3", ENV{ID_MEDIA_PLAYER}="1", MODE="0666", GROUP="video"
.
.
LABEL="libgphoto2_usb_end".
.
KERNEL=="sg[0-9]*", ATTRS{idVendor}=="0168", ATTRS{idProduct}=="3011", MODE="0666", GROUP="video"

LABEL="libgphoto2_rules_end"

After making those changes, and attaching my camera, the KDE notifier now pops up with ‘Camera’ and I can choose from 3 options to view/download the files - digiKam, Gwenview, or Dolphin. I’ll update the bug report shortly.

A minimal PTP camera rules file also works as expected


# udev rules file for libgphoto2 devices (for udev 0.98 version)
# Created from this library:
#   libgphoto2      2.5.2.1        all camlibs, gcc, ltdl, EXIF
#   libgphoto2_port 0.10.0         gcc, ltdl, USB, serial lockdev locking
#
# this file is autogenerated, local changes will be LOST on upgrades
ACTION!="add", GOTO="libgphoto2_rules_end"
SUBSYSTEM!="usb|usb_device", GOTO="libgphoto2_usb_end"

ENV{ID_USB_INTERFACES}=="", IMPORT{program}="usb_id --export %p"
ENV{ID_USB_INTERFACES}=="*:08*:*", GOTO="libgphoto2_usb_end"
ENV{ID_USB_INTERFACES}=="*:060101:*", ENV{ID_GPHOTO2}="1",
ENV{GPHOTO2_DRIVER}="PTP", 
GOTO="libgphoto2_usb_end"

#Camera model entries can go here to set mode and group permissions eg
#ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="3234", MODE="0666", GROUP="video"

LABEL="libgphoto2_usb_end"

LABEL="libgphoto2_rules_end"

For any others who come searching, with openSUSE 13.1 the correct rules can be generated using ‘version 175’

usr/lib64/libgphoto2/print-camera-list udev-rules version 175 group video mode 0666 > /lib/udev/rules.d/40-libgphoto2.rules

For reference, openSUSE 13.1 reports

udevadm --version
208

but 175 is the latest compatible version that libgphoto2-6 supports.

Previously (with openSUSE 12.2), running something like the following worked


/usr/lib64/libgphoto2/print-camera-list udev-rules version 0.98 group video mode 0666 > /etc/udev/rules.d/80-libgphoto2.rules

Is the rule number significant? You show 40-libgphoto2 & 80-libgphoto2
Right now I have 90-gphoto.rules

I figure it’s better to have all the extra rules in case I attach a different device in the future. I imagine that a short list will produce a better response from kNotify.

I lack basic understanding of this sort of thing so I hesitate to cut out the extra stuff.

jon

The rules are processed in numeric order, but in the context of the rules required for PTP devices, it’s arbitrary.

I figure it’s better to have all the extra rules in case I attach a different device in the future. I imagine that a short list will produce a better response from kNotify.

I lack basic understanding of this sort of thing so I hesitate to cut out the extra stuff.

jon

It doesn’t matter whether you use the minimal rules I outlined, or the libghoto2-generated one. The model-specific entries are not important IMHO.