Install scanner Canoscan LIDE 120

Install scanner Canoscan LIDE 120

Postby cldjean » Apr 4th, '18, 02:25

Hello

I try to install Canoscan LIDE 120 scanner.
I am on Mageia 6; Kernel : 4.14.30-desktop-3.mga6; arch: 64-bit; Desktop : Xfce
I've run the configuration wizard in the Control Center. The automatic detection said the scanner is detected but Xsane didn't detect the scanner. When I wanted to add manually the scanner I saw that the wizard doesn't support Canoscan LIDE 120.

As root, sane-find-scanner gives
Code: Select all
found USB scanner (vendor=0x04a9 [Canon], product=0x190e [CanoScan], chip=GL848+) at libusb:002:002


And scanimage -L gives
Code: Select all
device `genesys:libusb:002:002' is a Canon LiDE 120 flatbed scanner


How should I proceed ?

Thank you
cldjean
 
Posts: 23
Joined: Oct 3rd, '17, 05:46

Re: Install scanner Canoscan LIDE 120

Postby wintpe » Apr 4th, '18, 10:43

the vuescan site suggests On Linux, you need to set up libusb device protections for that scanner.

has something to do with its device only having root permissions.

im guessing this means you will have to create a udev rule for it to set the devices ownership and modes.

theres a few examples of this, this is just one, i picked out of many on google to point you off in a voyage of exploration and discovery.

https://unix.stackexchange.com/question ... other-user

first thing to try is run up scanimage in a terminal as root and see if that changes the findings.

if so then you need as above to set the mode to something less restrictive.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1178
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: Install scanner Canoscan LIDE 120

Postby cldjean » Apr 4th, '18, 10:55

Hello Peter

Thank you for your reply

Running scanimage as root gives the following answer :

Code: Select all
[root@localhost jeanc]# scanimage
scanimage: output is not a file, exiting


What should I do in this case ?

Regards
cldjean
 
Posts: 23
Joined: Oct 3rd, '17, 05:46

Re: Install scanner Canoscan LIDE 120

Postby Lebarhon » Apr 5th, '18, 11:23

hello,
May be
Code: Select all
#scanimage -L
Lebarhon
 
Posts: 408
Joined: Mar 22nd, '11, 22:24
Location: France

Re: Install scanner Canoscan LIDE 120

Postby cldjean » Apr 5th, '18, 11:30

Hello Lebarhon

Thank you for your help

Here is the result of running scanimage -L

Code: Select all
[root@localhost jeanc]# scanimage -L
device `genesys:libusb:002:002' is a Canon LiDE 120 flatbed scanner


What should be the next step ?

Regards
cldjean
 
Posts: 23
Joined: Oct 3rd, '17, 05:46

Re: Install scanner Canoscan LIDE 120

Postby Lebarhon » Apr 5th, '18, 13:28

Sorry, I didn't see you already gave the information.

Did you install (for 64bit):
lib64canberra-gtk3_0-0.30-4.mga4
canberra-common-0.30-4.mga4
lib64canberra-gtk0-0.30-4.mga4
canberra-gtk-0.30-4.mga4
lib64canberra0-0.30-4.mga4

Did you try to use xsane with the root rights? To start the scanner before Mageia?
Can you find your scanner in /lib/udev/rules.d/60-libsane.rules?
Lebarhon
 
Posts: 408
Joined: Mar 22nd, '11, 22:24
Location: France

Re: Install scanner Canoscan LIDE 120

Postby doktor5000 » Apr 5th, '18, 13:54

Lebarhon wrote:Did you install (for 64bit):
lib64canberra-gtk3_0-0.30-4.mga4
canberra-common-0.30-4.mga4
lib64canberra-gtk0-0.30-4.mga4
canberra-gtk-0.30-4.mga4
lib64canberra0-0.30-4.mga4


For reference, those are only for sound notifications, nothing to do with scanners.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14678
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Install scanner Canoscan LIDE 120

