LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slack12, libgphoto2-2.4.0, Canon Powershot A95 (https://www.linuxquestions.org/questions/slackware-14/slack12-libgphoto2-2-4-0-canon-powershot-a95-591634/)

Franklin 10-14-2007 12:55 AM

Slack12, libgphoto2-2.4.0, Canon Powershot A95
 
Hi All,

I recently built Digikam 0.9.2, gphoto2-2.4.0, and libgphoto2-2.4.0 using slackbuilds from slackbuilds.org. Everthing works fine, but I can only access the camera as root. I have all users in the plugdev group but still no joy.

This is a bit frustrating as I had this working over several earlier versions of slack and libgphoto2 and had copied a functional camera.rules which I had been using for new installs. Apparently the syntax has changed and no matter what I seem to try, a normal user cannot access the camera.

Thanks in advance.

duryodhan 10-14-2007 07:30 AM

when you connect the camera... does HAL allow you to auto mount it as a normal user >?

Franklin 10-14-2007 07:57 AM

Thanks for the reply.

I use KDE, so when the camera is connected as a normal user I get a pop-up that tells me a camera was detected and asks what I want to do with it. When I open Digikam (not given as a choice by the media pop-up by-the-way), the the camera can be added to the camera list in Digikam using the auto-scan procedure, and is detected as the A95 in PTP mode (previous versions of libgphoto2 also saw normal mode, but not 2.4.0) When I try to access the camera however, it fails. I would like to add, that any time I have had a permissions problem with a camera in the past, I was NOT able to add the camera to the camera list in digikam, even if auto-scan detected it.

As root, the camera is detected by KDE as well, but when the Media pop-up tells me a camera has been detected, opening the camera with Digikam is listed as an option, whereas a normal user is not given this as a choice.

Just a reminder that this camera cannot be loaded as a usb mass storage device. You must use libgphoto2.

duryodhan 10-14-2007 08:38 AM

Ohh, I am sorry , I thought it was mounted as a USB Mass storage device (most cameras are).

Quote:

As root, the camera is detected by KDE as well, but when the Media pop-up tells me a camera has been detected, opening the camera with Digikam is listed as an option, whereas a normal user is not given this as a choice.
I think this implies the problem is in digikam. I think your normal user's KDE isn't properly configured to use digikam (rather it doesn't know that digikam is there). You might wanna play around in the KDE control centre , you could probably fix it somewhere there.


But as I said, I never used libgphoto so wouldn't know much.

Franklin 10-14-2007 09:24 AM

Quote:

Originally Posted by duryodhan (Post 2923715)
Ohh, I am sorry , I thought it was mounted as a USB Mass storage device (most cameras are).



I think this implies the problem is in digikam. I think your normal user's KDE isn't properly configured to use digikam (rather it doesn't know that digikam is there). You might wanna play around in the KDE control centre , you could probably fix it somewhere there.


But as I said, I never used libgphoto so wouldn't know much.

No, digikam works fine. This is a usb permissions problem involving udev rules and libgphoto2 (maybe hal too). Just in case, I also tried gtkam and this application also failed to initialize the camera as a normal user despite correctly identifying the camera via auto-scan.

I'm currently re-reading the ghoto2 documents regarding usb permissions. The author indicates that a hal-fdi file needs to be edited or created. Maybe this is involved as hal also appears to be a new wrinkle here. I'm not really confident though as the examples are from FC6 and the author states from the top he's clueless regarding hal so he just copied and pasted the examples to his howto.

I'm also wondering if I need to something different because this is now a PTP camera with no option for normal mode any longer.

Sigh - too many variables.

Anyone successfully beat this combo into submission?

Slackware-12.0, udev-111, hal-0.9.5.1, libghoto-2.4.0, and gphoto-2.4.0?

Fluxx 10-14-2007 09:44 AM

I have here Slackware 12.0 running, gphoto2-2.4.0, libgphoto2-2.4.0, gtkam-0.1.14 and libexif-gtk-0.3.5 (hal and udev in your mentioned versions). I used the Slackbuilds from slackbuilds.org.

I have a Canon PowerShot A 60.

I added a rule to $HOME/.ivman/IvmanConfigActions.xml to open gtkam at the moment the camera is plugged in (I use fluxbox as windowmanager).

This works without any problems. I can copy, remove, add folders, pictures, movies from and onto the camera.

My user is in group "plugdev,audio,cdrom,video,wheel".

Fluxx.

Alien Bob 10-14-2007 10:29 AM

Hm, I have a "Start digiKam" in the KDE popup window that appears when I plug in a camera. I am using my own set of packages for digiKam: http://www.slackware.com/~alien/slackbuilds/digikam/ (it's dependencies can be found there as well).

Eric

Franklin 10-14-2007 12:10 PM

I don't believe this is a digiKam issue per se.

After reading the usb permissions howto from gphoto2 and looking at the referenced files on my install, I am beginning to suspect that the slackbuild script I used may not have worked as advertised.

I think I will look for another libgphoto2 build script to try and see if that helps at all.

My group ownership does not seem to be an issue and I'll spare you all the output of ldd on both digiKam and gtkam. All dependencies are met.

Steve

Franklin 10-14-2007 12:59 PM

Well, I went the easy route and installed Alien Bob's packages for digiKam and libgphoto2 and unfortunately I am still unable to access the camera as a normal user. Root works great as allways.

So it seems I'm just not configuring udev properly.

I guess I'll keep googling for an answer.

Thanks.

fcaraballo 10-14-2007 09:54 PM

Could you post your rules file? it might help us figure out your problem. Also, the libgphoto2 script from SBo was modified from the original to create a rules file for you (iirc), so that might have been your problem when using that script.

FYI, gphoto2 has not been a dependency of digiKam for quite some time. There is no reason to install it unless you plan on accessing your camera from the CLI.

MagicMan

arubin 10-15-2007 02:21 AM

This appears to be the udev rules problem which I have had

I found that adding the line

SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="3058", GROUP="users"
to 10-udev.rules got it working for users as well as root.

Looking back over my old postings here what I did to get the SYSFS values was /usr/lib/libgphoto2/print-camera-list udev-rules > camera.rules
By examining the usbcam.usermap file I was able to identify the camera in camera.rules.

rworkman 10-15-2007 08:33 AM

The udev rules generated by libgphoto2 *should* work properly. If they don't, then my first guess is that it's a problem with the rule generator itself.

Alternatively, if you're using a newer kernel than what Slackware 12 ships, then it's a good possibility that changes to the kernel's sysfs structure might have some effect, but I'm honestly not sure. I do know that my wife's camera (in PTP mode) worked just fine in a stock Slackware 12 installation with the libgphoto2 from SlackBuilds.org when I approved the script.

redbuds 10-15-2007 10:58 AM

Just a comment about the digikam slackbuild at slackbuild.org and all the dependencies. I used them and my camera woks as normal user.

fcaraballo 10-15-2007 12:41 PM

Quote:

Originally Posted by rworkman (Post 2924738)
The udev rules generated by libgphoto2 *should* work properly.

I got the impression that he was still using his old camera.rules file when he tried the new libgphoto2 from SBo and that might have been the source of the problem, conflicting rules files. He removed it though and installed using Eric's script and it still doesn't work. Its likely that the rules file he's currently using still needs minor tweaking but we wont know that until we see it.

Quote:

Originally Posted by redbuds
I used them and my camera woks as normal user.

Always glad to hear that kind of feedback :D

MagicMan

Franklin 10-15-2007 06:43 PM

Quote:

Originally Posted by rworkman (Post 2924738)
The udev rules generated by libgphoto2 *should* work properly. If they don't, then my first guess is that it's a problem with the rule generator itself.

Alternatively, if you're using a newer kernel than what Slackware 12 ships, then it's a good possibility that changes to the kernel's sysfs structure might have some effect, but I'm honestly not sure. I do know that my wife's camera (in PTP mode) worked just fine in a stock Slackware 12 installation with the libgphoto2 from SlackBuilds.org when I approved the script.

Hi Everyone and thanks for the replies. I had this thing called work today, but I wanted to reply and let you know I was still listening.

I am running a different (from slackware stock) kernel on both my computers - 2.6.22.5. Each computer has a different config tuned to the hardware. This may indeed be involved. One variable at a time please. ;)

I will post my 50-udev.rules if you think it might help. This is from my desktop and is more or less unchanged. I had been editing files on the laptop more.

Before I ran out of gas last night I was going to try to create a new 90-libgphoto2.rules file using /usr/bin/print-camera-list. Why not ;)

My 50-udev.rules file:

Code:

# /etc/udev/udev.rules:  device naming rules for udev
#
# There are a number of modifiers that are allowed to be used in some of the
# fields.  See the udev man page for a full description of them.
#
# This rules file is a mix of 10.2 Slackware udev.rules file and some
# rules from the udev examples.
#

# sysfs is populated after the event is sent
ACTION=="add", KERNEL=="[0-9]*:[0-9]*", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"

# all block devices
SUBSYSTEM=="block", GROUP="disk"

# permissions for IDE floppy devices
SUBSYSTEMS=="ide", KERNEL=="*[!0-9]", ENV{DRIVER}=="ide-floppy*", NAME="%k", GROUP="floppy", MODE="0660"

# permissions for SCSI sg/tape devices
SUBSYSTEMS=="scsi", KERNEL=="s[gt][0-9]*", ATTRS{type}=="5", NAME="%k", GROUP="cdrom", MODE="0660"

# load modules to scsi disks, if they aren't in kernel
SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst"
SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{type}=="1", RUN+="/sbin/modprobe st"
SUBSYSTEM=="scsi_device", ACTION=="add", ATTRS{type}=="[45]", RUN+="/sbin/modprobe sr_mod"
SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"

# disk devices
KERNEL=="sd*",                NAME="%k", GROUP="disk"
KERNEL=="ataraid*",        NAME="%k", GROUP="disk"

# put all removable devices in group "plugdev"
KERNEL=="hd*[!0-9]", ATTR{removable}=="1", GROUP="plugdev"
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GROUP="plugdev"
KERNEL=="sd*[!0-9]", ATTR{removable}=="1", GROUP="plugdev"
KERNEL=="sd*[0-9]", ATTRS{removable}=="1", GROUP="plugdev"

# persistent storage links: /dev/{disk,tape}/{by-id,by-uuid,by-label,by-path,by-name}

ACTION!="add", GOTO="persistent_storage_end"

KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst"

# type 8 devices are "Medium Changers"
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"

SUBSYSTEM!="block", GOTO="persistent_storage_end"

# skip rules for inappropriate block devices
KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="persistent_storage_end"

# never access removable ide devices, the drivers are causing event loops on open()
KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", GOTO="persistent_storage_end"
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_storage_end"

# for partitions import parent information
KERNEL=="*[0-9]", IMPORT{parent}="ID_*"

# by-id (hardware serial number)
KERNEL=="hd*[!0-9]", IMPORT{program}="ata_id --export $tempnode"
KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
KERNEL=="hd*[0-9]", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"

KERNEL=="sd*[!0-9]|sr*|st*", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="usb_id -x"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="sd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"

# libata compat (links like hd*)
KERNEL=="sd*[!0-9]|sr*", ENV{ID_VENDOR}=="ATA", PROGRAM="ata_id $tempnode", ENV{ID_ATA_COMPAT}="$result"
KERNEL=="sd*[!0-9]|sr*", ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}"
KERNEL=="sd*[0-9]", ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}-part%n"

