getsolus / packages

Solus Package Monorepo & Issue Tracker
51 stars 68 forks source link

Problem using simple-scan when scanning document exceeds one page #1771

Closed PennyFarthing-GH closed 3 months ago

PennyFarthing-GH commented 4 months ago

Please confirm there isn't an existing open bug report

Summary

I am a Budgie Desktop user and I use an HP Officejet 2622 printer. Unable actually to scan a document exceeding one page with simple-scan. 2024-03-01_17-30_error_simple-scan

Steps to reproduce

When I want to scan a document of several pages with this application, the first page is scanned without any problem, but when I get to the second page, an error message "Impossible de se connecter au périphérique de numérisation" (unable to connect to scanning device) appears systematically.

Expected result

I want to scan documents with simple-scan whatever the number of pages to scan.

Actual result

The following error message appears when scanning the 2nd page: "Impossible de se connecter au périphérique de numérisation" (unable to connect to scanning device)

Environment

Repo

Shannon (stable)

Desktop Environment

Budgie

System details

administrateur@solus-budgie ~ $ inxi -b
System:
  Host: solus-budgie Kernel: 6.6.17-277.current arch: x86_64 bits: 64
  Desktop: Budgie v: 10.9.1 Distro: Solus 4.5 resilience
Machine:
  Type: Desktop Mobo: Gigabyte model: B85M-D3H v: x.x
    serial: <superuser required> UEFI: American Megatrends v: F15
    date: 08/20/2015
CPU:
  Info: dual core Intel Core i3-4160 [MT MCP] speed (MHz): avg: 3595
    min/max: 800/3600
Graphics:
  Device-1: Intel 4th Generation Core Processor Family Integrated Graphics
    driver: i915 v: kernel
  Device-2: NVIDIA GP107 [GeForce GTX 1050 Ti] driver: nvidia v: 535.154.05
  Device-3: Logitech Webcam C270 driver: snd-usb-audio,uvcvideo type: USB
  Display: x11 server: X.Org v: 21.1.11 with: Xwayland v: 23.2.4 driver: X:
    loaded: nvidia gpu: nvidia,nvidia-nvswitch resolution: 1920x1080
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 535.154.05
    renderer: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    driver: r8169
Drives:
  Local Storage: total: 1.02 TiB used: 732.03 GiB (70.2%)
Info:
  Memory: total: 16 GiB available: 15.52 GiB used: 2.65 GiB (17.1%)
  Processes: 301 Uptime: 22m Shell: Bash inxi: 3.3.33
administrateur@solus-budgie ~ $ 

Other comments

With the software Skanpage, I was able to scan all the pages of my document. But, from the 2nd page, by clicking on the Numériser button (scan), I obtained the message "Argument incorrect"; so, by clicking this button a 2nd time, scanning was normally done.

With another one called Master PDF Editor someone in the Solus Forum suggested to try, it says "Error open device".

It's as if simple-scan (or other software like this) didn't recognize correctly the device printer.

PennyFarthing-GH commented 4 months ago

Issue opened at the request of @alfisya

malfisya commented 4 months ago

Putting these similiar issue here :

malfisya commented 4 months ago

Okay, I managed to solve this on my printer (HP Deskjet 5820) by installing sane-airscan. After installing that , simple-scan will have another scanner named : "eSCL - Your Printer" in the drop-down menu. Select that and now I can scan multiple pages without any error. To read more abaout sane-airscan, here is their github page. There is a little quirk with sane-airscan: Usually it shows scanning process in real-time, now with "eSCL", it only shows the page when the scan is completed.

Now, the question is would it be good to just add sane-airscan as rundeps onsimple-scan and skanpage or any scanner utility for good OOTB experience? Thoughts @ReillyBrogan @joebonrichie ?

PennyFarthing-GH commented 4 months ago

New elements:

From this day (01/08/2024) I scanned a 2-page document withsimple-scan, 3 updates were produced for the packages hplip and hplip-drivers:

NB. The previous update then dates back to 07/29/2023.

I tested each version, from the most recent to the one that took place before my last scan.

I was this one that worked, by typing the following terminal command: sudo eopkg it hplip-3.23.5-56-1-x86_64.eopkg hplip-drivers-3.23.5-56-1-x86_64.eopkg and then reboot.

An important (and surprising) note: I was able to scan a 2-page document using a single page (Page unique) instead of multiple pages from a flat scanner (Pages multiples depuis un numériseur à plat)!

PennyFarthing-GH commented 4 months ago

@malfisya ask me to precise that this issue concerns @TraceyC77 (the maintainer of hplip)

TraceyC77 commented 3 months ago

Thank you, @PennyFarthing-GH , for providing so much detail about this problem. That will help me narrow down the problem.

I've done testing with my own HP Color LaserJet Pro MFP M479fdn printer / scanner. Method Scan a multi-page document, double sided, from the auto document feeder. Then attempt a second scan from the flatbed. Software Simple Scan, Skanlite and Skanpage from eopkg. Then, I removed the Skanpage eopkg and installed the flatpak. I found the flatpak works as expected, but I received errors with all testing with the eopkgs (details below).

I'm looking into our hplip package to see if there's a problem caused by how we package it.

@malfisya Thanks for linking the issues that may be related. I'll have a look at them. Adding sane-airscan to the rundeps of other scanner programs is not a bad idea, but is probably not going to solve the root cause of this issue. Scanning used to work without errors (for me and for the reporter), and now there is a bug. If you would like sane-airscan support in the scanning programs, please open an enhancement request for us to add it. I suspect this is being caused in how we package hplip which is affecting the plugin / firmware HP uses to communicate with the scanner.

Testing details

All 3 scanning programs I tested with can connect to the printer (as in the original message). They can scan all pages successfully from the ADF. They all have trouble after that scan is complete.

Simple Scan (Document Scanner) - scanned all pages successfully. If I try to start a second scan (same document) I get an error. "Failed to scan. Unable to start scan". Further clicks on the Scan button will produce the error "Failed to scan. Unable to connect to scanner" If I try to start a new scan in a new document I get "Failed to scan. Unable to connect to scanner" All further attempts to scan will fail until I restart Document Scanner. Skanlite - scanned all pages successfully If I try to scan from the flatbed next, I get an error "Error during device I/O". If I click Scan again, it is successful. Skanpage (eopkg) - scanned all pages successfully. If I switch to the flatbed after ADF scanning I get an error "Error during I/O". If I click Scan again, it works.

Skanpage (flatpak) - no error. The fact that the flatpak works without issue is what causes me to think there's a difference in packaging between the eopkg and flatpak that is important.

malfisya commented 3 months ago

@TraceyC77 Maybe you already saw it, but this is the forum post where it all started https://discuss.getsol.us/d/10368-simple-scan-hp-printer-scanner. (With much unnecessary details 😅).

TraceyC77 commented 3 months ago

@malfisya Yes, I was already following that forum thread. No need to ping me here. I keep an eye on printer related forum threads

If you have any specific details to add, please add them here.