Postby cldjean » Apr 5th, '18, 15:31

When I run as root, Xsane recognizes the scanner but doesn't work properly. Booting preview wizard takes a very long time and when preview is done, the image is dark.

I can't find my scanner in /lib/udev/rules.d/60-libsane.rules : in this file there is a list of several Canoscan LIDE but Canoscan LIDE 120 is not present.

Doktor 5000 said canberra packages are only for sound notifications and have no link with scanner. Can you explain why should I install the canberra linked packages ?

What is the next step ?
cldjean
 
Posts: 23
Joined: Oct 3rd, '17, 05:46

Re: Install scanner Canoscan LIDE 120

Postby Lebarhon » Apr 5th, '18, 16:44

If Doktor 5000 said it, it is true ! I asked about it because somebody with a similar problem on the French forum said it was better after these rpm were installed. But it is not an evidence that it is connected.
If the behaviour is better with root rights, it means you may have user rights problems. Is your user a scanner group member?
You can try to add a line in /lib/udev/rules.d/60-libsane.rules. Here is an example that worked for a Brother scan:
See what does this command answer:
Code: Select all
#lsusb

For example:
Code: Select all
Bus 007 Device 007: ID 04f9:0182 Brother Industries, Ltd Composite Device

You can write a line in /lib/udev/rules.d/60-libsane.rules with the ID 04f9:0182. Copy an existing line for Canon Lide and change it with the right ID, in my example
# Brother DCP-7010 (this line is free)

ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="0182", MODE="0644", GROUP="usb", ENV{libsane_matched}="yes"

No garantee, I never tried it.
Lebarhon
 
Posts: 408
Joined: Mar 22nd, '11, 22:24
Location: France

Re: Install scanner Canoscan LIDE 120

Postby cldjean » Apr 6th, '18, 03:16

As root I added in /etc/sane.d/genesys.conf

# Canon LiDE 120
usb 0x04a9 0x190e

I added in /lib/udev/rules.d/60-libsane.rules

# Canon CanoScan LiDE 120
ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="190e", MODE="0644", GROUP="usb", ENV{libsane_matched}="yes"

After that I copied what I have considered the firmware of Canoscan LIDE 120 (CNQ2415.INF) in /etc/sane.d/
As root, I gave the rights
Code: Select all
chmod 775 /etc/sane.d/CNQ2415.INF


I wrote in /etc/sane.d/snapscan.conf the following information
firmware /etc/sane.d/CNQ2415.INF

The scanner is working with Xsane as user. But it doesn't work properly. The preview action is very long to boot. The preview and the scanned images are blank.

Is CNQ2415.INF the firmware ? That is my question.
cldjean
 
Posts: 23
Joined: Oct 3rd, '17, 05:46

Re: Install scanner Canoscan LIDE 120

Postby Lebarhon » Apr 6th, '18, 10:10

cldjean wrote:Is CNQ2415.INF the firmware ? That is my question.


It looks like a Windows driver. Usually, Canon Asia has Canon drivers for Linux but I didn't find anything for Lide 120, probably to recent.
http://support-asia.canon-asia.com/?personal
But I found on Ubuntu and Debian forums that Lide 120 was working with the latest version of Sane, you may have to build yourself from source.
http://www.sane-project.org/sane-mfgs.html#Z-CANON
Lebarhon
 
Posts: 408
Joined: Mar 22nd, '11, 22:24
Location: France

Re: Install scanner Canoscan LIDE 120

Postby cldjean » Apr 6th, '18, 10:18

Thank you for the time you spent in these searchings

I've never built sane from source. I saw pages explaining the process on ubuntu forums. But how can I proceed under Mageia ? Can you help me?

Thank you
cldjean
 
Posts: 23
Joined: Oct 3rd, '17, 05:46

Re: Install scanner Canoscan LIDE 120

Postby doktor5000 » Apr 6th, '18, 11:53

