sane-backend 1.0.21 broke on 8.0?

Jason Naughton jason at
Sun Nov 7 20:47:34 UTC 2010

Hi Warren,

> One last thing, then I'm out of tricks.  After the change to FreeBSD 8,
> did you rebuild all, yes all, of your ports?

I did a complete re-install.  I didn't upgrade.  So when I installed
Freebsd 8 the ports were built with that version of the OS.

> Also (two! two last tricks!) you should not have the libusb port
> installed, since libusb is now part of the OS.

# pkg_info |grep libusb

Not installed.

I've managed to solve the problem but at the same time definitely find a
bug with the sane-backend 1.0.21.  I wanted to isolate where the seg fault
was occurring as it was not occurring when I moved everything out of
/usr/local/etc/sane.d and just left epson.conf which was indicated from
the sane support page that my scanner was to be apart of.  With only
inside of the /usr/local/etc/sane.d folder I had the following results:

# sane-find-scanner -q
found USB scanner (vendor=0x04b8 [EPSON], product=0x011e [EPSON Scanner])
at libusb:/dev/usb:/dev/ugen3.2

# scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

I could do this as root or as user.  Now if I put everything back into
/usr/local/etc/sane.d I would get a seg fault.  So I did the following:

# cd /usr/local/etc/sane.d
# mkdir ../orig
# mv * ../orig
# mv ../orig/epson.conf .
# mv ../orig/epson2.conf .
# mv ../orig/dll* .

So now:

# ls /usr/local/etc/sane.d
dll.conf        dll.d           epson.conf      epson2.conf

# scanimage -L
device `epson2:libusb:/dev/usb:/dev/ugen3.2' is a Epson GT-8300 flatbed

Now both xsane and scanimage work fine without a seg fault.  Odd that the
same scanner that was under epson is now seen as an epson2.

So using trial a process of elimination I moved one file at a time back
into the sane.d folder.  What I found was when the microtek2.conf file was
added to the sane.d folder the following would occur:

# scanimage -L
zsh: segmentation fault  scanimage -L

My quick and simple solution would be to simply delete the microteck2.conf
file and I can now use my scanner.  Yet what is in this file that would
make scanimage seg fault:

# grep -v "#" microtek2.conf

option dump 1
option no-backtrack-option on
option lightlid-35 on
option toggle-lamp on
option lineart-autoadjust on
option backend-calibration on
scsi * * Scanner

One of the above lines is causing scanimage to segfault. As I move this
file outside of the sane.d folder I can now:

# scanimage -L
device `epson2:libusb:/dev/usb:/dev/ugen3.2' is a Epson GT-8300 flatbed

and everything works again...  Just to recap my scanner is an EPSON
Perfection 1660 Photo usb scanner which is supposedly completely
compatible with sane-backends.


Jason Naughton,  P.Eng, M.E.Sc,
Professional Contractor,
JMN Planning,  Pickering, Ontario,
Office: (416)-509-4886 Fax: (905)-831-3810

More information about the freebsd-ports mailing list