Frederic Peters wrote:
I have found it difficult to debug since I do not know how to find out what
is being done by "udev_run_hotplugd usb" and what is being done by
"udev_run_devd usb", and why /etc/hotplug/usb/libgphoto2 is not
apparently being run and in any case is not setting the groups of the
created files to "camera" so that gthumb can access the camera.
/etc/hotplug/usb/libgphoto2 is not run when udev is used; instead
there are rules in /etc/udev/libgphoto2.rules to set appropriate
ownerships.
What is your kernel version ?
2.6.16-2-686 #2 Mon May 22 23:10:59 UTC 2006 i686 GNU/Linux
Do you have a /etc/udev/rules.d/025_libgphoto2.rules symlink ?
Yes:
lrwxrwxrwx 1 root root 19 2005-11-06 13:18 025_libgphoto2.rules ->
../libgphoto2.rules
which points to:
-rw-r--r-- 1 root root 48307 2006-05-30 14:28 libgphoto2.rules
Can you suggest how to debug the failure of udev to cause the running of
the libgphoto2 script to change the permissions of the /dev/bus/usb
and/or /proc/bus/usb file(s) needed by gthumb?
The udev guys are silent[1], I'm shooting in the dark.
You can use udevmonitor before plugging your camera, it will output
several /devices/ lines, which you can pass to udevinfo, like this:
udevinfo -a -p /devices/pci0000:00/0000:00:1d.7/usb4/4-1/4-1:1.0
udevinfo -a -p /devices/pci0000:00/0000:00:0a.1/usb2/2-1/2-1:1.0
udevinfo starts with the device the node belongs to and then walks up the
device chain, to print for every device found, all possibly useful
attributes
in the udev key format.
Only attributes within one device section may be used together in one rule,
to match the device for which the node will be created.
looking at device '/devices/pci0000:00/0000:00:0a.1/usb2/2-1/2-1:1.0':
KERNEL=="2-1:1.0"
SUBSYSTEM=="usb"
^^^^^^^^^^^^^^^^^^^^
SYSFS{modalias}=="usb:v04A9p3052d0001dcFFdscFFdpFFicFFiscFFipFF"
SYSFS{bInterfaceProtocol}=="ff"
SYSFS{bInterfaceSubClass}=="ff"
SYSFS{bInterfaceClass}=="ff"
SYSFS{bNumEndpoints}=="03"
SYSFS{bAlternateSetting}==" 0"
SYSFS{bInterfaceNumber}=="00"
looking at device '/devices/pci0000:00/0000:00:0a.1/usb2/2-1':
ID=="2-1"
BUS=="usb"
DRIVER=="usb"
SYSFS{configuration}==""
SYSFS{product}=="DIGITAL IXUS v"
SYSFS{manufacturer}=="Canon Inc."
SYSFS{maxchild}=="0"
SYSFS{version}==" 1.10"
SYSFS{devnum}=="3"
SYSFS{speed}=="12"
SYSFS{bMaxPacketSize0}=="32"
SYSFS{bNumConfigurations}=="1"
SYSFS{bDeviceProtocol}=="ff"
SYSFS{bDeviceSubClass}=="ff"
SYSFS{bDeviceClass}=="ff"
SYSFS{bcdDevice}=="0001"
SYSFS{idProduct}=="3052"
SYSFS{idVendor}=="04a9"
SYSFS{bMaxPower}=="100mA"
SYSFS{bmAttributes}=="c0"
SYSFS{bConfigurationValue}=="1"
SYSFS{bNumInterfaces}==" 1"
looking at device '/devices/pci0000:00/0000:00:0a.1/usb2':
ID=="usb2"
BUS=="usb"
DRIVER=="usb"
SYSFS{configuration}==""
SYSFS{serial}=="0000:00:0a.1"
SYSFS{product}=="OHCI Host Controller"
SYSFS{manufacturer}=="Linux 2.6.16-2-686 ohci_hcd"
SYSFS{maxchild}=="2"
SYSFS{version}==" 1.10"
SYSFS{devnum}=="1"
SYSFS{speed}=="12"
SYSFS{bMaxPacketSize0}=="64"
SYSFS{bNumConfigurations}=="1"
SYSFS{bDeviceProtocol}=="00"
SYSFS{bDeviceSubClass}=="00"
SYSFS{bDeviceClass}=="09"
SYSFS{bcdDevice}=="0206"
SYSFS{idProduct}=="0000"
SYSFS{idVendor}=="0000"
SYSFS{bMaxPower}==" 0mA"
SYSFS{bmAttributes}=="c0"
SYSFS{bConfigurationValue}=="1"
SYSFS{bNumInterfaces}==" 1"
looking at device '/devices/pci0000:00/0000:00:0a.1':
ID=="0000:00:0a.1"
BUS=="pci"
DRIVER=="ohci_hcd"
SYSFS{modalias}=="pci:v00001033d00000035sv00003083sd00000035bc0Csc03i10"
SYSFS{local_cpus}=="1"
SYSFS{irq}=="10"
SYSFS{class}=="0x0c0310"
SYSFS{subsystem_device}=="0x0035"
SYSFS{subsystem_vendor}=="0x3083"
SYSFS{device}=="0x0035"
SYSFS{vendor}=="0x1033"
looking at device '/devices/pci0000:00':
ID=="pci0000:00"
BUS==""
DRIVER==""
By changing the second uncommented line /etc/udev/libgphoto2.rules to:
SUBSYSTEM!="usb", GOTO="libgphoto2_rules_end"
and turning my camera on again I had:
/dev/bus/usb/002:
total 0
drwxr-xr-x 2 root root 80 2006-05-30 19:49 .
drwxr-xr-x 6 root root 120 2006-05-31 05:09 ..
crw-rw-r-- 1 root root 189, 128 2006-05-31 05:09 001
crw-rw---- 1 root camera 189, 129 2006-05-30 19:49 002
Success! THANKS!!
gthumb then accessed the camera fine.
Could you please consider adding the debugging instructions you gave me
in some *up-to-date* explanation to be included with libgphoto2-2?
It will output things which will look correct and you'll then be in
the dark. Welcome.
Anyway there were two changes in 2.1.6-12, you could try to undo
them, one by one, in /etc/udev/libgphoto2-2.rules,
1. SUBSYSTEM!="usb_device", GOTO="libgphoto2_rules_end"
replace it with BUS!="usb", GOTO="libgphoto2_rules_end"
Yes, that would have worked.
(and remove the line if that still fails)
2. prefix each SYSFS{idVendor}=="0553" by SUBSYSTEM=="usb_device", ->
SYSFS{idVendor}=="0553", SYSFS{idProduct}=="0202", MODE="0660",
GROUP="camera"
to
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0553", SYSFS{idProduct...
I don't think that would have worked.
You could also test if compatibility hotplug script is being run, add
something like `echo "hello world" > /tmp/hello' to the top of
/etc/hotplug/usb/libgphoto2; while you are at it you could also echo
$ACTION, $DEVICE and $DEVNAME.
I had tried that and received nothing because /etc/udev/libgphoto2.rules
was skipping to the end, and in any case /etc/hotplug/usb/libgphoto2
wasn't being run.
Sorry I can't help you more.
Frederic
[1] http://marc.theaimsgroup.com/?l=linux-hotplug-devel&m=114876475106203&w=2
Thanks again for your help.
Regards,
Arthur.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]