SCM

[#315803] Canon LiDE 110 (genesys) - possible timing issue with USB3

View Trackers | Bugs | Export CSV

Date:
2017-07-31 08:46
Priority:
3
State:
Open
Submitted by:
Jeff MacLoue (jmacloue-guest)
Assigned to:
Nobody (None)
Category:
backends (drivers)
Group:
None
Resolution:
None
Summary:
Canon LiDE 110 (genesys) - possible timing issue with USB3

Detailed description
I have a Canon LiDE110 scanner (GL847-based, according to the driver output) which doesn't work at all with my USB3-only motherboard (ASUS Q170M-C, no "companion" USB2 hub so the usual fix doesn't work) but works reliable enough with my older laptop (USB2 controller).

The usual recommendation is to plug it through a USB2 or USB1.1 hub which helps a bit but still scanning fails half of the time.

However as I discovered there is a hack to make it work through USB3 port: adding SANE_DEBUG_GENESYS_LOW=128 to the environment:

SANE_DEBUG_GENESYS_LOW=128 xsane

It makes the scanner function reliable enough (I'm using this hack for some time now, and just have scanned around 10 pages in a row with only a single failure).

This looks like a timing issue to me - when the driver doesn't need to output so many debug messages it still fails: e.g., with SANE_DEBUG_GENESYS_LOW=8 it usually freezes after a message like this:

[genesys_low] sanei_genesys_read_data_from_scanner (size = 403104 bytes)
[genesys_low] sanei_genesys_read_valid_words start
[genesys_low] sanei_genesys_read_hregister(0x102)=0x00
[genesys_low] sanei_genesys_read_hregister(0x103)=0x00
[genesys_low] sanei_genesys_read_hregister (0x104): failed while reading register: Invalid argument
[genesys_low] sanei_genesys_read_valid_words: Invalid argument
[genesys_low] sanei_genesys_read_data_from_scanner: checking for empty buffer failed: Invalid argument
[genesys_low] sanei_genesys_read_gl847_register(0x32)=0x00
[genesys_low] sanei_genesys_write_gl847_register (0x32, 0x00): failed : Invalid argument
[genesys_low] sanei_genesys_read_hregister(0x101)=0xb8
[genesys_low] sanei_genesys_read_hregister(0x100)=0xf1
[genesys_low] sanei_genesys_write_gl847_register (0x01, 0xa2) completed
[genesys_low] sanei_genesys_read_hregister(0x101)=0xf8
[genesys_low] sanei_genesys_read_hregister(0x100)=0xf0
[genesys_low] sanei_genesys_read_gl847_register(0x32)=0x5b
[genesys_low] sanei_genesys_write_gl847_register (0x32, 0x59) completed

(Not always register 0x104, I've seen 0x105 and 0x103 as well)

The whole scanning operation times out afterwards but the next time it may work as expected - without restarting xsane or unplugging the scanner. Also this failure happens only during scanner initialization and calibration - I don't remember a scanning failure mid-aquiring image or immediately afterwards.

With DEBUG level of 8 it works half of the time - at least as well as through the hub.


I'm using Slackware64 14.2, xsane-0.999 with stock sane 1.0.25, but tried building 1.0.27 from source and the latest one from Git repository - looks the same: no luck without low-level debug, more luck with debug level 8 and quite reliable with 128.


PS Not sure if a packet dump will be useful here, and as it is quite large - skipping it for now.

Followups: Sort comments antichronologically

No Followups Have Been Posted

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge