(SOLVED) Scanner not recognized after upgrading to LM18

Forum rules
Before you post please read this
Post Reply
Arrababiski
Level 1
Level 1
Posts: 39
Joined: Wed Aug 24, 2016 3:21 pm
Location: España

(SOLVED) Scanner not recognized after upgrading to LM18

Post by Arrababiski » Wed Aug 24, 2016 3:48 pm

Hi all!

I was using my Epson SX235W printer & scanner under LM17.3 without any problem. This weekend upgraded to LM18 and since then, my scanner is not recognized. Epson "Image Scan! for Linux" takes a lot of time to start (about 2 min and 40 seconds), but only to show a window with the message "Could not send command to scanner". All what happens is very close to the behaviour described in this thread:

viewtopic.php?f=51&t=226249

First reinstalled the drivers from Epson, then try to make lots of changes in dll.conf, net.conf, epkowa.conf, ufw enable and disable but nothing worked.

Finally it worked... but I don't know why. If I disable ufw and start "Image Scan", doesn't work. But if I disable ufw and REBOOT... Image Scan works!!! Next I enabled ufw, disabled again, and "Image Scan" won't work again. Also created an ufw rule to allow inbound/outbound traffic from/to port 1865 and doesn't work. The only way is disabling ufw and rebooting. Starting ufw again means scanner stops responding.

So this is some new issue related to LM18, ufw and the Epson scanner, because with LM17.3 and ufw enabled everything was working fine.

Any idea to solve this...???
Last edited by Arrababiski on Fri Sep 09, 2016 8:48 am, edited 1 time in total.

Arrababiski
Level 1
Level 1
Posts: 39
Joined: Wed Aug 24, 2016 3:21 pm
Location: España

Re: Scanner not recognized after upgrading to LM18

Post by Arrababiski » Wed Aug 24, 2016 7:05 pm

More info:

Xsane works, altough it takes about three minutes to display de scanning interface. Looking in the "Information" option of the "File" menu says it's loading the epson2.conf instead of epkowa.conf. Commenting the "epson2" line in dll.conf makes Xsane fail to start (scanner not found). Editing the iscan file in /etc/sane.d/dll.d and changing "epkowa" for "epson2" has no effect, Epson's "Image Scan for Linux" still doesn't work.

