xsane fails to open brother scanner (linux mint xfce 19.1)

Forum rules
Before you post please read this
User avatar
ClixTrix
Level 6
Level 6
Posts: 1069
Joined: Wed Dec 09, 2015 11:40 am
Location: Columbus, Ohio, USA

Re: xsane fails to open brother scanner (linux mint xfce 19.1)

Post by ClixTrix »

ClixTrix wrote:
Sat Jan 19, 2019 4:27 pm
Success USB!

OK.....I followed the standard install for the MFC-440CN and got no joy. I installed using the same printer installer 2.2.1-1 and the rule-type1 deb from download as OP. I added "scanner" to my user account group and still no joy.

Looking through the discussion at the bug report, I tried adding the linkages and the rule 59-udev-local.rules for brother in post #36. It works. Both Simple Scan and XSane detect the scanner.

https://bugs.launchpad.net/ubuntu/+sour ... ug/1728012

Edit: Here's the detected/working scanner checks.

Code: Select all

danno@Moneual:~$ lsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 11b0:6888 ATECH FLASH TECHNOLOGY 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 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 004 Device 002: ID 04f9:01af Brother Industries, Ltd MFC-440CN
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 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
danno@Moneual:~$ 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 0x1d6b/0x0001 at 007:001: Access denied (insufficient permissions)
could not open USB device 0x11b0/0x6888 at 002:002: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 002:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 006: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/0x0002 at 001:001: Access denied (insufficient permissions)
found USB scanner (vendor=0x04f9, product=0x01af) at libusb:004:002
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 0x1d6b/0x0003 at 009:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 008:001: Access denied (insufficient permissions)
  # 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.

  # 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.

danno@Moneual:~$ scanimage -L
device `brother2:bus6;dev1' is a Brother MFC-440CN USB scanner
device `imagescan:esci:networkscan://192.168.1.102:1865' is a Epson WF-2760 
danno@Moneual:~$ scanimage --test
scanimage: rounded value of br-x from 215.9 to 215.88
scanimage: rounded value of br-y from 355.6 to 355.567
scanimage: scanning image of size 1648x2314 pixels at 24 bits/pixel
scanimage: acquiring RGB frame, 8 bits/sample
scanimage: reading one scanline, 4944 bytes...	PASS
scanimage: reading one byte...		PASS
scanimage: stepped read, 2 bytes... 	PASS
scanimage: stepped read, 4 bytes... 	PASS
scanimage: stepped read, 8 bytes... 	PASS
scanimage: stepped read, 16 bytes... 	PASS
scanimage: stepped read, 32 bytes... 	PASS
scanimage: stepped read, 64 bytes... 	PASS
scanimage: stepped read, 128 bytes... 	PASS
scanimage: stepped read, 256 bytes... 	PASS
scanimage: stepped read, 512 bytes... 	PASS
scanimage: stepped read, 1024 bytes... 	PASS
scanimage: stepped read, 2048 bytes... 	PASS
scanimage: stepped read, 4096 bytes... 	PASS
scanimage: stepped read, 8192 bytes... 	PASS
scanimage: stepped read, 8191 bytes... 	PASS
scanimage: stepped read, 4095 bytes... 	PASS
scanimage: stepped read, 2047 bytes... 	PASS
scanimage: stepped read, 1023 bytes... 	PASS
scanimage: stepped read, 511 bytes... 	PASS
scanimage: stepped read, 255 bytes... 	PASS
scanimage: stepped read, 127 bytes... 	PASS
scanimage: stepped read, 63 bytes... 	PASS
scanimage: stepped read, 31 bytes... 	PASS
scanimage: stepped read, 15 bytes... 	PASS
scanimage: stepped read, 7 bytes... 	PASS
scanimage: stepped read, 3 bytes... 	PASS
danno@Moneual:~$
Also did successful scans using Simple Scan and XSane. :)
Linux Mint 19.2 x64 Cinnamon 4.15.0-111-generic
Gigabyte GA-AB350M-D3H (F20) / Ryzen 5 1600 / Micron Ballistix Sport DDR4 2400 2x8GB / Sapphire Radeon HD6450
NVMe-SSD: Samsung 960 EVO 250GB / SATA-SSD: Samsung 850 EVO 250GB + Toshiba OCZ VX500 512GB

