Xsane, network scanner, and MX23.1

Over the Christmas/New Year break I put a new SSD in my computer , and decided to
install MX23 on it as the grub-controlling Linux. I chose mx23.1-ahs-x64.iso because it has kernel 6.5 while the standard edition has kernel 6.1 , which I wanted to avoid.

Everything went smoothly, I installed grub, setup networks, installed lots of software, and setup my 2 printers with no hassle.
but
Then I tried to setup the scanner which is part of my Brother MFC640CW multifunction printer. The Brother MFC is a network printer, it has IP-192.168.32.98, I can ping it, and I can print to it.
The Brother scanner drivers are a simple install

1. dpkg -i --force-all brscan2-0.2.5-1.amd64.deb
   dpkg -l | grep Brother

2.
brsaneconfig2 -a name=brscan2 model="MFC-640CW" ip=192.168.32.98

3.
cd /usr/lib64
cp -r sane /usr/lib
cp libbrcolm* /usr/lib
cp libbrscandec* /usr/lib

4.
scanimage -L 

5.
apt-get install xsane
xsane

I can see the installed software

$ dpkg -l | grep Brother
ii  brscan2                                  0.2.5-1                                amd64        Brother Scanner Driver
ii  cupswrappermfc210c:i386                  1.0.2-3                                i386         Brother MFC210C CUPS wrapper driver
ii  mfc210clpr:i386                          1.0.2-1                                i386         Brother lpr Inkjet Printer Definitions

The scanner driver is the first line above, the others are for printer.

Sane can see the device

$ brsaneconfig2 -q
  0 "MFC-9450CDN"
.....
 68 "MFC-640CW"
.....
Devices on network
  0 brscan2             "MFC-640CW"         I:192.168.32.98

and my printer is no68 in its list.
but scanimage fails

$ scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

and xsane gives the familiar ‘no devices found’ popup
Screenshot_2023-12-30_20-20-39

OK, maybe I made a mistake. Check everything, make sure inetd is present ( I dont think it needs it anyway because it uses saned -l), check the daemon (saned ) is running

$ ps ax | grep sane
   3172 ?        Ss     0:00 /usr/sbin/saned -a saned
   3173 ?        S      0:00 /usr/sbin/saned -a saned

Dont know why there are two, but that always happens. … No luck there.

I also have MX21 , on my HDD. I was planning to replace it with this new install of MX23.
MX21 runs my scanner perfectly.
A tedious compare of the 2 installations ( MX23 and MX21) shown they are identical,
except the software versions are different
This is MX23 and MX21 versions

                                   MX23                   MX21
ii  libsane-common                 1.2.1-2                1.0.31-4  
ii  libsane-hpaio:amd64            3.22.10+dfsg0-2                   
ii  libsane1:amd64                 1.2.1-2                1.0.31-4
ii  sane-utils                     1.2.1-2                1.0.31-4               
ii  xsane                          0.999-12+b1            0.999-10
ii  xsane-common                   0.999-12               0.999-10

Two possibilities

  • it may be a version issue
  • it may be that the newer 1.2.1-2 version requires systemd ( I run my MX’s with sysVinit)

To dispense with the latter possibility, I installed the Brother scanner drivers in Debian 12
(in a VM) , and they fail to work there . Debian12 has systemd, so that removes the systemd possibility. Debian 12 has the same versions as MX23, so it looks like a version problem.

To be totally sure, I installed the Brother scanner drivers in Devuan5… same story … xsane fails to find the device. Devuan 5 has the same versions as MX23.

That is fairly conclusive. … the new sane software versions in Debian12 and derivatives
are faulty.
What I want to do now in MX23 is uninstall those six sane software packages , and install older versions. MX23 is not missing something, the problem is in all Debian 12 distros.

I have never done that using apt before. How do I do a windback of specific packages with apt?

3 Likes

Oops, there seems to be a FOSS article on that

and another

but none of them tell me how to proceed if the repo does not contain any earlier version of a package?

2 Likes

Why not try using Gentoo instead of MX for your printer/scanner setup? It is up to kernel version 6.8 and should run your graphics.

That is one of my serious options.
Portage seems to have much better control over package
versions than apt does.
Winding back a large package like sane with lots of dependencies, would seem to be difficult with apt

My list of options are

  • keep a frozen MX21 just to drive my scanner
  • delete sane from MX23 and try a local install of an earlier version outside the package system
  • try gentoo
  • try void

