Bug 1684434

Summary: Scanning broken for HP LaserJet 3052
Product: [Fedora] Fedora Reporter: Dick Marinus <dick>
Component: hplipAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: dick, jan.public, jpopelka, tkorbar, twaugh, zdohnal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hplip-3.18.12-6.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-31 03:00:37 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
0001-remove-sane_control_option-9.patch none

Description Dick Marinus 2019-03-01 09:22:21 UTC
Description of problem:


Version-Release number of selected component (if applicable): hplip-3.18.12


How reproducible:


Steps to Reproduce:
1. Run hp-scan

Actual results:
error: No data read

Expected results:
Scanned image


Additional info: This seems to be introduced since 3.18.9 by the Misfeed(multipick) detection change.

When multipick is disabled, by changing if(0) to if(1) in scanext.c:

if(0)
{
SANE_Bool b = SANE_TRUE;
    sane_control_option (self->h, 9, SANE_ACTION_SET_VALUE, (void *)&b, &i);
}
else
{
SANE_Bool b = SANE_FALSE;
    sane_control_option (self->h, 9, SANE_ACTION_SET_VALUE, (void *)&b, &i);
}

Everything seems to be working. Could this please be patched in the hplip package?

Comment 1 Zdenek Dohnal 2019-03-04 13:12:02 UTC
Hi Dick!

Thank you for reporting the issue! To be honest, I have no idea what author meant by this if/else... it sets option number 9 (which can be completely different option for different handles) always to TRUE, not for what reason and what specific device option the author tries to set... Upstream does not have hplip in any public versioning system and there are no comments in this piece of code, so we can only guess.
IMO your patch can have some other unwanted outcome (your patch now sets the option to false), so my proposal would be remove the if/else, try if scanning works for you and report upstream to refactor their part of code. 
Would you mind testing if the scanning works if you remove the if/else code?

Comment 2 Dick Marinus 2019-03-24 18:55:33 UTC
Created attachment 1547500 [details]
0001-remove-sane_control_option-9.patch

Remove added block for sane_control_option 9

I've applied this patch and hplip keeps working for my MFP (as suspected).

Comment 3 Fedora Update System 2019-03-25 13:29:07 UTC
hplip-3.18.12-6.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-10abd337e0

Comment 4 Fedora Update System 2019-03-27 04:34:00 UTC
hplip-3.18.12-6.fc29 has been pushed to the Fedora 29 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-2019-10abd337e0

Comment 5 Fedora Update System 2019-03-31 03:00:37 UTC
hplip-3.18.12-6.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.