KERNEL=="mmcblk[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}"
KERNEL=="mmcblk[0-9]p[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n"

# by-path (shortest physical path)
KERNEL=="*[!0-9]|sr*", IMPORT{program}="path_id %p", SYMLINK+="disk/by-path/$env{ID_PATH}"
KERNEL=="st*", IMPORT{program}="path_id %p", SYMLINK+="tape/by-path/$env{ID_PATH}"
KERNEL=="sr*|st*", GOTO="persistent_storage_end"
KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"

# by-label/by-uuid (filesystem properties)
KERNEL=="*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end"
IMPORT{program}="vol_id --export $tempnode"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_SAFE}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_SAFE}"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"

# BIOS Enhanced Disk Device
KERNEL=="*[!0-9]", IMPORT{program}="edd_id --export $tempnode"
KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"

LABEL="persistent_storage_end"

# import optical drive properties and set CD partitions
KERNEL=="scd[a-z]|sr[0-9]*|hd[a-z]|pcd[0-9]*", IMPORT{program}="cdrom_id --export $tempnode"
ENV{ID_CDROM}=="?*", NAME="%k", GROUP="cdrom", MODE="0660", RUN+="cdrom-symlinks.sh %k"

# ALSA devices
SUBSYSTEM=="sound",                GROUP="audio"
SUBSYSTEM=="snd",                GROUP="audio"
KERNEL=="controlC[0-9]*",        NAME="snd/%k", MODE="0666"
KERNEL=="hw[CD0-9]*",                NAME="snd/%k", MODE="0662"
KERNEL=="pcm[CD0-9]*c",                NAME="snd/%k", MODE="0662"
KERNEL=="pcm[CD0-9]*p",                NAME="snd/%k", MODE="0666"
KERNEL=="midiC[D0-9]*",                NAME="snd/%k", MODE="0666"
KERNEL=="timer",                NAME="snd/%k", MODE="0666"
KERNEL=="seq",                        NAME="snd/%k", MODE="0666"