getstarted
Level 1
Level 1
Posts: 18
Joined: Sun Jul 03, 2016 2:11 pm

Re: xsane fails to open brother scanner (linux mint xfce 19.1)

Post by getstarted »

ClixTrix wrote:
Sat Jan 19, 2019 5:34 pm
ClixTrix wrote:
Sat Jan 19, 2019 4:27 pm
Success USB!

OK.....I followed the standard install for the MFC-440CN and got no joy. I installed using the same printer installer 2.2.1-1 and the rule-type1 deb from download as OP. I added "scanner" to my user account group and still no joy.

Looking through the discussion at the bug report, I tried adding the linkages and the rule 59-udev-local.rules for brother in post #36. It works. Both Simple Scan and XSane detect the scanner.

https://bugs.launchpad.net/ubuntu/+sour ... ug/1728012

Edit: Here's the detected/working scanner checks.

Code: Select all

danno@Moneual:~$ lsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 11b0:6888 ATECH FLASH TECHNOLOGY 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 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 004 Device 002: ID 04f9:01af Brother Industries, Ltd MFC-440CN
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 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
danno@Moneual:~$ 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 0x1d6b/0x0001 at 007:001: Access denied (insufficient permissions)
could not open USB device 0x11b0/0x6888 at 002:002: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 002:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 006: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/0x0002 at 001:001: Access denied (insufficient permissions)
found USB scanner (vendor=0x04f9, product=0x01af) at libusb:004:002
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 0x1d6b/0x0003 at 009:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 008:001: Access denied (insufficient permissions)
  # 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.

  # 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.

danno@Moneual:~$ scanimage -L
device `brother2:bus6;dev1' is a Brother MFC-440CN USB scanner
device `imagescan:esci:networkscan://192.168.1.102:1865' is a Epson WF-2760 
danno@Moneual:~$ scanimage --test
scanimage: rounded value of br-x from 215.9 to 215.88
scanimage: rounded value of br-y from 355.6 to 355.567
scanimage: scanning image of size 1648x2314 pixels at 24 bits/pixel
scanimage: acquiring RGB frame, 8 bits/sample
scanimage: reading one scanline, 4944 bytes...	PASS
scanimage: reading one byte...		PASS
scanimage: stepped read, 2 bytes... 	PASS
scanimage: stepped read, 4 bytes... 	PASS
scanimage: stepped read, 8 bytes... 	PASS
scanimage: stepped read, 16 bytes... 	PASS
scanimage: stepped read, 32 bytes... 	PASS
scanimage: stepped read, 64 bytes... 	PASS
scanimage: stepped read, 128 bytes... 	PASS
scanimage: stepped read, 256 bytes... 	PASS
scanimage: stepped read, 512 bytes... 	PASS
scanimage: stepped read, 1024 bytes... 	PASS
scanimage: stepped read, 2048 bytes... 	PASS
scanimage: stepped read, 4096 bytes... 	PASS
scanimage: stepped read, 8192 bytes... 	PASS
scanimage: stepped read, 8191 bytes... 	PASS
scanimage: stepped read, 4095 bytes... 	PASS
scanimage: stepped read, 2047 bytes... 	PASS
scanimage: stepped read, 1023 bytes... 	PASS
scanimage: stepped read, 511 bytes... 	PASS
scanimage: stepped read, 255 bytes... 	PASS
scanimage: stepped read, 127 bytes... 	PASS
scanimage: stepped read, 63 bytes... 	PASS
scanimage: stepped read, 31 bytes... 	PASS
scanimage: stepped read, 15 bytes... 	PASS
scanimage: stepped read, 7 bytes... 	PASS
scanimage: stepped read, 3 bytes... 	PASS
danno@Moneual:~$
Also did successful scans using Simple Scan and XSane. :)
Thanks for looking into this. Following your suggestion I created the file

