Reputation: 11
I had a new machine set up running El Capitan, and xsane installed for the scanner via macports as usual. xsane failed to recognise the device, with the following symptoms:
sane-find-scanner
found USB scanner (vendor=0x04b8 [EPSON], product=0x0128 [EPSON Scanner]) at libusb:020:026
scanimage -L
No scanners were identified.
Even as root I got
# /opt/local/bin/scanimage -T -d epson2:libusb:020:026
scanimage: open of device epson2:libusb:020:026 failed: Access to resource has been denied
The MacOS tools for this scanner worked, so I observed that when I connect the USB cable, there was some process starting:
tail /var/log/system.log
Nov 23 23:01:47 host kernel[0]: 348238.593685 EPSON Scanner@14200000: AppleUSBDevice::waitForInterfacesGated: timeout waiting for _interfacesMatched
Nov 23 23:01:47 host EPSON Scanner[86324]: --> HandleMessageFromICDD
Nov 23 23:01:47 host EPSON Scanner[86322]: --> HandleMessageFromICDD
Nov 23 23:01:47 host EPSON Scanner[86323]: --> HandleMessageFromICDD
It turned out that this process was squatting on the USB device so libusb did not get access. (In some cases, the process was even started in the name of a background user, not active with fast user swapping):
ps aux | grep EPSON
username 86323 0.1 0.1 2582644 22072 ?? S 11:01pm 0:00.21 /Library/Image Capture/Devices/EPSON Scanner.app/Contents/MacOS/EPSON Scanner
Now once I kill the Image Capture
process, sane runs nicely, and I can use xsane again:
scanimage -L
device `epson2:libusb:020:026' is a Epson GT-X700 flatbed scanner
While I have my workaround, remains the question what would prevent that Image Capture from occupying the USB device without asking?
For other libusb issues, there are some hints to unload a kernel extension, however for this problem kextstat shows no difference in the extensions before and after plugging the scanner in.
Upvotes: 1
Views: 377