# IEEE1394 raw devices (often used for video)
KERNEL=="raw1394", NAME="%k", GROUP="video"
KERNEL=="dv1394*", NAME="dv1394/%n", GROUP="video"
KERNEL=="video1394*", NAME="video1394/%n", GROUP="video"

# capi devices
KERNEL=="capi",                NAME="capi20", SYMLINK+="isdn/capi20"
KERNEL=="capi*",        NAME="capi/%n"

# cpu devices
KERNEL=="cpu[0-9]*",        NAME="cpu/%n/cpuid"
KERNEL=="msr[0-9]*",        NAME="cpu/%n/msr"
KERNEL=="microcode",        NAME="cpu/microcode"

# floppy devices
KERNEL=="fd[0-9]*", NAME="floppy/%n", SYMLINK+="%k", GROUP="floppy", PROGRAM="/lib/udev/floppy-extra-devs.sh %k %b %n"

# i2c devices
KERNEL=="i2c-[0-9]*",        NAME="i2c/%n", SYMLINK+="%k"

# persistent input links: /dev/input/{by-id,by-path}

ACTION!="add", GOTO="persistent_input_end"
SUBSYSTEM!="input", GOTO="persistent_input_end"
KERNEL=="input[0-9]*", GOTO="persistent_input_end"

