Bug 336523 - PTP camera is shown twice in device notifier plasmoid
Summary: PTP camera is shown twice in device notifier plasmoid
Status: RESOLVED FIXED
Alias: None
Product: frameworks-solid
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Lukáš Tinkl
URL:
Keywords:
: 339334 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-20 21:21 UTC by Kyrylo Bohdanenko
Modified: 2015-03-13 13:37 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
lsusb -v output (camera part) (2.63 KB, text/plain)
2014-06-25 17:54 UTC, Kyrylo Bohdanenko
Details
lsb -v for Android phone connected as a camera (2.61 KB, text/plain)
2014-11-28 21:34 UTC, skierpage
Details
the complete fix (1006 bytes, patch)
2015-02-05 20:42 UTC, hamelg
Details
lsusb -v when testing kf5 (5.7.0) (both PTP camera and MTP android device) (53.84 KB, text/plain)
2015-03-03 22:53 UTC, Kyrylo Bohdanenko
Details
screenshot of plasmoid when MTP device (phone) is connected (47.79 KB, image/png)
2015-03-03 22:56 UTC, Kyrylo Bohdanenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kyrylo Bohdanenko 2014-06-20 21:21:37 UTC
I've got a Nikon D5300 DSLR camera and when I plug it into my laptop device notifier lists it twice. 

P.S. But dolphin shows nothing in "Devices" and I must explicitly type 'camera:/' to open photos on my camera. And also nothing happens when I press "mount" button. And when I press "Copy using DigiKam" it says: 

Camera
/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/usb3/3-2/3-2:1.0 is not supported

Reproducible: Always

Steps to Reproduce:
1. Plug in PTP camera (haven't tried with others than Nikon D5300)

Actual Results:  
"Device Notifier" plasmoid lists the camera twice / Dolphin does not show it in "Devices section" / Photo Import does not work

Expected Results:  
"Device Notifier" plasmoid should list the camera only once / Dolphin should show it in "Devices" section / Photo Import should work
Comment 1 Marcus Meissner 2014-06-23 06:02:02 UTC
this is probably not a kio_kamera issue, but solid / digikam

however, for libgphoto2, can you post the USB ids of the D5300

run:
lsusb
when attached
Comment 2 Kyrylo Bohdanenko 2014-06-25 17:54:37 UTC
Created attachment 87399 [details]
lsusb -v output (camera part)

Here's device ID string:

Bus 003 Device 002: ID 04b0:0431 Nikon Corp. 

See lsusb -v output in attachment
Comment 3 Marcus Meissner 2014-07-05 08:53:52 UTC
Thanks, I have it in libgphoto2!

reassign to solid driver framework for detection issues
Comment 4 Philippe Cloutier 2014-08-02 20:48:03 UTC
I am getting this with my mainstream Canon PowerShot SX200 iS, which has been supported for years.

I am getting this on the same Debian testing install as the one I used 2 months ago, when I didn't get this problem with the same hardware. Meanwhile, Solid was upgraded 4.13.1 to 4.13.3. I can't easily test the previous version.

I use Linux 3.14.12. I migrated from sysvinit to systemd since I last saw things working correctly.

After noticing this bug, I realized that Digikam would throw an error when opening the first camera item shown (but not the second), as reported in bug 335870. Either these bugs appeared nearly at the same time, or they are related.
Comment 5 skierpage 2014-11-28 21:34:53 UTC
Created attachment 89762 [details]
lsb -v for Android phone connected as a camera
Comment 6 skierpage 2014-11-28 21:36:30 UTC
Happens to me too, two "Camera" boxes in Device Notifier window under "Available Devices Camera." I'm plugging a 2013 Moto X running Android 4.4.4 "Connected as a camera" into a desktop PC running Kubuntu 14.10 KDE Platform Version 4.14.1. lsb -v output attached

In the Device Notifier window, clicking the connector icon with tooltip "Click to mount this device" does nothing, the device is not mounted (maybe this is a separate bug with Solid and the PTP protocol). The action "Open with File Manager" in both opens camera:/ in Dolphin, and both work to browse camera:/USB%2520PTP%2520Class%2520Camera@usb:001,009/
Comment 7 hamelg 2014-12-28 19:31:05 UTC
It seems it will be fixed in the next SC
https://git.reviewboard.kde.org/r/119834/
Comment 8 hamelg 2015-02-05 20:41:02 UTC
I have checked 4.14.4.
The fix is incomplete ! It only fixes camera, not media player devices.
Here is the complete fix in the attachment.
Comment 9 hamelg 2015-02-05 20:42:32 UTC
Created attachment 90931 [details]
the complete fix
Comment 10 hamelg 2015-03-03 20:33:01 UTC
Please, could you port this fix in the next KDE Applications ?
Comment 11 Kyrylo Bohdanenko 2015-03-03 22:53:42 UTC
Created attachment 91402 [details]
lsusb -v when testing kf5 (5.7.0) (both PTP camera and MTP android device)

Hi,

I have tried on my Kubuntu 15.04 beta1 and actually the results are strange.
* for Nikon DSLR (PTP) -- it is not listed in the plasmoid
* for my android phone (Nexus 4, actually MTP) -- it is still listed twice (and the second entry has no name)

How I tested: first I plugged in DSLR, than plugged it out and connected my phone. Afterwards I connected DSLR and made lsusb.txt (using sudo lsusb -v)
Comment 12 Kyrylo Bohdanenko 2015-03-03 22:56:00 UTC
Created attachment 91403 [details]
screenshot of plasmoid when MTP device (phone) is connected
Comment 13 Jonathan Riddell 2015-03-11 19:11:04 UTC
This bug is reported on libsolid which is the kdelibs4 version of the solid library.  It is now in maintenance mode.  If you think it should still be fixed in the KDE Frameworks 5 version of solid please move it to or report a bug on frameworks-solid.
Comment 14 Lukáš Tinkl 2015-03-12 11:29:12 UTC
*** Bug 339334 has been marked as a duplicate of this bug. ***
Comment 15 Lukáš Tinkl 2015-03-13 13:37:01 UTC
Git commit a100520e3891368b370b8925f44e5fb71eaa23a3 by Lukáš Tinkl.
Committed on 13/03/2015 at 13:36.
Pushed by lukas into branch 'master'.

complete check for multiple MTP/PTP devices

M  +1    -1    src/solid/devices/backends/udev/udevmanager.cpp

http://commits.kde.org/solid/a100520e3891368b370b8925f44e5fb71eaa23a3