Bug 897855

Summary: USB scanner CanoScan LiDE 110 (genesys backend) makes bad-sounding noise with sane-backends-1.0.24 (worked with sane-backends-1.0.23 )
Product: [openSUSE] openSUSE Tumbleweed Reporter: Jon Nelson <jnelson-suse>
Component: OtherAssignee: Johannes Meixner <jsmeix>
Status: RESOLVED UPSTREAM QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: bwiedemann, friedhelm.stappert, jnelson-suse, lnussel
Version: 201409*   
Target Milestone: ---   
Hardware: Other   
OS: SUSE Other   
Whiteboard:
Found By: Community User Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Jon Nelson 2014-09-23 00:47:24 UTC
I have a canon scanner that works very nicely.
However, I tried to scan something tonight (using 13.2X -- Factory) and the scanner made a bunch of bad-sounding noises and wouldn't quite work (but was identified properly).

I tried several times without luck. I moved the device to a machine running 13.1 and the scanner worked perfectly - several times.
Comment 1 Jon Nelson 2014-09-23 00:48:23 UTC
More info:

[64067.527196] usb 2-1.2: new high-speed USB device number 7 using ehci-pci
[64067.615898] usb 2-1.2: New USB device found, idVendor=04a9, idProduct=1909
[64067.615917] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[64067.615919] usb 2-1.2: Product: CanoScan
[64067.615921] usb 2-1.2: Manufacturer: Canon
[64109.357393] usb 2-1.2: USB disconnect, device number 7
Comment 2 Bernhard Wiedemann 2014-09-27 14:54:14 UTC
Would be important to know if only skanlite is broken
or if scanning is broken on a lower level.

So please try as root:
zypper in xsane yast2-scanner
yast2 scanner
xsane
Comment 3 Jon Nelson 2014-12-28 03:27:53 UTC
Confirmed.
It happens with everything.
I downgraded *just* the sane-backends rpm from openSUSE 13.1 and everything works as it should once more.
Comment 4 Johannes Meixner 2015-01-08 08:44:05 UTC
According to comment#1 "idVendor=04a9, idProduct=1909" and
http://www.sane-project.org/cgi-bin/driver.pl?manu=&model=&bus=any&v=04a9&p=1909
you have a USB scanner CanoScan LiDE 110 and you use the genesys driver
from the sane-backends RPM.

Caution:
When a scanner makes bad-sounding noises the usual reason is that
the scanner's internal moving parts "do bad things" which means
the scanner hardware could get damaged.

It seems this is the same issue:
https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/1184699

Regarding the genesys driver we also have bug#905034 (different symptoms)
but there it also had worked on a 13.1 system.

I do not have a scanner that uses the genesys driver so that I
cannot reproduce anything here.
My scanner usees the plustek driver that works for me.

We (i.e. openSUSE) distribute sane-backends from the SANE project
but we do not develop scanner drivers. In case of issues with
scanner drivers from  sane-backends, you should report them
directly to the driver authors at the SANE project via
http://www.sane-project.org/bugs.html
so that there is a direct communication between you
and the upstream authors.
Comment 5 Johannes Meixner 2015-01-08 08:46:52 UTC
According to
https://bugs.launchpad.net/ubuntu/+source/sane-backends/+bug/1184699/comments/22
it seems it is fixed in a recent development snapshot at SANE upstream.
Comment 6 Johannes Meixner 2015-01-08 10:29:40 UTC
I made sane-backends version git20150108 RPMs an unstable
development source only for testing, without any guarantee
or warranty, and without any support in my openSUSE build service
home project "home:jsmeix".

Please read
https://build.opensuse.org/project/show?project=home:jsmeix

You can get the packages in the "home:jsmeix" project
for example for openSUSE 13.2 from this direct URL
http://download.opensuse.org/repositories/home:/jsmeix/openSUSE_13.2/