/etc/udev/rules.d/59-udev-local.rules

with the following content

# Brother brscan devices
ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="*", MODE="0664", GROUP="scanner", EN
V{libsane_matched}="yes"


reboot, but to no avail, and journalctl still contains the same error message

Jan 19 16:58:02 desktop kernel: usb 1-3: usbfs: interface 0 claimed by usblp while 'scanimage' sets config #1
Jan 19 16:58:02 desktop kernel: usb 1-3: usbfs: process 2709 (scanimage) did not claim interface 1 before use
Jan 19 16:58:02 desktop upowerd[1144]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1
Jan 19 16:58:02 desktop upowerd[1144]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1

User avatar
ClixTrix
Level 6
Level 6
Posts: 1069
Joined: Wed Dec 09, 2015 11:40 am
Location: Columbus, Ohio, USA

Re: xsane fails to open brother scanner (linux mint xfce 19.1)

Post by ClixTrix »

Did you run the link commands per the recommendation?

Code: Select all

sudo ln -sfr /usr/lib64/libbr* /usr/lib/x86_64-linux-gnu
sudo ln -sfr /usr/lib64/sane/libsane-brother* /usr/lib/x86_64-linux-gnu/sane
Edit: Also, I added "scanner" to my user account in Users and Groups.

Edit2: I have the same messages in journalctl. These were there after a successful scan using Simple Scan a few minutes ago.

Code: Select all

Jan 20 07:41:16 Moneual kernel: usb 4-3: usbfs: interface 0 claimed by usblp while 'scan-thread' sets config #1
Jan 20 07:41:16 Moneual kernel: usb 4-3: usbfs: process 4126 (scan-thread) did not claim interface 1 before use
Jan 20 07:41:16 Moneual upowerd[1359]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:12.1/usb4/4-3/4-3:1.1
Jan 20 07:41:17 Moneual upowerd[1359]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:12.1/usb4/4-3/4-3:1.1
Jan 20 07:41:17 Moneual kernel: usb 4-3: usbfs: interface 0 claimed by usblp while 'scan-thread' sets config #1
Jan 20 07:41:17 Moneual kernel: usb 4-3: usbfs: process 4126 (scan-thread) did not claim interface 1 before use
Jan 20 07:41:17 Moneual upowerd[1359]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:12.1/usb4/4-3/4-3:1.1
Jan 20 07:41:31 Moneual upowerd[1359]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:12.1/usb4/4-3/4-3:1.1
Those messages apparently aren't the problem.
Linux Mint 19.2 x64 Cinnamon 4.15.0-111-generic
Gigabyte GA-AB350M-D3H (F20) / Ryzen 5 1600 / Micron Ballistix Sport DDR4 2400 2x8GB / Sapphire Radeon HD6450
NVMe-SSD: Samsung 960 EVO 250GB / SATA-SSD: Samsung 850 EVO 250GB + Toshiba OCZ VX500 512GB

getstarted
Level 1
Level 1
Posts: 18
Joined: Sun Jul 03, 2016 2:11 pm

Re: xsane fails to open brother scanner (linux mint xfce 19.1)

Post by getstarted »

ClixTrix wrote:
Sat Jan 19, 2019 6:22 pm
Did you run the link commands per the recommendation?

Code: Select all

sudo ln -sfr /usr/lib64/libbr* /usr/lib/x86_64-linux-gnu
sudo ln -sfr /usr/lib64/sane/libsane-brother* /usr/lib/x86_64-linux-gnu/sane
Edit: Also, I added "scanner" to my user account in Users and Groups.

Edit2: I have the same messages in journalctl. These were there after a successful scan using Simple Scan a few minutes ago.
Thanks for the suggestions. I did run the link commands and add myself to the scanner group, cf. the OP. Just in case, I ran these commands again and xane returned the "Failed to start scanner: Invalid argument" message.

