xsane fail "invalid arguments" // sane replaces correct driver "genesys" with "Device" and fails

I am using Open SuSE 15.0 (formerly upgraded from leap and now refreshed).
The last steps:

  • xsane worked after dist-upgrade to latest code about a year ago
  • minor updates for mozilla, teamviewer, and some other apps
  • xsane did not work anymore
  • asked for “zypper update”, got again new libs and rpms for mozilla, vdrift and some more
  • xsane still does not work
  • using “yast scanner” (did not really work well, deleting an inactive configured scanner, that came back later)
  • checked /etc/sane.d
  • usb ids match the configured scanner
  • (dll.conf.rpmnew swapped with dll.conf), no change in content (some more comments now)
  • sane.conf unchanged
  • starting still leads to error “invalid argument”
  • reinstalling xsane
  • checking that all libusb are installed (was true)
  • found only a few executables of xsane and not config files outside /etc/sane.d
  • Now following the trouble-shooting section of https://en.opensuse.org/SDB:Configuring_Scanners
    it turns out that the (correct) configuration gets lost between sane_init() and sane_open():

me:~# sane-find-scanner

sane-find-scanner will now attempt to detect your scanner. If the

result is different from what you expected, first make sure your

scanner is powered up and properly connected to your computer.

No SCSI scanners found. If you expected something different, make sure that

you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04a9 [Canon], product=0x221c [CanoScan], chip=GL842) at libusb:001:028
could not fetch string descriptor: Pipe error
could not fetch string descriptor: Pipe error

Your USB scanner was (probably) detected. It may or may not be supported by

SANE. Try scanimage -L and read the backend’s manpage.

Not checking for parallel port scanners.

Most Scanners connected to the parallel port or other proprietary ports

can’t be detected by this program.

me:~# scanimage -L
device genesys:libusb:001:028' is a Canon LiDE 60 flatbed scanner me:~# scanimage -d genesys:libusb:001:028 -v -v -v -v -v scanimage: open of device genesys:libusb:001:028 failed: Invalid argument Calling sane_exit scanimage: finished me:~# scanimage -L device genesys:libusb:001:029’ is a Canon LiDE 60 flatbed scanner

OK, i.e. using “scanimage” kicks the scanner from the USB bus. Why?

me:~> export SANE_DEBUG_DLL=16
me:~> scanimage -d Device -v >/dev/null && echo OK || echo FAILED
[sanei_debug] Setting debug level of dll to 16.
[dll] sane_init: SANE dll backend version 1.0.13 from sane-backends 1.0.27
[dll] sane_init/read_dlld: attempting to open directory ./dll.d' [dll] sane_init/read_dlld: attempting to open directory /etc/sane.d/dll.d’
[dll] sane_init/read_dlld: opendir failed: No such file or directory
[dll] sane_init/read_config: reading dll.conf
[dll] add_backend: adding backend genesys' *** [dll] sane_open: trying to open Device’
[dll] add_backend: adding backend Device' [dll] load: searching backend Device’ in /usr/lib64/sane' [dll] load: trying to load /usr/lib64/sane/libsane-Device.so.1’
[dll] load: couldn’t open /usr/lib64/sane/libsane-Device.so.1' (No such file or directory) [dll] load: couldn't find backend Device’ (No such file or directory)
scanimage: open of device Device failed: Invalid argument
[dll] sane_exit: exiting
[dll] sane_exit: finished
FAILED

I added *** where the backend was determined correctly,
but in the next line ‘sane_open()’ uses “Device” instead of “genesys”
The other debugging options did not change the above output.

It looks to me like a binary in error. How do I resolve this situation?

Bug report territory IMHO.

Hi
Unlikely as the version in use is EOL :wink:

@OP, can you upgrade to Leap 15.1?

Yes it is a good idea to upgrade to see if the regression is still evident (and report if necessary) :wink:

Thanks ! I am going for bug resolution.
It is also triggered by this not very specific “askubuntu” comments:
https://askubuntu.com/questions/724366/xsane-fails-to-open-device-invalid-argument

