DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
1) If i turn on the debian sarge system, hotplug does nothing and i have no permission ( and i don't know how to fix this )
2) If i unplug the usb cable from the scanner and after this step i reinsert it, then launch xsane, the first time it hangs looking for devices.
3) Killing it and reloading xsane, i obtain the scanner working.
What can i do in order to have the scanner working without unplugging and replugging it, and considering that maybe i have to unplug it from the pc in order to have a spare usb port for digital camera [ changing maybe also the port ]?
I have recently tried fedora 4 and it solves the problem, but i don't understand how ( and anyway i have already removed it ).
A really unclean way to have the scanner working is this script i have wrote and i call from .xsession, but there MUST be a better and safer way...
Code:
#!/bin/sh
# You need sudo without password for that commands
SCANNERPOS=$(sane-find-scanner |grep "found USB" | sed "s/.*[libusb]//" |sed "s/\:/\//g")
sudo chown root.scanner /proc/bus/usb"$SCANNERPOS"
sudo chmod 0660 /proc/bus/usb"$SCANNERPOS"
I am running Debian Sarge, with a LIDE 20 scanner as well.
I don't know how your computer starts up, so there is little to say why your scanner is not seen. Can you do
Code:
dmesg | grep usb
and see what the output is?
My /var/log/messages gives this:
Code:
Sep 19 08:07:22 localhost kernel: usb.c: registered new driver usbdevfs
Sep 19 08:07:22 localhost kernel: usb.c: registered new driver hub
Sep 19 08:07:22 localhost kernel: usb-uhci.c: $Revision: 1.275 $ time 19:47:10 Dec 1 2004
Sep 19 08:07:22 localhost kernel: usb-uhci.c: High bandwidth mode enabled
Sep 19 08:07:22 localhost kernel: usb-uhci.c: USB UHCI at I/O 0xd800, IRQ 10
Sep 19 08:07:22 localhost kernel: usb-uhci.c: Detected 2 ports
Sep 19 08:07:22 localhost kernel: usb.c: new USB bus registered, assigned bus number 1
Sep 19 08:07:22 localhost kernel: usb-uhci.c: USB UHCI at I/O 0xd400, IRQ 10
Sep 19 08:07:22 localhost kernel: usb-uhci.c: Detected 2 ports
Sep 19 08:07:22 localhost kernel: usb.c: new USB bus registered, assigned bus number 2
Sep 19 08:07:22 localhost kernel: usb-uhci.c: USB UHCI at I/O 0xd000, IRQ 10
Sep 19 08:07:22 localhost kernel: usb-uhci.c: Detected 2 ports
Sep 19 08:07:22 localhost kernel: usb.c: new USB bus registered, assigned bus number 3
Sep 19 08:07:22 localhost kernel: usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
Sep 19 08:07:22 localhost kernel: usb.c: USB device 2 (vend/prod 0x45e/0x39) is not claimed by any
Sep 19 08:07:22 localhost kernel: usb.c: new USB bus registered, assigned bus number 4
Sep 19 08:07:22 localhost kernel: usb.c: USB disconnect on device 00:10.0-1 address 2
Sep 19 08:07:22 localhost kernel: usb.c: USB device 3 (vend/prod 0x45e/0x39) is not claimed by any
Sep 19 08:07:22 localhost kernel: usb.c: USB device 4 (vend/prod 0x4a9/0x220d) is not claimed by an
Sep 19 08:07:22 localhost kernel: usb.c: registered new driver hiddev
Sep 19 08:07:22 localhost kernel: usb.c: registered new driver hid
Sep 19 08:07:22 localhost kernel: usb-uhci.c: interrupt, status 3, frame# 536
Sep 19 08:07:22 localhost kernel: input: USB HID v1.00 Mouse [Microsoft Microsoft IntelliMouseX Opt
Sep 19 08:07:22 localhost kernel: usb.c: registered new driver usbscanner
(dmesg does not contain this messages anymore, it is almost a month ago I started my system )
Since you can use your scanner when you change the permissions to 0660, it means that you are a member of the scanner group, and that authorization as such works. The question is: why is this not arranged by the hotplug script.
When you plug in a USB device, "something" happens which eventually calls the correct script. Unfortunately I forgot what that "something" is. (Maybe you can check he man page for "hotplug") The script which eventually is called, is /etc/hotplug/usb/libusbscanner.
Is it there? Does this file have the correct permissions? (0755). Does it contain a statement to change permissions of your device to 0660?
I am not physically near my machine, so I cannot replug the scanner. Hopefully this afternoon I will be there, and I'll do that, and record the log for you. That may help in finding out how the libusbscanner script is called.
How did you install sane? Using the debian package? (good!) Or compiled sane from source? (bad!)
Sorry that I cannot provide you with the complete information, but maybe this already helps.
I am running Debian Sarge, with a LIDE 20 scanner as well.
I don't know how your computer starts up, so there is little to say why your scanner is not seen. Can you do
Code:
dmesg | grep usb
and see what the output is?
here is:
Code:
usbcore: registered new driver usbfs
usbcore: registered new driver hub
usb 1-2: new full speed USB device using address 2
usb 2-1: new full speed USB device using address 2
usb 2-1: USB disconnect, address 2
usb 1-2 is the scanner.
[EDIT] I'm using 2.6 kernel.
Quote:
Since you can use your scanner when you change the permissions to 0660, it means that you are a member of the scanner group, and that authorization as such works. The question is: why is this not arranged by the hotplug script.
When you plug in a USB device, "something" happens which eventually calls the correct script. Unfortunately I forgot what that "something" is. (Maybe you can check he man page for "hotplug") The script which eventually is called, is /etc/hotplug/usb/libusbscanner.
Is it there? Does this file have the correct permissions? (0755). Does it contain a statement to change permissions of your device to 0660?
It is not there, but in /etc/hotplug.d/usb/libsane.hotplug script.
Code:
#!/bin/sh
#
# This file is part of the SANE distribution.
# Hotplug USB hook for SANE
if [ "$ACTION" != "add" ]; then
exit 0
fi
DEVVID=$(printf %4s $(echo $PRODUCT | cut -d'/' -f1) | tr ' ' 0)
DEVPID=$(printf %4s $(echo $PRODUCT | cut -d'/' -f2) | tr ' ' 0)
DEVCONF=$(grep -i "^0x$DEVVID[[:space:]]\+0x$DEVPID" /etc/sane.d/hotplug/*.db 2> /dev/null)
if [ $? != 0 ]; then
exit 0
fi
set $DEVCONF
chown $3 $DEVICE && chmod $4 $DEVICE
if [ ! -z $5 -a -x $5 ]; then
export DEVVID
export DEVPID
exec $5
fi
exit 0
Should i rename it to your name and copy it there too?
Quote:
I am not physically near my machine, so I cannot replug the scanner. Hopefully this afternoon I will be there, and I'll do that, and record the log for you. That may help in finding out how the libusbscanner script is called.
How did you install sane? Using the debian package? (good!) Or compiled sane from source? (bad!)
It was downright stupid from me to forget to ask what kernel you were running. There is a huge difference in module detection and loading between 2.4.x and 2.6.x.
Anyway, I haven't been near my computer yet, but I rebooted so I can give you a proper output of dmesg | grep usb. It is this:
Code:
Last login: Mon Oct 17 20:27:54 2005 from donald_pc.megaline.com
jlinkels@jlinkels_pc:~$ dmesg | grep usb
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.275 $ time 19:47:10 Dec 1 2004
usb-uhci.c: High bandwidth mode enabled
usb-uhci.c: USB UHCI at I/O 0xd800, IRQ 10
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
usb-uhci.c: USB UHCI at I/O 0xd400, IRQ 10
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 2
usb-uhci.c: USB UHCI at I/O 0xd000, IRQ 10
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 3
usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
usb.c: USB device 2 (vend/prod 0x45e/0x39) is not claimed by any active driver.
usb.c: new USB bus registered, assigned bus number 4
usb.c: USB disconnect on device 00:10.0-1 address 2
usb.c: USB device 3 (vend/prod 0x45e/0x39) is not claimed by any active driver.
usb.c: USB device 4 (vend/prod 0x4a9/0x220d) is not claimed by any active driver.
usb.c: registered new driver hiddev
usb.c: registered new driver hid
usb-uhci.c: interrupt, status 3, frame# 530
input: USB HID v1.00 Mouse [Microsoft Microsoft IntelliMouse® Optical] on usb1:3.0
usb.c: registered new driver usbscanner
jlinkels@jlinkels_pc:~$
All my remarks might be invalidated by the fact that I use a different kernel version, but I find it highly sucpicous that you don't get any output from usb-uhci. If it is true that there is something wrong with loading that module, it doesn't make sense to look at scripts in /etc/hotplug.d. Then it is at a different level.
You don't have blacklisted the usb-uhci module, did you?
Time permitting I can try Tuesday to connect the scanner to a machine running 2.6.12 and give you that output of dmesg.
usbcore: registered new driver usbfs
usbcore: registered new driver hub
USB Universal Host Controller Interface driver v2.2
uhci_hcd 0000:00:1f.2: Intel Corp. 82801BA/BAM USB (Hub #1)
uhci_hcd 0000:00:1f.2: irq 5, io base 0000b000
uhci_hcd 0000:00:1f.2: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
uhci_hcd 0000:00:1f.4: Intel Corp. 82801BA/BAM USB (Hub #2)
uhci_hcd 0000:00:1f.4: irq 11, io base 0000b800
uhci_hcd 0000:00:1f.4: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
usb 1-2: new full speed USB device using address 2
usb 2-2: new full speed USB device using address 2
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
USB Mass Storage device found at 2
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usb 2-2: USB disconnect, address 2
I connected the scanner to my laptop with kernel 2.6.12 running.
To my surprise I see the same messages as you do. No vendor/product id like in kernel 2.4.x.
I don't have SANE installed, but that should not be necessary for this detection.
For the moment I cannot spend the time to track down where the USB detection went, so I am not able to help you further for the moment. I am sorry about this.
If I have to install SANE anyway, I'll post my findings here.
I, too, am running 2.6.12 (installed debian package) on a debianpure install updated to testing, and my epson perfection 1660 photo is only detected as root.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.