LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-11-2017, 04:02 PM   #1
pierssnell
Member
 
Registered: Sep 2011
Location: UK
Distribution: Puppy 571 + Mint 18.2
Posts: 38

Rep: Reputation: Disabled
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.

https://forums.linuxmint.com/viewtopic.php?t=250453

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
 
Old 10-11-2017, 07:07 PM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
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):
Code:
rm libsane-genesys.so.1
ln -s libsane-genesys.so.1.0.22 libsane-genesys.so.1
Then your directory looks like:
Code:
lrwxrwxrwx 1 root root     25 Dec 27  2014 libsane-genesys.so.1 -> libsane-genesys.so.1.0.22
-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
So whenever is referred to libsane-genesys.so.1, libsane-genesys.so.1.0.22 is used.

jlinkels
 
Old 10-12-2017, 09:55 AM   #3
pierssnell
Member
 
Registered: Sep 2011
Location: UK
Distribution: Puppy 571 + Mint 18.2
Posts: 38

Original Poster
Rep: Reputation: Disabled
Many thanks jlinkels!

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?

Regards,
Piers.
 
Old 10-12-2017, 10:47 AM   #4
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
Quote:
Originally Posted by pierssnell View Post
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.

jlinkels
 
Old 10-12-2017, 12:14 PM   #5
pierssnell
Member
 
Registered: Sep 2011
Location: UK
Distribution: Puppy 571 + Mint 18.2
Posts: 38

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-12-2017, 04:07 PM   #6
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
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.

Once done that:
Code:
sudo apt-get update
sudo apt-get remove --purge sane xsane
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.

jlinkels

Last edited by jlinkels; 10-12-2017 at 04:09 PM.
 
Old 10-12-2017, 04:27 PM   #7
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,895

Rep: Reputation: 469Reputation: 469Reputation: 469Reputation: 469Reputation: 469
I wonder if it's all so serious.

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.

However, once it's done, it remains stable.
 
Old 10-13-2017, 11:02 AM   #8
pierssnell
Member
 
Registered: Sep 2011
Location: UK
Distribution: Puppy 571 + Mint 18.2
Posts: 38

Original Poster
Rep: Reputation: Disabled
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.

Thanks again; best regards, Piers.
 
Old 10-13-2017, 01:55 PM   #9
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
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.

jlinkels
 
Old 10-13-2017, 02:21 PM   #10
pierssnell
Member
 
Registered: Sep 2011
Location: UK
Distribution: Puppy 571 + Mint 18.2
Posts: 38

Original Poster
Rep: Reputation: Disabled
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.

Thanks again!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Bugfix" for sane package in Slackware-14.0 joenew Slackware 5 06-27-2013 07:47 AM
newbie question: whats the difference between "su root", "su" and "su -&quo mojarron Slackware 9 12-07-2009 04:08 PM
Troubleshooting "Initialization failed fro alloc backend, deferred!" dguy Linux - Server 0 10-19-2009 01:53 PM
Sane Scanner Tool shows "no devices available" norm.h Linux - Hardware 2 01-12-2009 08:49 AM
Gentoo: "network interface eth0 does not exist" after kernel downgrade geogaddi Linux - Networking 2 12-14-2008 12:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration