My ScanSnap IX500 stopped working recently, possibly on upgrade from Debian jessie to stretch.
Per the documentation in http://www.sane-project.org/man/sane-fujitsu.5.html I set the environmental variable SANE_DEBUG_FUJITSU=5and then ran xsane, I got:
fujitsu] sane_init: fujitsu backend 1.0.127, from sane-backends 1.0.25
[fujitsu] sane_get_devices: config option "buffer-size" (262144) is > 65536, warning!
[fujitsu] stat: return error 'Error during device I/O'
[fujitsu] WARNING: Brain-dead scanner. Hitting with stick
[fujitsu] stat: return error 'Error during device I/O'
[fujitsu] WARNING: Brain-dead scanner. Hitting with stick again
[fujitsu] stat: return error 'Error during device I/O'
[fujitsu] wait_scanner: error 'Error during device I/O'
[fujitsu] connect_fd: could not wait_scanner
It shows up in lsusb as
Bus 004 Device 002: ID 04c5:132b Fujitsu, Ltd
It shows up intermittently in scanimage -L, but currently it's showing:
SANE_DEBUG_FUJITSU=15 scanimage -L
[fujitsu] attach_one: start
[fujitsu] attach_one: looking for 'libusb:003:015'
[fujitsu] connect_fd: start
[fujitsu] connect_fd: opening USB device
[fujitsu] connect_fd: could not open device: 3
[fujitsu] connect_fd: finish
Why is it not working? How do I fix it?
Note: the scanner is plugged into a USB 2 slot. I earlier had it plugged into a USB 3 slot. I tried switching it to a USB 2 slot because of some reports that USB 3 was the problem, but it's still not working.
See for example the bug reports: https://bugzilla.redhat.com/show_bug.cgi?id=1297169 and http://sane-devel.alioth.debian.narkive.com/kLQc0Aik/fujitsu-ix500-no-scanners-were-identified
In any case, a USB device should work regardless whether it's plugged into a USB 2 or USB 3 slot.
Thanks to Anthony (@derobert) for assistance debugging this.
It seems likely that sane-backends is the problem, and that downgrading or upgrading it will make the problem go away. stretch is using 1.0.25-4.1, while jessie used 1.0.24-8+deb8u2, and experimental has 1.0.27-1~experimental2.
Also, unplugging it and then plugging it back in again seems to make it visible again for awhile. Which suggests the problem may not be with sane-backends and may be a USB issue.