# usb devices
SUBSYSTEMS=="usb", IMPORT{program}="usb_id -x"
SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", ENV{ID_CLASS}="kbd"
SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="02", ENV{ID_CLASS}="mouse"

# other devices
DRIVERS=="pcspkr", ENV{ID_CLASS}="spkr"
DRIVERS=="atkbd", ENV{ID_CLASS}="kbd"
DRIVERS=="psmouse", ENV{ID_CLASS}="mouse"
ATTRS{name}=="*dvb*|*DVB*|* IR *", ENV{ID_CLASS}="ir"
ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", ATTRS{modalias}!="input:*-*k*14A,*r*", ENV{ID_CLASS}="joystick"

ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="", ENV{ID_SERIAL}="noserial"

# by-id
KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}"
KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}"

# by-path
IMPORT{program}="path_id %p"
ENV{ID_PATH}=="?*", KERNEL=="mouse*|js*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}"
ENV{ID_PATH}=="?*", KERNEL=="event*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{ID_CLASS}"

LABEL="persistent_input_end"

# input devices
KERNEL=="mice",                NAME="input/%k", MODE="0644", SYMLINK+="mouse"
KERNEL=="mouse*",        NAME="input/%k", MODE="0644"
KERNEL=="event*",        NAME="input/%k", MODE="0640"
KERNEL=="js*",                NAME="input/%k", MODE="664"
KERNEL=="ts*",                NAME="input/%k", MODE="0600"
KERNEL=="input[0-9]*", ACTION=="add", ENV{ABS}=="[1-9]*", RUN+="/sbin/modprobe joydev"

# loop devices
KERNEL=="loop[0-9]*",        NAME="loop/%n", SYMLINK+="%k", GROUP="disk"

# md block devices
KERNEL=="md[0-9]*",        NAME="md/%n", SYMLINK+="%k", GROUP="disk"

# aoe char devices,
SUBSYSTEM=="aoe", KERNEL=="discover",        NAME="etherd/%k", GROUP="disk", MODE="0220"
SUBSYSTEM=="aoe", KERNEL=="err",        NAME="etherd/%k", GROUP="disk", MODE="0440"
SUBSYSTEM=="aoe", KERNEL=="interfaces",        NAME="etherd/%k", GROUP="disk", MODE="0220"

# netlink devices
KERNEL=="route",        NAME="netlink/%k"
KERNEL=="skip",                NAME="netlink/%k"
KERNEL=="usersock",        NAME="netlink/%k"
KERNEL=="fwmonitor",        NAME="netlink/%k"
KERNEL=="tcpdiag",        NAME="netlink/%k"
KERNEL=="nflog",        NAME="netlink/%k"
KERNEL=="xfrm",                NAME="netlink/%k"
KERNEL=="arpd",                NAME="netlink/%k"
KERNEL=="route6",        NAME="netlink/%k"
KERNEL=="ip6_fw",        NAME="netlink/%k"
KERNEL=="dnrtmsg",        NAME="netlink/%k"
KERNEL=="tap*",                NAME="netlink/%k"