Here's an interesting observation: When I fired up xsane for the first time (per log in session), I got the xsane UI etc, and the error message was "Failed to start scanner: Invalid argument". But after I closed xsane and ran it again, I no longer got the UI, and the error message became "Failed to open device `brother2:bus2;dev5': Invalid argument. So somehow xsane could "see" the scanner the first time, and then failed to do so afterwards?

I tried to look up the scanner's address again
lsusb | grep -n Brother
Bus 001 Device 002: ID 04f9:0180 Brother Industries, Ltd MFC-7420

scanimage -L
device `brother2:bus2;dev5' is a Brother MFC-7420 USB scanner

and then I noticed something weird:

ls -l /dev/bus/usb/001
total 0
crw-rw-r-- 1 root root 189, 0 Jan 20 10:30 001
crw-rw-r--+ 1 root scanner 189, 1 Jan 20 11:35 002
crw-rw-r-- 1 root root 189, 2 Jan 20 10:30 003
crw-rw-r-- 1 root root 189, 3 Jan 20 10:30 004
crw-rw-r-- 1 root root 189, 4 Jan 20 10:30 005
crw-rw-r-- 1 root root 189, 5 Jan 20 10:30 006

ls -l /dev/bus/usb/002
total 0
crw-rw-r-- 1 root root 189, 128 Jan 20 10:30 001

Remember that xsane complained that it couldn't find the scanner at 002:005 --- so maybe it really is an address issue? I did try

scanimage --test -d brother2:bus1;dev2

but it didn't help.

User avatar
ClixTrix
Level 6
Level 6
Posts: 1069
Joined: Wed Dec 09, 2015 11:40 am
Location: Columbus, Ohio, USA

Re: xsane fails to open brother scanner (linux mint xfce 19.1)

Post by ClixTrix »

If you noticed, those messages in journalctl came in pairs. I think the first pair initiates contact/initilization and the second does the actual scan (note the times in log). It appears you're getting the error at/with the first contact. I didn't get any log message in launch of Simple Scan, just the action of SCAN.

I never saw the errors you're having. Isusb and sane-find-scanner both showed the scanner. scanimage , Xsane, and Simple Scan failed to find the scanner. That seems consisted with the bug report.

I am using the same download drivers as your model, which appears to operate as brscan2 device.

I installed:
1. Driver Install Tool using the precise instructions provide using sudo su bash [script file] scanner-name
2. Scanner Setting File install (deb package for Ubuntu) which appears to add a rule to /etc/udev/rules.d
3. Added the rule 59 previously discussed (which by itself didn't work)
4. Ran the linkages from Terminal (which finally worked)

I did try removing the "scanner" from my user in Users and Groups, and that also works, so apparently not needed.

I am currently testing in Mint 19.1 Cinnamon for client, but will try later in xfce on test system. Perhaps that's the reason.

Any chance your install is corrupted from all the attempts?

Edit:

This is interesting (post near bottom by hhill). Are you using USB3 port? I'm using a USB2 port on the test system. Going to switch to USB3 for test.

viewtopic.php?t=266135

Edit2:

You won't believe it. It fails exactly like yours on USB3!!!!!!!!!!!!! INVALID ARGUMENT

Edit3:

Problem is discussed at Sane here in section "Communication via xHCI not working (older scanner models)".

https://wiki.archlinux.org/index.php/SANE
Linux Mint 19.2 x64 Cinnamon 4.15.0-111-generic
Gigabyte GA-AB350M-D3H (F20) / Ryzen 5 1600 / Micron Ballistix Sport DDR4 2400 2x8GB / Sapphire Radeon HD6450
NVMe-SSD: Samsung 960 EVO 250GB / SATA-SSD: Samsung 850 EVO 250GB + Toshiba OCZ VX500 512GB

getstarted
Level 1
Level 1
Posts: 18
Joined: Sun Jul 03, 2016 2:11 pm

Re: xsane fails to open brother scanner (linux mint xfce 19.1)

Post by getstarted »

SUCCESS! Kind of...
ClixTrix wrote:
Sun Jan 20, 2019 1:16 pm
If you noticed, those messages in journalctl came in pairs. I think the first pair initiates contact/initilization and the second does the actual scan (note the times in log). It appears you're getting the error at/with the first contact. I didn't get any log message in launch of Simple Scan, just the action of SCAN.

I never saw the errors you're having. Isusb and sane-find-scanner both showed the scanner. scanimage , Xsane, and Simple Scan failed to find the scanner. That seems consisted with the bug report.

I am using the same download drivers as your model, which appears to operate as brscan2 device.

I installed:
1. Driver Install Tool using the precise instructions provide using sudo su bash [script file] scanner-name
2. Scanner Setting File install (deb package for Ubuntu) which appears to add a rule to /etc/udev/rules.d
3. Added the rule 59 previously discussed (which by itself didn't work)
4. Ran the linkages from Terminal (which finally worked)

I did try removing the "scanner" from my user in Users and Groups, and that also works, so apparently not needed.

I am currently testing in Mint 19.1 Cinnamon for client, but will try later in xfce on test system. Perhaps that's the reason.

Any chance your install is corrupted from all the attempts?

Edit:

This is interesting (post near bottom by hhill). Are you using USB3 port? I'm using a USB2 port on the test system. Going to switch to USB3 for test.

viewtopic.php?t=266135

Edit2:

You won't believe it. It fails exactly like yours on USB3!!!!!!!!!!!!! INVALID ARGUMENT

Edit3:

Problem is discussed at Sane here in section "Communication via xHCI not working (older scanner models)".

https://wiki.archlinux.org/index.php/SANE
My desktop has both usb2 and usb3 ports. I just tried ALL of them and none of them worked. I need functioning usb3 ports for work so I didn't fiddle with the BIOS settings.

Your comment about my install being possibly corrupted led me to install on my latop from scratch all the packages/settings as in OP. Reboot and *** I CAN SCAN *** !! I didn't even have to apply the rule 59 trick!

This is an old laptop with only usb2 ports. I don't know if that's the reason. For now at least I can finally use my scanner for work. THANKS SO MUCH!

p.s How/where (and if!) might I report this?

User avatar
ClixTrix
Level 6
Level 6
Posts: 1069
Joined: Wed Dec 09, 2015 11:40 am
Location: Columbus, Ohio, USA

Re: xsane fails to open brother scanner (linux mint xfce 19.1)

Post by ClixTrix »

I tried moving back and forth from USB2 to USB3, and only get the problem on my test system with both USB2 and USB3. The USB3 is an add-on card to an older system.

It would appear the problem is known and tied to older scanners. I believe both our scanners are circa 2005 (before USB3 introduction around 2008). I don't know if a firmware update for the scanners would help. I don't think this bug (if it is a bug) ties to the prior bug report we've followed.

Apparently, from some other reports, on boards with both USB2 and USB3, just moving the cable from 3 to 2 doesn't fix the problem. You have to disable USB3 in BIOS.

This could be a kernel bug.

Here's a thread at debian.

https://bugs.debian.org/cgi-bin/bugrepo ... bug=727211

I'm seeing some discussion at Fedora and a few other places.
Linux Mint 19.2 x64 Cinnamon 4.15.0-111-generic
Gigabyte GA-AB350M-D3H (F20) / Ryzen 5 1600 / Micron Ballistix Sport DDR4 2400 2x8GB / Sapphire Radeon HD6450
NVMe-SSD: Samsung 960 EVO 250GB / SATA-SSD: Samsung 850 EVO 250GB + Toshiba OCZ VX500 512GB

brian_p
Level 6
Level 6
Posts: 1219
Joined: Thu Jan 17, 2019 9:20 am

Re: xsane fails to open brother scanner (linux mint xfce 19.1)

Post by brian_p »

getstarted wrote:
Sun Jan 20, 2019 3:01 pm
SUCCESS! Kind of...
Splendid. Success, nevertheless; even if we did not get to the root of the issue. Your willingness to experiment, provide information and persevere has been outstanding.
p.s How/where (and if!) might I report this?
Brother? They are the only entity who know how their scanner driver works. I wouldn't hold my breath as they do not seem to know what goes where on a modern 64-bit Linux distribution.

I'll remind you: the laptop scanner can be shared with the desktop, which you might be more comfortable using.
--
Brian.

brian_p
Level 6
Level 6
Posts: 1219
Joined: Thu Jan 17, 2019 9:20 am

Re: xsane fails to open brother scanner (linux mint xfce 19.1)

Post by brian_p »

[This is an old laptop with only usb2 ports. I don't know if that's the reason. For now at least I can finally use my scanner for work. THANKS SO MUCH!
/quote]

You have put a lot of effort into this so might be exhausted, but would a little imposition be acceptable? What does the laptop give for

Code: Select all

lsusb
sane-find-scanner
scanimage -L
ls -l /dev/bus/usb/*/* ?
--
Brian.

getstarted
Level 1
Level 1
Posts: 18
Joined: Sun Jul 03, 2016 2:11 pm

Re: xsane fails to open brother scanner (linux mint xfce 19.1)

Post by getstarted »

brian_p wrote:
Sun Jan 20, 2019 3:40 pm
[This is an old laptop with only usb2 ports. I don't know if that's the reason. For now at least I can finally use my scanner for work. THANKS SO MUCH!
You have put a lot of effort into this so might be exhausted, but would a little imposition be acceptable? What does the laptop give for

Code: Select all

lsusb
sane-find-scanner
scanimage -L
ls -l /dev/bus/usb/*/* ?
No problem -- THANKS FOR EVERYONE'S HELP! Typing from the laptop:

lsusb | grep Brother
1:Bus 002 Device 003: ID 04f9:0180 Brother Industries, Ltd MFC-7420

sane-find-scanner
[other junk deleted]
found USB scanner (vendor=0x04f9, product=0x0180) at libusb:002:003

scanimage -L
device `brother2:bus1;dev1' is a Brother MFC-7420 USB scanner

