Brother MFC-7220: Scanner allergic to Linux?

Hello.

I have been fighting with this machine since mid-2014, & it has consistently beaten me. Being an MFC, it prints & scans… at least it does both those in Windows. Ever since i changed from Windows to Linux however, i’ve only ever managed to get its printer function working [which is fine], but never its scanner. My first Linux was Mint KDE4, then Maui, now oS TW. In all three… great printing, nil scanning. I’m hoping that some benevolent genius here might pls be able to identify what i’m doing wrong. Here’s my latest TW attempt:

  1. I reviewed each of these:
  1. poppler-tools is installed & up to date.

  2. libstdc++6-32bit is installed & up to date.

  3. I ran linux-brprinter-installer-2.1.1-1

  4. My MFC successfully printed the test page after that.

  5. I added myself to the "lp’ group, then logged out/in.

  6. According to http://support.brother.com/g/s/id/linux/en/download_scn.html#brscan2 my MFC-7220 is a brscan2 model, so I verified that */etc/sane.d/dll.conf *has the necessary ‘brother2’ entry present and uncommented.

  7. I created new file 66-brother.rules in /etc/udev/rules.d/ [then rebooted], with content:


# Brother MFC-7220
ATTR{idVendor}=="04f9", ATTR{idProduct}=="0185", MODE="0664", GROUP="lp", ENV{libsane_matched}="yes"
#
# https://forums.opensuse.org/showthread.php/499286-I-can-t-make-work-my-brother-scanner-MFC-1810?p=2652454#post2652454
# a more generalised rule (that doesn't care about model) should work okay too
# ATTR{idVendor}=="04f9", MODE="0664", GROUP="lp", ENV{libsane_matched}="yes"

  1. For the preceding, i first tried the first ATTR line, rebooted, scanning failed, edited file to activate 2nd ATTR line, rebooted, scanning still failed.

  2. I obtained the chipset details from:


linux-Tower:~> **lsusb**                                                                                                                                      
Bus 004 Device 002: ID 8087:8001 Intel Corp.  
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 
Bus 003 Device 002: ID 8087:8009 Intel Corp.  
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub 
**Bus 001 Device 010: ID 04f9:0185 Brother Industries, Ltd MFC-7220 Printer **
Bus 001 Device 008: ID 045e:0039 Microsoft Corp. IntelliMouse Optical 
Bus 001 Device 006: ID 413c:2003 Dell Computer Corp. Keyboard 
Bus 001 Device 007: ID 413c:2010 Dell Computer Corp. Keyboard 
Bus 001 Device 005: ID 413c:1003 Dell Computer Corp. Keyboard Hub 
Bus 001 Device 004: ID 0461:4d81 Primax Electronics, Ltd Dell N889 Optical Mouse 
Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. Hub 
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 

  1. The MFC is plugged into a USB2 not USB3 port.

  2. Simple Scan can see the machine:
    https://paste.opensuse.org/images/48176750.png

  3. But all attempts to actually scan, still fail like has happened for three years & three distros:
    https://paste.opensuse.org/images/68195063.png

  4. YaST also sees it:
    https://paste.opensuse.org/images/67939493.png

Same as with Mint & Mau before, i’ve run out of ideas to try. Each time i need to scan, i still have to launch my dreaded Win10 VM, & do it that way… aggravatingly that works perfectly.

Anything interesting reported in the ~/.cache/simple-scan/simple-scan.log ?

Does scanimage report the scanner as expected?

scanimage -L

Using the bus# and device# reported are you able to complete a successful scan using something like the following?

scanimage -d brother2:libusb:001:010 --format=tiff >image.tiff

*Substitute the applicable bus:device IDs for the connected scanner device.

Thanks for your fast reply deano.

Here’s the log:


+0.00s] DEBUG: simple-scan.vala:637: Starting Simple Scan 3.26.0, PID=4
+0.02s] CRITICAL: g_action_print_detailed_name: assertion 'g_action_name_is_valid (action_name)' failed
+0.02s] CRITICAL: gtk_application_set_accels_for_action: assertion 'detailed_action_name != NULL' failed
+0.05s] DEBUG: app-window.vala:1714: Loading state from /home/gooeygirl/.cache/simple-scan/state
+0.05s] DEBUG: app-window.vala:1671: Restoring window to 600x400 pixels
+0.05s] DEBUG: autosave-manager.vala:64: Loading autosave information
+0.05s] DEBUG: autosave-manager.vala:259: Waiting to autosave...
+0.09s] DEBUG: scanner.vala:1454: sane_init () -> SANE_STATUS_GOOD
+0.09s] DEBUG: scanner.vala:1460: SANE version 1.0.27
+0.09s] DEBUG: scanner.vala:1521: Requesting redetection of scan devices
+0.10s] DEBUG: scanner.vala:806: Processing request
+0.15s] DEBUG: scanner.vala:341: sane_get_devices () -> SANE_STATUS_GOOD
+0.15s] DEBUG: scanner.vala:353: Device: name="brother2:bus4;dev1" vendor="Brother" model="MFC-7220" type="USB scanner"
+0.34s] DEBUG: autosave-manager.vala:281: Autosaving book information
+0.34s] DEBUG: app-window.vala:1775: Saving state to /home/gooeygirl/.cache/simple-scan/state
+0.46s] DEBUG: app-window.vala:1775: Saving state to /home/gooeygirl/.cache/simple-scan/state
+3.73s] DEBUG: app-window.vala:1775: Saving state to /home/gooeygirl/.cache/simple-scan/state
+4.09s] DEBUG: simple-scan.vala:454: Requesting scan at 150 dpi from device 'brother2:bus4;dev1'
+4.09s] DEBUG: scanner.vala:1569: Scanner.scan ("brother2:bus4;dev1", dpi=150, scan_mode=ScanMode.GRAY, depth=2, type=ScanType.SINGLE, paper_width=0, paper_height=0, brightness=0, contrast=0, delay=15ms)
+4.09s] DEBUG: scanner.vala:806: Processing request
+4.23s] DEBUG: app-window.vala:1775: Saving state to /home/gooeygirl/.cache/simple-scan/state
+4.96s] DEBUG: app-window.vala:1775: Saving state to /home/gooeygirl/.cache/simple-scan/state
+10.24s] DEBUG: scanner.vala:867: sane_open ("brother2:bus4;dev1") -> SANE_STATUS_INVAL
+10.24s] WARNING: scanner.vala:871: Unable to get open device: Invalid argument
+10.36s] DEBUG: app-window.vala:1775: Saving state to /home/gooeygirl/.cache/simple-scan/state
+15.21s] DEBUG: app-window.vala:1775: Saving state to /home/gooeygirl/.cache/simple-scan/state
+16.83s] DEBUG: autosave-manager.vala:195: Deleting autosave records
+16.83s] DEBUG: scanner.vala:1597: Stopping scan thread
+16.83s] DEBUG: scanner.vala:806: Processing request
+16.83s] DEBUG: scanner.vala:1608: sane_exit ()



Now the command response:


gooeygirl@linux-Tower:~> scanimage -L
**device `brother2:bus4;dev1' is a Brother MFC-7220 USB scanner**
gooeygirl@linux-Tower:~> 

Wrt your final command, i’m sorry for my ignorance, but which parts of it are where i need to substitute my MFC’s details?

Since this on TW. see this thread https://forums.opensuse.org/showthread.php/526075-Samsung-ML-1640-working-on-Leap-not-on-Tumbleweed?highlight=ML-1640
You as well might have to blacklist the device, then run YaST - Hardware - Scanner .

Hi,

You might need to install the libusb-1.0 Compatibilty Librarary for libusb-0.1
InTumbleweed it is

libusb-0_1-4

I am using a brother mfc also and I always have to install this package
to be able to use the scanner.

You might need a reboot after installing the package.

Hope this help.

I have to add lp to both the user and group to make the scanner work also.
Not only in group as you mentioned.

You need a reboot for this also.

Now the command response:

gooeygirl@linux-Tower:~> scanimage -L
device `brother2:bus4;dev1’ is a Brother MFC-7220 USB scanner
gooeygirl@linux-Tower:~>

Wrt your final command, i’m sorry for my ignorance, but which parts of it are where i need to substitute my MFC’s details?

Based on the above…

scanimage -d brother2:libusb:004:001 --format=tiff >image.tiff

That’s interesting to know. I haven’t run into this problem with my DCP-7055 scanner. It might be the key. :slight_smile:

Thank you. I followed your link, & then also its own link – very interesting. I have not yet tried this blacklist, because it seems to apply to a printer, whereas with my MFC the printing function is fine. As i’ve now seen several other helpful replies herein, i’m going to try them all, one by one, & if via that means my scanner is still useless, i shall certainly then return to your nice clue & try it too. :slight_smile:

Oh, right, [slaps forehead], i should have deduced that myself – thank you. Unfortunately however:


gooeygirl@linux-Tower:~> **scanimage -d brother2:libusb:004:001 --format=tiff >image.tiff**                                       
scanimage: open of device brother2:libusb:004:001 failed: Invalid argument                                                                                   
gooeygirl@linux-Tower:~>  

Hello & thanks

Sadly, it’s already installed:


gooeygirl@linux-Tower:~> **zypper if libusb-0_1-4**                                                                                                                                                                                 
Loading repository data...                                                                                                                                       
Reading installed packages...                                                                                                                                    
                                                                                                                                                                 
                                                                                                                                                                 
Information for package libusb-0_1-4:                                                                                                                            
-------------------------------------                                                                                                                            
Repository     : Main Repository (OSS)                          
Name           : libusb-0_1-4                                   
Version        : 0.1.13-36.8                                    
Arch           : x86_64                                         
Vendor         : openSUSE                                       
Installed Size : 68.1 KiB                                       
Installed      : **Yes**                                            
Status         : **up-to-date**                                     
Source package : libusb-compat-0.1.5-36.8.src                   
Summary        : libusb-1.0 Compatibility Library for libusb-0.1
Description    :                                                
    A compatibility layer allowing applications written for libusb-0.1 to
    work with libusb-1.0. libusb-compat-0.1 attempts to look, feel, smell
    and walk like libusb-0.1.


gooeygirl@linux-Tower:~> 

Thanks, but this also has not resolved the [intractable] problem.

I, as a user, am in these groups [this is unchanged]:


gooeygirl@linux-Tower:~> **id**
uid=1000(gooeygirl) gid=100(users) groups=100(users),7(lp),475(vboxusers)


gooeygirl@linux-Tower:~> **groups**
users lp vboxusers

And now, following your suggestion, into the group “users”, to which i belong, i have now added “lp” … is that what you meant?

I then rebooted, tried Simple Scan again, but as usual it still cannot connect to the scanner [or so it says]. Unsurprisingly, i still get the same bad outcome here too:


gooeygirl@linux-Tower:~> **scanimage -d brother2:libusb:004:001 --format=tiff >image.tiff**
scanimage: open of device brother2:libusb:004:001 failed: Invalid argument
gooeygirl@linux-Tower:~>

Sigh…

As everything else to this point has not solved the problem, i now returned to this. The relevant segment of my /etc/default/tlp is now:


# Exclude listed devices from USB autosuspend (separate with spaces).
# Use lsusb to get the ids.
# Note: input devices (usbhid) are excluded automatically
#USB_BLACKLIST="1111:2222 3333:4444"
#Added 26/9/17 as last-ditch attempt to get the bloody Brother MFC-7220 **SCANNER** to work.
#Reference1 = https://forums.opensuse.org/showthread.php/526075-Samsung-ML-1640-working-on-Leap-not-on-Tumbleweed?p=2836288#post2836288
#Reference2 = https://ubuntu-mate.community/t/printer-pauses-randomly-after-upgrade-to-16-04/5653/52
USB_BLACKLIST="04f9:0185"
# UPDATE: Still NFG.

The ID i blacklisted of course came from:


gooeygirl@linux-Tower:~> **lsusb**
Bus 002 Device 003: ID **04f9:0185** Brother Industries, Ltd MFC-7220 Printer

After this edit, i ran:


gooeygirl@linux-Tower:~> **sudo tlp usb**
[sudo] password for root: 
USB autosuspend settings applied.

Then:


gooeygirl@linux-Tower:~> **scanimage -d brother2:libusb:004:001 --format=tiff >image.tiff**
scanimage: open of device brother2:libusb:004:001 failed: Invalid argument

Then, as you suggested [despite me feeling it was now redundant, given the above], i ran YaST - Hardware - Scanner do anything there, just launched it, then “OK”]. Repeating the preceding;


gooeygirl@linux-Tower:~> **scanimage -d brother2:libusb:004:001 --format=tiff >image.tiff**
scanimage: open of device brother2:libusb:004:001 failed: Invalid argument

I then rebooted, logged in as my second user [ie, obviously to eliminate any possibility of this being some weird fault in my main user profile], tried Simple Scanner;
https://paste.opensuse.org/images/27982282.png

I think that Brother are owed a serious amount of congratulations. It cannot have been easy to create an MFC model which is so comprehensively defiantly obstinately USELESS for scanning in Linux. Well done Brother, i curtsy before you.

Thank you all for your valiant efforts to help me here. 3+ years & my MFC-7220 Scanner continues to vanquish all challengers!