# ramdisk devices
KERNEL=="ram[0-9]*",        NAME="rd/%n", SYMLINK+="%k"

# raw devices
KERNEL=="raw[0-9]*",        NAME="raw/%k", GROUP="disk"
KERNEL=="ram*",                NAME="%k", GROUP="disk"

# sound devices
KERNEL=="adsp",                        NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="adsp[0-9]*",                NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="audio",                NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="audio[0-9]*",                NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="dsp",                        NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="dsp[0-9]*",                NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="mixer",                NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="mixer[0-9]*",                NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="sequencer",                NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"
KERNEL=="sequencer[0-9]*",        NAME="sound/%k", SYMLINK+="%k", GROUP="audio", MODE="0662"

# tty devices
KERNEL=="console",        NAME="%k", GROUP="tty", MODE="0600"
KERNEL=="tty",                NAME="%k", GROUP="tty", MODE="0666"
KERNEL=="tty[0-9]*",        NAME="vc/%n",  SYMLINK+="%k", GROUP="tty"

# serial or dialout devices
KERNEL=="ttyS[0-9]*",        NAME="tts/%n", SYMLINK+="%k", GROUP="uucp", MODE="0660"
KERNEL=="ttyUSB[0-9]*",        NAME="tts/USB%n", SYMLINK+="%k", GROUP="uucp", MODE="0660"
KERNEL=="ippp0",        NAME="%k", GROUP="uucp"
KERNEL=="isdn*",        NAME="%k", GROUP="uucp"
KERNEL=="dcbri*",        NAME="%k", GROUP="uucp"
KERNEL=="ircomm*",        NAME="%k", GROUP="uucp"

# pty devices
KERNEL=="ptmx",                        NAME="%k", GROUP="tty", MODE="0666"
KERNEL=="pty[p-za-e][0-9a-f]*",        NAME="pty/m%m", SYMLINK+="%k", GROUP="tty"
KERNEL=="tty[p-za-e][0-9a-f]*",        NAME="pty/s%m", SYMLINK+="%k", GROUP="tty"

# vc devices
KERNEL=="vcs",                NAME="vcc/0",        SYMLINK+="%k", GROUP="tty"
KERNEL=="vcs[0-9]*",        NAME="vcc/%n",        SYMLINK+="%k", GROUP="tty"
KERNEL=="vcsa",                NAME="vcc/a0",        SYMLINK+="%k", GROUP="tty"
KERNEL=="vcsa[0-9]*",        NAME="vcc/a%n",        SYMLINK+="%k", GROUP="tty"

# memory devices
KERNEL=="random",        NAME="%k", MODE="0664"
KERNEL=="urandom",        NAME="%k", MODE="0664"
KERNEL=="mem",                NAME="%k", GROUP="kmem", MODE="0640"
KERNEL=="kmem",                NAME="%k", GROUP="kmem", MODE="0640"
KERNEL=="port",                NAME="%k", GROUP="kmem", MODE="0640"
KERNEL=="nvram",        NAME="%k", GROUP="kmem", MODE="600"
KERNEL=="full",                NAME="%k", MODE="0666"
KERNEL=="null",                NAME="%k", MODE="0666"
KERNEL=="zero",                NAME="%k", MODE="0666"

# misc devices
KERNEL=="agpgart",        NAME="misc/%k", SYMLINK+="%k"
KERNEL=="psaux",        NAME="misc/%k", SYMLINK+="%k"
KERNEL=="rtc",                NAME="misc/%k", SYMLINK+="%k", MODE="0664"
KERNEL=="uinput",        NAME="misc/%k", SYMLINK+="%k"
KERNEL=="inotify",        NAME="misc/%k", SYMLINK+="%k", MODE="0666"

# usb devices
KERNEL=="hiddev*",                NAME="usb/%k"
KERNEL=="auer*",                NAME="usb/%k"
KERNEL=="legousbtower*",        NAME="usb/%k"
KERNEL=="dabusb*",                NAME="usb/%k"

# fb devices
KERNEL=="fb[0-9]*",        NAME="fb/%n", SYMLINK+="%k", GROUP="video"

# DRI devices
KERNEL=="card*",        NAME="dri/card%n", GROUP="video"
KERNEL=="nvidia*",        NAME="%k", GROUP="video"
KERNEL=="3dfx*",        NAME="%k", GROUP="video"

# v4l devices
KERNEL=="video[0-9]*",        NAME="v4l/video%n", SYMLINK+="video%n", GROUP="video"
KERNEL=="radio[0-9]*",        NAME="v4l/radio%n", SYMLINK+="radio%n", GROUP="video"
KERNEL=="vbi[0-9]*",        NAME="v4l/vbi%n", SYMLINK+="vbi%n", GROUP="video"
KERNEL=="vtx[0-9]*",        NAME="v4l/vtx%n", GROUP="video"

# dvb devices
SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'X=%k; X=$${X#dvb}; A=$${X%%%%.*}; D=$${X#*.}; echo dvb/adapter$$A/$$D'", NAME="%c", GROUP="video"

# Asterix Zaptel devices
KERNEL=="zapctl",        NAME="zap/ctl"
KERNEL=="zaptimer",        NAME="zap/timer"
KERNEL=="zapchannel",        NAME="zap/channel"
KERNEL=="zappseudo",        NAME="zap/pseudo"
KERNEL=="zap[0-9]*",        NAME="zap/%n"

# pilot/palm devices
KERNEL=="pilot",        NAME="%k", GROUP="uucp"

# jaz devices
KERNEL=="jaz*",                NAME="%k", GROUP="disk"

# zip devices
KERNEL=="pocketzip*",        NAME="%k", GROUP="disk"
KERNEL=="zip*",                NAME="%k", GROUP="disk"

# ls120 devices
KERNEL=="ls120",        NAME="%k", GROUP="disk"

# lp devices
KERNEL=="irlpt",        NAME="%k", GROUP="lp", MODE="0664"
SUBSYSTEM=="usb", KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp", MODE="0664"
SUBSYSTEM=="printer", KERNEL=="lp*", NAME="%k", GROUP="lp", MODE="0664"
KERNEL=="parport*",        NAME="%k", GROUP="lp", MODE="0664"

# tape devices
KERNEL=="ht*",                NAME="%k"
KERNEL=="nht*",                NAME="%k"
KERNEL=="pt*",                NAME="%k"
KERNEL=="npt*",                NAME="%k"
KERNEL=="st*",                NAME="%k"
KERNEL=="nst*",                NAME="%k"
KERNEL=="osst*",        NAME="%k"
KERNEL=="nosst*",        NAME="%k"

# diskonkey devices
KERNEL=="diskonkey*",        NAME="%k", GROUP="disk"

# rem_ide devices
KERNEL=="microdrive*",        NAME="%k", GROUP="disk"

# kbd devices
KERNEL=="kbd",                NAME="%k", MODE="0664"

# Sony Vaio Jogdial sonypi device
KERNEL=="sonypi",        NAME="%k", MODE="0666"

# packet devices
KERNEL=="pktcdvd",                NAME="pktcdvd/control", GROUP="cdrom", MODE="0660"
KERNEL=="pktcdvd[0-9]*",        NAME="pktcdvd/pktcdvd%n", GROUP="cdrom", MODE="0660"

# infiniband devices
KERNEL=="umad*",        NAME="infiniband/%k"
KERNEL=="issm*", NAME="infiniband/%k"

# i82365 is broken, and puts udev in a terrible loop.  To fix that, we
# will ignore the platform provided module, and stop the loop:
SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="load_modules_end"

# PnP
SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", \
        RUN+="/bin/sh -c 'while read id; do /lib/udev/modprobe.sh pnp:d$$id; done < /sys$devpath/id'"

# firewire
SUBSYSTEM=="ieee1394", ENV{MODALIAS}!="?*", IMPORT{program}="modalias_ieee1394"

# libusb device access
DEVPATH=="/module/usbcore", ACTION=="add", \
              RUN+="/bin/sh -c 'sleep 1; /bin/mount none -t usbfs /proc/bus/usb -o devmode=0666,devgid=10'"
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev}; B=$${X%%%%.*}; D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c"

# firmware loader
SUBSYSTEM=="firmware", ACTION=="add", RUN+="/lib/udev/firmware.sh"

# Platform
SUBSYSTEM=="platform", ACTION=="add", ENV{MODALIAS}=="?*", RUN+="/lib/udev/modprobe.sh $env{MODALIAS}", GOTO="load_modules_end"

# load module
ACTION=="add", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"

LABEL="load_modules_end"

# network devices
KERNEL=="tun", NAME="net/%k"

