You are not logged in.

#1 2013-08-02 22:01:04

Lowra
Member
Registered: 2009-09-21
Posts: 192

[SOLVED] Printer not detected by CUPS (detected as scanner only)

Hello,

I have set up my Epson SX415 multifunction printer with CUPS and it was working flawlessly until I installed sane to use the scanner part.
lsusb

Bus 001 Device 004: ID 04b8:0851 Seiko Epson Corp. Stylus SX410
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. LAN9500 Ethernet 10/100 Adapter / SMSC9512/9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

When only cups was installed: ls -l /dev/bus/usb/001/004

crw-rw-r-- 1 root lp 189, 3 Jan  1  1970 /dev/bus/usb/001/004


Now after installing sane and rebooting: ls -l /dev/bus/usb/001/004

crw-rw-r-- 1 root scanner 189, 3 Jan  1  1970 /dev/bus/usb/001/004

Now my printer isn't working anymore, CUPS keeps saying "Waiting for printer to become available" and I'm confident it is because of the issue mentioned above.

Do any of you have a clue about how to properly fix this ?

Thanks a lot,

Last edited by Lowra (2013-08-04 11:12:47)

Offline

#2 2013-08-03 05:41:15

bazmonkey
Member
Registered: 2010-11-03
Posts: 21

Re: [SOLVED] Printer not detected by CUPS (detected as scanner only)

I don't have a direct clue, no.

But if I were you, the first thing I'd try is removing sane and get printing working again.  Then I would tackle getting it to scan.

Did you do any particular configuration before this happened, or was it literally 'pacman -S sane' and boom?

Offline

#3 2013-08-03 18:03:07

Lowra
Member
Registered: 2009-09-21
Posts: 192

Re: [SOLVED] Printer not detected by CUPS (detected as scanner only)

I am running Arch on a server-oriented desktop (meaning no Desktop Environment, the only thing goal of the server so far is CUPS and SANE server).
I already targeted the problem. I installed the printer and got it to work without difficulty, I then installed the scanner part (sane & xinetd), that's when the printer stopped working. I then noticed the change when I executed the ls command: it displayed "root scanner" instead of "root lp".
I then did another fresh install of Arch, with just the printer, and got it to work again, but as soon as I want to set up the scanner, the same problem occurs.

Offline

#4 2013-08-03 20:37:00

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] Printer not detected by CUPS (detected as scanner only)

Look at the udev rule installed by sane:

install -D -m0644 tools/udev/libsane.rules \
  "${pkgdir}/usr/lib/udev/rules.d/53-sane.rules"

Maybe that 53 should be changed to be less than whatever udev rule sets your "lp" group.

Offline

#5 2013-08-04 11:08:40

Lowra
Member
Registered: 2009-09-21
Posts: 192

Re: [SOLVED] Printer not detected by CUPS (detected as scanner only)

SOLVED:
After trying the "Printer is not recognized by CUPS" fix documented in the ArchWiki without sucess, I came across this post which solved my problem.

I had to create this file (you must adapt its content depending on your printer): /etc/udev/rules.d/10-cups-usb.rules

# Epson Stylus NX410 Series | Epson Stylus SX410 Series | Epson Stylus TX410 Series
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0851", MODE="0664", GROUP:="lp", ENV{libsane_matched}="yes"

Reloaded udev rules:

udevadm control --reload-rules

Unplugged your printer, plugged it back, and it worked:
lsusb:

Bus 001 Device 004: ID 04b8:0851 Seiko Epson Corp. Stylus SX410
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. LAN9500 Ethernet 10/100 Adapter / SMSC9512/9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

ls -l /dev/bus/usb/001/004

crw-rw-r-- 1 root [b]lp[/b] 189, 3 Jan  1  1970 /dev/bus/usb/001/004

However, after doing this, my scanner stopped working. In order to make both the printer and scanner to work simultaneously I had to edit /etc/xinetd.d/sane:

			service sane-port
			{
			   port        = 6566
			   socket_type = stream
			   wait        = no
			   user        = nobody
			   group       = scanner
			   server      = /usr/bin/saned
			   disable     = no
			}

The line "group       = scanner" had to be changed to "group       = lp".

After rebooting, both the printer and the scanner were working smile

Last edited by Lowra (2013-08-04 11:11:54)

Offline

#6 2013-08-04 12:39:28

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] Printer not detected by CUPS (detected as scanner only)

Yes, but if you took my advice, you shouldn't need your override rule in /etc/udev/rules.d/10-cups-usb.rules wink

Offline

#7 2013-08-04 13:25:37

Lowra
Member
Registered: 2009-09-21
Posts: 192

Re: [SOLVED] Printer not detected by CUPS (detected as scanner only)

I solved my problem through the fix I explained here before reading your answer, I would however like your way better if it is cleaner, but I am not sure I am following.

ls /usr/lib/udev/rules.d

10-dm.rules                       69-cd-sensors.rules
11-dm-lvm.rules                   69-dm-lvm-metad.rules
13-dm-disk.rules                  70-infrared.rules
40-gphoto.rules                   70-power-switch.rules
42-usb-hid-pm.rules               70-uaccess.rules
50-firmware.rules                 71-seat.rules
50-udev-default.rules             73-seat-late.rules
53-sane.rules                     75-net-description.rules
60-cdrom_id.rules                 75-probe_mtd.rules
60-persistent-alsa.rules          75-tty-description.rules
60-persistent-input.rules         78-sound-card.rules
60-persistent-serial.rules        80-drivers.rules
60-persistent-storage-tape.rules  80-net-name-slot.rules
60-persistent-storage.rules       95-cd-devices.rules
60-persistent-v4l.rules           95-dm-notify.rules
61-accelerometer.rules            95-keyboard-force-release.rules
63-md-raid-arrays.rules           95-keymap.rules
64-btrfs.rules                    95-udev-late.rules
64-md-raid-assembly.rules         99-systemd.rules

Do you see something wrong with this ouput ? Thanks for you help smile

Offline

#8 2013-08-05 02:16:15

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] Printer not detected by CUPS (detected as scanner only)

50-udev-default.rules sets the "lp" group.

sane's PKGBUILD contains:

  install -D -m0644 tools/udev/libsane.rules \
    "${pkgdir}/usr/lib/udev/rules.d/53-sane.rules"

That 53 should be changed to be less than 50, so that "lp" takes priority over "scanner" - it is the more important property of a multi-function device wink

I suggest you file an Arch bug, referencing this thread. I won't - I don't use Arch.

Offline

#9 2013-08-15 17:04:02

Lowra
Member
Registered: 2009-09-21
Posts: 192

Re: [SOLVED] Printer not detected by CUPS (detected as scanner only)

@brebs: I applied your instructions, and it worked perfectly, many thanks !

Bug report filed, hoping I was clear enough for the skilled users to fix this issue smile

Offline

#10 2013-09-06 15:44:42

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,240

Re: [SOLVED] Printer not detected by CUPS (detected as scanner only)

Lowra wrote:

@brebs: I applied your instructions, and it worked perfectly, many thanks !

Bug report filed, hoping I was clear enough for the skilled users to fix this issue smile

Do you mean that what you did was to rename the file 53-sane.rules to make it 49-sane.rules for example?  Was that all that is needed?


Mike C

Offline

Board footer

Powered by FluxBB