Really, really weird... :(

Arrababiski
Level 1
Level 1
Posts: 39
Joined: Wed Aug 24, 2016 3:21 pm
Location: España

Re: Scanner not recognized after upgrading to LM18

Post by Arrababiski » Fri Aug 26, 2016 10:32 am

Today's test: in a new computer installed Debian 8.4 from scratch. Once installed, activated firewall and install printer + scanner drivers, changed epkowa.conf file to add a net command with the ip of the scanner. The scanner worked ok and Epson's "Image Scan for Linux" application works perfectly.

Next, reformated the same computer with LM17.3. Exactly the same results.

Next, reformated the same computer with LM18. "Image scan for Linux" doesn't work (Could not send command to scanner). Xsane program lasts two and a half minutes to start.

As I see in this forum, there are lots of problems between LM18 and network scanners, so I'm assuming this must be a bug or something similar... :(

AlekseyK
Level 1
Level 1
Posts: 44
Joined: Sat Jul 16, 2016 6:02 pm

Re: Scanner not recognized after upgrading to LM18

Post by AlekseyK » Fri Aug 26, 2016 6:46 pm

Hi developers!

Any fix on this?! I have same bug: scanner does not work in Mint 18.

Arrababiski
Level 1
Level 1
Posts: 39
Joined: Wed Aug 24, 2016 3:21 pm
Location: España

Re: Scanner not recognized after upgrading to LM18

Post by Arrababiski » Fri Sep 09, 2016 8:47 am

Finally I get this issue solved. After lots of tests, all with the same result (Xsane lasting three minutes to start and Iscan not working), restarted with kernel 4.2.0-42 and everything worked fine, Xsane starts in two seconds and the same for Iscan. Restarted again with kernel 4.4.0-36, and the problems went back again. Tryed also the recommended kernel (4.4.0-21) with the same results. So I think the problems with the scanner are something kernel-related, something must have been changed in 4.4 kernel series that generates this problem.

I also tested the scanner in another computer with Debian 8.5 and kernel 4.6.0 and worked ok. Let's wait until kernel 4.6 comes to Mint...

AlekseyK
Level 1
Level 1
Posts: 44
Joined: Sat Jul 16, 2016 6:02 pm

Re: Scanner not recognized after upgrading to LM18

Post by AlekseyK » Fri Sep 09, 2016 12:23 pm

Arrababiski wrote:So I think the problems with the scanner are something kernel-related, something must have been changed in 4.4 kernel series that generates this problem.
No, it is not kernel related. You may find solution here: viewtopic.php?p=1208012#p1208012 It is group rights problem. Need to add scanner group to a user which wants to scan.

Arrababiski
Level 1
Level 1
Posts: 39
Joined: Wed Aug 24, 2016 3:21 pm
Location: España

Re: (SOLVED) Scanner not recognized after upgrading to LM18

Post by Arrababiski » Fri Sep 09, 2016 3:27 pm

Well, my user belongs to "scanner" group and the problems remain. Adding "saned" group also doesn't work.

It's hard to believe that this problem is not kernel related, because starting with kernel 4.2 the network scanner works perfectly and restarting with 4.4 kernel without changing anything else, and scanner doesn't work... :?:

AlekseyK
Level 1
Level 1
Posts: 44
Joined: Sat Jul 16, 2016 6:02 pm

Re: (SOLVED) Scanner not recognized after upgrading to LM18

Post by AlekseyK » Fri Sep 09, 2016 3:40 pm

For me works for 4.4 kernel now.

Arrababiski
Level 1
Level 1
Posts: 39
Joined: Wed Aug 24, 2016 3:21 pm
Location: España

Re: (SOLVED) Scanner not recognized after upgrading to LM18

Post by Arrababiski » Fri Sep 09, 2016 6:24 pm

Even a command as easy as "scanimage -L" fails to detect the scanner with kernel 4.4. Restarting with kernel 4.2, same computer, same scanner, same user and same permissions, detects the scanner correctly in two seconds.

User avatar
kyphi
Level 9
Level 9
Posts: 2603
Joined: Sat Jul 09, 2011 1:14 am
Location: The Hunter Valley, Australia

Re: (SOLVED) Scanner not recognized after upgrading to LM18

Post by kyphi » Fri Sep 09, 2016 9:44 pm

You have been very systematic in trying to find the cause of the malfunction, full marks for that, Arrababiski.

To get my Epson devices to work in Linux Mint 17.x 64bit required nothing more than installing the Epson drivers for both printer and scanner from the Epson Download Center. After that XSane Scanner, Simple Scan and the Epson program Image Scan! for Linux were accessible and fully functional via USB.

To get them to work via Wi-Fi needed the installation of iscan-network-nt, writing the access code of the router into the Epson configuration screen of the multifunction device, editing the dll.conf and epkowa.conf files (viewtopic.php?f=42&t=225289) and writing the IP Address of the scanner into both the Epson configuration screen and the epkowa.conf file. It is assumed that the Epson device has been disconnected from USB and configured to work via Wi-Fi.

The Linux Mint firewall is turned OFF since I have a firewall enabled in my router. If you want to turn the Mint firewall to ON then write a few rules for it. Please note that changes to the Mint firewall will need a reboot to enable or disable.

In Linux Mint 18 64bit, both XSane Scanner and Simple Scan work out of the box with kernel 4.4.0-34.53. It is only if you want to use Epson's Image Scan! for Linux that you have to install the Epson drivers and if you want to use Wi-Fi then make the adjustments as described for LM 17.x.

To install the Epson drivers, I prefer to unpack them from the bundle and install them individually (they are all in .deb format) but keep in mind that iscan-data must be installed before iscan ... and don't forget iscan-network-nt.

The reason I changed from the default kernel to 4.4.0 had nothing whatsoever to do with the functionality of my Epson devices.
Linux Mint 19.2 Cinnamon - 64bit

Arrababiski
Level 1
Level 1
Posts: 39
Joined: Wed Aug 24, 2016 3:21 pm
Location: España

Re: (SOLVED) Scanner not recognized after upgrading to LM18

Post by Arrababiski » Sat Sep 10, 2016 4:46 pm

Thanks for your help, kyphi. I think the configuration should be ok, because starting Mint 18 with kernel 4.2 and ufw enabled everything works fine: Xsane, Iscan, scanimage -L, all of them do what it's supposed they have to do, if a deb file were missing or a .conf file were wrong, should not work neither in 4.2 nor in 4.4.

The only way I succeeded with kernel 4.4 was disabling the firewall (sudo ufw disable) and rebooting. Sudo ufw disable & sudo ufw enable doesn't work, you have to reboot. So kernel 4.2 and ufw works, kernel 4.4 and ufw doesn't work. Does kernel 4.4 change anything in the firewall...? :?:

If I restart the firewall in 4.4, the scanner doesn't respond until I disable ufw and reboot. Tried lots of rules but no success:

sudo ufw allow from my_scanner_ip
sudo ufw allow to my_scanner_ip
sudo ufw allow 1865
sudo ufw allow out 1865
sudo ufw allow saned

Also added a rule to allow traffic from and to port 35587 (used by Epson, see /etc/services), added scanner ip at 'hosts' file, etc, etc. Nothing worked.

By the way, since last 09-01-2016 there's a new version of Epson scanner software for Linux (1.0.2), installed with the same results as usual.

Tomorrow I may install Mint 18 from scratch in another computer and then try step by step to see what happens. More news soon... :wink:

Arrababiski
Level 1
Level 1
Posts: 39
Joined: Wed Aug 24, 2016 3:21 pm
Location: España

Re: (SOLVED) Scanner not recognized after upgrading to LM18

Post by Arrababiski » Sun Sep 11, 2016 6:08 am

AlekseyK wrote:For me works for 4.4 kernel now.
Please Aleksey, have you UFW enabled in your computer? Thanks.

Arrababiski
Level 1
Level 1
Posts: 39
Joined: Wed Aug 24, 2016 3:21 pm
Location: España

Re: (SOLVED) Scanner not recognized after upgrading to LM18

Post by Arrababiski » Sun Sep 11, 2016 6:24 am

Well... more tests done. Same computer as always but new hard disk:

- Installed Mint 18 from scratch, kernel is 4.4, nvidia drivers, epson drivers, full update & upgrade: scanner works perfectly
- Enable UFW: the problems start. Iscan says cant send command to scanner, Xsane doesn't find scanner, scanimage -L doesn't find scanner too
- Install kernel 4.2, UFW enabled, reboot: everything works
- Disable UFW, reboot with kernel 4.4: everything works
- Enable UFW: problems again, scanner not recognized
- Add my user to scanner, saned and lp groups, reboot: scanner not recognized
- UFW allow saned, reboot: scanner not recognized
- Change firewall policy from Deny incoming/Allow outgoing to Allow/Allow and reboot: scanner not recognized
- Install kernel 4.3.3 and reboot: all scanner software working fine
- Install kernel 4.7 and reboot: scanner not recognized

So for me it's clear something has changed involving the firewall and kernel since version 4.4... :?: Now I'm going to make the same tests installing LM 17.3 and let's see what happens.

By the way, I have found Epson has also a "Epson printer utility", you can download in the same place than the drivers. Register your printer in CUPS and then you can see the ink levels, check nozzles and do a head cleaning. :)