SUBSYSTEM=="net", ACTION=="add", RUN+="nethelper.sh $env{INTERFACE} start"
SUBSYSTEM=="net", ACTION=="remove", RUN+="nethelper.sh $env{INTERFACE} stop"

# catch the event in udevmonitor
RUN+="socket:/org/kernel/udev/monitor"


rworkman 10-15-2007 07:21 PM

Quote:

Originally Posted by Franklin (Post 2925444)
Hi Everyone and thanks for the replies. I had this thing called work today, but I wanted to reply and let you know I was still listening.

Yeah, work sucks. :-)

Quote:

I am running a different (from slackware stock) kernel on both my computers - 2.6.22.5. Each computer has a different config tuned to the hardware. This may indeed be involved. One variable at a time please. ;)
Well, before getting *too* involved, I'm going to request that you reproduce it on the stock generic kernel :-)

Quote:

I will post my 50-udev.rules if you think it might help. This is from my desktop and is more or less unchanged. I had been editing files on the laptop more.

Before I ran out of gas last night I was going to try to create a new 90-libgphoto2.rules file using /usr/bin/print-camera-list. Why not ;)
The 50-udev.rules file shouldn't have been altered by anything, so that isn't the issue.
I'm inclined to say that you should verify that the 90-libgphoto2.rules and hal fdi files installed by the package have the correct contents.

fcaraballo 10-16-2007 01:44 AM

Quote:

Originally Posted by Franklin (Post 2925444)
My 50-udev.rules file

When I asked you to post your rules file, I actually meant your current camera rules file. I guess I wasn't specific enough, sorry.

MagicMan

ic_torres 10-16-2007 05:32 AM

hi. i want to try installing digikam in my slack 12.0 but im using fuse and ntfs 3g. do i still need HAL? plus, wat are the complete packages to be installed if i want to use digikam?

Franklin 10-16-2007 06:49 AM

Well - I installed 2.6.21.5 smp generic with an initrd for ext3 and I can now access the camera as a normal user.

The question now is is the a case of a missing option or a missing initrd (per the discussion in the HAL sticky thread).

I will rebuild my 2.6.22.5 laptop kernel with the only change being ext3 as a module and the use of an initrd and let you know what I see.

Getting close - thanks!

rworkman 10-16-2007 08:10 AM