Lebarhon wrote:But I found on Ubuntu and Debian forums that Lide 120 was working with the latest version of Sane, you may have to build yourself from source.
http://www.sane-project.org/sane-mfgs.html#Z-CANON

Latest version meaning which version? All of the scanners using the genesys backend should work since sane-backends-1.0.16 which is older then Mageia 1. See http://www.meier-geinitz.de/sane/genesys-backend/


Apart from that I believe the changes done by OP should not be required at all to get the scanner working at all. Although I don't have a canon scanner to test anymore,
but from what I remember no such change was required, only thing that was needed was to fix device access as regular user.

See also viewtopic.php?f=24&t=12068
viewtopic.php?f=24&t=11918
viewtopic.php?f=7&t=11802
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14678
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Install scanner Canoscan LIDE 120

Postby cldjean » Apr 7th, '18, 08:12

Thank you Doktor 5000

My scanner is not shared on a network so I guess the first of the topics you've suggested is not for me.

For the second topic I've tried the following command
Code: Select all
strace -f scanimage --format=jpeg >'0001.jpg' -o output.txt


It gave me a very long answer that I put in a file. There are some ioctrl instructions but not many.

How can I attach this file (.txt) to a post and send you the information ?
cldjean
 
Posts: 23
Joined: Oct 3rd, '17, 05:46

Re: Install scanner Canoscan LIDE 120

Postby doktor5000 » Apr 7th, '18, 12:12

cldjean wrote:How can I attach this file (.txt) to a post and send you the information ?

Below the forum editor (only available in Full editor, not via quick reply), switch to the tab "Upload attachment".
Upload your file, then when finished, click in the editor window where you want your file to display, and click the button "Place inline".

But in the current state it's probably not helpful. You should first remove your changes from /etc/sane.d/snapscan.conf and also remove /etc/sane.d/CNQ2415.INF

Also it seems that Canon may have changed the chipset in that scanner to a different one, but kept the same USB vendor/product device IDs, see e.g. comment #076 at https://answers.launchpad.net/ubuntu/+question/262320
This is also contained in your ouput:
found USB scanner (vendor=0x04a9 [Canon], product=0x190e [CanoScan], chip=GL848+) at libusb:002:002


I believe you would need at least sane-backends-1.0.27 (1.0.26 does not exist, this version was skipped) if I'm not mistaken.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14678
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Install scanner Canoscan LIDE 120

Postby cldjean » Apr 7th, '18, 15:10

The upload file contains the very verbous answer of
Code: Select all
strace -f scanimage --format=jpeg >'0001.jpg' -o output.txt


I removed the informations put in /etc/sane.d/snapscan.conf. But I 've lost the former firmware.

I also remove /etc/sane.d/CNQ2415.INF

My actuel sane-backends is 1.0.25.
Attachments
strace -f scanimage.txt
Answer of : strace -f scanimage --format=jpeg >'0001.jpg' -o output.txt
(2.76 MiB) Downloaded 40 times
cldjean
 
Posts: 23
Joined: Oct 3rd, '17, 05:46

Re: Install scanner Canoscan LIDE 120

Postby cldjean » Apr 10th, '18, 11:00

I believe you would need at least sane-backends-1.0.27 (1.0.26 does not exist, this version was skipped) if I'm not mistaken.

My actuel sane-backends is 1.0.25.


How to proceed to install properly sane-backends-1.0.27 ?

I am on Mageia 6; Kernel : 4.14.30-desktop-3.mga6; arch: 64-bit; Desktop : Xfce
cldjean
 
Posts: 23
Joined: Oct 3rd, '17, 05:46

Re: Install scanner Canoscan LIDE 120

Postby Lebarhon » Apr 10th, '18, 12:22

The more simple is to have a rpm package
You have one here for Fedora 27:
https://fedora.pkgs.org/27/fedora-x86_6 ... 4.rpm.html
Fedora packages are often suitable for Mageia, wait for other advises.
Lebarhon
 
Posts: 408
Joined: Mar 22nd, '11, 22:24
Location: France