Image

Arrababiski
Level 1
Level 1
Posts: 39
Joined: Wed Aug 24, 2016 3:21 pm
Location: España

Re: (SOLVED) Scanner not recognized after upgrading to LM18

Post by Arrababiski » Sun Sep 11, 2016 8:06 am

Test made with Mint 17.3, exactly the same results as in the previous message, so something happens between firewall and kernel 4.4 and it's beyond my knowledge. Any idea is welcome. ;)

User avatar
kyphi
Level 9
Level 9
Posts: 2603
Joined: Sat Jul 09, 2011 1:14 am
Location: The Hunter Valley, Australia

Re: (SOLVED) Scanner not recognized after upgrading to LM18

Post by kyphi » Sun Sep 11, 2016 10:56 pm

Linux Mint 17.3 has Gufw version 14.04.2 LTS whereas Linux Mint 18 has Gufw version 16.04.1.

Considering your thorough process of evaluation, it does look like the kernel version is the culprit and something has gone awry with Netfilter. Have you tried a newer kernel?

LM 17.3 with Gufw switched to ON and no additional rules set - all scanner programs work.
LM 18 with Gufw switched to ON and numerous rules set (none of which work) - no scanner programs work - not even a message.
LM 18 with Gufw switched to OFF - all scanner programs work.

