I was wrong when I thought the issue only comes up with the button daemon.

I tried to find a way to reproduce it and found this:

watch "SANE_DEFAULT_DEVICE=fujitsu:fi-7160:42929 scanimage > image.pnm"

Sometimes I just put some papers into the hopper and let it scan. It takes
maybe half a minute and I get the error

scanimage: open of device fujitsu:fi-7160:42929 failed: Invalid argument

This is on SANE backends 1.2.1 but also happens with 1.4.0, OS is
AlmaLinux 10 (RHEL10 compatible) with kernel 6.12.0. Using USB2 or USB3
connection doesn't change anything.

Regards,
Simon

> well, are you normally killing button daemon, or did the problem start
> before that?
>
> On Wed, Jan 14, 2026 at 3:54 PM Simon Matter <[email protected]>
> wrote:
>
>> There is nothing in dmesg, unfortunately.
>> I see that the button daemon does a sane_open() but when it is
>> terminated
>> with SIGTERM, there is no sane_close() called from what I understand.
>> Could that be problem?
>>
>> Thanks,
>> Simon
>>
>> > Again, check for kernel-level errors using dmesg.
>> >
>> > On Wed, Jan 14, 2026 at 2:59 PM Simon Matter <[email protected]>
>> > wrote:
>> >
>> >> Everything changed, yes.
>> >> The button daemon is a quite small program so I expected it to work
>> also
>> >> with the new system. I was wrong here and now I try to find out why
>> it
>> >> leaves the system in a state where access to the device is blocked.
>> >>
>> >> Simon
>> >>
>> >> > What changed? Just the sane-backends version, or anything else
>> >> (hardware,
>> >> > OS, etc)
>> >> >
>> >> > allan
>> >> >
>> >> > On Wed, Jan 14, 2026 at 2:32 PM Simon Matter
>> <[email protected]>
>> >> > wrote:
>> >> >
>> >> >> I can confirm now that the problem is with the button daemon
>> >> >> scanmonitord-sanebd only and not with scanimage.
>> >> >>
>> >> >> When I run "SANE_DEFAULT_DEVICE=fujitsu:fi-7160:42929
>> >> >> scanmonitord-sanebd"
>> >> >> several times in a terminal and terminate it with Ctrl+C, it will
>> >> >> suddenly
>> >> >> say "Open of device fujitsu:fi-7160:42929 failed: Invalid
>> argument".
>> >> >> While studying the code of scanmonitord-sanebd.c I'm failing to
>> >> >> understand
>> >> >> what could be wrong. This has worked fine with SANE backends
>> 1.0.24
>> >> but
>> >> >> something has changed here.
>> >> >>
>> >> >> If anyone has an idea what could be wrong, please let me know. I'm
>> >> quite
>> >> >> lost here.
>> >> >>
>> >> >> Thanks,
>> >> >> Simon
>> >> >>
>> >> >> > I start to believe the problem is not in SANE itself but in the
>> >> button
>> >> >> > daemon we are using (see attachement).
>> >> >> >
>> >> >> > Our software is running the button daemon and waits for events,
>> >> then
>> >> >> > terminates the button daemon and does the appropriate scanimage
>> >> job,
>> >> >> and
>> >> >> > then starts the button daemon again.
>> >> >> >
>> >> >> > The button daemon is a modified version of some daemon which was
>> >> >> floating
>> >> >> > around many years ago. It has worked well for the last 15 years
>> or
>> >> so.
>> >> >> > Maybe there is some modification needed to make it work well
>> with
>> >> >> newer
>> >> >> > SANE.
>> >> >> >
>> >> >> > If someone who knows SANE better than me would take a look at
>> it,
>> >> that
>> >> >> > would be much appreciated.
>> >> >> >
>> >> >> > Thanks,
>> >> >> > Simon
>> >> >> >
>> >> >> >> We need to isolate the problem if possible- I expect if you
>> >> compile
>> >> >> an
>> >> >> >> older, known working sane-backends on your current computer,
>> the
>> >> >> problem
>> >> >> >> will persist. That would indicate hardware or OS level issue.
>> >> >> >>
>> >> >> >> allan
>> >> >> >>
>> >> >> >> On Wed, Jan 14, 2026 at 9:35 AM Simon Matter via sane-devel <
>> >> >> >> [email protected]> wrote:
>> >> >> >>
>> >> >> >>> >
>> >> >> >>> > Hello,
>> >> >> >>> >
>> >> >> >>> > On 2026-01-14 14:59, Simon Matter via sane-devel wrote:
>> >> >> >>> >> These scanners work perfectly fine with very old
>> sane-backends
>> >> >> >>> >> and operating system.
>> >> >> >>> >
>> >> >> >>> > Does it work on the exact same computer
>> >> >> >>> > where it fails or does it work on old computers?
>> >> >> >>>
>> >> >> >>> It works fine on old computers with old software.
>> >> >> >>>
>> >> >> >>> >
>> >> >> >>> > I ask because of possible USB 3 related issues, see
>> >> >> >>> > https://en.opensuse.org/SDB:Configuring_Scanners#USB
>> >> >> >>>
>> >> >> >>> Thanks, I'll check it out.
>> >> >> >>>
>> >> >> >>> Simon
>> >> >> >>>
>> >> >> >>>
>> >> >> >>>
>> >> >> >>
>> >> >> >> --
>> >> >> >> "well, I stand up next to a mountain- and I chop it down with
>> the
>> >> >> edge
>> >> >> >> of
>> >> >> >> my hand"
>> >> >> >>
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >
>> >> > --
>> >> > "well, I stand up next to a mountain- and I chop it down with the
>> edge
>> >> of
>> >> > my hand"
>> >> >
>> >>
>> >>
>> >>
>> >
>> > --
>> > "well, I stand up next to a mountain- and I chop it down with the edge
>> of
>> > my hand"
>> >
>>
>>
>>
>
> --
> "well, I stand up next to a mountain- and I chop it down with the edge of
> my hand"
>



Reply via email to