You are not logged in.

#1 2013-04-13 19:55:18

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

[SOLVED] Samsung SCX4500W MFP can't get scanner to work

I have a multifunction printer - Samsung SCX4500W - the printer works. This device is listed as a supported scanner at http://www.sane-project.org/man/sane-xerox_mfp.5.html

The scanner fails to work, but is detected both as root and as user using the command:

sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.
  # Also you need support for SCSI Generic (sg) in your operating system.
  # If using Linux, try "modprobe sg".

found USB scanner (vendor=0x04e8 [Samsung Electronics Co., Ltd.], product=0x342b [SCX-4500W Series]) at libusb:003:007
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

  # You may want to run this program as root to find all devices. Once you
  # found the scanner devices, be sure to adjust access permissions as
  # necessary.

But then the following fails:

scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

The GIMP won't see the scanner, and when I checked the log files I see lines such as:

Apr 13 20:36:03 localhost kernel: [161439.431624] usb 3-4: usbfs: interface 1 claimed by usblp while 'scanimage' sets config #1

The device is listed in the file /etc/sane.d/xerox_mfp.conf

# Samsung SCX-4500W
usb 0x04e8 0x342b

The command lsusb shows these values are correct:

Bus 003 Device 007: ID 04e8:342b Samsung Electronics Co., Ltd

Unplugging the printer and replugging I get in the logs:

Apr 13 21:07:16 localhost kernel: [163309.338353] usb 3-4: new high-speed USB device number 8 using xhci_hcd
Apr 13 21:07:16 localhost kernel: [163309.352713] usb 3-4: ep 0x3 - rounding interval to 8 microframes, ep desc says 10 microframes
Apr 13 21:07:16 localhost kernel: [163309.352721] usb 3-4: ep 0x84 - rounding interval to 8 microframes, ep desc says 10 microframes
Apr 13 21:07:16 localhost kernel: [163309.352727] usb 3-4: ep 0x1 - rounding interval to 8 microframes, ep desc says 10 microframes
Apr 13 21:07:16 localhost kernel: [163309.352732] usb 3-4: ep 0x82 - rounding interval to 8 microframes, ep desc says 10 microframes
Apr 13 21:07:16 localhost kernel: [163309.353000] usb 3-4: ep 0x1 - rounding interval to 8 microframes, ep desc says 10 microframes
Apr 13 21:07:16 localhost kernel: [163309.353007] usb 3-4: ep 0x82 - rounding interval to 8 microframes, ep desc says 10 microframes
Apr 13 21:07:16 localhost kernel: [163309.353458] usblp 3-4:1.1: usblp0: USB Bidirectional printer dev 8 if 1 alt 0 proto 2 vid 0x04E8 pid 0x342B
Apr 13 21:07:16 localhost colord: Device added: sysfs-Samsung_Electronics_Co.__Ltd.-SCX-4500W_Series
Apr 13 21:07:16 localhost systemd[1]: Starting Printer.
Apr 13 21:07:16 localhost systemd[1]: Reached target Printer.
Apr 13 21:07:16 localhost systemd[1]: Starting Configure Plugged-In Printer...
Apr 13 21:07:16 localhost systemd[1]: Started Configure Plugged-In Printer.
Apr 13 21:07:16 localhost systemd[1]: configure-printer@usb-003-008.service: main process exited, code=exited, status=1/FAILURE
Apr 13 21:07:16 localhost systemd[1]: Unit configure-printer@usb-003-008.service entered failed state

Is this a possible problem with colord? 

Interestingly after restarting the colord daemon via systemctl, and replugging the device the first time I try scanimage -L it works but then fails!

