a scsi scanner is not recognized as scanner by udev , so the right on its /dev/sg* remains 640 root:root , prohibiting users to scan without prior manual rights change , for usb-based scsi-scanners to group is changed to "scanner" fixing this problem Reproducible: Always Steps to Reproduce: 1. ll /dev/sg* 2. start xsane Actual Results: 1. the sg-device of scanner has rights 660 root:root 2. xsane does not find the scanner Expected Results: 2. xsane should find the scanner 1. the right on device should be something like 660 root:scanner
Portage 2.1.2.11 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.5-r4, 2.6.22.1-it4linux i686) ================================================================= System uname: 2.6.22.1-it4linux i686 AMD Duron(tm) Gentoo Base System release 1.12.9 Timestamp of tree: Wed, 19 Sep 2007 03:50:01 +0000 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] app-shells/bash: 3.2_p15-r1 dev-java/java-config: 1.3.7, 2.0.33-r1 dev-lang/python: 2.4.4-r4 dev-python/pycrypto: 2.0.1-r5 sys-apps/baselayout: 1.12.9-r2 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.14 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.17-r2 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -mtune=athlon-tbird -march=athlon -pipe " CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config " CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-O2 -mtune=athlon-tbird -march=athlon -pipe " DISTDIR="/usr/portage/distfiles" FEATURES="buildpkg distcc distlocks metadata-transfer sfperms strict" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/" LANG="de_DE.utf8" LC_ALL="de_DE.utf8" LINGUAS="de en en_GB" MAKEOPTS="-j20" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-afte r --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/etc/portage/overlay" SYNC="rsync://rsync.linux-net.dnsalias.net/gentoo-portage/" USE="3dnow 3dnowex 3dnowext acl acpi bitmap-fonts bzip bzip2 bzlib cdr cli cracklib crypt cups dbus dri dvd dvdr fortran gdb m gif gzip iconv imlib isdnlog jbig jpeg jpeg2k midi mmx mmx2 mmxext mudflap ncurses nls nptl nptlonly openmp pam pcre perl png pppd python readline reflection rle session spl sse ssl tcpd tiff truetype-fonts type1-fonts unicode x86 xorg xprint zli b" ALSA_CARDS="bt87x usb-audio via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks i ec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" CAMERAS="kodak konica minolta so nydscf1 sonydscf55" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev aiptek" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfon tz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en en_GB" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_O PTS
media-gfx/sane-backends version? udev version? Relevant part of syslog output?
an easy fix for this derived from the udev-code for scsi-cdroms is this: the ATTR-ids are from scsi-kernel-src as xsane states somewhere in its docu SCSI-scanner can announce themselfes as Scanner (6) or as Processor (3) my scanner uses processor so there is no futher need to check this --- /etc/udev/rules.d/50-udev.rules 2007-11-24 23:30:06.107872779 +0100 +++ /etc/udev/rules.d/50-udev.rules~ 2007-11-24 23:30:06.057871935 +0100 @@ -265,7 +265,6 @@ # sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC # sr: 4 TYPE_WORM, 5 TYPE_ROM # st/osst: 1 TYPE_TAPE -# scanner: 3 Processor, 6 Scanner # Setting timeout for tape-devices to 900 seconds # if you need timeouts for other devices add a similar rule @@ -276,9 +275,6 @@ # assign cdrom-permission also to associated generic device KERNEL=="sg[0-9]*", ACTION=="add", ATTRS{type}=="4|5", GROUP="522" -# assign scanner-permission to associated generic device -KERNEL=="sg[0-9]*", ACTION=="add", ATTRS{type}=="3|6", GROUP="817" - # Load driver for scsi-device ACTION=="add", SUBSYSTEM=="scsi_device", RUN+="modprobe.sh sg" ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \
sys-fs/udev: [ I] 104-r12 (0) media-gfx/sane-backends: [ I] 1.0.18-r2 (0)
(In reply to comment #4) > sys-fs/udev: > [ I] 104-r12 (0) Uh, upgrade your udev to 115-r1 at least.
updated to udev-115-r1 (0) sane-backends-1.0.18-r4 (0) device is after reboot crw-rw---- 1 root root 21, 1 26. Nov 20:10 /dev/sg1 after applinf proposed fix the device-right are correct: crw-rw---- 1 root scanner 21, 1 26. Nov 20:17 /dev/sg1
Created attachment 137073 [details, diff] add the detectin-rule for scsi-scanners to 50-udev.rules this patch is rebuild with udev-115-r1 it adds the detecton of devices with Type 6 (Scanner) and Type 3 (Processor) as already done in this rules-file for cd-burners. Type 3 is also accepted as scanner-device by xsane and it is the type my scanner reports
somehow the output from syslog got lost; here it is : Dec 1 21:29:49 vilya kernel: scsi0 : sata_via Dec 1 21:29:49 vilya kernel: scsi1 : sata_via [...] Dec 1 21:29:49 vilya kernel: DC390: clustering now enabled by default. If you get problems load Dec 1 21:29:49 vilya kernel: with "disable_clustering=1" and report to maintainers Dec 1 21:29:49 vilya kernel: ACPI: PCI Interrupt 0000:00:0b.0[A] -> GSI 19 (level, low) -> IRQ 17 Dec 1 21:29:49 vilya kernel: scsi2 : Tekram DC390/AM53C974 V2.1d 2004-05-27 Dec 1 21:29:49 vilya kernel: scsi 2:0:3:0: Processor HP C7670A 3925 PQ: 0 ANSI: 2 Dec 1 21:29:49 vilya kernel: scsi 2:0:3:0: Attached scsi generic sg1 type 3
Hi udev-guys, do you think it is your job (if not, why?) or should this be handled by sane-backends somehow?
Should be OK for sane-backends-1.0.19, please test.
works for me with scsi-scanner (ID=3) sys-fs/udev-115-r1 media-gfx/sane-backends-1.0.19 media-gfx/xsane-0.995