On 16/09/2020 06:05, Ralph Little wrote:
Hi,

On 2020-09-15 4:33 a.m., Charles Lindsey wrote:
I have cracked it; well, sort of.

Still using my old 0.999-5ubuntu2 version of xsane.
Clearly, the preview uses a low resolution scan. So I tried doing a
full scan at various resolutions.

50 dpi - banding seen
75 dpi - banding seen
100 dpi - banding seen
150 dpi - no banding

I an still planning to download and compile the newer 0.999-8ubuntu2
version of xsane (but not today). In the meantime, I suggest you try
the same experiment on your Epson 1260.

Using Simple Scan, I got no banding at either 75 dpi or 150 dpi, so I
still think it is an xsane problem.


OK, I *think* that I might be seeing something like what you are.
I get no stripiness, but some resolutions give me a red tinted scan.
It looks to be the same kind of pink tint that you see but it is for the
entire scan area.

I have to say that I only get this if I set the bit depth to 14. 8
doesn't give me any problems.

In all cases, I get the funny thin yellow stripe on the right hand side
which may or may not be related.
For all the scans, I am using xsane.

Apologies for long delay but I was hospitalized for a while.

I downloaded and compiled the source code for xsane. It is in a messy state, and maintained (in a desultory manner) by some guys at Debian. Gcc complained of many casts from pointer to int. I changes these to long, but it made no difference.

I then downloaded the code for the plusek backend and compiled it. This was difficult because I do not have autoconf and its package had too many dependencies which I did not really want. So I had to do a bit of guesswork to get a config.h. It did compile but the problem remained. After many hours of using gdb to find how it worked, plus some use of the builtin SANE_DEBUG facility and comparing that with SANE_DEBUG on simple-scan which worked correctly, I spotted what the problem was.

It is not a BUG; it is a FEATURE!

Simple-scan runs a calibration (both Course and Fine) om every startup.
Xsane has a setting "calibration cache" which can be set in the Standard Options window, and which I had set (because it seemed like a good idea). When set, it causes the result of the calibration to be set in
 ~/.sane/Epson_Perfection_1250_Photo-coarse.cal
and in
 ~/.sane/Epson_Perfection_1250_Photo-fine.cal
If it sees these in a later run, it uses them and omits the calibration process entirely. In the backend code there ia a variable 'dev->adj.cacheCalData' but nowhere could I find where it gets set, though I see now it can be set in /etc /sand.d/plustek.conf, which is presumably where simple-scan picks it up.

Anyway, when I first used Xsane in Ubuntu 18.04 (where sane 1.0.27 was used), it created these cache files (which suffered from the original bug), and when I switched to sane 1.0.31 (both the binary package and my locally compiled one) it still used these buggy cache files (simple-scan followed the new code, of course). So when I deleted them and let xsane re-create them, it all started to work correctly (not even any sign of Ralph's yellow stripe).

I also found a few oddities:
in plustek.c, it declares:
        struct SIGACTION act;
However, that struct is nowhere defined. I had to change it to
        struct sigaction act;
and also
 #include <signal.h>

Also, when running xsane and even simple-scan, it produced massive warnings of the form: MIB search path: /home/chl/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
Cannot find module (SNMPv2-MIB): At line 1 in (none)
Cannot find module (IF-MIB): At line 1 in (none)
Cannot find module (IP-MIB): At line 1 in (none)
Cannot find module (TCP-MIB): At line 1 in (none)
Cannot find module (UDP-MIB): At line 1 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 1 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 1 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 1 in (none)
Cannot find module (DISMAN-SCHEDULE-MIB): At line 1 in (none)
Cannot find module (HOST-RESOURCES-TYPES): At line 1 in (none)
Cannot find module (MTA-MIB): At line 1 in (none)
Cannot find module (NETWORK-SERVICES-MIB): At line 1 in (none)
Cannot find module (SNMPv2-TC): At line 15 in /usr/share/snmp/mibs/UCD-DISKIO-MI
and much more. But I did not see them when using my own compiled 
backend-plustek.

The bug is described in https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/1795861, but the workaround given there doesn't work. AFAICS, it is trying to use the feature to use a scanner elsewhere on the net, but I have not installed saned because I do not need it. How do I turn it off?


--
Charles H. Lindsey ---------At my New Home, still doing my own thing------
Tel: +44 161 488 1845                    Web: http://www.cs.man.ac.uk/~chl
Email: [email protected]              Snail-mail: Apt 40, SK8 5BF, U.K.
PGP: 2C15F1A9 Fingerprint: 73 6D C2 51 93 A0 01 E7 65 E8 64 7E 14 A4 AB A5

Reply via email to