Both Gentoo and Void involve unpacking the brother scanner
drivers, which are a .deb file, and installing the pieces
manually. I have done it before for printer drivers… I can drive the Brother printer from Void. Never tried with Gentoo.

Looks like the New Year is going to be busy first, then maybe happy.

3 Likes

Have you considered W10?

1 Like

I had it once in the other PC.
All I have is a recovery DVD. Can I put it back from that into a different PC?
I do have W7 in a VM. That would probably work, but not very convenient.
Easier to keep MX21

1 Like

No!!! Why do you fight Linux and device drivers, I am sure that Brothers has software and drivers for your printer and scanner. Why do you think I use Windows first and Linux second.
You have a new SSD and a new GPU, give yourself a break and your PC, install W10 and use Linux on the spinner drives or in a VM. You will have to have ntfs and Windows either needs the whole drive or at least the 1st partition. You can download a W10 ISO from several places, I sometimes use a website called Get-Into-PC, I can send you a link, if you want. Do not try using the Windows media creation tool, without a working Windows OS.

1 Like

What specs does this PC have?

1 Like

Core i7 generation 2 , Sandy Bridge, 64Gb ram, PCie3

1 Like

How many drives will that machine run?

1 Like

It is running 3 sata disks at moment, and I have one spare
6Gb/s sata port, plus several 3Gb/s ports.
I am in the middle of reorganising disks after putting in the new SSD. MX23 was supposed to be my new safe fallback.
May be changing that.
Dont suggest a Win disk… it does not meet my requirements for a safe fallback.
I might have Win as a toy, but that can be in VM.

1 Like

I do not understand your reasoning, explain, in a private post. I am not going to debate the Windows/Linux issue, you can have, and use both, and not in a VM.

1 Like

Fallback:
It is just the things I need.
It has to run R and Latex and a C and Fortran compiler and vi and make and tools like awk, sed, grep …
And it has to drive my printers, scanner, run backups with rsync or clonezilla, and run my mail and browser.
And I want access to repos, preferably Debian.
And I occasionally need to read a Word doc or spreadsheet file, so it needs Libreoffice or equivalent, but I dont work with
them, they are just translators for me.
Lately, I have also needed markdown viewers like Remarkable.

So its mostly about office functions and programming. But my office functions are abnormal.
I do other more experimental stuff like Virt-manager or docker or Julia elsewhere.

Win just does not fit my needs. It would do some of it, but would be clumsy for me. Its work pattern is foreign to a Unix person like me.

2 Likes

OK, I can see why you use Linux and I am sure you will find the support you need, just glad you are not pushing the “Linux is best scenario” if Linux works, then go for it.
I on the other hand, use Windows, as a tool to learn Linux, have nothing against either one, but Windows will run most of my software, depending on what version of Windows I install, and my devices.
You have also contributed, to my knowledge of running Linux, thank you!!!

1 Like

OK lets call a truce on that.
If I wanted videos, and games and Office suite and a good gui,
I would probably use Win or Apple. I have nothing against
Win, it just does not fit a CLI persons needs. DOS would probably suit me better.

4 Likes

Update:

I went to Void linux, which has libsane version 1.2.1… same as MX23 and Debian12.

I unpicked the .deb file containing my brother
scanner drivers, and copied them by hand into Void. (This is not the place to document unpacking .deb files… if you want to do that ask me ) . The result… Xsane still can not find the scanner device.

So, conclusion is, this issue is not a Debian peculiarity, it is a version issue with libsane .

I cant downgrade libsane in either Debian or Void, because there is no archive containing an earlier version of libsane.
I would have to rebuild the libsane binary package from source.
There may be a way to downgrade libsane in Gentoo… it has more archives available.
At the moment my proposed solution is build a docker
container with Debian11 + libsane + xsane and use that container in MX23 to drive my scanner.
I should be able to use that docker container in any distro in the future… it would provide an xsane in a working environment immune to system changes.
Building the docker container is not a trivial task, but it seems
easier and safer than a dubious downgrade, and I only have to do it once.

3 Likes

One has to love linux after reading all the comments!!!

2 Likes

Have a go at docker. It is interesting. You can use it in Gentoo.

2 Likes

In the past I’ve had to fix some missing folders and symlinks dealing with my Brother scanner- Ubuntu mainly
Seems they had the same problem with MX .

https://mxlinux.org/wiki/hardware/scanners/

EDIT: I just re-read your install and noticed you did add these… sorry

1 Like

Hi Joel,
Yes, I know about that thanks. It is a pain. Brother
should do a fix.
It will be interesting to see how I get on with a docker container
Regards
Neville

1 Like