Bug 3698 - xsane fails to correctly find device Brother DCP-J125 us user (OK as root) (missing udev rules)
Summary: xsane fails to correctly find device Brother DCP-J125 us user (OK as root) (m...
Status: RESOLVED OLD
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: i586 Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords: Triaged
: 4800 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-11 03:01 CET by David Taylor
Modified: 2013-11-23 16:14 CET (History)
4 users (show)

See Also:
Source RPM: sane-1.0.22-5.mga2.src.rpm
CVE:
Status comment:


Attachments
dmesg as requested (38.95 KB, text/plain)
2011-12-12 01:37 CET, David Taylor
Details
Extract of various commands/logs (4.18 KB, text/plain)
2012-03-09 08:37 CET, David Taylor
Details

Description David Taylor 2011-12-11 03:01:04 CET
lsusb output:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 058f:6377 Alcor Micro Corp. Multimedia Card Reader
Bus 002 Device 004: ID 046d:0802 Logitech, Inc. Webcam C200
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 004: ID 04f9:0028 Brother Industries, Ltd Printer
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 04f9:0253 Brother Industries, Ltd        <<< 
Bus 005 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 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 002: ID 0665:5161 Cypress Semiconductor USB to Serial

usb-devices output

T:  Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=04f9 ProdID=0253 Rev=01.00
S:  Manufacturer=Brother
S:  Product=DCP-J125
S:  SerialNumber=BROH1F384514
C:  #Ifs= 3 Cfg#= 1 Atr=c0 MxPwr=2mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I:  If#= 2 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

xsane produces the following error:

Failed to open device 'brother3:bus4:dev2':
Error during device I/O
Comment 1 Manuel Hiebel 2011-12-11 11:45:56 CET
Hi, thanks for reporting this bug.
Assigned to the package maintainer.

(maybe more a sane issue and/or upstream ?

Keywords: (none) => Triaged
Assignee: bugsquad => supp

Comment 2 Thierry Vignaud 2011-12-11 18:48:23 CET
Have you tried as root?

Keywords: (none) => NEEDINFO
CC: (none) => thierry.vignaud

Comment 3 Thierry Vignaud 2011-12-11 18:48:51 CET
Also attach the dmesg.txt file resulting from running the following command:
dmesg > dmesg.txt
Comment 4 David Taylor 2011-12-12 01:33:01 CET
(In reply to comment #2)
> Have you tried as root?

Yes it works as root.
Comment 5 David Taylor 2011-12-12 01:37:39 CET
Created attachment 1225 [details]
dmesg as requested
Comment 6 Thierry Vignaud 2011-12-12 08:32:18 CET
Permissions issues

Assignee: supp => mageia
Summary: xsane fails to correctly find device Brother DCP-J125 => xsane fails to correctly find device Brother DCP-J125 us user (OK as root)
Source RPM: xsane-0.998-1.mga1 => udev

Comment 7 David Taylor 2011-12-17 05:18:13 CET
(In reply to comment #6)
> Permissions issues

/.sane (and contents) have the same permissions for both root and user
Comment 8 David Taylor 2011-12-31 01:22:35 CET
(In reply to comment #6)
> Permissions issues

Thats really good to know, but whats the solution?

Tried running it from the command line and get the following message:

libusb couldn't open USB device /dev/bus/usb/002/005: Permission denied.
libusb requires write access to USB device nodes.

(/dev/bus/usb/002/005 permissions are set at 664, Owner: Root; Group: lp)

I've made myself a member of the lp and saned groups and that didn't work.
Comment 9 David Taylor 2011-12-31 08:27:10 CET
(In reply to comment #8)
> (In reply to comment #6)
> > Permissions issues
> 
> Thats really good to know, but whats the solution?
> 
> Tried running it from the command line and get the following message:
> 
> libusb couldn't open USB device /dev/bus/usb/002/005: Permission denied.
> libusb requires write access to USB device nodes.
> 
> (/dev/bus/usb/002/005 permissions are set at 664, Owner: Root; Group: lp)
> 
> I've made myself a member of the lp and saned groups and that didn't work.

Ah! it needed a reboot. I now have it working
Comment 10 Marja Van Waes 2012-01-21 14:12:00 CET
removed NEEDINFO

@ Colin

Please set status to ASSIGNED if you agree this bug was assigned correctly.

Keywords: NEEDINFO => (none)
CC: (none) => marja11

Comment 11 Colin Guthrie 2012-03-07 13:35:02 CET
David do you still have this h/w and can you test on Cauldron? I suspect updated udev rules will make this work without needing to be in any special groups, but I don't have any h/w to test with.

Status: NEW => ASSIGNED

Comment 12 David Taylor 2012-03-08 00:56:14 CET
Will do Colin as soon as I can get Cauldron up and running
Comment 13 David Taylor 2012-03-09 08:37:04 CET
Created attachment 1707 [details]
Extract of various commands/logs
Comment 14 David Taylor 2012-03-09 08:42:42 CET
(In reply to comment #11)
> David do you still have this h/w and can you test on Cauldron? I suspect
> updated udev rules will make this work without needing to be in any special
> groups, but I don't have any h/w to test with.

In a nut shell had to add the groups lp and saned to the user to get the scanner working.

Downloaded and installed the printer/scanner drivers from Brother.

System-config-printer then downloaded/installed a bunch of cups drivers.

Add and select printer routines scanned for the printer but fail to find.

see attachment 1707 [details] for log extracts.

What other info do you require?
Comment 15 Thierry Vignaud 2012-03-10 18:15:42 CET
*** Bug 4800 has been marked as a duplicate of this bug. ***
Comment 16 Thierry Vignaud 2012-03-10 18:17:04 CET
Colin, I've seen the same issue on my uncle's PC with a DCP-153c multifunction printer.
Only root can scan unless I manually add a new udev rule:

ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="01e1", TAG+="udev-acl"

Severity: normal => major

Thierry Vignaud 2012-03-10 18:17:42 CET

Summary: xsane fails to correctly find device Brother DCP-J125 us user (OK as root) => xsane fails to correctly find device Brother DCP-J125 us user (OK as root) (missing udev rules)
Source RPM: udev => udev sane

Comment 17 Colin Guthrie 2012-03-10 19:06:02 CET
The tag would want to be uaccess these days (tho' doing both udev-acl and uaccess is a good idea for the transition period when consolekit is deprecated)
Comment 18 David Taylor 2012-03-11 01:21:10 CET
(In reply to comment #16)
> Colin, I've seen the same issue on my uncle's PC with a DCP-153c multifunction
> printer.
> Only root can scan unless I manually add a new udev rule:
> 
> ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="01e1", TAG+="udev-acl"

Thierry, where exactly does this line have to be inserted? /etc/udev/??
Colin Guthrie 2012-03-11 12:02:40 CET

Attachment 1707 mime type: application/octet-stream => text/plain

Comment 19 Colin Guthrie 2012-03-11 12:08:39 CET
David, it would typically be included in the upstream file, but perhaps under different mechanisms (e.g. not based purely on vendor and product ids, but rather on other metadata - it may be that the ids are used to add the other metadata and then standard rules then subsequently add the TAG).

For example, the standard rules for uaccess (/lib/udev/rules.d/70-uaccess.rules) contains the following line.

# SCSI and USB scanners
ENV{libsane_matched}=="yes", TAG+="uaccess"

So we really need to work out why libsane_matched env var does not contain the word "yes".

Now the file /etc/udev/rules.d/60-libsane.rules (which shouldn't be in /etc/ it should be in /lib), contains all the rules that set the libsane_matched env var.

So you probably want to add a new lines to that file so that it recognises your scanner.

From previous commands, we know that your scanner is: vendor: 04f9, product: 0253 so the lines would be:

# Brother DCP-J125
ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="0253", MODE="0664", GROUP="usb", ENV{libsane_matched}="yes"


If you do this, does your printer work as expected?

If so we can add those lines to the sane package (along with Thierry's one) and submit the patches upstream for inclusion.
Comment 20 Colin Guthrie 2012-03-11 12:09:12 CET
I meant, "does you *scanner* work as expected?" above :p
Comment 21 David Taylor 2012-03-11 22:09:46 CET
(In reply to comment #19)
====== sniped ======

> From previous commands, we know that your scanner is: vendor: 04f9, product:
> 0253 so the lines would be:
> 
> # Brother DCP-J125
> ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="0253", MODE="0664", GROUP="usb",
> ENV{libsane_matched}="yes"
> 
> 
> If you do this, does your printer work as expected?
> 
> If so we can add those lines to the sane package (along with Thierry's one) and
> submit the patches upstream for inclusion.

Thanks Colin,

Added the above line, removed myself from the lp and saned groups and the scanner worked as expected. Now to just get the printer side to work on cauldron, but that can wait now until beta2 comes out.
Comment 22 Colin Guthrie 2012-03-12 00:14:49 CET
OK, I've added this one in the latest sane package. I also added Thierry's uncle's model too (tho' separately as I forgot initially!)

The udev rule location was also fixed to move it to /lib/udev/rules.d/. As you edited the one in /etc/ you may have to remove an rpmsave file left over when you upgrade.

So this will be fixed in mga2 which will be out soon.

I'll leave it up to the maintainer to see if he wants to backport this fix.

Assignee: mageia => dmorganec
Source RPM: udev sane => sane-1.0.22-5.mga2.src.rpm

Comment 23 Serge Moreau 2012-03-19 08:50:27 CET
I have a similar behavior on a epson perfection 2400, after installation of MGA2 BETA2.

SM

CC: (none) => serge.moreau

Comment 24 Serge Moreau 2012-03-19 18:28:11 CET
Still does not work as root.

Message : failed to load canberra-gtk-module;

Corresponding rpm (canberra-gtk) is however installed.
Comment 25 Thierry Vignaud 2012-03-19 18:33:54 CET
That's a gtk+ _warning_ which is totally unrelated anyway
Comment 26 Serge Moreau 2012-03-19 18:37:13 CET
Thanks, so, what to do ?
Comment 27 Serge Moreau 2012-03-19 21:34:41 CET
Some additionnal data

[serge@Saturne ~]$ xscanimage
Gtk-Message: Failed to load module "canberra-gtk-module"
[xscanimage] No scanners were identified. If you were expecting something
          different, check that the scanner is plugged in, turned on and
          detected by sane-find-scanner (if appropriate). Please read
          the documentation which came with this software (README, FAQ,
          manpages).
[serge@Saturne ~]$ 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=0x03f0 [HP], product=0xc202 [Photosmart 8200 series]) at libusb:001:006
found USB scanner (vendor=0x04b8 [EPSON], product=0x011b [EPSON Scanner]) at libusb:001:007
Manuel Hiebel 2012-10-31 16:44:25 CET

Version: 1 => 2

D Morgan 2013-09-18 00:01:49 CEST

Assignee: dmorganec => bugsquad

Comment 28 Manuel Hiebel 2013-10-22 12:10:50 CEST
This message is a reminder that Mageia 2 is nearing its end of life.
Approximately one month from now Mageia will stop maintaining and issuing updates for Mageia 2. At that time this bug will be closed as WONTFIX (EOL) if it remains open with a Mageia 'version' of '2'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Mageia version prior to Mageia 2's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Mageia 2 is end of life.  If you would still like to see this bug fixed and are able to reproduce it against a later version of Mageia, you are encouraged to click on "Version" and change it against that version of Mageia.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Mageia release includes newer upstream software that fixes bugs or makes them obsolete.

-- 
The Mageia Bugsquad
Comment 29 Manuel Hiebel 2013-11-23 16:14:12 CET
Mageia 2 changed to end-of-life (EOL) status on ''22 November''. Mageia 2 is no
longer maintained, which means that it will not receive any further security or
bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of Mageia
please feel free to click on "Version" change it against that version of Mageia
and reopen this bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

--
The Mageia Bugsquad

Status: ASSIGNED => RESOLVED
Resolution: (none) => OLD


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