It's a missing option (or options)
.
There's no "magic" in an initrd. Its only purpose is to provide the necessary drivers to access the root partition at boot. The initrd provides a small temporary root filesystem, the kernel loads the necessary module(s) from the initrd's filesystem, and then it uses either switch_root or pivot_root (sorry, I don't recall which one at the moment) to use the real root filesystem. At that point, the system continues on normally and the initrd is wholly and completely irrelevant.

Franklin 10-16-2007 10:45 AM

Quote:

Originally Posted by rworkman (Post 2926099)
It's a missing option (or options)
.
There's no "magic" in an initrd. Its only purpose is to provide the necessary drivers to access the root partition at boot. The initrd provides a small temporary root filesystem, the kernel loads the necessary module(s) from the initrd's filesystem, and then it uses either switch_root or pivot_root (sorry, I don't recall which one at the moment) to use the real root filesystem. At that point, the system continues on normally and the initrd is wholly and completely irrelevant.

And that would be my understanding as well. The initrd loads modules required at boot that would not be loaded early enough in the process otherwise.

The section I refer to in the HAL thread is the part where the / partition cannot be accessed by root nor by a user via the system:/media module if an initrd is not used. I can confirm that making no other change except to load ext3 as a module via an initrd.gz changed this behavior of the KDE system:/media module so that I can now access the root partition in this manner. (not that I cared one way or the other)

I did not bring my camera to work so that will need to wait. I did not expect much from an initrd to be honest, but it was an easy and quick way to remove a variable from the list.

I am not drawing any conclusions here, just making observations.

I can't post any configs at the moment (being at work), but any suggestions as to suspected omissions?

Thanks.

rworkman 10-16-2007 11:46 AM

Quote:

Originally Posted by Franklin (Post 2926250)
And that would be my understanding as well. The initrd loads modules required at boot that would not be loaded early enough in the process otherwise.

Well, not exactly. It contains modules that otherwise can't even be accessed. When the kernel is initially booted, if it doesn't have support for your root filesystem (and anything else, such as the chipset, etcetera) that it needs, it can't access the root filesystem. Since the kernel modules to access the root filesystem are *on* the root filesystem, well, that's bad. That's where the initrd comes in...

Quote:

The section I refer to in the HAL thread is the part where the / partition cannot be accessed by root nor by a user via the system:/media module if an initrd is not used. I can confirm that making no other change except to load ext3 as a module via an initrd.gz changed this behavior of the KDE system:/media module so that I can now access the root partition in this manner. (not that I cared one way or the other)
Yeah, I'm familiar with that thread, and that's what I thought you were referencing. It's not the presence of an initrd that resolves the system:/media problem, but sadly, I simply don't know what *is* resolving it. It's obviously some difference in the huge* versus generic* kernels, and while there aren't too many differences in the configs, it's quite frankly enough to dissuade me from trying too hard to track it down -- after all, there's a reason that the release notes and such advise to use one of the generic* kernels.
I suspect that some driver doesn't behave quite correctly when compiled statically into the kernel while behaving just fine as a module (there's some precedent for that - the iSCSI stuff comes to mind). On the other hand, I've seen reports of this problem in other distributions where it was somehow related to the lack of a /dev/root node (which is a symlink to the device holding the / filesystem), but I honestly don't see the connection there, so I can't even attempt to explain it, and I certainly don't understand why it would work with the generic* kernels (without /dev/root) but not in the huge* kernels (without /dev/root).

Quote:

I can't post any configs at the moment (being at work), but any suggestions as to suspected omissions?
It might not be a config problem - instead, it could be a change in the way the kernel exports sysfs contents. I would think that the libgphoto2 folks would have acknowledged that though, but it's still worth some googling perhaps.

As for config options, the only thing that stands out at the moment is this: make sure you don't enable the CONFIG_SYSFS_DEPRECATED or something along those lines; there have been all sorts of problem reports on HAL with that enabled.

duryodhan 10-16-2007 11:55 PM

bash-3.1$ cat config | grep -i sysfs
# CONFIG_SYSFS_DEPRECATED is not set
CONFIG_SYSFS=y



Is this fine? Or should I disable sysfs too ?

rworkman 10-17-2007 12:03 AM

Quote:

Originally Posted by duryodhan (Post 2926946)
bash-3.1$ cat config | grep -i sysfs
# CONFIG_SYSFS_DEPRECATED is not set
CONFIG_SYSFS=y

Is this fine? Or should I disable sysfs too ?

NO, NO, don't do that. What you have is correct. :-)

Alien_Hominid 10-17-2007 12:11 AM

Quote:

Originally Posted by duryodhan (Post 2926946)
bash-3.1$ cat config | grep -i sysfs
# CONFIG_SYSFS_DEPRECATED is not set
CONFIG_SYSFS=y



Is this fine? Or should I disable sysfs too ?

If you disable sysfs, you wouldn't be able to use hal or udev at all.

Franklin 10-17-2007 06:11 AM

That wasn't the issue here.

I did try a couple of changes, but none had the desired effect.
I went back to using the generic config as a base to build the kernel and everything worked as user.
Good news here is that the other packages seem to be doing everthing right script-wise. No need to edit udev rules.

I'll need to to take some time to try to figure what the offending option(s) are.
It's not immediately obvious to me. Maybe the USB drivers or related options?

Thanks for the help, it would have taken longer for me to look at the kernel for the answer.

shepper 12-02-2007 10:22 PM

I used this post to get my Canon S10 working in Slackware 12.0 with the Slackbuild.org versions of libgphoto2-2.4.0 and gtkam-0.1.1.4. I am running a stripped non-smp kernel. What proved to be the issue for me was enabling rc.scanluns. I do not know if this is an issue for ptp mode but may be for those using non-ptp drivers (? if assigned a LUN other than 0) in libgphoto2.

When I added OWNER="<user>" to 90-libgphoto.rules gtkam would find the camera but could not read the digital card. I recalled that rc.scanluns had something to do with reading usb devices
Quote:

# This script simply runs "rescan-scsi-bus -l" to look for devices
# that have been plugged into a USB or IEEE1394 (Firewire) port that
# might not have been detected because they use a LUN (Logical Unit
# Number) other than 0.
#
# You might need to run this script again (or just use
# rescan-scsi-bus directly at the command line) after plugging
# in new devices such as USB cameras, music players, external
# storage, and similar items.

# Run this only if "noscanluns" was NOT given as a kernel option.
After chmod +x /etc/rc.d/rc.scanluns, removing "OWNER="<user>"from 90-libgphoto2.rules and rebooting gtkam worked fine as a user.


All times are GMT -5. The time now is 10:20 AM.