Bug 1288712

Summary: Fix for HP8200 scanners: ADF infinite loop [patch]
Product: [Fedora] Fedora Reporter: Thibault North <thibault.north>
Component: sane-backendsAssignee: Nils Philippsen <nphilipp>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: nphilipp, organicchemistry_01, thibault.north, zdohnal
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: sane-backends-1.0.25-6.fc25 sane-backends-1.0.25-6.fc26 sane-backends-1.0.25-7.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-01 17:06:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch against sane-backends none

Description Thibault North 2015-12-05 13:23:36 UTC
Created attachment 1102523 [details]
Patch against sane-backends

Description of problem:

Without the attached patch, sane is stuck in a loop and can't scan. The output of scanimage is:
$ scanimage --device avision:libusb:004:003 --format=tiff > test.tiff
scanimage: open of device avision:libusb:004:003 failed: Operation not supported

Version-Release number of selected component (if applicable):
sane-backends-1.0.25-1

Steps to Reproduce:
1. Find a ScanJet 8200 from HP...
2. run scanimage --device <the device from scanimage -L> --format=tiff > test.tiff

Actual results:
Operation not supported (timeout?)

Expected results:
test.tiff.

Additional info:
This patch was adapted from https://bugzilla.novell.com/show_bug.cgi?id=840443 and rebased against sane-backends-1.0.25

Attached patch works for me.

Comment 1 Thibault North 2016-08-10 15:41:43 UTC
The problem still exists with Fedora 24.

Unless there is a reason/opposition to this patch, I'm ready to request ACLs to apply it.

Comment 2 Nils Philippsen 2016-10-14 15:34:51 UTC
Hey Thibault, sorry for the lack of response from my side so far!

I'd gladly accept help maintaining the sane-backends component. If that's what you mean, please check the relevant boxes here:

https://admin.fedoraproject.org/pkgdb/package/rpms/sane-backends/

Regarding the patch you attached, I have reservations about enabling the option as a default, I suspect that only certain devices show the error you experience. Can you take this upstream -- http://sane-project.org -- and we apply the patch without making the option enabled by default in the interim?

Comment 3 Zdenek Dohnal 2016-11-09 16:47:02 UTC
*** Bug 1392712 has been marked as a duplicate of this bug. ***

Comment 4 Thibault North 2016-11-09 17:34:09 UTC
Hi Nils,

Ok, I'll check upstream.
I'll apply for ACLs and push the fix - disabling it by default sound like a reasonable option.

Comment 5 Nils Philippsen 2016-12-20 13:54:16 UTC
Hi Thibault! Any news from upstream about this?

Comment 6 Thibault North 2016-12-20 14:23:34 UTC
Hi Nils,

Looks like a fix was commited upstream:

"""
commit 6585b6f60d07a196e42c99b935e2754bbc80b3c8
Author: Dave Platt <dplatt>
Date:   Thu Dec 15 22:29:16 2016 -0800

    avision.c: Add "skip-adf" option
    
    The code which tries aggressively to reset/initialize HP 82xx/83xx
    Automatic Document Feeders doesn't work well if there's no ADF attached,
    because the scanner reports a non-zero ADF model type in this case.
    The retry code makes several attempts to initialize the ADF, and then
    bails out with an "Operation not supported" error.
    
    Add a new "option skip-adf" which will cause the backend to believe
    the "ADF not present" status if that's what the scanner reports.
    
    Fixes #313751
"""

See https://alioth.debian.org/tracker/?group_id=30186&atid=410366&func=detail&aid=313751

The patch can most likely be backported as a patch before this fix makes it into a new release of sane-backends. What do you think?

Comment 7 Nils Philippsen 2016-12-23 18:29:11 UTC
Hi Thibault,

that sounds fine to me! I'm on vacation until after New Year, so if you want to give it a go...? You seem to be set as far as co-maintainer permissions are concerned. Otherwise I can do it when I return.

Comment 8 Nils Philippsen 2017-03-14 16:41:49 UTC
This has been laying around too long already, I'll build it.

Comment 9 Thibault North 2017-03-14 17:04:27 UTC
Thanks. I couldn't find time for this unfortunately.

Comment 10 Fedora Update System 2017-03-15 09:25:44 UTC
sane-backends-1.0.25-6.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-8d1ecdf7e2

Comment 11 Fedora Update System 2017-03-15 09:25:53 UTC
sane-backends-1.0.25-6.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d969db6151

Comment 12 Fedora Update System 2017-03-15 09:25:59 UTC
sane-backends-1.0.25-6.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-8964acb82a

Comment 13 Nils Philippsen 2017-03-15 09:28:12 UTC
(In reply to Thibault North from comment #9)
> Thanks. I couldn't find time for this unfortunately.

Me neither until now, no worries. But you can test it ;).

Comment 14 Thibault North 2017-03-15 09:48:06 UTC
I'd love to, but this scanner is now 700 km south from me.
Once I am able to reach it (with or without proxy :)) i'll give it a try!

Comment 15 Fedora Update System 2017-03-15 19:56:28 UTC
sane-backends-1.0.25-6.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-d969db6151

Comment 16 Fedora Update System 2017-03-15 19:58:41 UTC
sane-backends-1.0.25-6.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-8d1ecdf7e2

Comment 17 Fedora Update System 2017-03-16 00:49:27 UTC
sane-backends-1.0.25-6.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-8964acb82a

Comment 18 Fedora Update System 2017-03-21 03:20:44 UTC
sane-backends-1.0.25-6.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2017-03-23 12:07:12 UTC
sane-backends-1.0.25-7.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-0f5fe1913f

Comment 20 Fedora Update System 2017-03-24 19:52:21 UTC
sane-backends-1.0.25-7.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-0f5fe1913f

Comment 21 Fedora Update System 2017-04-01 17:06:24 UTC
sane-backends-1.0.25-6.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2017-05-19 22:54:09 UTC
sane-backends-1.0.25-7.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.