Re: Install scanner Canoscan LIDE 120

Postby doktor5000 » Apr 10th, '18, 19:59

cldjean wrote:How to proceed to install properly sane-backends-1.0.27 ?


Install the buildrequires for the src.rpm as root via
Code: Select all
urpmi --buildrequires http://ftp.snt.utwente.nl/pub/os/linux/mageia/distrib/6/SRPMS/core/release/sane-1.0.25-5.mga6.src.rpm


Then compile sane-backends 1.0.27 yourself, as e.g. mentioned here: http://www.sane-project.org/INSTALL.linux
1. Quick install:
=================

$ ./configure
$ make
$ make install
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14678
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Install scanner Canoscan LIDE 120

Postby cldjean » Apr 11th, '18, 03:33

I followed your advices but I seem have a problem

1. I install the buildrequires for the src.rpm as root via
Code: Select all
urpmi --buildrequires http://ftp.snt.utwente.nl/pub/os/linux/mageia/distrib/6/SRPMS/core/release/sane-1.0.25-5.mga6.src.rpm

I choose to install libstdc++-devel-5.5.0-1.mga6.x86_64 and gcc-5.5.0-1.mga6.x86_64 
2. I could not install make 4.1 5.mga6 x86_64. I could only install make 4.1 5.mga6 i586
3. I downloaded sane-backends-git20180411.tar.gz
4. I extracted it in /usr/local/lib
5. I launched ./configure BACKENDS="canon canoscan lide 120"
The end of the process gave that result :
-
> Installation directories:
Configuration: /usr/local/etc
Libraries: /usr/local/lib
Binaries: /usr/local/bin and /usr/local/sbin
Manpages: /usr/local/share/man
Documentation: /usr/local/share/doc/sane-backends
Lockfiles: /usr/local/var/lock/sane
-> Network parameters:
Build saned: yes
IPv6 support: yes
Avahi support: no
SNMP support: no
-> The following backends will be built:
canon canoscan lide 120

-> The following preload backends will be built:

****************************************************************
* Please be sure to read file PROBLEMS in this directory *
* BEFORE running any of the SANE applications. Some devices *
* may be damaged by improper operation, so please do heed this *
* advice.

What means really means " Some devices may be damaged by improper operation. ?
What is your advice ?

The total informations given by ./configure is in the uploaded document
Attachments
configure.txt
(17.3 KiB) Downloaded 31 times
cldjean
 
Posts: 23
Joined: Oct 3rd, '17, 05:46

Re: Install scanner Canoscan LIDE 120

Postby cldjean » Apr 11th, '18, 09:22

Here is a copy of the file called PROBLEMS
Attachments
PROBLEMS.txt
(1.05 KiB) Downloaded 33 times
cldjean
 
Posts: 23
Joined: Oct 3rd, '17, 05:46

Re: Install scanner Canoscan LIDE 120

Postby doktor5000 » Apr 11th, '18, 18:06

cldjean wrote:What means really means " Some devices may be damaged by improper operation. ?
What is your advice ?

It means what it means.
Either you want to use sane or you don't, this is a standard message shown for every sane-backends build.

Did you actually read the PROBLEMs file you attached here?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14678
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Install scanner Canoscan LIDE 120

Postby cldjean » Apr 12th, '18, 08:50

Thank you for your reply. I just wanted to know if I could go further.

Finally I could install make 1:4.1-5,mga6 x86_64

I run
Code: Select all
[root@localhost sane-backends-git20180411]# make && make install


the end of the process gave me an error message

