[sane-devel] "scanimage: sane_start: Invalid argument" with a Canon LiDE 220 scanner

Ralph Little skelband at gmail.com
Fri Mar 5 16:46:09 GMT 2021


On 2021-03-05 2:14 a.m., YuGiOhJCJ wrote:
> Hello,
> I confirm that the workaround on your link is working.
> If I set "SANE_DEBUG_SANEI_USB" to "5" then I am able to scan.
> I confirm that it works.
> However, I don't understand how a debug variable can fix the problem.
I have seen a couple of ways that enabling debug can affect the
performance of a program:

1) Changes the timing of the program, i.e. to slow it down, such that a
timing issue is averted.

2) I have also seen instances where the flow of the code is altered by
switching on debug so that critical code is only executed when debug is

I suspect that 1) above is the culprit here. Most likely the backend
needed to wait for the scanner to be ready and it is not.

> Is there a better way to fix that please?
There surely is, but that will have to wait for Povilas to look into it
and find a solution.
As always with these timing issues, diagnosing it can be a difficult
task since reproduction is often problematic.
I have a LiDE 220 here and it works just fine for me. There may be many
variables involved to conspire to make it a rare event.
We could ask you to give us some diag to pinpoint the issue, but of
course that would make the problem go away :(

I may have time to look into this myself but it may take some time.


More information about the sane-devel mailing list