1

I installed SANE backend (hardware.sane.enable = true; on NixOS) and tested if my scanner is detected by running scanimage -L (as suggested here https://nixos.wiki/wiki/Scanners).

Interestingly, the first time I run this command, I can see my scanner (and my webcam):

$ scanimage -L
device `xerox_mfp:libusb:001:012' is a Samsung Samsung SCX-3200 Series multi-function peripheral
device `v4l:/dev/video0' is a Noname HP HD Camera virtual device

but the next time I run it, I only see my webcam:

$ scanimage -L
device `v4l:/dev/video0' is a Noname HP HD Camera virtual device

I only have to unplug and replug the USB connection to see it again (only once).

I have tried using simple-scan to scan a document but I get a similar experience (I can see the scanner only if I just plug it in without testing the connection with scanimage -L but in any case, the application doesn't manage to scan even just a page).

I thought it may be the same issue as in https://unix.stackexchange.com/a/191816/115070 so I disabled USB autosuspend using TLP, I can see that it has been taken into account:

$ tlp-stat -u
--- TLP 1.0 --------------------------------------------

+++ USB
Autosuspend         = disabled

but this doesn't help actually.

Update: lsusb

The scanner is always visible with lsusb:

Bus 001 Device 006: ID 04e8:3441 Samsung Electronics Co., Ltd 

Update: sane-find-scanner

The scanner is always visible with sane-find-scanner (in normal mode or in sudo mode):

found USB scanner (vendor=0x04e8 [Samsung Electronics Co., Ltd.], product=0x3441 [SCX-3200 Series]) at libusb:001:005
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

Update: permissions

scanimage -L behaves the same in normal and sudo mode. It detects the scanner only the first time after plugging / restarting, including across modes (normal then sudo or sudo then normal).

Update: searching the mailing list and commit history

It really looks like the issue is just that the scanner is unsupported (see https://www.mail-archive.com/sane-devel@lists.alioth.debian.org/msg34458.html in particular). I'm just a bit surprised with the behavior of scanimage -L in this case. It would have been less confusing if it was never detected.

Important update: works on another laptop

It looks like the problem doesn't come from a lack of support after all. I have tested the SANE backend with the same scanner and an older laptop (Dell Latitude E6500). It works perfectly well with scanimage -L and simple-scan.

Given the lack of difference in the way I configured the two laptops, I can only assume that the problem I was having on my first laptop (HP EliteBook Folio 1040 G3 Notebook PC) is a hardware problem.

  • Is the scanner all the time visible in lsusb? – Tomáš Pospíšek Dec 21 '17 at 19:24
  • @TomášPospíšek Sorry for the delay in the answer. Yes, it is. – Zimm i48 Dec 22 '17 at 22:26
  • and if you switch on/off the scanner, then the next scanimage -L will see it again? Have a look at the sane mailing list and change log, if maybe there were fixes for your scanner. – Tomáš Pospíšek Dec 22 '17 at 22:29
  • @TomášPospíšek switching on and off allows seeing the scanner again, exactly like unplugging / plugging the USB. I could not find the link to SANE change log or a way to search the mailing list archive. – Zimm i48 Dec 22 '17 at 23:17
  • 1
    mailing list: sane-project.org/mailing-lists.html , git repository, where you can go through the changes: sane-project.org/cvs.html - also you might want to ask on the mailing list why sane-find-scanner is seeing the device but scanimage -L is not. – Tomáš Pospíšek Dec 23 '17 at 8:24
1

I just had the same problem on Scientific-Linux 6.5 with a Fujitsu Scansnap and sane-backends 1.0.24. I compiled 1.0.25 (i.e. not the most recent one, but I just had that one around) and it solved the problem. No special environment variables needed.

All other tricks recommended here and elsewhere (exchanging the scanner for another specimen of the same type, using another USB cable, using another USB socket on the computer) failed.

  • Thanks, I'll try to test this when I get the opportunity. – Zimm i48 Nov 20 '18 at 18:58
  • If even this fails, it might be a problem with older kernels doing USB2 by emulating it on USB3. The last resort is to install a PCI-USB-card with USB2 only. – Ralf Muschall Nov 22 '18 at 8:52
  • 1
    Btw., 1.0.25 added a feature to work around the problem. In 1.0.27 that feature is disabled by default. To re-enable it, say "export SANE_USB_WORKAROUND=1". – Ralf Muschall Nov 22 '18 at 8:53
  • I'm now on 1.0.27. I confirm that exporting the above environment variable solves the problem. – Zimm i48 Jan 13 at 20:53
  • Appendix for people using saned: add a line "env = SANE_USB_WORKAROUND=1" to the appropriate .conf file in /etc/xinetd.d/. – Ralf Muschall May 23 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.