Black bar in scans, Canon LIDE 100 scanner, Mint 19, reverting to libsane 1.0.25 backends fixes

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
mintytux

Black bar in scans, Canon LIDE 100 scanner, Mint 19, reverting to libsane 1.0.25 backends fixes

Post by mintytux »

I am posting this workaround in case it helps others with the same problem.

Problem Summary: Canon LIDE 100 scanner produces a vertical black strip on all scans in Linux Mint 19 using multiple programs (SimpleScan, XSane, etc.). The scanner worked flawlessly in Mint 18.


Relevant Hardware/Software Configuration:
- Architecture: x86_64
- OS: Linux Mint 19
- Scanner: Canon LIDE 100
- Relevant applications: SimpleScan, Xsane
- Relevant libraries: libsane 1.0.27, genesys backend


Workaround Summary:
Revert libsane backends to version 1.0.25. I followed the general process from here: https://askubuntu.com/questions/567863/ ... using-sane


Workaround Details:

- Download the libsane 1.0.25 backends source from: http://http.debian.net/debian/pool/main ... rig.tar.gz.
- Unpack the archive
- Install prerequisite packages to build libsane backends from source:

Code: Select all

sudo apt-get install libusb-dev build-essential libsane-dev
sudo apt-get install libavahi-client-dev libavahi-glib-dev libjpeg-dev
- Build and install libsane 1.0.25:

Code: Select all

cd sane-backends
./configure
make
sudo make install
- Double-check that 1.0.25 is FIRST in the library load order for libsane:

Code: Select all

sudo ldconfig -v | grep libsane
- You should see something like:

Code: Select all

libsane.so.1 -> libsane.so.1.0.25
libsane.so.1 -> libsane.so.1.0.27
- Run SimpleScan or XSane to test
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
harryw

Re: Black bar in scans, Canon LIDE 100 scanner, Mint 19, reverting to libsane 1.0.25 backends fixes

Post by harryw »

Thanks for posting this - exactly what I was googling for.

One note:

Code: Select all

sudo ldconfig -v | grep libsane

shows the wrong load order for me (27 before 25), but

Code: Select all

ldd /usr/bin/simple-scan
displays that libsane.1.0.25 would be used, as intended. Anyways, problem solved.
Grenny
Level 1
Level 1
Posts: 8
Joined: Sun May 26, 2019 5:35 pm

Re: Black bar in scans, Canon LIDE 100 scanner, Mint 19, reverting to libsane 1.0.25 backends fixes

Post by Grenny »

I had a little trouble getting my LiDE 100 going using the solution MintyTux gave. But doing the following procedure did work for me:

1. Make sure the scanner is unplugged or off.
2. Use MintyTux's excellent procedure in Message 1
3. Do an update:

Code: Select all

sudo apt-get update
4. Remove libsane1:

Code: Select all

sudo apt-get remove libsane1
5. Install simple-scan:

Code: Select all

sudo apt-get install simple-scan
6. Plug in the scanner

I don't know why this worked, but I'm guessing that removing libsane1 (which removes simple-scan) then reinstalling simple-scan (which installs libsane1) puts :

Code: Select all

libsane.so.1 -> libsane.so.1.0.25
libsane.so.1 -> libsane.so.1.0.2
in the right order.
I used this method on a Live version of 19.1, many times, as a precursor to a full hard drive installation. So only use these additional steps if MintyTux's method doesn't fully work. Hope this helps someone. And a BIG thank you to MintyTux for the method. It has saved me £100 in buying a new scanner!
Brewmaster

Re: Black bar in scans, Canon LIDE 100 scanner, Mint 19, reverting to libsane 1.0.25 backends fixes

Post by Brewmaster »

Thanks a bunch mintytux. Your procedure was simple to follow and worked perfectly! Dreaded black stripe is gone! I applied the fix after my upgrade from Debian Stretch (which worked) to Debian Buster (which didn't).

I do have a question, though.

This process gave me an opportunity to educate myself a bit on linux's shared objects. I see now, at the end of your procedure, my system now has both libsane.so.1.0.25 (which works) and libsane.so.1.0.27 (which introduced the black bar problem). I see that libsane.so.1.0.25 is located in /usr/local/lib and libsane.so.1.0.27 is located in /lib/x86_64-linux-gnu.

"ldconfig -v | grep libsane" confirms that libsane.so.1.0.25 is loaded/resolved first. I get all this.

My question is this: if and when a later libsane library is released, will the "apt update && apt upgrade" process "automagically" install the later (presumably fixed) library? If not, what should one do to install it? Is there any issue with having both of the older libraries (25 and 27)? Will "apt autoremove" remove them?

Hope my question(s) were clear and thanks in advance!
Locked

Return to “Printers & Scanners”