[SOLVED] Would like to downgrade "sane" backend. Can it be done? Newbie.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Would like to downgrade "sane" backend. Can it be done? Newbie.
PLEASE NOTE PLEASE NOTE PLEASE NOTE
I am marking this as [solved] not because the solution worked for me; in the end I admitted defeat... but it does contain useful guidance which others may well find helpful.
Running 18.2 Sonya 64-bit. (I see my signature lists me as a Puppy, but it *is* my Mint setup I need help with.)
Fresh install, just getting into "picking the bones out" stage. I believe the problem as described in the following thread is the problem I have (same type of scanner, documented bug), but implementing the solution described is beyond my comfort zone. Not scared of command line, just unsure of the *exact* steps.
The "sane" backend I have is in /usr/lib/x86../sane/libsane-genesys.la, libsane-genesys.so.1 and libsane-genesys.so.1.0.25
The solution reported as working in the thread would mean taking it down to 1.0.23 (at least).
By the way, on another linux OS on the same hardware, which has 1.0.22 genesys backend, everything works beautifully, as it did when I was running Rebecca.
Would be ever so grateful for a helping hand!
Last edited by pierssnell; 10-13-2017 at 11:06 AM.
Reason: correction
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
It is really very simply, but the person describing the solution has a terse way to explain it. You'll find the correct library in:
Code:
/usr/lib/x86_64-linux-gnu/sane
(I am not quite sure you are on a x86_64 system, but if not, the directory will be x86_something)
Now copy a working libsane-genesys.so.1.0.22 from this directory on a different machine into /usr/lib/x86_64-linux-gnu/sane on your target machine.
You have libsane-genesys.so.1.0.22 on the other machine, so use that one first. If it doesn't work you have to try and find a libsane-genesys.so.1.0.23. But it seems not to be available in Debian, and most likely not in Mint either.
So if you go to that directory and do:
Code:
ls -l libsane-genesys.so*
you'll see:
Code:
lrwxrwxrwx 1 root root 25 Dec 27 2014 libsane-genesys.so.1 -> libsane-genesys.so.1.0.24
-rw-r--r-- 1 root root 530656 Dec 27 2014 libsane-genesys.so.1.0.22
-rw-r--r-- 1 root root 530656 Dec 27 2014 libsane-genesys.so.1.0.24
The trick is that sane always looks for libsane-genesys.so.1
So, perform these actions (as root or sudo):
Your beautifully clear instructions did accord with my understanding, and I think the file-copying and symbolic-linking I did before getting as far as posting my help request *should* have worked, although I went about it in a slightly different way.
I have now been trying again, following your method exactly... and I'm still getting no joy. Xsane fires up, scans for devices... and reports "no devices available". I've tried the 1.0.22 from my Puppy installation, and two different versions of 1.0.23 from other archived OS's.
(I don't know *how* they differ, or if they even do differ functionally, only observed that different file-sizes are listed.)
I'll mention one suspicion I did have about my understanding... your instructions, and those on the thread already mentioned, suggest that libsane-genesys.so.1 is a symbolic link which is used to point to your most-recent or best-working libsane-genesys.so.1.n.n ... Why then does the installed libsane-genesys.so.1 (the one I removed in favour of the symbolic link) not show up as a symbolic link?
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
Quote:
Originally Posted by pierssnell
I'll mention one suspicion I did have about my understanding... your instructions, and those on the thread already mentioned, suggest that libsane-genesys.so.1 is a symbolic link which is used to point to your most-recent or best-working libsane-genesys.so.1.n.n ... Why then does the installed libsane-genesys.so.1 (the one I removed in favour of the symbolic link) not show up as a symbolic link?
If it doesn't show up as a symbolic link, that might very well the reason it does not give the desired results. Strange if you say that libsane-genesys.so.1 does not show up as a symbolic link. Can you execute this commands in order in a terminal, and post the complete output of what you get here. You have to precede the command with sudo, or run as root.
Code:
cd /usr/lib/x86_64-linux-gnu/sane
ls -l libsane-genesys.so.*
rm libsane-genesys.so.1
ls -l libsane-genesys.so.*
ln -s libsane-genesys.so.1.0.23 libsane-genesys.so.1
ls -l libsane-genesys.so.*
Select everything from the first until the last command, including the command results. Then SHF-CTRL-C or Edit->Copy to copy from the terminal. Past here. Select, apply code tags. That is, select and press the # button right above the edit window in this forum.
Here goes. First, I reverted the sane directory to its installed state, just to confirm that Xsane *does* open, and finds the device, and makes a scan...
The problem here never *was* that it didn't find the scanner, but that the resulting scan is a horrible blotchy mess, (because in lineart mode it finds the edge of every dark area, but doesn't fill those outlines.)
Starting with "sane" directory in its installed state, did the following --
Code:
minty sane # cd /usr/lib/x86_64-linux-gnu/sane
minty sane # ls -l libsane-genesys.so.*
-rw-r--r-- 1 root root 540000 Oct 12 17:24 libsane-genesys.so.1
-rw-r--r-- 1 root root 540000 Oct 12 17:24 libsane-genesys.so.1.0.25
minty sane # rm libsane-genesys.so.1
minty sane # ls -l libsane-genesys.so.*
-rw-r--r-- 1 root root 540000 Oct 12 17:24 libsane-genesys.so.1.0.25
minty sane # cp /home/piers/libsane-genesys.so.1.0.23 .
minty sane # ln -s libsane-genesys.so.1.0.23 libsane-genesys.so.1
minty sane # ls -l libsane-genesys.so.*
lrwxrwxrwx 1 root root 25 Oct 12 17:26 libsane-genesys.so.1 -> libsane-genesys.so.1.0.23
-rw-r--r-- 1 root root 421081 Oct 12 17:26 libsane-genesys.so.1.0.23
-rw-r--r-- 1 root root 540000 Oct 12 17:24 libsane-genesys.so.1.0.25
-- following which, Xsane now looks for a scanner and fails to find one.
From where I am sitting, it looks as though this installation is working by making libsane-genesys.so.1 a *copy* of libsane-genesys.so.1.0.25 rather than a symlink to it? Either way, replacing 1.0.25 with 1.0.23 is somehow blocking Xsane from detecting the scanner.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
Yes, it looks like libsane-genesys.so.1 is a copy. Weird. But it doesn't change anything whether you make a copy or a symlink.
If you want to be sure, issue
Code:
scanimage -L
in the command line and see if it lists anything. If not, try again with sudo.
If nothing is listed, try to remove the symlink and then link again to version 25. Repeat the scanimage -L
The first scanimage -L should return no scanner, the second should list your scanner.
If the first scanimage -L does return something when ran as sudo, it is a permissions problem. (Slight chance, but some Sane versions did that)
If the scanner is not found with version 23 then I fear the library is simply not compatible with the latest Sane. That is possible.
Sometimes it works to point to a different repository and install the previous version of a program.
Open your /etc/apt/sources.list and you should see a line which resembles
Code:
deb http://httpredir.debian.org/debian/ jessie main contrib non-free
but instead of debian you might see mint specific words.
I don't have an installed Mint system at hand now so I cannot copy the real Mint lines.
Now go into the Mint web site, and find the repository for the previous version of Mint. The repositry is a line starting with "deb" and somehow it should contain words to the previous Mint version.
Once you found that, insert that line in /etc/apt/sources.list and comment out the original line.
It is possble that many more packages are removed than these two. If you happen to remove too much, it is possible to re-install later.
Then:
Code:
sudo apt-get install sane
That should install the previous version of Sane. When apt tells it will REMOVE packages, it is better to stop. The same for version conflicts or other install errors. Then it cannot be done.
To get your system back in a workable state, restore the original /etc/apt/sources.list, re-run
Code:
sudo apt-get update
and re-installl what you removed.
And think about cleaning your disk and make fresh install of a previous Mint version.
I got a free HP Deskjet scanner from a skip, about 10 years ago.
SANE works fine - except that I have to apply power to the scanner, start Sane and connect via USB (in that order).
It sometimes takes two or three attempts at starting Sane & connecting the USB.
jlinkels, again, many many thanks for your help, and being so generous with your time.
I followed all those instructions; alas, it turns out that Mint 17 versions had already moved onto version 1.0.25 of libsane-genesys, so I would need to go back to a still older version.
It was worth a try... but repository lists are only readily available for Mint 17. Others are available, but you have to jump through hoops to get at them... and bearing in mind that even if I can get an older libsane-genesys backend, it is going to compromise the updating of other packages...
I think it is actually simpler to take your last suggestion, admit defeat, and simply do a fresh install of an older Mint version from an .iso I already have on DVD -- I think I have version 14 on disc. It won't be a supported version, but I remember it all worked pretty well out of the box in any case. Being able to make lineart scans is really crucial for me, and I simply can't use an OS that won't do it for me! I'll take a look at Mint again when it goes up to 19, and see if the sane backend has been sorted by the time that happens.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
Glad for you that it worked. Indeed installing a previous Mint version was the right thing to do. And yes, Mint is user friendly and does not harass the users with things like repositories. Let alone repositories for previous versions.
Since your skill level has increased during this project from Newbie to at least Intermediate you could try next time to install Debian instead of Mint. Mint used to be based on Debian. Or based on Ubuntu which was in turn based in Debian.
Debian is not more difficult than Mint, but it tries less to hide everything. Hiding is nice, but only until you hit your first problem. Like adding a different repository.
Debian comes with Mate for sure and I think Cinnamon is also available. The latest Debian version has the same version of libsane because Mint is based on Debian. It won't help you this time of course. But you have much more freedom and support while installing previous versions. For in the future.
You are too kind... I don't think I'd call myself intermediate quite yet!
I did try a Debian a while back; mostly I reacted against all the eye-candy on the desk-top and the feeling that the graphic designers had worked as hard as the software people... which I am sure I could have turned off quite easily, but it was really quite off-putting. I *still* like the huge simplicity of Puppy linux, it's just that it is "behind the curve" on packages.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.