Code: Select all
/bin/sh ../libtool --silent  --tag=CC   --mode=link gcc -Wall -Wextra -pedantic -g -O2 -Wl,-z,defs -rpath '/usr/local/lib/sane' -version-number 1:0:27 -module  -o libsane-canon.la  libsane_canon_la-canon-s.lo ../lib/liblib.la libcanon.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo ../sanei/sanei_config2.lo sane_strstatus.lo ../sanei/sanei_scsi.lo -lm   
./.libs/libcanon.a(libcanon_la-canon.o): In function `sane_canon_start':
/usr/local/lib/sane-backends-git20180411/backend/canon-sane.c:1128: warning: the use of `mktemp' is dangerous, better use `mkstemp'
make[2]: ***  Aucune règle pour fabriquer la cible « libsane-canoscan.la », nécessaire pour « all-am ». Arrêt.
make[2] : on quitte le répertoire « /usr/local/lib/sane-backends-git20180411/backend »
Makefile:2809 : la recette pour la cible « all » a échouée
make[1]: *** [all] Erreur 2
make[1] : on quitte le répertoire « /usr/local/lib/sane-backends-git20180411/backend »
Makefile:546 : la recette pour la cible « all-recursive » a échouée
make: *** [all-recursive] Erreur 1


No rule to built the target « libsane-canoscan.la », necessary for « all-am » !

I tried to go further
Code: Select all
[root@localhost sane-backends-git20180411]# ldconfig -v | grep libsane
ldconfig: Ne peut évaluer par stat /libx32: Aucun fichier ou dossier de ce type
ldconfig: Chemin « /usr/lib » donné plus d'une fois
ldconfig: Chemin « /usr/lib64 » donné plus d'une fois
ldconfig: Ne peut évaluer par stat /usr/libx32: Aucun fichier ou dossier de ce type
   libsane.so.1 -> libsane.so.1.0.25
[root@localhost sane-backends-git20180411]# cd /usr/share/locale/fr/LC_MESSAGES
[root@localhost LC_MESSAGES]# ln -sf /usr/local/share/locale/fr/LC_MESSAGES/sane-backends.mo
[root@localhost LC_MESSAGES]# cd
[root@localhost ~]# cp tools/udev/libsane.rules /etc/udev/rules.d
cp: impossible d'évaluer 'tools/udev/libsane.rules': Aucun fichier ou dossier de ce type
[root@localhost ~]# cp usr/lib/udev/rules.d/60-libsane.rules /etc/udev/rules.d
cp: impossible d'évaluer 'usr/lib/udev/rules.d/60-libsane.rules': Aucun fichier ou dossier de ce type


What should I add to 60-libsanes.rules ?

Actually the scanner is only recognized when xsane is booted in root. But the scanned image is still blank.

Should I re-compile sane-backends 1.0.27 but this time without any backends spécification ? Before compiling should i do something ? I don't know what I can do now.

Thank you for your help, it's my first time I compile.

Attached file: complete process when I run make && make install
Attachments
make sane-backends-git20180411.txt
(34.22 KiB) Downloaded 46 times
cldjean
 
Posts: 23
Joined: Oct 3rd, '17, 05:46

Re: Install scanner Canoscan LIDE 120

Postby wintpe » Apr 13th, '18, 15:23

cldjean

we dont ever recommend installing recompiled new tarballs over an rpm distribution, it totally mucks it up. very akin to a seagul hovering above your plate of dinner.

the only exception on an rpm based distribution is when the --target is set to something like /opt/newappversion, so its separated from the rpm install.

you cant do that with a subsystem, like sane.

the only recommendation we ever promote is build a new rpm , and frankly you dont yet have the experience to do that or understand many of the concepts

if you cant solve this issue with your canonscan using the recommendations, then perhaps it should be put on the shelf till the next mageia revision.

upgrading your install to mga7 could potentially fix this issue, but given your experience im not sure i want to recommend that. and not at all sure it will fix it.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1178
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: Install scanner Canoscan LIDE 120

Postby doktor5000 » Apr 13th, '18, 16:55

@Peter: Well, currently this would be his only option, as mga7 does not have a newer sane. Also he would be the only one to test whether a newer sane fixes the issue, so that information could then be used as feedback to request a newer or possibly a patched sane version for mga7 ...
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14678
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Next

Return to Printers and Scanners

Who is online

Users browsing this forum: No registered users and 1 guest