Bug 1019760 - kernel-3.11 prevents the sane scanner software to detect the usb scanners
kernel-3.11 prevents the sane scanner software to detect the usb scanners
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: udev (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Orphan Owner
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-16 07:11 EDT by Joachim Backes
Modified: 2014-09-10 03:42 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-10 03:42:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
output of "strace sane-find-scanner" (82.23 KB, text/x-log)
2013-10-16 07:11 EDT, Joachim Backes
no flags Details

  None (edit)
Description Joachim Backes 2013-10-16 07:11:34 EDT
Created attachment 812866 [details]
output of "strace sane-find-scanner"

Description of problem:

I have problems to run the sane scanner software under kernel-3.11.5-200.fc19.x86_64: sane-find-scanner is unable to detect attached usb scanners! Only if running sane-find-scanner with UID 0, the scanner is found:

-------------------------------------------------------------------------------

lsusb
Bus 001 Device 004: ID 046d:081d Logitech, Inc. HD Webcam C510
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 003: ID 04a9:220e Canon, Inc. CanoScan N1240U/LiDE 30
Bus 002 Device 002: ID 046d:c00e Logitech, Inc. M-BJ58/M-BJ69 Optical Wheel Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

------------------------------------------------------------------------------

 sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

could not open USB device 0x046d/0x081d at 001:004: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 001:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 005:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 004:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 003:001: Access denied (insufficient permissions)
could not open USB device 0x04a9/0x220e at 002:003: Access denied (insufficient permissions)
could not open USB device 0x046d/0xc00e at 002:002: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 002:001: Access denied (insufficient permissions)
  # No USB scanners found. If you expected something different, make sure that
  # you have loaded a kernel driver for your USB host controller and have setup
  # the USB system correctly. See man sane-usb for details.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

  # You may want to run this program as root to find all devices. Once you
  # found the scanner devices, be sure to adjust access permissions as
  # necessary.

-----------------------------------------------------------------------------

 sudo sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04a9 [Canon], product=0x220e [CanoScan]) at libusb:002:003
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.Attach some USB-Scanner
2.sane-find-scanner
3.

Actual results:
see above

Expected results:


Additional info:
No such problems with kernel-3.11.4-201.fc19.x86_64
Comment 1 Joachim Backes 2013-10-16 07:19:10 EDT
I have to correct :-(

Same problems with both

kernel-3.11.5-200.fc19.x86_64 and kernel-3.11.4-201.fc19.x86_64.

So it's possibly a 3.11 problem.
Comment 2 Josh Boyer 2013-10-16 08:28:02 EDT
Does it happen with all of the 3.11 kernels or any of the 3.10 kernels?
Comment 3 Joachim Backes 2013-10-16 10:07:22 EDT
(In reply to Josh Boyer from comment #2)
> Does it happen with all of the 3.11 kernels or any of the 3.10 kernels?

I have no more access to some 3.10 kernel, but if I remember correctly, I had no problems with the 3.10 kernels.
Comment 4 Joachim Backes 2013-10-16 10:09:23 EDT
Today it was the first try to scan after a long period of not using the scanner.
Comment 5 Josh Boyer 2013-10-16 10:36:41 EDT
(In reply to Joachim Backes from comment #3)
> (In reply to Josh Boyer from comment #2)
> > Does it happen with all of the 3.11 kernels or any of the 3.10 kernels?
> 
> I have no more access to some 3.10 kernel, but if I remember correctly, I
> had no problems with the 3.10 kernels.

The 3.10 kernels are available in koji.  You could download them from here:

http://koji.fedoraproject.org/koji/packageinfo?packageID=8

and use 'rpm -ivh --oldpackage <kernel RPM>' to install them to test with.  If you still have trouble with one of those, it is quite possible it was a userspace update that changed this.

Was there anything else updated along with the update to 3.11?
Comment 6 Joachim Backes 2013-10-16 11:06:41 EDT
I was a little bit too overhasty: Even with kernel 3.10.11-200.fc19.x86_64 (which I installed now) I have the same problem.  Downgrading the sane Software did not help!
Comment 7 Bob Gustafson 2013-10-19 11:34:56 EDT
I'm having problems too - might be related..

Note Fujitsu detected by lsusb, but not sane-find-scanner

This is a new scanner, I am attempting to run it on a system which has never run a scanner before. Fujitsu fi-6130z

[user1@hoho6 ~]$ uname -a
Linux hoho6.chidig.com 3.11.4-201.fc19.x86_64 #1 SMP Thu Oct 10 14:11:18 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[user1@hoho6 ~]$ 

[user1@hoho6 ~]$ lsusb
Bus 002 Device 002: ID 04c5:11f3 Fujitsu, Ltd 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[user1@hoho6 ~]$ sudo sane-find-scanner
[sudo] password for user1: 

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

  # No USB scanners found. If you expected something different, make sure that
  # you have loaded a kernel driver for your USB host controller and have setup
  # the USB system correctly. See man sane-usb for details.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.
[user1@hoho6 ~]$
Comment 8 Joachim Backes 2013-10-20 04:04:25 EDT
(In reply to Joachim Backes from comment #6)
> I was a little bit too overhasty: Even with kernel 3.10.11-200.fc19.x86_64
> (which I installed now) I have the same problem.  Downgrading the sane
> Software did not help!

Same problems in F20 (kernel-3.11.6-300.fc20.x86_64)!

Additionally: an attached an USB webcam  is always offered by xsane as a scan device (without running as root!!), but the USB scanner is presented only if running as root.
Comment 9 Arne Ahrend 2013-10-21 04:43:32 EDT
Same in F20. Running chown root:USERID /dev/bus/usb/002/004 (or whatever the scanner device node happens to be) as root helps to work around this temporarily.
Maybe this is a udev rule set bug?
Comment 10 Joachim Backes 2013-10-21 05:08:34 EDT
(In reply to Arne Ahrend from comment #9)
> Same in F20. Running chown root:USERID /dev/bus/usb/002/004 (or whatever the
> scanner device node happens to be) as root helps to work around this
> temporarily.
> Maybe this is a udev rule set bug?

Very helpful.

I made a small script for the workaround:

---------------------------------------------------------------
#!/bin/bash
set $(lsusb|grep -i "<scanner>")
sudo chown root:$USER /dev/bus/usb/$2/$(echo $4 | tr -d :) && exit 0 || exit 1
----------------------------------------------------------------

will set the group rights, independent from the USB slot
Comment 11 Josh Boyer 2013-10-22 08:55:16 EDT
Sounds like a possible udev issue.
Comment 12 Bob Gustafson 2013-10-22 23:34:22 EDT
(In reply to Bob Gustafson from comment #7)
> I'm having problems too - might be related..
> 
> Note Fujitsu detected by lsusb, but not sane-find-scanner
> 
> This is a new scanner, I am attempting to run it on a system which has never
> run a scanner before. Fujitsu fi-6130z
> 

I installed the latest sane-backends-1.0.24.tar.gz

It is not yet in the Fedora repository and needs packaging help. My lucky trick was to use the configure options from the Fedora source for 1.0.23

./configure --host=x86_64-redhat-linux-gnu --build=x86_64-redhat-linux-gnu --pro
gram-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bi
ndir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --inclu
dedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir
=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/inf
o --with-gphoto2=/usr --with-docdir=/usr/share/doc/sane-backends-1.0.23 --disabl
e-locking --disable-rpath --enable-libusb_1_0 --enable-pthread 2>&1 | tee config
.out

Not pretty, but it worked.

[user1@hoho6 sane-backends-1.0.24]$ scanimage -L
device `fujitsu:fi-6130Zdj:725083' is a FUJITSU fi-6130Zdj scanner
[user1@hoho6 sane-backends-1.0.24]$
Comment 13 Arne Ahrend 2013-11-07 15:28:22 EST
I can no longer reproduce this bug, but unfortunately I cannot point to any specific update having fixed the issue. I am currently on kernel 3.11.7-300.fc20.x86_64 and libgudev1.x86_64 at version 208-4.fc20.

The device node for my scanner -- a CANON model --shows permissions
crw-rw-r--+ 1 root root 189, 130 Nov  7 20:18 /dev/bus/usb/002/003
(as given by "ls -l /dev/bus/usb/`lsusb | grep Canon | cut -d: -f1 | tr " " / | cut -d/ -f 2,4`").

Not sure though why read access by ordinary "other" users should be sufficient for them to control the scanner, but I have today been able to do just that.
Comment 14 Joachim Backes 2013-11-29 05:56:43 EST
seems to be fixed with kernel-3.11.9-300.fc20.x86_64 or with sane-backends-1.0.24-7.fc20.x86_64.
Comment 15 Adri Verhoef 2013-12-13 10:27:27 EST
My Canon N650U usb scanner is detected now, with kernel-3.11.10-200.fc19.x86_64:

$ lsusb|grep Canon
Bus 003 Device 006: ID 04a9:2206 Canon, Inc. CanoScan N650U/N656U
$ ls -l /dev/bus/usb/`lsusb |grep Canon |cut -d: -f1 |tr " " / |cut -d/ -f 2,4`
crw-rw-r--+ 1 root root 189, 261 Dec 13 14:14 /dev/bus/usb/003/006
$ rpm -qa | egrep sane'\>'
sane-backends-doc-1.0.24-7.fc19.noarch
sane-backends-libs-1.0.24-7.fc19.x86_64
sane-backends-1.0.24-7.fc19.x86_64
xsane-0.999-6.fc19.x86_64
sane-backends-drivers-scanners-1.0.24-7.fc19.x86_64
xsane-common-0.999-6.fc19.x86_64
Comment 16 Joachim Backes 2014-09-10 03:42:55 EDT
No longer reprucable with kernel-3.16.2-200.fc20.x86_64

Note You need to log in before you can comment on or make changes to this bug.