Closed keks24 closed 2 years ago
This package seems to be unmodified by us or by Raspbian and the issue isn't caused by an interaction with one of our other changes. Since it's a straight Debian package and I don't know enough about how it's meant to work, this one is probably for the maintainers of the package.
https://www.debian.org/Bugs/Reporting
If they agree that this makes sense, I can backport their change.
TL;DR: Remove the parameter
--no-create-home
from the following line from the shell scriptpostinst
, so calibration (.cal
) files can be saved in/var/lib/saned/.sane/
:Hello,
I would like to report a bug, where the home directory
/var/lib/saned/
in the Raspbian packagesane-utils_1.0.27-3.2_armhf.deb
is missing.While I was investigating the USB bug
-1 EPIPE (Broken Pipe)
on my Raspberry Pi 4 (8 GB), which uses Raspbian (Debian Buster
) as operating system, I analysed thesaned
process viastrace
:I figured out, that the process tries to create the directory
/var/lib/saned/.sane/
while scanning:It then tries to create and open the binary file
hewlett-packard-scanjet-2300c.cal
in that directory after the client detached from thesaned
process/socket:With this knowledge, I created the home directory for
saned
like so:Then, I scanned one more time and found the above mentioned directory
.sane/
and the binary filehewlett-packard-scanjet-2300c.cal
:After that, I did some more investigation, if creating the home directory has some impact and it does.
If the home directory is missing, it causes the
saned
process to initialise the scanner every time the client initiates a scan process. I always hear the servo motor adjusting for each initiated scan with a timeout of about three to five seconds. This timeout is hardware related. During tests with other hardware to investigate the USB bug, the following rule of thumb should apply: The less CPU power, the higher the timeout after initiating a scan.If the home directory exists on the other hand, the process will look for a suiting
.cal
file in there first and then loads it. Initiating a scan with a pre-loaded.cal
file will skip the servo motor adjustments and the scanner just scans.Digging further and looking into the
postinst
file; I found the section, where the usersaned
is created viaadduser
:The user
saned
is created and will use the home directory/var/lib/saned/
. The parameter--home
will actually create the given path automatically, but the parameter--no-create-home
prevents this.It would be nice, if
--no-create-home
could be removed in further updates.-Ramon