[mike@home1 ~]$ scanimage -L
device `xerox_mfp:libusb:003:008' is a Samsung Samsung SCX-4500W Series multi-function peripheral
[mike@home1 ~]$ scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).

This (non arch) bug report does seem related - https://alioth.debian.org/tracker/index … tid=410366

Can anyone suggest a way forward to get the scanner operational?

Thanks in advance

Adding more info on 6th May 2013

I ran some tests which make me completely confused. I unplugged the multifunction printer and plugged it into a laptop running arch - the scanner worked perfectly without any problems at all. Plugging the machine back into the computer which failed to get the scanner working still failed.  Unplugging again and plugging it into a different laptop and it worked perfectly as a scanner again!

So it seems that the failure to get the scanner working is specific to the hardware on my main desktop machine but I have no idea how to progress in getting some diagnostics to find where the problem lies.
I have checked everything I know but clearly there is either a hardware specific issue, or one or other of the configuration files is not right.

I do have lines like the following in the system log files:
May  6 16:43:47 localhost kernel: [ 8061.137284] usb 1-4: usbfs: interface 1 claimed by usblp while 'scanimage' sets config #1

and if I try to start saned then lines such as this appear:
May  6 16:43:52 localhost systemd[1]: Started Scanner Service.
May  6 16:43:52 localhost kernel: [ 8066.281676] usb 1-4: usbfs: interface 1 claimed by usblp while 'saned' sets config #1

I have also seen similar lines in posts from people having problems with scanners with suse and ubuntu when googling. However I don't know if this points to where a problem may lie?

Can anyone point me to how to get some diagnostic that would be useful to find where the problem is? Is there an strace I can get which might be useful?

Thanks

Last edited by mcloaked (2014-03-21 09:37:18)


Mike C

Offline

#2 2013-05-06 18:48:19

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

Re: [SOLVED] Samsung SCX4500W MFP can't get scanner to work

Can anyone point me to a link outlining a set of steps on getting some diagnostics for this issue?  I have done extensive googling and failed to find links that are useful.

Thanks


Mike C

Offline

#3 2013-05-06 21:19:52

ubunchu
Member
Registered: 2012-05-01
Posts: 181

Re: [SOLVED] Samsung SCX4500W MFP can't get scanner to work

I have very few experience with printers, only tried mine (epson) and an HP.
Hints:
-are you (your user) in the lp and scanner group?
-is the printer in the lp or the scanner group?

#lsusb
Bus 001 Device 003: ID 0505:0505 Whatever
#ls -al /dev/bus/usb/001/003 (these numbers are from the previous info, 001, and 003)
crw-rw-rw-+ 1 root scanner 189, 4 Oct 10 14:40 /dev/bus/usb/001/003 ( "scanner" this means, the device is only accessible as a scanner, a new rule has to be created with udev)

My problem with Epson, solved: https://bbs.archlinux.org/viewtopic.php?id=149883
Printing: https://wiki.archlinux.org/index.php/CUPS
Udev: https://wiki.archlinux.org/index.php/udev

Good luck.


Don't forget to mark as [SOLVED].

Offline

#4 2013-05-06 21:26:50

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

Re: [SOLVED] Samsung SCX4500W MFP can't get scanner to work

ubunchu wrote:

I have very few experience with printers, only tried mine (epson) and an HP.
Hints:
-are you (your user) in the lp and scanner group?
-is the printer in the lp or the scanner group?

Good luck.

Yes the user is in both lp and scanner groups (though I also tried with the user not in the scanner group and it made no difference)

The printer is in the lp group.

I have read the links you sent but I think that as far as I know the udev rule is correct - at least it is the same in the machines that work as well as the one that does not!

The printer works fine and it is the scanner function that doesn't work - so I am still stumped!


Mike C

Offline

#5 2013-05-06 22:12:54

ubunchu
Member
Registered: 2012-05-01
Posts: 181

Re: [SOLVED] Samsung SCX4500W MFP can't get scanner to work

Well if printing works, but scanning not; shift permissions. Deny printing, allow somehow scanning, see if that works at least.
Also try with simple-scan, to see if the program can detect your device or not.


Don't forget to mark as [SOLVED].

Offline

#6 2013-05-07 08:59:53

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

Re: [SOLVED] Samsung SCX4500W MFP can't get scanner to work

ubunchu wrote:

Well if printing works, but scanning not; shift permissions. Deny printing, allow somehow scanning, see if that works at least.
Also try with simple-scan, to see if the program can detect your device or not.

Can you say which permissions to shift?  I am not sure what you mean by deny printing?  Also I don't know how to "allow somehow scanning"?  I need something more explicit in terms of steps I can execute in order to test those things?

Thanks


Mike C

Offline

#7 2013-05-09 16:47:19

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

Re: [SOLVED] Samsung SCX4500W MFP can't get scanner to work

I am now wondering whether on the machine which cannot get the scanner working that there is a conflict between the printer and scanner detection. That machine is the only machine where I have set up the printer function by adding a line to the file /etc/udev/rules.d/70-printers.rules:

# Low-level USB device add trigger
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", TAG+="systemd", ENV{SYSTEMD_WANTS}="configure-printer@usb-$env{BUSNUM}-$env{DEVNUM}.service"
# Low-level USB device remove trigger
ACTION=="remove", SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:0701*:*", RUN+="udev-configure-printer remove %p"
ATTR{idVendor}=="04e8", ATTR{idProduct}=="342b", MODE:="0664", GROUP:="lp", ENV{libsane_matched}="yes"

Without the last line the printer does not work - with it the printer got automatically detected as soon as I plugged it in. On the laptops where the same device plugged in works fine as a scanner I did not test the printer functions.

I did try removing the usblp kernel module and replugging the device but that made no difference.

I don't know enough about udev/systemd concerning printer/scanner operation for a multifunction device to know if there is some udev setting that is making this break?

Any help would be very much appreciated.

Thanks


Mike C

Offline

#8 2013-05-12 08:19:36

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

Re: [SOLVED] Samsung SCX4500W MFP can't get scanner to work

I spent quite a lot of time looking into anyway way to work around the udev conflict between the printer and scanner rules.  It seems that because there is a rule for the scanner in /usr/lib/udev/rules.d/53-sane.rules containing

# Samsung SCX-4500W
ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="342b", MODE="0664", GROUP="scanner", ENV{libsane_matched}="yes"

and also I made a new rule for the printer (otherwise that would not work) in /etc/udev/rules.d/71-scx4500w.rules

# Samsung SCX-4500W printer MFP
ATTR{idVendor}=="04e8", ATTR{idProduct}=="342b", MODE:="0664", GROUP:="lp", ENV{libsane_matched}:="yes"

and also when there were updates the lines I added in /etc/udev/rules.d/70-printers.rules got removed with a new default file, so I needed the additional file.

However it seems that the sane rules get processed first by udev, and the rule is overridden by the printer rule for the same Vendor and Product id. I tried to look for additional parameters that I could use to separate the print and scan functions for udev by checking the output of commands such as

udevadm info -a -p  $(udevadm info -q path -n /dev/bus/usb/001/015)

but I could not find any differences that would allow me to have two independent rules for the print and scan functions. So I can have this device working as a printer, or as a scanner but not both. Yet this mfp printer was working for both print and scan functions without adjustment when it was previously connected to a Fedora 16 system which also used udev - however since that time the udev/systemd packages have been updated a number of times and I can no longer get this device to function normally. Hence my conclusion is that there is a flaw in udev that prevents this device from being used for both printer and scanner functions on the same machine.  I believe that there is a similar problem for multifunction cameras which also need more than one udev rule and with the current version of udev also no longer function as before.

However I have reached the point where I can't see any solution despite extensive research into udev rules, so I have ordered a separate stand-alone flatbed scanner so that I don't have the rigmarole of having to unplug the device from the server, and plug it into a laptop in order to switch between printing and scanning. This is a great shame, and seems to be a sad failure for linux in being unable to support this multifunction printer, despite the fact that previously it was working perfectly for me in an earlier incarnation of linux!

If anyone does know if there is a way to overcome the limitations I would still be happy to hear about it. However I have asked on the sane-devel list and there has not been a forthcoming solution either. I also sent a direct email to the author of udev and have not had the courtesy of any reply after several days so presumably the udev author does not know how to work around this either!


Mike C

Offline

#9 2014-03-21 09:36:56

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

Re: [SOLVED] Samsung SCX4500W MFP can't get scanner to work

Ever since I began the search for a solution to this issue I have not been able to solve it for connection to the usb3 port on the computer, and indeed in recent months there have continued to be issues with the scanner function because it is designed to work via usb2 but is connected to a usb3 port (the machine only has usb3 ports), and there are known problems with xhci drivers in the kernel for usb3 even with the current kernel (3.13.6-1-ARCH).

However last night I finally found a workaround that has allowed this scanner to work with xsane, but via the network interface on the printer instead of the usb interface.  The solution to getting this to work is remarkably simple.

No adjustments were made to the main sane config files, but one active line was added to the file /etc/sane.d/xerox_mfp.conf

#Samsung scx4500w wireless ip network address
tcp xx.xx.xx.xx

where xx.xx.xx.xx is the static ip address of the printer that is set up using the SyncThru management interface.

Indeed this solution is explicitely stated in the sane web page at http://www.sane-project.org/man/sane-xerox_mfp.5.html but I did not spot that at all until last night!

Now starting xsane shows a choice of two scanner devices, and selecting the option with the tcp address defined above allows xsane to access the scanner via the network instead of via usb. This may be slower than usb but it does work. Also scanimage -L shows both the network and the usb scanner interfaces on the scx4500w.

Although I have still been unable to get the scanner working via the usb port I will close this thread since this workaround using the network interface does allow the scanner to work on this device. The added advantage is that the scanner part can now also be accessed from other machines on the same LAN, although for practical reasons must be in the same room to allow papers to be placed on the scanner platter.  If anyone knows of a method to allow scanning via the usb3 port on a computer where the printer is connected I would still like to see a solution.

Last edited by mcloaked (2014-03-21 09:40:25)


Mike C

Offline

Board footer

Powered by FluxBB