When you like to upgrade an installed sane-backends 1.0.23 or 1.0.24
to sane-backends development version git20150108 you need to install
version git20150108 with plain rpm using "--force" e.g. like
# rpm -Uhv --force sane-backends-git20150108-2.1.x86_64.rpm
because for rpm the version number git2015010 is lower than
the installed version number 1.0.23 or 1.0.24.

For my scanner that uses the plustek driver sane-backends development
version git20150108 still works for me.

Perhaps you are a venturous openSUSE user who likes to try out
if sane-backends development version git20150108 works for you?

Again note that when a scanner makes bad-sounding noises
it means that the scanner hardware could get damaged.

If you like to try it out nevertheless, please report
whether or not it works for you.

Many thanks in advance for testing it and for your feedback!
Comment 7 Jon Nelson 2015-01-09 02:33:31 UTC
I gave it a try -- no luck.
The rpm from 13.1 works perfectly.
Comparison of SANE_DEBUG_GENESYS=5 scanimage ....


[sanei_debug] Setting debug level of genesys to 5.
[genesys] SANE Genesys backend version 1.0 build 2302 from sane-backends 1.0.23
[genesys] SANE Genesys backend built with libusb-1.0
[genesys] sane_init: authorize != null
[genesys] sane_init: little endian machine
[genesys] probe_genesys_devices start
[genesys] attach: start: devp != NULL, may_wait = 0
[genesys] attach: trying to open device `libusb:002:015'
[genesys] attach: device `libusb:002:015' successfully opened
[genesys] attach: found Canon flatbed scanner LiDE 110 at libusb:002:015
[genesys] attach completed
[genesys] probe_genesys_devices completed
[genesys] sane_genesys_init completed
[genesys] sane_get_devices: start: local_only = false
[genesys] probe_genesys_devices start
[genesys] attach: start: devp != NULL, may_wait = 0
[genesys] attach: device `libusb:002:015' was already in device list
[genesys] probe_genesys_devices completed
[genesys] sane_genesys_get_devices completed
[genesys] sane_open: start (devicename = `libusb:002:015')
[genesys] sane_open: found `canon-lide-110' in devlist
[genesys] init_options start
[genesys] init_options completed
[genesys] sanei_genesys_init_fe start
[genesys] sanei_genesys_init_fe start
[genesys] sanei_genesys_create_gamma_table: size = 256, maximum = 65535, gamma_max = 65535, gamma = 1.7
[genesys] sanei_genesys_create_gamma_table: completed
[genesys] sanei_genesys_create_gamma_table: size = 256, maximum = 65535, gamma_max = 65535, gamma = 1.7
[genesys] sanei_genesys_create_gamma_table: completed
[genesys] sanei_genesys_create_gamma_table: size = 256, maximum = 65535, gamma_max = 65535, gamma = 1.7
[genesys] sanei_genesys_create_gamma_table: completed
[genesys] Calibration filename set to:
[genesys] >/home/jon/.sane/canon-lide-110.cal<
[genesys] sanei_genesys_read_calibration start
[genesys] sanei_genesys_read_calibration: reading one record
[genesys] sanei_genesys_read_calibration: adding record to list
[genesys] sanei_genesys_read_calibration: reading one record
[genesys] sanei_genesys_read_calibration completed
[genesys] sane_genesys_open completed
[genesys] sane_genesys_start start
[genesys] genesys_start_scan start
[genesys] genesys_restore_calibration start
[genesys] genesys_restore_calibration: completed(nothing found)
[genesys] genesys_flatbed_calibration
[genesys] sanei_genesys_calculate_zmode2: two_table=0
[genesys] sanei_genesys_calculate_zmode2: two_table=0
[genesys] genesys_dark_shading_calibration start
[genesys] genesys_dark_shading_calibration completed
[genesys] genesys_white_shading_calibration (lines = 50)
[genesys] genesys_white_shading_calibration completed
[genesys] genesys_flatbed_calibration: completed
[genesys] genesys_save_calibration start
[genesys] genesys_save_calibration completed
[genesys] sanei_genesys_calculate_zmode2: two_table=0
[genesys] sanei_genesys_calculate_zmode2: two_table=0
[genesys] genesys_send_shading_coefficient start
[genesys] genesys_send_offset_and_shading (size = 62016)
[genesys] genesys_send_offset_and_shading completed
[genesys] genesys_send_shading_coefficient completed
[genesys] genesys_start_scan completed
[genesys] sane_genesys_start completed
[genesys] sane_genesys_get_parameters start
[genesys] sane_genesys_get_parameters completed
[genesys] sane_read: start, 32768 maximum bytes required
[genesys] genesys_read_ordered_data start
[genesys] genesys_read_ordered_data: dumping current_setup:


and for the rpms that don't work (13.2 and the updated one):

[sanei_debug] Setting debug level of genesys to 5.
[genesys] SANE Genesys backend version 1.0 build 2504 from sane-backends 1.0.25git
[genesys] SANE Genesys backend built with libusb-1.0
[genesys] sane_init: authorize != null
[genesys] sane_init: little endian machine
[genesys] probe_genesys_devices start
[genesys] attach: start: devp != NULL, may_wait = 0
[genesys] attach: trying to open device `libusb:002:015'
[genesys] attach: device `libusb:002:015' successfully opened
[genesys] attach: found Canon flatbed scanner LiDE 110 at libusb:002:015
[genesys] attach completed
[genesys] probe_genesys_devices: 1 devices currently attached
[genesys] probe_genesys_devices completed
[genesys] sane_genesys_init completed
[genesys] sane_get_devices: start: local_only = false
[genesys] probe_genesys_devices start
[genesys] attach: start: devp != NULL, may_wait = 0
[genesys] attach: device `libusb:002:015' was already in device list
[genesys] probe_genesys_devices: 1 devices currently attached
[genesys] probe_genesys_devices completed
[genesys] sane_genesys_get_devices completed
[genesys] sane_open: start (devicename = `libusb:002:015')
[genesys] sane_open: found `canon-lide-110' in devlist
[genesys] init_options start
[genesys] init_options completed
[genesys] sanei_genesys_init_fe start
[genesys] sanei_genesys_init_fe start
[genesys] sanei_genesys_create_gamma_table: size = 256, maximum = 65535, gamma_max = 65535, gamma = 2.1
[genesys] sanei_genesys_create_gamma_table: completed
[genesys] sanei_genesys_create_gamma_table: size = 256, maximum = 65535, gamma_max = 65535, gamma = 2.1
[genesys] sanei_genesys_create_gamma_table: completed
[genesys] sanei_genesys_create_gamma_table: size = 256, maximum = 65535, gamma_max = 65535, gamma = 2.1
[genesys] sanei_genesys_create_gamma_table: completed
[genesys] calibration_filename: calibration filename >/home/jon/.sane/canon-lide-110.cal<
[genesys] Calibration filename set to:
[genesys] >/home/jon/.sane/canon-lide-110.cal<
[genesys] sanei_genesys_read_calibration start
[genesys] Calibration: Cannot open /home/jon/.sane/canon-lide-110.cal
[genesys] sanei_genesys_read_calibration completed
[genesys] sane_genesys_open completed
[genesys] sane_genesys_start start
[genesys] genesys_start_scan start
[genesys] genesys_restore_calibration start
[genesys] genesys_flatbed_calibration
[genesys] sanei_genesys_calculate_zmode2: two_table=0
[genesys] sanei_genesys_calculate_zmode2: two_table=0
[genesys] genesys_flatbed_calibration: led calibration failed: Error during device I/O
[genesys] genesys_start_scan: failed to do scanner calibration: Error during device I/O
[genesys] sane_genesys_start: Error during device I/O
scanimage: sane_start: Error during device I/O
[genesys] sane_genesys_cancel start
[genesys] sane_genesys_cancel completed
[genesys] sane_genesys_close start
[genesys] write_calibration start
[genesys] write_calibration completed
[genesys] sane_genesys_close completed
[genesys] sane_genesys_exit start
[genesys] sane_genesys_exit completed



Can you perhaps try building a new rpm with the genesys sources from whatever was in 13.1?
Comment 8 Jon Nelson 2015-01-09 04:26:33 UTC
Using git bisect, I narrowed it down:


The first bad commit could be any of:
d62ebea4e85c414051d54e4033cdcc5f510653c1
e1a74a94beda015f13e8c83b06912a3b4e6f5e42
0897a60c601dc79e596762922ffcbe91b078f258
a5a6543cd0585859a698e44998cbca37bf072c42
bc1a14518b8e24600d549877f3a22308425c340d
<fin>

I couldn't test the last *four* due to linking errors (not my fault).
Comment 9 Johannes Meixner 2015-01-09 08:20:54 UTC
I do not have a scanner that uses the genesys driver
so that I cannot do anything here (in particular
I cannot help debugging it because for my scanner it works).

We (i.e. openSUSE) distribute sane-backends from the SANE project
but we do not develop scanner drivers.
In particular I don't have any knowledge about the genesys driver.

Please report it directly to the driver authors at the SANE project
http://www.sane-project.org
so that there is a direct communication between you
and the upstream authors.

The best way is to report it on the sane-devel mailing list so that
the upstream authors plus interested users can notice the issue, see
http://www.sane-project.org/mailing-lists.html
Comment 10 Johannes Meixner 2015-01-09 08:36:25 UTC
Regarding "Error during device I/O", see
https://bugzilla.opensuse.org/show_bug.cgi?id=905034#c16

Recently there have been various postings on the the sane-devel mailing list
regarding USB I/O issues in particular with USB 3.0 ("SuperSpeed"),
see the "sane to work with USB 3.0" mail thread on
http://lists.alioth.debian.org/pipermail/sane-devel/2014-November/thread.html
http://lists.alioth.debian.org/pipermail/sane-devel/2014-December/thread.html

Regarding issues with higher speed USB see also
https://en.opensuse.org/SDB:Configuring_Scanners#USB_Speed

Only a blind guess:
Perhaps the root cause is not the genesys driver but something
USB related on a lower level (perhaps even in the kernel)
that is somehow triggered by the genesys driver?
When it works with sane-backends-1.0.23 it indicates that
the issue can be at least avoided in the sane-backends software
(even if the actual root cause is not in sane-backends).
Comment 11 Ludwig Nussel 2016-11-29 07:27:16 UTC
I still see the problem on 42.2 with a LiDE 200. Since there's
already lots of useful links in here I'll add my info too. I see the
device IO error if the "cold" scanner is plugged into 42.2. If
however the scanner was used on 13.2 before (same sane-backends
version!) the scanner makes that grinding noise. So I guess the
initialization part of the genesys driver does something that
doesn't work on newer kernels. I also got see the following errors
in 13.2's dmesg, maybe that can give a hint?

[   54.395209] usb 3-1: new high-speed USB device number 4 using xhci_hcd
[   54.560998] usb 3-1: New USB device found, idVendor=04a9, idProduct=1905
[   54.561005] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   54.561009] usb 3-1: Product: CanoScan
[   54.561012] usb 3-1: Manufacturer: Canon
[  108.076029] usb 3-1: reset high-speed USB device number 4 using xhci_hcd
[  108.076105] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 3.
[  108.076176] usb 3-1: hub failed to enable device, error -22
[  108.228896] usb 3-1: reset high-speed USB device number 4 using xhci_hcd
[  108.228944] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 3.
[  108.229016] usb 3-1: hub failed to enable device, error -22
[  108.381991] usb 3-1: reset high-speed USB device number 4 using xhci_hcd
[  108.393770] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff88034ddf3200
[  108.393778] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff88034ddf3248
[  108.393781] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff88034ddf3290

Latest git version of sane-backends doesn't work either.
Comment 12 Jon Nelson 2017-04-07 02:03:57 UTC
Not completely fixed, just re-tested.
Also see bug #905034.