Bug 428056 - Skanlite gives "Invalid argument" error when attempting to scan
Summary: Skanlite gives "Invalid argument" error when attempting to scan
Status: CLOSED NOT A BUG
Alias: None
Product: Skanlite
Classification: Applications
Component: general (show other bugs)
Version: 2.2.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Kåre Särs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-21 12:03 UTC by Want_Reason2Use_Linux
Modified: 2020-11-11 22:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Output report for first debug command (53.71 KB, text/plain)
2020-10-21 13:53 UTC, Want_Reason2Use_Linux
Details
Output report for second debug command (1.38 KB, text/plain)
2020-10-21 13:54 UTC, Want_Reason2Use_Linux
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Want_Reason2Use_Linux 2020-10-21 12:03:43 UTC
SUMMARY
I have Skanlite 2.2.0-1 on Kubuntu. When attempting to scan, it produces error "Invalid Argument"

STEPS TO REPRODUCE
1. Open skanlite, which searches for scanners.
2. Select the only scanner available over the Wifi (HP Color LaserJet Pro MFP M277dw with a IP address) (Home environment, not an office network nor server printer)
3. The Skanlite screen opens.
4. Placed A4 printout on the (ADR and Flatbed produce same result) with settings: scan source ADF, Scan mode colour, resolution 300dpi, Scan Area A4.
5. Click Scan or Preview.
6. Popup says: "Invalid Argument"

OBSERVED RESULT
Popup says: "Invalid Argument"

EXPECTED RESULT
Start scanning the document or documents.

SOFTWARE/OS VERSIONS
Windows: (Scanner works on a nother laptop running Windows 10)
macOS: n/a
Linux/KDE Plasma: Kubuntu 20.10
(available in About System)
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Comment 1 Kåre Särs 2020-10-21 13:22:44 UTC
Thanks for the report.

Can you run skanlite with debugging enabled?

from a terminal run:

SANE_DEBUG_DLL=128 skanlite

And then attach the output to this report.

I am assuming that the scanner is supported by the hpaio backend so maybe a more interesting debug log would be to run Skanlite with the following command

SANE_DEBUG_HPAIO=16 skanlite

(and attach the log to this report)

Thanks,
  Kåre
Comment 2 Want_Reason2Use_Linux 2020-10-21 13:53:01 UTC
Created attachment 132607 [details]
Output report for first debug command
Comment 3 Want_Reason2Use_Linux 2020-10-21 13:54:45 UTC
Created attachment 132608 [details]
Output report for second debug command

There are 3 instances of the Scanner and Printer that are detected. Only one of the 3 allows Skanlite to open, but returns the "Invalid Argument" error as described in the initial thread.
Comment 4 Kåre Särs 2020-10-21 15:05:22 UTC
Thanks for the logs!

Did you try scanning with the hpaio logs? I did not find the reason for the "Invalid Argument".

Could you add a log with a higher debug value for hpaio (you can play with the level to see where you start to get interesting oputput) 128 is the highest if I remember correctly...

Regards,
  Kåre
Comment 5 Want_Reason2Use_Linux 2020-10-22 17:39:23 UTC
(In reply to Kåre Särs from comment #4)
> Thanks for the logs!
> 
> Did you try scanning with the hpaio logs? I did not find the reason for the
> "Invalid Argument".
> 
> Could you add a log with a higher debug value for hpaio (you can play with
> the level to see where you start to get interesting oputput) 128 is the
> highest if I remember correctly...
> 
> Regards,
>   Kåre

Hi.

These logs don't seem to bring up any further information ...
user@user-HP-Pavilion-m6-Notebook-PC:~$ SANE_DEBUG_HPAIO=128 skanlite
[sanei_debug] Setting debug level of hpaio to 128.
[hpaio] sane_hpaio_init(): scan/sane/hpaio.c 349
[hpaio] sane_hpaio_get_devices(local=0): scan/sane/hpaio.c 370
[hpaio] sane_hpaio_get_devices(local=0): scan/sane/hpaio.c 370
[hpaio] scantype=5 hp:/net/hp_color_laserjet_mfp_m277dw?ip=192.168.1.6&queue=false
[hpaio] sane_hpaio_exit(): scan/sane/hpaio.c 364

I wonder if there is something missing in the SANE drivers of Skanlite installation?

Perhaps if you can guide me through uninstalling the drivers and Skanlite and reinstalling, it may start to work? Note that I have installed the Printer part through "System Settings" and this is working fine (Maybe my "suggestion" is because I have been too long in Windows environments).
Comment 6 2wxsy58236r3 2020-10-26 07:29:33 UTC
Please try the hplip package and then run "hp-setup printer_ip".
(or hplip-gui for GUI)

See also:
https://wiki.archlinux.org/index.php/SANE/Scanner-specific_problems#HP
https://www.systutorials.com/how-to-configure-scanner-in-a-hp-all-in-one-printer-on-linux/
Comment 7 2wxsy58236r3 2020-11-07 06:51:36 UTC
See also:
https://developers.hp.com/hp-linux-imaging-and-printing/binary_plugin.html

For m277dw, you probably need hplip + the binary plugin for scanning support.
Comment 8 Want_Reason2Use_Linux 2020-11-10 18:08:53 UTC
(In reply to 2wxsy58236r3 from comment #7)
> See also:
> https://developers.hp.com/hp-linux-imaging-and-printing/binary_plugin.html
> 
> For m277dw, you probably need hplip + the binary plugin for scanning support.

Thank you very much ... this link together with your previous message did the trick. I had some trouble initially, so removed all previous installations of the printer.
1. Connected the MFP using the printer USB cable.
2. Waiting for the computer to do its auto-detect thing.
3. Then from the console>hp-setup
4. On the first pop-up, brings up a 2nd pop-up.
5. Following the instructions on the second pop, where I was prompted to choose the correct Wifi as I have 2 routers. Just before this completes, there is an instruction to run hp-setup printer_ip.
6. On the first popup, even though it says step 1 of 3, I selected Cancel, because Next started the process again.
7. From the console> hp-setup printer_ip
8. Three printers are installed (1 printer, 1 fax, and 1 scanner).
9. I am unable to select the HPLIP Device Manager as it gives an "HPLIP Status Service: Unable to locate hp-toolbox on system PATH"
10. But I can now use Scanlite for scanning and can print from other programs.

Thank you for you assistance.
Comment 9 2wxsy58236r3 2020-11-11 05:53:03 UTC
(In reply to Want_Reason2Use_Linux from comment #8)
You are welcome.

> I am unable to select the HPLIP Device Manager as it gives an
> "HPLIP Status Service: Unable to locate hp-toolbox on system PATH"
If you want to use HPLIP Device Manager GUI, you may be able to solve this by installing hplip-gui.
Comment 10 Want_Reason2Use_Linux 2020-11-11 22:14:11 UTC
Thank you everyone for your assistance - My HP MFP printer and scanner works with an HP Device Manager GUI. Since these threads are used by others, I will add my step, which continues from Comment 8.
11. Application Launcher -> Applications -> System -> Muon Package Manager.
12. Enter "hplip" into the search bar (the search is automatic as you type).
13. hplip and hplip-data are shown as "installed", but hplip-gui is shown as "Not Installed".
14. Select the hplip-gui line, then click "Installation" (Newbies, don't be surprised if nothing happens).
15. Click the "Apply Changes" near the top of the window, and the installation runs to completion.
16. Application Launcher -> Applications -> System -> HPLIP Toolbox.