View previous topic :: View next topic |
Author |
Message |
01mf02 Veteran


Joined: 21 Nov 2004 Posts: 1070 Location: Innsbruck, Austria
|
Posted: Thu May 04, 2006 2:18 pm Post subject: Scanner only works as root [SOLVED] |
|
|
Hi! My scanner used to work perfectly before, but now I can only access it as root. It isn't even detected as user.
Scanner: CanoScan FB 630U
Code: |
michi@tux ~ $ emerge udev hal dbus -pv
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] sys-fs/udev-079-r1 0 kB
[ebuild R ] sys-apps/hal-0.5.5.1-r3 USE="-acpi -debug -doc -pam_console -pcmcia" 0 kB
[ebuild R ] sys-apps/dbus-0.60-r4 USE="X gtk python qt -debug -doc -gcj -mono -xml" 0 kB
Total size of downloads: 0 kB
|
Any ideas?
Last edited by 01mf02 on Sat May 06, 2006 7:07 pm; edited 2 times in total |
|
Back to top |
|
 |
didymos Advocate


Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Thu May 04, 2006 4:51 pm Post subject: |
|
|
Did you upgrade udev lately? Currently, my scanner device is listed as
Code: |
crw-rw--- root root
|
so that seems to be the default for udev. I imagine it should have group ownership 'scanner'. _________________ Thomas S. Howard |
|
Back to top |
|
 |
01mf02 Veteran


Joined: 21 Nov 2004 Posts: 1070 Location: Innsbruck, Austria
|
Posted: Thu May 04, 2006 5:16 pm Post subject: |
|
|
I upgraded udev, but as it didn't let me mount my usb sticks automatically anymore, I downgraded.
Code: |
michi@tux ~ $ sudo lsusb
Bus 002 Device 003: ID 04a9:2204 Canon, Inc. CanoScan FB630U <------------ at bus 2, device 3
Bus 002 Device 002: ID 03f0:7304 Hewlett-Packard DeskJet 35xx
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 003: ID 07cc:0501 Carry Computer Eng., Co., Ltd
Bus 001 Device 001: ID 0000:0000
michi@tux ~ $ ls /dev/bus/usb/002/003 -l
crw-r--r-- 1 root root 189, 130 4. Mai 19:12 /dev/bus/usb/002/003
|
The funny thing is that I can't find anything that resembles a scanner device in /dev. I have my entry in /dev/bus/usb, but that's it. Do you have something like /dev/usb/scanner0? |
|
Back to top |
|
 |
sternklang Veteran


Joined: 10 Sep 2005 Posts: 1641 Location: Somewhere in time and space
|
Posted: Thu May 04, 2006 6:17 pm Post subject: |
|
|
If you are running Gnome and have hal-device-manager installed, you may be able to find your scanner in the list of devices (for a USB scanner look for "<Controller name> USB Controller"). If it's there you can click on the "Advanced" tab and look for something like "linux.device_file" to see its /dev entry. I think there's also a command-line utility (hal-device?) that can give you the same info. |
|
Back to top |
|
 |
sundialsvc4 Guru

Joined: 10 Nov 2005 Posts: 436
|
Posted: Thu May 04, 2006 6:46 pm Post subject: |
|
|
udev works off a set of rules in /etc/udev, which tells it how to create the device-nodes in /dev. Among these rules are the permissions that should be set for the device. Just like an ordinary file, to use a device you must be able to read and write to it. Although the rules rarely need to be changed, it's not at all difficult to do so. |
|
Back to top |
|
 |
01mf02 Veteran