Since I can see no value in setting a firewall between my computer and my scanner, I have left the firewall in LM 18 disabled.
Another point about having the firewall set to ON is that it also interferes with my weather report on the bottom panel.

I do have a firewall switched on in my router because that is the real link to the big bad world. My WLAN connection is purely internal and does not reach far enough to be interfered with and the Epson unit is not powered on until needed.

There are still more updates and fixes expected for LM 18 as well as for Ubuntu 16.04.
Linux Mint 19.2 Cinnamon - 64bit

Arrababiski
Level 1
Level 1
Posts: 39
Joined: Wed Aug 24, 2016 3:21 pm
Location: España

Re: (SOLVED) Scanner not recognized after upgrading to LM18

Post by Arrababiski » Mon Sep 12, 2016 5:26 pm

Hi kyphi!

Yes, I have tested kernel 4.7, and the scanner doesn't work. It seems something involving the firewall has changed since kernel 4.4 but I don't know what is.

I also have a firewall in my router so ufw can be disabled, and I can also live perfectly using kernel 4.2, I don't need kernel 4.4. All these tests are only for knowledge and my curiosity when something should work and does not. Epson Printer Utility also doesn't work at first, but after a couple of tests, allowing incoming traffic from the printer IP started to show ink levels. :)

User avatar
kyphi
Level 9
Level 9
Posts: 2603
Joined: Sat Jul 09, 2011 1:14 am
Location: The Hunter Valley, Australia

Re: (SOLVED) Scanner not recognized after upgrading to LM18

Post by kyphi » Tue Sep 13, 2016 8:02 pm

So, this time the issue really is "SOLVED".

One last thought about the printer utility - my Epson Artisan has a display screen that shows ink levels on command.

Happy scanning, Arrababiski :)
Linux Mint 19.2 Cinnamon - 64bit

chris2370
Level 1
Level 1
Posts: 2
Joined: Wed Jul 26, 2017 10:47 am

Re: (SOLVED) Scanner not recognized after upgrading to LM18

Post by chris2370 » Wed Jul 26, 2017 11:07 am

I know this is probably necrobumping but I have been battling to get my Epson WP-4535 wifi scanner with 18.2 with kernel 4.10.0-27-generic to be recognised with ufw enabled.

As I have a working fix, thought it might help others.

I have a very basic set of ufw rules:
ufw default deny
ufw allow from 192.168.0.0/24

Having googled many solutions, I have a fix that will reliably allow simple scan/iscan to comunicate with the scanner with ufw enabled.

NOTE: these steps assume you can scan with ufw disabled ...

Step 1

sudo nano /etc/default/ufw

FIND:

IPT_MODULES="nf_conntrack_ftp nf_nat_ftp nf_conntrack_netbios_ns"

REPLACE WITH:

IPT_MODULES="nf_conntrack_ftp nf_nat_ftp nf_conntrack_netbios_ns nf_conntrack_sane"

Save file

Step 2

sudo nano /etc/ufw/sysctl.conf

FIND:

net/ipv4/tcp_syncookies=0

REPLACE WITH:

net/ipv4/tcp_syncookies=1

Save file.

Enable ufw and reboot. Yes, you could ufw reload and reload sysctl but a reboot ensures ufw conection table is properly refreshed.

You should now have a working sane network scanner with ufw enabled.

Hope this saves someone the hair loss I got trying to fix this.

Chris

Post Reply

Return to “Printers & Scanners”