However, it is interesting that the system behaves now differently.
There was no reboot, but the system was left running since yesterday.
The (by yast) deleted entry “hpaio” reappeared in the device list (driver is still removed from dll.conf)
Now the device is recognized but kicked out again when trying to open it.
The rediscovery during the xsane startup assigns the next usb address.

// some lines removed to stay in the size limit //
me:~> xsane
[sanei_debug] Setting debug level of dll to 16.
[dll] sane_init: SANE dll backend version 1.0.13 from sane-backends 1.0.27
[dll] sane_init/read_dlld: attempting to open directory ./dll.d' [dll] sane_init/read_dlld: attempting to open directory /etc/sane.d/dll.d’
[dll] sane_init/read_dlld: opendir failed: No such file or directory
[dll] sane_init/read_config: reading dll.conf
[dll] add_backend: adding backend genesys' [dll] add_backend: adding backend **hpaio’**
[dll] sane_get_devices
[dll] load: searching backend hpaio' in /usr/lib64/sane’
[dll] load: trying to load /usr/lib64/sane/libsane-hpaio.so.1' [dll] load: dlopen()ing /usr/lib64/sane/libsane-hpaio.so.1’
[dll] init: initializing backend hpaio' [dll] init: backend hpaio’ is version 1.0.0
[dll] load: searching backend genesys' in /usr/lib64/sane’
[dll] load: trying to load /usr/lib64/sane/libsane-genesys.so.1' [dll] load: dlopen()ing /usr/lib64/sane/libsane-genesys.so.1’
[dll] init: initializing backend genesys' [sanei_debug] Setting debug level of sanei_usb to 128. [sanei_usb] sanei_usb_init: initializing libusb-1.0 [sanei_usb] sanei_usb_scan_devices: marking existing devices [sanei_usb] libusb_scan_devices: Looking for libusb-1.0 devices libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/007/001: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. [sanei_usb] libusb_scan_devices: skipping device 0x1d6b/0x0002 at 007:001: cannot open: Access denied (insufficient permissions) libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/011/001: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. [sanei_usb] libusb_scan_devices: skipping device 0x1d6b/0x0001 at 011:001: cannot open: Access denied (insufficient permissions) libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/010/001: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. [sanei_usb] libusb_scan_devices: skipping device 0x1d6b/0x0001 at 010:001: cannot open: Access denied (insufficient permissions) libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/004/001: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. [sanei_usb] libusb_scan_devices: skipping device 0x1d6b/0x0002 at 004:001: cannot open: Access denied (insufficient permissions) libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/009/009: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. [sanei_usb] libusb_scan_devices: skipping device 0x044f/0xb108 at 009:009: cannot open: Access denied (insufficient permissions) libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/009/002: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. [sanei_usb] libusb_scan_devices: skipping device 0x046d/0xc52b at 009:002: cannot open: Access denied (insufficient permissions) libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/009/001: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. [sanei_usb] libusb_scan_devices: skipping device 0x1d6b/0x0001 at 009:001: cannot open: Access denied (insufficient permissions) libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/005: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. [sanei_usb] libusb_scan_devices: skipping device 0x046d/0xc52b at 001:005: cannot open: Access denied (insufficient permissions) [sanei_usb] libusb_scan_devices: found libusb-1.0 device (0x04a9/0x221c) interface 0 at libusb:001:032 [sanei_usb] store_device: add dn 0 with libusb:001:032 libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/003: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. [sanei_usb] libusb_scan_devices: skipping device 0x2109/0x2811 at 001:003: cannot open: Access denied (insufficient permissions) libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/001: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. [sanei_usb] libusb_scan_devices: skipping device 0x1d6b/0x0002 at 001:001: cannot open: Access denied (insufficient permissions) libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/008/001: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. [sanei_usb] libusb_scan_devices: skipping device 0x1d6b/0x0001 at 008:001: cannot open: Access denied (insufficient permissions) libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/006/001: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. [sanei_usb] libusb_scan_devices: skipping device 0x1d6b/0x0003 at 006:001: cannot open: Access denied (insufficient permissions) libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/005/001: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. [sanei_usb] libusb_scan_devices: skipping device 0x1d6b/0x0002 at 005:001: cannot open: Access denied (insufficient permissions) libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/003/001: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. [sanei_usb] libusb_scan_devices: skipping device 0x1d6b/0x0003 at 003:001: cannot open: Access denied (insufficient permissions) libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/002/002: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. [sanei_usb] libusb_scan_devices: skipping device 0x8644/0x800b at 002:002: cannot open: Access denied (insufficient permissions) libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/002/001: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. [sanei_usb] libusb_scan_devices: skipping device 0x1d6b/0x0002 at 002:001: cannot open: Access denied (insufficient permissions) [sanei_usb] sanei_usb_scan_devices: device 00 is libusb:001:032 [sanei_usb] sanei_usb_scan_devices: found 1 devices [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0a01 [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x1405 [sanei_usb] sanei_usb_find_devices: vendor=0x0461, product=0x0377 [sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0901 [sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x2213 [sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x221c [sanei_usb] sanei_usb_open: trying to open device libusb:001:032’
[sanei_usb] sanei_usb_open: configuration nr: 0
[sanei_usb] sanei_usb_open: interface nr: 0
[sanei_usb] sanei_usb_open: alt_setting nr: 0
[sanei_usb] sanei_usb_open: endpoint nr: 0
[sanei_usb] sanei_usb_open: direction: 128
[sanei_usb] sanei_usb_open: address: 1 transfertype: 2
[sanei_usb] sanei_usb_open: found bulk-in endpoint (address 0x01)
[sanei_usb] sanei_usb_open: endpoint nr: 1
[sanei_usb] sanei_usb_open: direction: 0
[sanei_usb] sanei_usb_open: address: 2 transfertype: 2
[sanei_usb] sanei_usb_open: found bulk-out endpoint (address 0x02)
[sanei_usb] sanei_usb_open: endpoint nr: 2
[sanei_usb] sanei_usb_open: direction: 128
[sanei_usb] sanei_usb_open: address: 3 transfertype: 3
[sanei_usb] sanei_usb_open: found interrupt-in endpoint (address 0x03)
[sanei_usb] sanei_usb_open: opened usb device libusb:001:032' (*dn=0) [sanei_usb] sanei_usb_get_vendor_product: device 0: vendorID: 0x04a9, productID: 0x221c [sanei_usb] sanei_usb_close: evaluating environment variable SANE_USB_WORKAROUND [sanei_usb] sanei_usb_close: closing device 0 [sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x2214 [sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x2228 ...] [sanei_usb] sanei_usb_find_devices: vendor=0x1803, product=0x162e [sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x1300 [dll] init: backend genesys’ is version 1.0.2511
[sanei_usb] sanei_usb_scan_devices: marking existing devices
[sanei_usb] libusb_scan_devices: Looking for libusb-1.0 devices
libusb: error [_get_usbfs_fd] libusb couldn’t open USB device /dev/bus/usb/007/001: Permission denied
…]
[sanei_usb] libusb_scan_devices: found libusb-1.0 device (0x04a9/0x221c) interface 0 at libusb:001:032
[sanei_usb] store_device: not storing device libusb:001:032
libusb: error [_get_usbfs_fd] libusb couldn’t open USB device /dev/bus/usb/001/003: Permission denied
…]
[sanei_usb] libusb_scan_devices: skipping device 0x8644/0x800b at 002:002: cannot open: Access denied (insufficient permissions)
libusb: error [_get_usbfs_fd] libusb couldn’t open USB device /dev/bus/usb/002/001: Permission denied
libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes.
[sanei_usb] libusb_scan_devices: skipping device 0x1d6b/0x0002 at 002:001: cannot open: Access denied (insufficient permissions)
[sanei_usb] sanei_usb_scan_devices: device 00 is libusb:001:032
[sanei_usb] sanei_usb_scan_devices: found 1 devices
[sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0a01
[sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x1405
[sanei_usb] sanei_usb_find_devices: vendor=0x0461, product=0x0377
[sanei_usb] sanei_usb_find_devices: vendor=0x03f0, product=0x0901
[sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x2213
[sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x221c
[sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x2214
…]
[sanei_usb] sanei_usb_find_devices: vendor=0x07b3, product=0x1300
[sanei_usb] sanei_usb_find_devices: vendor=0x04a9, product=0x221c
[dll] sane_get_devices: found 1 devices
[dll] sane_open: trying to open genesys:libusb:001:032' [sanei_usb] sanei_usb_open: trying to open device libusb:001:032’
[sanei_usb] sanei_usb_open: configuration nr: 0
[sanei_usb] sanei_usb_open: interface nr: 0
[sanei_usb] sanei_usb_open: alt_setting nr: 0
[sanei_usb] sanei_usb_open: endpoint nr: 0
[sanei_usb] sanei_usb_open: direction: 128
[sanei_usb] sanei_usb_open: address: 1 transfertype: 2
[sanei_usb] sanei_usb_open: found bulk-in endpoint (address 0x01)
[sanei_usb] sanei_usb_open: we already have a bulk-in endpoint (address: 0x81), ignoring the new one
[sanei_usb] sanei_usb_open: endpoint nr: 1
[sanei_usb] sanei_usb_open: direction: 0
[sanei_usb] sanei_usb_open: address: 2 transfertype: 2
[sanei_usb] sanei_usb_open: found bulk-out endpoint (address 0x02)
[sanei_usb] sanei_usb_open: we already have a bulk-out endpoint (address: 0x02), ignoring the new one
[sanei_usb] sanei_usb_open: endpoint nr: 2
[sanei_usb] sanei_usb_open: direction: 128
[sanei_usb] sanei_usb_open: address: 3 transfertype: 3
[sanei_usb] sanei_usb_open: found interrupt-in endpoint (address 0x03)
[sanei_usb] sanei_usb_open: we already have a int-in endpoint (address: 0x83), ignoring the new one
[sanei_usb] sanei_usb_open: opened usb device libusb:001:032' (*dn=0) [sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 12, value = 131, index = 0, len = 1 [sanei_usb] 000 0E . [sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 12, value = 133, index = 0, len = 1 [sanei_usb] 000 01 . [sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 12, value = 131, index = 0, len = 1 [sanei_usb] 000 0E . [sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 12, value = 133, index = 0, len = 1 [sanei_usb] 000 00 . [sanei_usb] sanei_usb_control_msg: rtype = 0x40, req = 4, value = 131, index = 0, len = 64 [sanei_usb] 000 01 A0 02 38 03 5F 04 10 05 40 06 18 07 00 08 00 ...8._...@...... [sanei_usb] 010 09 10 0A 00 10 00 11 00 12 00 13 00 14 00 15 00 ................ [sanei_usb] 020 16 00 17 02 18 00 19 50 1A 00 1B 00 1C 00 1D 02 .......P........ [sanei_usb] 030 1E F0 1F 01 20 20 21 00 22 00 23 00 24 00 25 00 .... !.".#.$.%. [sanei_usb] sanei_usb_control_msg: libusb complained: Input/output error [dll] sane_exit: exiting [dll] sane_exit: calling backend hpaio’s exit function
[dll] sane_exit: calling backend `genesys’s exit function
[sanei_usb] sanei_usb_exit: freeing resources
[sanei_usb] sanei_usb_exit: freeing device 00
libusb: warning [libusb_exit] application left some devices open
[dll] sane_exit: finished

Is the** libusb-0_1-4** installed?

Hi
How do you expect resolution from an unsupported, end of life release, a bug report if created will be closed as won’t fix, there are no more updates etc?