Joined: 21 Nov 2004 Posts: 1070 Location: Innsbruck, Austria
|
Posted: Fri May 05, 2006 3:02 pm Post subject: |
|
|
I found this by calling hal-device and searching around a bit:
Code: |
0: udi = '/org/freedesktop/Hal/devices/usb_device_4a9_2204_noserial_if0'
info.udi = '/org/freedesktop/Hal/devices/usb_device_4a9_2204_noserial_if0' (string)
linux.subsystem = 'usb' (string)
linux.hotplug_type = 1 (0x1) (int)
info.product = 'USB Interface' (string)
usb.interface.protocol = 0 (0x0) (int)
usb.interface.subclass = 1 (0x1) (int)
usb.interface.class = 16 (0x10) (int)
usb.interface.number = 0 (0x0) (int)
usb.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:02.0/usb2/2-7/2-7:1.0' (string)
usb.num_configurations = 1 (0x1) (int)
usb.device_class = 0 (0x0) (int)
usb.device_subclass = 0 (0x0) (int)
usb.device_protocol = 0 (0x0) (int)
usb.vendor_id = 1193 (0x4a9) (int)
usb.product_id = 8708 (0x2204) (int)
usb.vendor = 'Canon, Inc.' (string)
usb.product = 'USB Interface' (string)
usb.device_revision_bcd = 5 (0x5) (int)
usb.num_ports = 0 (0x0) (int)
usb.linux.device_number = 4 (0x4) (int)
usb.speed_bcd = 4608 (0x1200) (int)
usb.version_bcd = 272 (0x110) (int)
usb.is_self_powered = false (bool)
usb.can_wake_up = false (bool)
usb.bus_number = 2 (0x2) (int)
info.bus = 'usb' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_4a9_2204_noserial' (string)
linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:02.0/usb2/2-7/2-7:1.0' (string)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:02.0/usb2/2-7/2-7:1.0' (string)
###############################################
# what's coming below seems to be the scanner
###############################################
1: udi = '/org/freedesktop/Hal/devices/usb_device_4a9_2204_noserial'
info.udi = '/org/freedesktop/Hal/devices/usb_device_4a9_2204_noserial' (string)
linux.subsystem = 'usb' (string)
linux.hotplug_type = 1 (0x1) (int)
usb_device.bus_number = 2 (0x2) (int)
usb_device.can_wake_up = false (bool)
usb_device.is_self_powered = false (bool)
usb_device.version_bcd = 272 (0x110) (int)
usb_device.speed_bcd = 4608 (0x1200) (int)
usb_device.linux.device_number = 4 (0x4) (int)
usb_device.num_ports = 0 (0x0) (int)
usb_device.device_revision_bcd = 5 (0x5) (int)
info.product = 'CanoScan FB630U' (string) <-------------------------------------
usb_device.product = 'CanoScan FB630U' (string)
info.vendor = 'Canon, Inc.' (string)
usb_device.vendor = 'Canon, Inc.' (string)
usb_device.product_id = 8708 (0x2204) (int)
usb_device.vendor_id = 1193 (0x4a9) (int)
usb_device.device_protocol = 0 (0x0) (int)
usb_device.device_subclass = 0 (0x0) (int)
usb_device.device_class = 0 (0x0) (int)
usb_device.num_configurations = 1 (0x1) (int)
usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:02.0/usb2/2-7' (string)
info.linux.driver = 'usb' (string)
info.bus = 'usb_device' (string)
info.parent = '/org/freedesktop/Hal/devices/usb_device_0_0_0000_00_02_0' (string)
linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:02.0/usb2/2-7' (string)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:02.0/usb2/2-7' (string)
|
See the problem? There is nothing like a device_file entry here, only some obscure sysfs stuff.
In my /etc/udev/rules.d/50-udev.rules, there is nothing that has to do with scanners - no group mentioned.
Quote: |
Although the rules rarely need to be changed, it's not at all difficult to do so.
|
And how do you do it then? |
|
Back to top |
|
 |
01mf02 Veteran


Joined: 21 Nov 2004 Posts: 1070 Location: Innsbruck, Austria
|
Posted: Sat May 06, 2006 9:24 am Post subject: |
|
|
Does nobody have a solution for my problem? Come on, I just need somebody who has a scanner and can tell me if he has a device file for his/her scanner and if yes, how it is called.
I just need a very tiny bit of information to write my udev rule. See this example:
Code: |
BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k", GROUP="lp"
|
That's from 50-udev.rules and describes who has access to the printer. I think adapting this to make a scanner rule would be quite easy, but I don't know what I should write instead of "lp[0-9]*". Something like this:
Code: |
BUS=="usb", KERNEL=="scanner[0-9]*", NAME="usb/%k", GROUP="scanner"
|
? |
|
Back to top |
|
 |
gerard27 Advocate

Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Sat May 06, 2006 11:05 am Post subject: |
|
|
Hi,
I have a HP 3300C USB scanner and had the same problem.
The solution was quite simple: you should enable scanner for the user.
I did this in KDE user manager by ticking the scanner entry.
I searched my udev-rules but I can't find "scanner" anywhere yet my scanner
works fine,both directly and through Gimp.
Hope this helps.
G |
|
Back to top |
|
 |
01mf02 Veteran


Joined: 21 Nov 2004 Posts: 1070 Location: Innsbruck, Austria
|
Posted: Sat May 06, 2006 7:07 pm Post subject: |
|
|
I'M
A
DUMBASS!
Thanks, your advice worked! |
|
Back to top |
|
 |
gerard27 Advocate

Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Sat May 06, 2006 9:24 pm Post subject: |
|
|
You're quite welcome. |
|
Back to top |
|
 |
|