Bug 153705

Summary: re-plug USB scanner required for normal user access
Product: [openSUSE] SUSE Linux 10.1 Reporter: Johannes Meixner <jsmeix>
Component: HotplugAssignee: Johannes Meixner <jsmeix>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: forgotten_55iwwMllzz, jsmeix
Version: Beta 3   
Target Milestone: ---   
Hardware: All   
OS: SuSE Linux 10.1   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Johannes Meixner 2006-02-27 15:45:54 UTC
The problem was reported first by jfraga@dq.fct.unl.pt in
https://bugzilla.novell.com/show_bug.cgi?id=153128#c8

After configuring a USB scanner it must be unplugged from the USB
and re-plugged to trigger the udev -> HAL -> resmgr chain to allow
normal user access.

Details:
To make a new configured USB scanner accessible for normal users
the whole udev -> HAL -> resmgr machinery must be triggered
so that in the end resmgr allows access for normal users.
Normally during booting or when a scanner is new plugged into the USB
udev gets an event and then udev triggers hald which processes the
/etc/hal/fdi/policy/10osvendor/80-scanner.fdi
file so that hald triggers resmgr which allows normal user access
for the USB device node.
But for an already plugged in scanner this chain does not work.
It is not possible to trigger HAL to processes the 80-scanner.fdi file
on demand.
Furthermore even "echo 1 >/sys/complicated/path/uevent" does not work
to trigger udev for USN scanners (for other hardware it should work).
Therefore the only reliable way at the moment is a user information
in the YaST scanner configuration to re-plug the scanner.
Comment 1 Johannes Meixner 2006-02-27 15:56:21 UTC
Added a user information to the YaST scanner configuration.
Submitted yast2-scanner 2.13.13 to STABLE.
Comment 2 Johannes Meixner 2006-03-01 15:02:15 UTC
I removed the user information from the YaST scanner configuration
because I found out that the same can be done via the resmgr call:
/sbin/resmgr add /dev/bus/usb/<bus-number>/<device-number> scanner usb

This would grant resmgr access as long as the system runs
and as long as the scanner is not unplugged from the USB and re-plugged.

For the next reboot or if the scanner is unplugged from the USB
and re-plugged the resmgr access is granted via the
udev -> HAL -> resmgr machinery (according to bug #153128).

Submitted yast2-scanner 2.13.14 to STABLE.