:cry:

Yes, that result is consistent with the simple-scan log…

+10.24s] DEBUG: scanner.vala:867: sane_open ("brother2:bus4;dev1") -> SANE_STATUS_INVAL
+10.24s] WARNING: scanner.vala:871: Unable to get open device: Invalid argument

I think you’ve run into a regression that will require a bug report to help resolve. (FWIW, I’m reading of similar reports in Ubuntu forum and bug threads.)

I note that TW uses sane v1.0.27, while Leap 42.3 is still at v 1.024. If you’re up for a bit of experimentation, you could try ‘downgrading’ sane-backends to 1.0.25 perhaps…

https://software.opensuse.org/package/sane-backends

For example install a single package from home:jsmeix repo.

Thanks deano.

TW uses sane v1.0.27, while Leap 42.3 is still at v 1.024. If you’re up for a bit of experimentation, you could try ‘downgrading’ sane-backends to 1.0.25 perhaps…

I must say, i feel quite washed out, deflated & pessimistic now about this #@&*!! problem. I’m not averse to “a bit of experimentation”, if it would not jeopardise anything else in my TW installation. However a [silly?] question first…

One of my many VMs in my TW Tower is Leap 42.3. Would it have any value if i attempted to get this #@&*!! MFC to scan in this VM?

Yes, that could be worth a shot. If it’s a VM guest, you’ll need to configure USB passthru on the host for the device of course. At least we might more clearly learn if the problem is with the vendor driver or libsane perhaps.

Brother = 4, MintKDE4+Maui+TW+Leap42.3 = 0 !! Grrrrrrrrrrrrrr.

I have now repeated all the steps i’ve already documented in this thread for TW, in my Leap 42.3 VM, with only two exceptions:

  1. I didn’t/couldn’t do the /etc/default/tlp
    edit, because it doesn’t exist in Leap… as already pointed out here https://forums.opensuse.org/showthread.php/526075-Samsung-ML-1640-working-on-Leap-not-on-Tumbleweed?p=2836295#post2836295 & here https://forums.opensuse.org/showthread.php/526075-Samsung-ML-1640-working-on-Leap-not-on-Tumbleweed?p=2836294#post2836294 . 1. My scanimage
    command in Leap’s Konsole was slightly different to my TW one, due of course to different values being returned by Leap VM’s scanimage -L, viz:

linux-p6ec:~> **scanimage -L**
device `brother2:bus**2**;dev**1**' is a Brother MFC-7220 USB scanner

But it was all to no avail, once again this MFC-7220 showed its disdain for Linux wrt scanning [it did do the Test [i]Print all ok in Leap, just like in TW… it’s only the scanner which seems unable to work unless in MSWindows]:


linux-p6ec:~> **scanimage -d brother2:libusb:002:001 --format=tiff >image.tiff**
scanimage: open of device brother2:libusb:002:001 failed: Invalid argument
linux-p6ec:~> 

I facetiously titled my topic here “…Scanner allergic to Linux?” → so far this remains true.

Bus 002 Device 003: ID 04f9:0185 Brother Industries, Ltd MFC-7220 Printer

Just wondering whether the scanimage command is right re. the device numbers.
Is skanlite installed? If not, try it. If it detects the scanner it should work as well.

What does


scanimage -L 

give ?

Sorry to hear that it didn’t work for you.

I went to read your first post and I saw you use the brother installer for installing the printer driver.
and you also created this:

  1. I created new file 66-brother.rules in /etc/udev/rules.d/ [then rebooted], with content:
    Code:

Brother MFC-7220

ATTR{idVendor}==“04f9”, ATTR{idProduct}==“0185”, MODE=“0664”, GROUP=“lp”, ENV{libsane_matched}=“yes”

https://forums.opensuse.org/showthread.php/499286-I-can-t-make-work-my-brother-scanner-MFC-1810?p=2652454#post2652454

a more generalised rule (that doesn’t care about model) should work okay too

ATTR{idVendor}==“04f9”, MODE=“0664”, GROUP=“lp”, ENV{libsane_matched}=“yes”

Since openSUSE 12 versions I stop creating the above qouted from your first post, mine just works.

I suggest, maybe if you “want”, how about retry to reinstall the printer driver from scratch with a different procedure.
First download the appropriate latest rpm driver package from Brother support website
then put in folder and in yast2 add the folder containing the driver packages as repository. Next uninstall the current driver then use yast2
to install the driver from your new folder repository.