3. I can't install your deb, what can I do to get 32bit epson drivers on my 64bit system? - trufanov-nok/old-epson-drivers-epkowa-for-x64 GitHub Wiki
You may follow this instruction. I've write it while making the package. You can adjust it for yourself. Probably some paths on your system is different.
This example is based on Kubuntu 18.10 and Epson Perfection 1260 Photo.
Install 32bit version of libsane - it can be installed in parallel with 64-bit libsane
sudo apt-get install libsane:i386
My version (both 32 and 64 bit) were 1.0.27-1.
Install 32 bit version of sane-utils package:
sudo apt-get install sane-utils:i386
It WILL replace your 64-bit sane-utils package. But we need only daemon executable from it. So check where it is:
$ which saned
/usr/sbin/saned
check if it's 32-bit:
file /usr/sbin/saned
/usr/sbin/saned: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=8e77f96c5d4e9c199facd98a40bf85482dee0bae, stripped
and keep it for further use:
sudo cp /usr/sbin/saned /usr/sbin/saned32
Make sure it works:
$ saned32 -h
Usage: saned32 [OPTIONS]
Options:
-a, --alone[=user] run standalone and fork in background as `user'
-d, --debug[=level] run foreground with output to stdout
and debug level `level' (default is 2)
-s, --syslog[=level] run foreground with output to syslog
and debug level `level' (default is 2)
-b, --bind=addr bind address `addr'
-h, --help show this help message and exit
Now get your 64-bit sane-utils back:
sudo apt-get install sane-utils
Check if it's 64 bit now:
$file /usr/sbin/saned
/usr/sbin/saned: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=3f9af1bc3643c4b6080dd5c429996da8833b2f5e, stripped
Obtain drivers for your scanner.
Go to "Linux Drivers for Epson Products": http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX And search for your model. In my case: "1260"
I've got 4 results: driver itself for gcc 3.2/3.3 or gcc 3.4+ and "iscan plugin package" for same gcc versions. We'll need 3.4+ variants. They're newer, why not?
Go through the links and download rpm files as thee are no deb packages. You'll need iscan-2.10.0-1.c2.i386.rpm and iscan-plugin-gt-7300-1.0.0-1.c2.i386.rpm
First package contains SANE backend named Epkowa. Second contains libesint23.so which is a 32-bit firmware for GT 7300 (Japan name for Perfection 1260 Photo).
In fact there may be the case that Epson website won't offer you a model specific firmware for your device. This may mean that Epkowa is all you need. This backend is provided with sources which could be also downloaded from Epson's website and you can manage to build them on 64-bit machine. In this case all you need is to rebuild Epkowa and place it in /usr/lib/x86_64-linux-gnu/sane/.
But if Epson suggests you the "iscan plugin package" then you're out of luck as your device won't work without specific firmware lib named libesintNN.so where NN - is a firmware id or something like that. This firmware is a proprietary and 32-bit only. There are no sources so building or installing 64-bit libsane-epkowa.so in this case is useless.
It's also useless to convert rpm files to deb packages with alien or other tool as installation paths in rpm are different from 64-bit machine and these deb just can't be installed with dpkg. So we can just unpack them (rpm and deb are basically archives):
mkdir /tmp/driver
rpm2cpio iscan-2.10.0-1.c2.i386.rpm | cpio -idm -D /tmp/driver/
Edit /tmp/driver/etc/sane.d/epkowa.conf to add your device vendor and product id.
To get these values you may plug in your scanner via usb and execute sane-find-scanner
In my case the result will contain following line:
found USB scanner (vendor=0x04b8 [EPSON], product=0x011d [EPSON Scanner], chip=LM9832/3) at libusb:003:021
Now edit your epkowa.conf:
kate /tmp/driver/etc/sane.d/epkowa.conf find there commented line #usb 0x04b8 0x0110
Uncomment it and change values to the data you've got with sane-find-scanner:
usb 0x04b8 0x011d
Save the file and copy it to the SANE config folder: ``sudo cp /tmp/driver/etc/sane.d/epkowa.conf /etc/sane.d/
Then copy Epkowa driver to your's 32-bit drivers folder (it belongs to libsane:i386): ``sudo cp /tmp/driver/usr/lib/sane/libsane-epkowa.* /usr/lib/i386-linux-gnu/sane/
There is also iscan frontend app that could be installed to /usr/bin and libesmod.so library that required by it that could be installed to /usr/lib/i386-linux-gnu/. It's also will require installation of libgtk2.0-0:i386, libpangox-1.0-0:i386, libpangoxft-1.0-0:i386 and libjpeg62:i386 packages with apt-get to work.
I don't use this frontend and prefer default Skanlite application.
Next we need to unpack firmware (we can do this to the same folder):
rpm2cpio iscan-plugin-gt-7300-1.0.0-1.c2.i386.rpm | cpio -idm -D /tmp/driver/
Copy it to your 32-bit drivers including subfolder:
sudo cp -r /tmp/driver/usr/lib/iscan /usr/lib/
(yes, it need to be /usr/lib/ as Epkowa backend doesn't expect to find firmwares in /usr/lib/i386-linux-gnu/sane/ subfolder).
There is only libesint23.so but you also may google iscan-proprietary-drivers-2.10.0.1-1.3.x86_64.rpm that contains 10 more firmwares. In spite of "x86_64" suffix in its title the libraries are 32-bit.
At this point all 32-bit applications will be able to work with your scanner (for example - iscan). Try to launch iscan command to make sure.
Configure your saned32 daemon according to application manual. Use man saned for details. We'll stick with systemd option as it's used on my system.
According to saned documentation "Connections from localhost are always permitted" so we don't need to edit /etc/sane/saned.conf.
Register new systemd service by adding 3 files into /lib/sysemd/system/:
A. empty saned32.service
B. [email protected] with following content:
[Unit]
Description=Scanner 32-Bit Service
Requires=saned32.socket
[Service]
ExecStart=/usr/sbin/saned32
User=saned
Group=saned
StandardInput=null
StandardOutput=syslog
StandardError=syslog
Environment=SANE_CONFIG_DIR=/etc/sane.d
# Environment=SANE_CONFIG_DIR=/etc/sane.d SANE_DEBUG_DLL=255
[Install]
Also=saned32.socket
C. saned32.socket with the following content:
[Unit]
Description=saned32 incoming socket
[Socket]
ListenStream=6566
Accept=yes
MaxConnections=64
[Install]
WantedBy=sockets.target
Now we need to launch our new service with following 2 commands:
sudo systemctl start saned32.socket
sudo systemctl enable saned32.socket
You can check service status with:
$ sudo systemctl status saned32.socket
output should be:
● saned32.socket - saned32 incoming socket
Loaded: loaded (/lib/systemd/system/saned32.socket; enabled; vendor preset: enabled)
Active: active (listening) since Thu 2018-11-22 12:10:47 MSK; 1h 53min ago
Listen: [::]:6566 (Stream)
Accepted: 12; Connected: 0;
Tasks: 0 (limit: 4915)
Memory: 224.0K
CGroup: /system.slice/saned32.socket
laptop systemd[1]: Listening on saned32 incoming socket.
These 3 files are just copies of systemd service registration mechanism adjusted for systemd32 executable. If your system doesn't use systemd then you always can refer to sane-utils package and check how your saned registers itself. Use dpkg -L sane-utils
Now our 32-bit saned service is up and running. It uses libsane:i386 and 32bit drivers. The final step is to allow libsane:amd64 to connect this service via localhost:6566 address.
To do that you just need to ensure /etc/sane.d/net.conf has uncommented line
localhost
Sane doesn't try to find saned on localhost by default. So this must be explicitly permitted. It seems you also can't change port to something other than 6566, as it's hardcoded in libsane-net.so code.
P.S. Epson has newer (and even x64) linux version of iscan but it seems to be locked from being used with scanner models which require libesintNN.so firmware. So keep using 2.10 or, better, enable saned32 and use Skanlite, xsane or any other 64-bit frontend.
P.P.S. I've tested this with Epson Perfection 1260 (GT 7300U) and libesint23.so. I've also found 10 more firmwares in iscan-proprietary-drivers-2.10.0.1-1.3.x86_64.rpm. Looks like full list of supported devices will be: GT-7200U, GT-7300U, GT-9400UF, GT-F500, GT-F520, GT-F550, GT-F570, GT-F600, Perfection 1250, Perfection 1250 Photo, Perfection 1260, Perfection 1260 Photo, Perfection 2480 Photo, Perfection 2580 Photo, Perfection 3170 Photo, Perfection 3490 Photo, Perfection 3590 Photo, Perfection 4180 Photo.
P.P.P.S Note: my device take some time to worm up with this native driver. But it works fast enough after that. Faster than with plustek. Also in your backend may appear model specific "Wait for key" option and it may be turned on by default. If it so, your scanner will do nothing after receiving command until you press and hold a hardware button on it for a while. Make sure you disable this option before scanning or you'll wait device for readiness forever.