Scanning with simple-scan via network needs root and breaks after first page

Hello everyone,

since I re-installed Manjaro Gnome with Wayland (i used Xorg before), I am having trouble scanning. I use simple-scan and a Brother MFC-L2710DN via LAN.

a) It takes a while until simple-scan finds the scanner
b) it needs my sudo password before it finds the scanner. Well, it used to - I started simple-scan as root as a test and since then it no longer asks for the password even when started as user. (Starting simple-scan as root did not help in any way.)
c) it only scans one page then breaks and shows the first page and an additional blank page while the scanner continues to scan all pages. When the scanner is finished, simple-scan shows an error message stating the scan process could not be started. The blank page disappears and I am left with the first page.
d) While scanning, I do not see the progress, I only see the scanned page once it is completely scanned.

I can then repeat the process by putting all the paper except the first page in again, simple-scan does not break but it’s very annoying.

Sometimes it would scan two or three pages and then fail but usually it’s only one.

If I only scan one page, no error message occurs.

I have no problems printing on the same device.

I mentioned the change to Wayland because that is what obviously changed but I have no idea why Wayland / Xorg should be relevant here. My user account is in the scanner group but I read that should no longer be relevant.

Any help is appreciated, thank you.

Bump. Even with today’s updates, no change in behaviour. Anyone got a clue or something where to start looking?

Hello @Konzertheld :wink:

After reading this:

I would say, start it in debug mode:

simple-scan --debug

(the log is also at $HOME/.cache/simple-scan)

and have look what it is doing. Scan like you would do as usual and post the log here.

Hey @megavolt, thanks for your answer. I opened simple-scan as suggested, the log is attached.

  1. [+10,60s] DEBUG: scanner.vala:1657: Requesting redetection of scan devices apparently is what causes the password request. I noticed that I only have to enter the password when I start simple-scan for the first time after a reboot.
  2. I googled [+32,06s] CRITICAL: page_finish: assertion ‘self != NULL’ failed and found that someone on Linux Mint had the same issue a year ago. No solution though. (Scanning several Pages from flatbet scanner doesn't work (simple-scan; HP envy 4504) - Linux Mint Forums)

Looks like a bug to me but would be strange if nobody noticed until now. This seems to be my issue, I will join the conversation: Failed to scan document (#245) · Issues · GNOME / Document Scanner · GitLab

simple-scan --debug                                              ✔ 
[+0,00s] DEBUG: simple-scan.vala:2014: Starting simple-scan 40.1, PID=3489
[+0,00s] DEBUG: unsetenv() is not thread-safe and should not be used after threads are created
[+0,06s] DEBUG: app-window.vala:2003: Loading state from /home/christian/.cache/simple-scan/state
[+0,06s] DEBUG: app-window.vala:1982: Restoring window to 600x400 pixels
[+0,06s] DEBUG: app-window.vala:1986: Restoring window to maximized
[+0,17s] DEBUG: app-window.vala:2078: Saving state to /home/christian/.cache/simple-scan/state
[+2,12s] DEBUG: scanner.vala:1590: sane_init () -> SANE_STATUS_GOOD
[+2,12s] DEBUG: scanner.vala:1596: SANE version 1.0.32
[+2,12s] DEBUG: scanner.vala:1657: Requesting redetection of scan devices
[+2,12s] DEBUG: scanner.vala:844: Processing request
[+10,60s] DEBUG: scanner.vala:348: sane_get_devices () -> SANE_STATUS_GOOD
[+10,60s] DEBUG: scanner.vala:1657: Requesting redetection of scan devices
[+10,60s] DEBUG: scanner.vala:844: Processing request
[+17,82s] DEBUG: scanner.vala:348: sane_get_devices () -> SANE_STATUS_GOOD
[+17,82s] DEBUG: scanner.vala:360: Device: name="escl:http://192.168.178.37:80" vendor="Brother" model="MFC-L2710DN series" type="adf,platen scanner"
[+25,10s] DEBUG: simple-scan.vala:1819: Requesting scan at 300 dpi from device 'escl:http://192.168.178.37:80'
[+25,10s] DEBUG: scanner.vala:1748: Scanner.scan ("escl:http://192.168.178.37:80", dpi=300, scan_mode=ScanMode.GRAY, depth=2, type=adf, side=both, paper_width=0, paper_height=0, brightness=0, contrast=22, delay=0ms)
[+25,10s] DEBUG: scanner.vala:844: Processing request
[+25,12s] DEBUG: scanner.vala:905: sane_open ("escl:http://192.168.178.37:80") -> SANE_STATUS_GOOD
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (0)
[+25,12s] DEBUG: scanner.vala:776: Option 0: name='(null)' title='Number of options' type=int size=4 cap=soft-detect
[+25,12s] DEBUG: scanner.vala:779:   Description: Read-only option that specifies how many options a specific device supports.
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (1)
[+25,12s] DEBUG: scanner.vala:776: Option 1: name='(null)' title='Scan mode' type=group size=0
[+25,12s] DEBUG: scanner.vala:779:   Description: 
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (2)
[+25,12s] DEBUG: scanner.vala:776: Option 2: name='mode' title='Scan mode' type=string size=8 values=["Lineart", "Gray", "Color"] cap=soft-select,soft-detect
[+25,12s] DEBUG: scanner.vala:779:   Description: Selects the scan mode (e.g., lineart, monochrome, or color).
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (3)
[+25,12s] DEBUG: scanner.vala:776: Option 3: name='resolution' title='Scan resolution' type=int size=4 unit=dpi values=[100, 200, 300, 600] cap=soft-select,soft-detect
[+25,12s] DEBUG: scanner.vala:779:   Description: Sets the resolution of the scanned image.
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (4)
[+25,12s] DEBUG: scanner.vala:776: Option 4: name='source' title='Scan source' type=string size=8 values=["Flatbed", "ADF"] cap=soft-select,soft-detect
[+25,12s] DEBUG: scanner.vala:779:   Description: Selects the scan source (such as a document-feeder).
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (5)
[+25,12s] DEBUG: scanner.vala:776: Option 5: name='(null)' title='Geometry' type=group size=0 cap=advanced
[+25,12s] DEBUG: scanner.vala:779:   Description: Scan area and media size options
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (6)
[+25,12s] DEBUG: scanner.vala:776: Option 6: name='tl-x' title='Top-left x' type=fixed size=4 unit=mm min=0,000000, max=214,545319, quant=0 cap=soft-select,soft-detect
[+25,12s] DEBUG: scanner.vala:779:   Description: Top-left x position of scan area.
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (7)
[+25,12s] DEBUG: scanner.vala:776: Option 7: name='tl-y' title='Top-left y' type=fixed size=4 unit=mm min=0,000000, max=295,571320, quant=0 cap=soft-select,soft-detect
[+25,12s] DEBUG: scanner.vala:779:   Description: Top-left y position of scan area.
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (8)
[+25,12s] DEBUG: scanner.vala:776: Option 8: name='br-x' title='Bottom-right x' type=fixed size=4 unit=mm min=1,354660, max=215,899994, quant=0 cap=soft-select,soft-detect
[+25,12s] DEBUG: scanner.vala:779:   Description: Bottom-right x position of scan area.
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (9)
[+25,12s] DEBUG: scanner.vala:776: Option 9: name='br-y' title='Bottom-right y' type=fixed size=4 unit=mm min=1,354660, max=296,925995, quant=0 cap=soft-select,soft-detect
[+25,12s] DEBUG: scanner.vala:779:   Description: Bottom-right y position of scan area.
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (10)
[+25,12s] DEBUG: scanner.vala:776: Option 10: name='(null)' title='Enhancement' type=group size=0 cap=advanced
[+25,12s] DEBUG: scanner.vala:779:   Description: 
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (11)
[+25,12s] DEBUG: scanner.vala:776: Option 11: name='preview' title='Preview' type=bool size=4 cap=soft-select,soft-detect
[+25,12s] DEBUG: scanner.vala:779:   Description: Request a preview-quality scan.
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (12)
[+25,12s] DEBUG: scanner.vala:776: Option 12: name='preview-in-gray' title='Force monochrome preview' type=bool size=4 cap=soft-select,soft-detect
[+25,12s] DEBUG: scanner.vala:779:   Description: Request that all previews are done in monochrome mode.  On a three-pass scanner this cuts down the number of passes to one and on a one-pass scanner, it reduces the memory requirements and scan-time of the preview.
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (13)
[+25,12s] DEBUG: scanner.vala:776: Option 13: name='brightness' title='Brightness' type=int size=4 min=-1, max=2, quant=0 cap=soft-select,soft-detect,inactive
[+25,12s] DEBUG: scanner.vala:779:   Description: Controls the brightness of the acquired image.
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (14)
[+25,12s] DEBUG: scanner.vala:776: Option 14: name='contrast' title='Contrast' type=int size=4 min=-1, max=2, quant=0 cap=soft-select,soft-detect,inactive
[+25,12s] DEBUG: scanner.vala:779:   Description: Controls the contrast of the acquired image.
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (15)
[+25,12s] DEBUG: scanner.vala:776: Option 15: name='sharpen' title='Sharpen' type=int size=4 min=-1, max=2, quant=0 cap=soft-select,soft-detect,inactive
[+25,12s] DEBUG: scanner.vala:779:   Description: Set sharpen value.
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (16)
[+25,12s] DEBUG: scanner.vala:776: Option 16: name='threshold' title='Threshold' type=int size=4 min=-1, max=2, quant=0 cap=soft-select,soft-detect,inactive
[+25,12s] DEBUG: scanner.vala:779:   Description: Select minimum-brightness to get a white point
[+25,12s] DEBUG: scanner.vala:982: sane_get_option_descriptor (17)
[+25,12s] DEBUG: scanner.vala:583: sane_control_option (4, SANE_ACTION_SET_VALUE, source="ADF") -> (SANE_STATUS_GOOD, "ADF")
[+25,12s] DEBUG: scanner.vala:583: sane_control_option (2, SANE_ACTION_SET_VALUE, mode="Gray") -> (SANE_STATUS_GOOD, "Gray")
[+25,12s] DEBUG: scanner.vala:495: sane_control_option (3, SANE_ACTION_SET_VALUE, resolution=300) -> (SANE_STATUS_GOOD, 300)
[+25,12s] DEBUG: scanner.vala:565: sane_control_option (8, SANE_ACTION_SET_VALUE, br-x=option.range.max=215,899994) -> (SANE_STATUS_GOOD)
[+25,12s] DEBUG: scanner.vala:565: sane_control_option (9, SANE_ACTION_SET_VALUE, br-y=option.range.max=355,599991) -> (SANE_STATUS_GOOD)
[+25,12s] WARNING: scanner.vala:1286: The option brightness (13) is inactive and can't be set, please file a bug
[+25,12s] WARNING: scanner.vala:1286: The option contrast (14) is inactive and can't be set, please file a bug
[+31,86s] DEBUG: scanner.vala:1322: sane_start (page=0, pass=0) -> SANE_STATUS_GOOD
[+31,86s] DEBUG: scanner.vala:1359: sane_get_parameters () -> SANE_STATUS_GOOD
[+31,86s] DEBUG: scanner.vala:1371: Parameters: format=SANE_FRAME_RGB last_frame=SANE_TRUE bytes_per_line=7536 pixels_per_line=2512 lines=3477 depth=8
[+31,86s] DEBUG: scanner.vala:1446: sane_read (7537) -> (SANE_STATUS_GOOD, 7537)
[+31,86s] DEBUG: simple-scan.vala:1714: Page is 2512 pixels wide, 3477 pixels high, 8 bits per pixel
[+31,86s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,86s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,86s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,86s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,86s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,86s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,86s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,86s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,86s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
...
[+31,87s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,87s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,87s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,87s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,87s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,87s] DEBUG: simple-scan.vala:1648: Getting color profile for device escl:http://192.168.178.37:80
[+31,87s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,87s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,87s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,87s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,87s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,87s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
[+31,87s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15072)
...
[+31,88s] DEBUG: scanner.vala:1446: sane_read (15072) -> (SANE_STATUS_GOOD, 15071)
[+31,91s] DEBUG: scanner.vala:1446: sane_read (15073) -> (SANE_STATUS_EOF, 0)
[+32,05s] DEBUG: autosave-manager.vala:355: Autosaving page pixels to /home/christian/.cache/simple-scan/autosaves/3758958432.pixels
[+32,06s] DEBUG: autosave-manager.vala:287: Autosaving book information
[+32,06s] DEBUG: autosave-manager.vala:304: Autosaving page page-0
[+32,06s] CRITICAL: page_finish: assertion 'self != NULL' failed
[+32,09s] DEBUG: simple-scan.vala:1668: Unable to find colord device escl:http://192.168...:80: property match 'Serial'='sane:escl:http://192.168...:80' does not exist
[+35,05s] DEBUG: scanner.vala:1322: sane_start (page=1, pass=0) -> SANE_STATUS_INVAL
[+35,05s] WARNING: scanner.vala:1349: Unable to start device: Invalid argument
[+55,38s] DEBUG: scanner.vala:806: sane_cancel ()
[+55,38s] DEBUG: scanner.vala:809: sane_close ()
[+75,52s] DEBUG: autosave-manager.vala:201: Deleting autosave records
[+75,52s] DEBUG: scanner.vala:1778: Stopping scan thread
[+75,52s] DEBUG: scanner.vala:844: Processing request
[+75,53s] DEBUG: scanner.vala:1789: sane_exit ()

Bump. :frowning: I tried updating the Kernel, now using 5.13.1-3-MANJARO, but that did not help.

1 Like

Update: Using XSane (with a multipage project), the same problem occurs (scanner pulls all pages in but only one page appears in XSane), just without any error message displayed.

And: Using scanadf on the command line, all pages are scanned! To a format useless for me and it crashes with segfault once it is done, but it generates 5 files for 5 pages and they contain the pages.

The updates of August 9th, though not containing any sane or simple-scan updates, resolved part of the issue. I can now scan multiple pages again. So, either kernel-related or whatever.

I still have to enter my password though.

1 Like

https://wiki.manjaro.org/index.php/Forum_Rules#Old_Threads.2F.22Necro-Bumping.22