FS#39172 - [libgphoto2] hardware database probably not populated enough
Attached to Project:
Arch Linux
Opened by Gianpiero (4javier) - Wednesday, 05 March 2014, 00:38 GMT
Last edited by Andreas Radke (AndyRTR) - Thursday, 13 November 2014, 07:39 GMT
Opened by Gianpiero (4javier) - Wednesday, 05 March 2014, 00:38 GMT
Last edited by Andreas Radke (AndyRTR) - Thursday, 13 November 2014, 07:39 GMT
|
Details
Description: If I connect my camera nor thunar nor pcmanfm
shows it in their side pane, but notify-osd pop-up with a
"camera connected" message. Another user says that Nautilus
behave the same
wayhttps://bbs.archlinux.org/viewtopic.php?id=177864
Problem is solved adding a rule similar to the one proposed on the wiki by /usr/lib/libgphoto2/print-camera-list udev-rules version 175 > /etc/udev/rules.d/40-gphoto.rules Note that I stripped the "camera group" part, because it's actually not needed. libgphoto2 ships the /usr/lib/udev/hwdb.d/20-gphoto.hwdb file and run udevadm hwdb --update on post_install, but this seems not to be sufficient. I tried to watch what udev recognize with and without that rules file by udevadm monitor -p. I attach a sort of diff file where I highlighted by some asteriscs the 4 lines which are added to udev properties by the rules file Additional info: * package version(s) 2.5.3.1-2 * config and/or log files etc. http://pastebin.com/3rPBW02v Steps to reproduce: connect a camera, observe that thunar doesn't show an icon for it in its side pane. |
This task depends upon
when used to generate an udev rules file, print-camera-list add also this line
ENV{ID_USB_INTERFACES}=="*:060101:*", ENV{ID_GPHOTO2}="1", ENV{GPHOTO2_DRIVER}="PTP", GOTO="libgphoto2_usb_end"
that, as far as I understand, set those two variables, needed by file-managers, for every device connected by an usb interface with ID *:060101:*, the PTP usb class.
when print-camera-list is launched to generate an hwdb file, it totally ignores that ID, because the matches inside .hwdb files are made against modalias, and this ID is not.
My camera is a Fuji HS10 which is a PTP camera.
This means that both a hwdb and a udev rules file need to be generated.
See also:
https://bugzilla.gnome.org/show_bug.cgi?id=728205
http://sourceforge.net/p/gphoto/bugs/974/
The package needs to generate the rules file in *addition* to the hwdb because the generic rule is only in the rules file:
$ /usr/lib/libgphoto2/print-camera-list udev-rules version 201
NOTE: You need to generate a hwdb too, this file just contains the scsi generic device entries. <--- note!
# udev rules file for libgphoto2 devices (for udev 201 version)
# Created from this library:
# libgphoto2 2.5.5.1 all camlibs, gcc, ltdl, EXIF
# libgphoto2_port 0.10.0 gcc, ltdl, no USB, serial without locking
#
# this file is autogenerated, local changes will be LOST on upgrades
ACTION!="add", GOTO="libgphoto2_rules_end"
SUBSYSTEM!="usb", GOTO="libgphoto2_usb_end"
ENV{ID_USB_INTERFACES}=="", IMPORT{builtin}="usb_id"
ENV{ID_USB_INTERFACES}=="*:060101:*", ENV{ID_GPHOTO2}="1", ENV{GPHOTO2_DRIVER}="PTP" <-- this is the generic rule
LABEL="libgphoto2_usb_end"
> $ /usr/lib/libgphoto2/print-camera-list hwdb > /dev/null
> NOTE: You should generate a udev rules file with udev-version 201
> or later to support cameras that use SCSI tunneling support, like
> various picture frames, Olympus remote control support.
(and generic ptp devices)