ls -l /dev/bus/usb/*/* ?[/code]
/dev/bus/usb/001/:
total 0
crw-rw-r-- 1 root root 189, 0 Jan 20 14:43 001
crw-rw-r-- 1 root root 189, 1 Jan 20 14:43 002
crw-rw-r-- 1 root root 189, 2 Jan 20 14:43 003

/dev/bus/usb/002/:
total 0
crw-rw-r-- 1 root root 189, 128 Jan 20 14:43 001
crw-rw-r-- 1 root root 189, 129 Jan 20 14:43 002
crw-rw-r--+ 1 root lp 189, 130 Jan 20 14:43 003

Note:
(1) scanimage -L returns a different address than sane-find-scanner and lsusb, AND since I can scan (and print) this is clealry not the issue!
(2) /dev/bus/usb does not show a group named "scanner", and again this does not seem to matter!
brian_p wrote:
Sun Jan 20, 2019 3:25 pm
getstarted wrote:
Sun Jan 20, 2019 3:01 pm
SUCCESS! Kind of...
Splendid. Success, nevertheless; even if we did not get to the root of the issue. Your willingness to experiment, provide information and persevere has been outstanding.
p.s How/where (and if!) might I report this?
Brother? They are the only entity who know how their scanner driver works. I wouldn't hold my breath as they do not seem to know what goes where on a modern 64-bit Linux distribution.

I'll remind you: the laptop scanner can be shared with the desktop, which you might be more comfortable using.
(3) Regarding contacting Brother: What info should I send them? I was about to say that my mfc7420 does not seem to work with machine with usb3 portion (even if there are usb2 ones) and then send them the URL of this thread.

(4) Regarding network scanning: I have a orange pi zero lying around (a RPi clone) with ethernet where I can run a headless ubuntu. I wonder if they would work? Project for the next weekend...

ger
Level 1
Level 1
Posts: 41
Joined: Mon May 05, 2014 10:29 am

Re: xsane fails to open brother scanner (linux mint xfce 19.1)

Post by ger »

Hello!

I tried to install my Brolther printer/scanner DCP-195c (a Brother type #3 machine) on my 32-bits Ubuntu 18.04 using the Driver Install Tool from the Brother website.
The printer worked, but not so the scanner.
I commanded the terminal:

export SANE_DEBUG_DLL=255 && scanimage -L

One of the lines in the output showed something like:

[dll] load: couldn’t open `/usr/lib/i386-linux-gnu/sane/libsane-brother3.so.1′ (No such file or directory),

It indicated that the Brother Driver Install Tool had installed the driver in the wrong folder!
So I commanded the terminal:

sudo ln -s /usr/lib/sane/libsane-brother3* /usr/lib/i386-linux-gnu/sane

and subsequently:

sudo systemctl restart udev.service

And the scanner sprang to life!

brian_p
Level 6
Level 6
Posts: 1219
Joined: Thu Jan 17, 2019 9:20 am

Re: xsane fails to open brother scanner (linux mint xfce 19.1)

Post by brian_p »

getstarted wrote:
Sun Jan 20, 2019 4:00 pm

(1) scanimage -L returns a different address than sane-find-scanner and lsusb, AND since I can scan (and print) this is clealry not the issue!
This was the bit I was interested in. I cannot say I am any the wiser now than before but that is down to me, not anyone else.
getstarted wrote:
Sun Jan 20, 2019 4:00 pm
(2) /dev/bus/usb does not show a group named "scanner", and again this does not seem to matter!
I wonder if group "scanner" is used on another OS and has now become enhrined in the troubleshooting techniques. "lp" is used on Mint, Ubuntu and Debian. ClixTrix also reports that adding "scanner" for a user is not needed.
getstarted wrote:
Sun Jan 20, 2019 4:00 pm
(3) Regarding contacting Brother: What info should I send them? I was about to say that my mfc7420 does not seem to work with machine with usb3 portion (even if there are usb2 ones) and then send them the URL of this thread.
You have to be careful here. Reporting a mislocation of files is one thing (which I bet they know about), pointing at USB3 is another. Their response could very well be to suggest (as has been said here) that it is a kernel bug. Maybe we will get lucky and Brother will respond positively to a report.
getstarted wrote:
Sun Jan 20, 2019 4:00 pm
(4) Regarding network scanning: I have a orange pi zero lying around (a RPi clone) with ethernet where I can run a headless ubuntu. I wonder if they would work? Project for the next weekend...
I'd see network scanning as involving a scanner directly connected to the network and the technique we have touched on (which should work with your orange pi zero) as scanning over the network. Pedantic, I know!
--
Brian.

Foxtrot Papa
Level 1
Level 1
Posts: 5
Joined: Tue May 03, 2016 5:04 am

Re: xsane fails to open brother scanner (linux mint xfce 19.1)

Post by Foxtrot Papa »

I was also succesful getting my Brother MFC-7420 working in Fxce 19.1, following the suggestion by Click Trix, who again followed a fix by Steadler-Przyborski in Post36 of the bug page.
Remarks: the problem seems to occur ony with 64 bit machines, not with 32 bitters.
Other problems popped up, after installing the scanner, and even before applying the fix, which all seem to be related to brscan.
1. Microsoft fonts
I cannot use the Ttf-mscorefonts-installer for Microsoft fonts, in the way suggested in Easy Linux Tips https://easylinuxtipsproject.blogspot.c ... html#ID1.8
I get this message:
The package system is broken
Check if you are using third party repositories. If so disable them, since they are a common source of problems.
Furthermore run the following command in a Terminal: apt-get install -f
The following packages have unmet dependencies:
brother-cups-wrapper-laser: Depends: libc6 (>= 2.4) but 2.27-3ubuntu1 is installed
brother-lpr-drivers-laser: Depends: libc6-i386 (>= 2.1.3) but 2.27-3ubuntu1 is installed
ia32-libs: Depends: libsane:i386 but it is a virtual package

2. frans@Brick:~$ sudo apt-get install -f
[sudo] password for frans:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libsane1:i386
Suggested packages:
hplip:i386
The following packages will be REMOVED:
brmfc7420lpr:i386 cupswrappermfc7420:i386
The following NEW packages will be installed:
libsane1:i386
0 upgraded, 1 newly installed, 2 to remove and 6 not upgraded.
234 not fully installed or removed.
Need to get 0 B/2180 kB of archives.
After this operation, 10,5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 290702 files and directories currently installed.)
Preparing to unpack .../libsane1_1.0.27-1~experimental3ubuntu2_i386.deb ...
Unpacking libsane1:i386 (1.0.27-1~experimental3ubuntu2) ...
dpkg: error processing archive /var/cache/apt/archives/libsane1_1.0.27-1~experimental3ubuntu2_i386.deb (--unpack):
trying to overwrite shared '/lib/udev/rules.d/60-libsane1.rules', which is different from other instances of package libsane1:i386
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libsane1_1.0.27-1~experimental3ubuntu2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
frans@Brick:~$

Is there a solution, in particular for Ttf-mscorefonts-installer? I would like to get Times Roman font installed.

OldYogi2
Level 1
Level 1
Posts: 3
Joined: Sat Jun 01, 2019 2:18 pm

Re: xsane fails to open brother scanner (linux mint xfce 19.1)

Post by OldYogi2 »

For me the linkages and the rule .59 for Brother in post #36 worked -- almost.
The XSane console starts (it hadn't before) but fails to actually scan, with the message "Failed to Start Scanner: Invalid Argument."
But, if I close that error message and try again, then XSane works just fine.
Simple Scanner just fails to start.

Running all the same Scanner checks these are my results:

Code: Select all

lsusb
Bus 001 Device 005: ID 04f9:024f Brother Industries, Ltd 

sane-find-scanner
found USB scanner (vendor=0x04f9, product=0x024f) at libusb:001:005

scanimage -L
device `brother4:bus4;dev2' is a Brother MFC-7860DW USB scanner
HOWEVER

Code: Select all

~$ scanimage --test
scanimage: rounded value of br-x from 215.9 to 215.88
scanimage: rounded value of br-y from 355.6 to 355.567
scanimage: sane_start: Invalid argument
The problem seems to be in the command to start sane. Any suggestions?

Daisuke
Level 1
Level 1
Posts: 26
Joined: Fri Jun 21, 2019 6:29 pm

Re: xsane fails to open brother scanner (linux mint xfce 19.1)

Post by Daisuke »

I am running Linux Mint Cinnamon Tina (19.2) and wanted to scan with the Brother MFC-7840W multi-function machine.
Printing worked with no additional effort on my part but scanning was problematic.

After installing/updating the sane packages and the drivers from Brother, adding myself to the scanner group, and adding the required entry to the missing file 40-libsane.rules which I download from here https://gist.github.com/hishamhm/eef039 ... b2192dbc9c and put in this directory: /lib/udev/rules.d/
I still could not scan. SANE stands for Scanner Access Now Easy!

What finally made the difference was this article: https://bugs.launchpad.net/ubuntu/+sour ... ug/1728012 which states that after Ubuntu 17.10 scanning failed because some dynamic shared libraries were not placed in the directories searched by sane. I tried the symbolic linking step suggested above by ClixTrix, but that did not work as was mentioned in the article about the bug above.

What did work was actually copying the files as root to the directory which is searched by sane.

Code: Select all

su -s
cp /usr/lib64/libbrscan*  /usr/lib/x86_64-linux-gnu/
cp /usr/lib64/sane/libsane*  /usr/lib/x86_64-linux-gnu/sane
Then, after a day's work, I was finally able to scan using the built-in Linux Mint application, Simple Scan, found in the LM Menu.

O happy day!
SimpleScan.png

Post Reply

Return to “Printers & Scanners”