LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-29-2016, 07:36 AM   #1
Triple_S
LQ Newbie
 
Registered: May 2016
Posts: 9

Rep: Reputation: Disabled
Problems getting my Samsung SCX-4100 to run as a scanner


Hello,

first of all, this is my first post on this forum, so I'm not 100% sure whether this is the right subforum if not, please move my thread.

I'm using a Scientific Linux 7.2 64-bit distribution, which is based on RedHat Enterprise Linux, so everything that works for RedHat should work out for me too.

Basicly I want to get my Samsung SCX-4100 printer and scanner to work. The printing function works perfectly fine, but I have trouble getting the scanning functions to work. I figured out that I'm gonna need SANE and CUPS packages to use the printer as a scanner. To make sure that I have all required packages, I used:
Code:
sudo yum install *sane*
to install sane and I also used:
Code:
sudo yum update
to make sure everything is up to date.

I also checked that the Samsung SCX-4100 is supported by the current version of SANE.

Following some guides from the internet, I learned that I'd need an official Samsung driver too, to get the printer to work properly, so I installed the "Samsung Unified Linux driver" from the official Samsung website.

Up to this point everything worked out perfectly, but now the problems begin to start. First of all the scanner is being detected properly by scanimage:
Code:
scanimage -L
gives me:
Quote:
device `smfp:usb;04e8;3413;8J21BAKY926596L ' is a Samsung Samsung SCX-4100 Series on USB Scanner
But it is not being detected by sane-find-scanner:
Code:
sudo sane-find-scanner
gives me:
Quote:
found USB scanner (vendor=0x138a, product=0x0011) at libusb:001:003
which has a different vendor and product id than the Samsung SCX-4100, so I guess it's something else.

Furthermore I'm not able to scan anything:
Code:
scanimage
always gives me:
Quote:
scanimage: open of device smfp:usb;04e8;3413;8J21BAKY926596L failed: Device busy
I get the same error when I use xsane insead of scanimage and simple-scan wont work eigther.
First I thought it was a problem with my rights, so I checked:
Code:
ls -l /dev/usb/lp0
which gives me:
Quote:
crw-rw----. 1 root lp 180, 0 29. Mai 14:03 /dev/usb/lp0
so I added myself to the lp-group to get rw access, but that didnt fix anything. After that I tried to scan with full root-access, but even that resulted in the device busy error.

My question is whether any of you know similar errors and their fixes or have basicly any idea of whats going wrong here. I know the printer is pretty old, but I read that many guys on the internet already got the scanner to work, and I thing it should be possible cause according to http://www.sane-project.org/sane-mfgs.html#Z-SAMSUNG the Samsung SCX-4100 is still supported.

Thanks for your help.
 
Old 05-29-2016, 09:00 AM   #2
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,972
Blog Entries: 32

Rep: Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465
Triple_S,

Welcome to LQ.

I am not a yum/rpm user, so you will need to translate these instructions from Ubuntu for use in Scientific Linux:

http://askubuntu.com/questions/55468...msung-scx-4100
 
Old 05-29-2016, 09:26 AM   #3
Triple_S
LQ Newbie
 
Registered: May 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by beachboy2 View Post
Triple_S,

Welcome to LQ.

I am not a yum/rpm user, so you will need to translate these instructions from Ubuntu for use in Scientific Linux:

http://askubuntu.com/questions/55468...msung-scx-4100
Thanks for your answer.

I've already seen this instruction before, but I was not able to follow it, because the entry "usb 0x04e8 0x3413" already existed in my "/etc/sane.d/xerox_mfp.conf". Furthermoe the file "/lib/udev/rules.d/40-libsane.rules" doesnt exist. I checked the /lib64 folder too and it doesnt exist there eigther. The only file I found in the rules.d directory, that has something to do with SANE is "/lib/udev/rules.d/65-sane-backends.rules", but I doubt thats the same file. Last point is that the service saned doesnt exist on my system.
Code:
sudo service saned restart
always gives me:
Quote:
Failed to restart saned.service: Unit saned.service failed to load: No such file or directory.
And it doesnt work with start instead of restart eigther. I guess the ubuntu instructions use a different SANE package than me.

Last edited by Triple_S; 05-29-2016 at 09:31 AM.
 
Old 05-29-2016, 09:47 AM   #4
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Linux Mint 21 MATE, EndeavourOS, antiX, MX Linux
Posts: 3,972
Blog Entries: 32

Rep: Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465Reputation: 1465
Triple_S,

Dedoimedo gives widely differing conclusions on his reviews of the two RH-based OSs, but then again you may have solid reasons for using SL.

CentOS 7:
http://www.dedoimedo.com/computers/c...t-desktop.html

SL 7.1:
http://www.dedoimedo.com/computers/s...linux-7-1.html

You could try using CentOS 7 which is also based on RH.

However since it is based on RH, I suspect that the end result will be the same, a Samsung SCX-4100 whose scanner does not work.

Basically, as I see it, you have 2 choices:

1. Cheaper……..Change distro to Ubuntu/Mint/Debian or whatever

or

2. More expensive…….Buy a scanner such as the Canon CanoScan LiDE 220 Compact Scanner:

https://www.amazon.co.uk/Canon-CanoS...dp_ob_title_ce

Again, this works fine with Ubuntu/Mint/Debian but perhaps not in SL/CentOS?

EDIT There is also Fedora 23:

http://www.dedoimedo.com/computers/l...50-fedora.html

Last edited by beachboy2; 05-29-2016 at 09:53 AM.
 
Old 05-29-2016, 09:59 AM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
According to this it works in Linux. http://www.sane-project.org/lists/sa...html#Z-SAMSUNG

It really is irrelevant what distro is used. Make sure the correct driver is installed - that would be sane-xerox_mfp.
 
Old 05-29-2016, 10:11 AM   #6
Triple_S
LQ Newbie
 
Registered: May 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thanks for your answers.
Actually I'd like to stay with SL, cause its the distribution I use at university too. When I saw that SCX-4100 is included in xerox_mfp package, I thought it would be easy to get it working, but despite the driver package being installed, it just wont work. Without having the Samsung Unified Linux driver package installed, the scanner isnt even recognized, so there seems to be something wrong with my SANE. I really hope someone had the same problem before or has a brilliant idea how to get it working.
 
Old 05-29-2016, 10:24 AM   #7
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Your scanner has to show up in lsusb properly, if it does not then it cannot be found and made to work. I personally use ethernet connected printers/scanners only. Can yours be connected over ethernet?
 
Old 05-29-2016, 10:30 AM   #8
Triple_S
LQ Newbie
 
Registered: May 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
Your scanner has to show up in lsusb properly, if it does not then it cannot be found and made to work. I personally use ethernet connected printers/scanners only. Can yours be connected over ethernet?
Sadly the printer has no ethernet connection. But I guess it's showing up properly in lsusb, cause it gives me:
Quote:
Bus 001 Device 008: ID 04e8:3413 Samsung Electronics Co., Ltd SCX-4100 Scanner
which is the same vendor and product id as in sane-xerox_mfp.conf
 
Old 05-29-2016, 10:41 AM   #9
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
https://wiki.archlinux.org/index.php...roubleshooting

Are you using a USB3 port to connect your scanner?
 
Old 05-29-2016, 11:12 AM   #10
Triple_S
LQ Newbie
 
Registered: May 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thanks for the tipp, actually it was connected with a USB 3.0 port, but changing to an USB 2.0 port didnt fix the device being displayed as busy.
 
Old 05-29-2016, 11:20 AM   #11
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
It may be something else is claiming it, I'd unplug the scanner, run tail -f /var/log/messages and plug it back in ...
 
Old 05-29-2016, 11:32 AM   #12
Triple_S
LQ Newbie
 
Registered: May 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
It may be something else is claiming it, I'd unplug the scanner, run tail -f /var/log/messages and plug it back in ...
Thanks for the advice. I did plug it back in and got:
Quote:
May 29 18:28:00 localhost kernel: usb 1-2: new full-speed USB device number 17 using xhci_hcd
May 29 18:28:00 localhost kernel: usb 1-2: New USB device found, idVendor=04e8, idProduct=3413
May 29 18:28:00 localhost kernel: usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May 29 18:28:00 localhost kernel: usb 1-2: Product: Samsung SCX-4100 Series
May 29 18:28:00 localhost kernel: usb 1-2: Manufacturer: Samsung
May 29 18:28:00 localhost kernel: usb 1-2: SerialNumber: 8J21BAKY926596L
May 29 18:28:00 localhost kernel: usblp 1-2:1.0: usblp0: USB Bidirectional printer dev 17 if 0 alt 0 proto 2 vid 0x04E8 pid 0x3413
May 29 18:28:00 localhost systemd: Reached target Printer.
May 29 18:28:00 localhost systemd: Starting Printer.
May 29 18:28:00 localhost systemd: Started Configure Plugged-In Printer.
May 29 18:28:00 localhost systemd: Starting Configure Plugged-In Printer...
May 29 18:28:01 localhost kernel: usblp0: removed
May 29 18:28:01 localhost kernel: usblp 1-2:1.0: usblp0: USB Bidirectional printer dev 17 if 0 alt 0 proto 2 vid 0x04E8 pid 0x3413
May 29 18:28:02 localhost udev-configure-printer: Re-enabled printer ipp://localhost:631/printers/SCX-4100
After some time it gave me:

Quote:
May 29 18:28:33 localhost dbus-daemon: dbus[871]: [system] Activating service name='org.fedoraproject.Setroubleshootd' (using servicehelper)
May 29 18:28:33 localhost dbus[871]: [system] Activating service name='org.fedoraproject.Setroubleshootd' (using servicehelper)
May 29 18:28:34 localhost dbus[871]: [system] Successfully activated service 'org.fedoraproject.Setroubleshootd'
May 29 18:28:34 localhost dbus-daemon: dbus[871]: [system] Successfully activated service 'org.fedoraproject.Setroubleshootd'
May 29 18:28:34 localhost dbus-daemon: 'list' object has no attribute 'split'
May 29 18:28:34 localhost setroubleshoot: Plugin Exception restorecon_source
May 29 18:28:34 localhost setroubleshoot: SELinux is preventing /usr/sbin/cupsd from write access on the file printers.conf.O. For complete SELinux messages. run sealert -l ac547b3a-0ed3-4c09-943c-d11fce0a9e41
May 29 18:28:34 localhost python: SELinux is preventing /usr/sbin/cupsd from write access on the file printers.conf.O.#012#012***** Plugin catchall (100. confidence) suggests **************************#012#012If you believe that cupsd should be allowed write access on the printers.conf.O file by default.#012Then you should report this as a bug.#012You can generate a local policy module to allow this access.#012Do#012allow this access for now by executing:#012# grep cupsd /var/log/audit/audit.log | audit2allow -M mypol#012# semodule -i mypol.pp#012
Actually I got to admit that I have no idea what this is telling me. Maybe you could translate it for me. I suspect that it has something to do with the fact that the printer is a printer and scanner in one device and by deafualt it's loaded as a printer and trying to scan anything isnt able to switch it to the scan mode. I dont know if that makes any sense.
 
Old 05-29-2016, 11:40 AM   #13
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
TBH SELinux is terra incognita for me. I know there can be some conflicts between USB drivers and CUPS, but this is something I never experienced myself, thus I have no details on this. Nor have I experience with CUPS locking up a multifunction device and denying access to SANE. You could shut down CUPS as troubleshooting measure and see if you get access to the scanner.
 
Old 05-29-2016, 12:24 PM   #14
Triple_S
LQ Newbie
 
Registered: May 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
Even with cups deactivated (sudo service cups stop) scanimage issues "Device busy". Somehow cups is restarting itself. Because it starts running without using sudo service cups start. I really dont get, cause I really dont know which application could be blocking the scanner.
 
Old 05-29-2016, 12:34 PM   #15
Triple_S
LQ Newbie
 
Registered: May 2016
Posts: 9

Original Poster
Rep: Reputation: Disabled
I just had another idea that might help someone who's experienced to find the error.
Running
Code:
SANE_DEBUG_DLL=255 scanimage
gives me quite a lot debug messages:
Quote:
[sanei_debug] Setting debug level of dll to 255.
[dll] sane_init: SANE dll backend version 1.0.13 from sane-backends 1.0.24
[dll] sane_init/read_dlld: attempting to open directory `./dll.d'
[dll] sane_init/read_dlld: using config directory `./dll.d'
[dll] sane_init/read_dlld: considering ./dll.d/hpaio
[dll] sane_init/read_config: reading dll.d/hpaio
[dll] add_backend: adding backend `hpaio'
[dll] sane_init/read_dlld: done.
[dll] sane_init/read_config: reading dll.conf
[dll] add_backend: adding backend `smfp'
[dll] sane_get_devices
[dll] load: searching backend `smfp' in `/usr/lib64/sane'
[dll] load: trying to load `/usr/lib64/sane/libsane-smfp.so.1'
[dll] load: dlopen()ing `/usr/lib64/sane/libsane-smfp.so.1'
[dll] init: initializing backend `smfp'
[dll] init: backend `smfp' is version 1.0.1
[dll] load: searching backend `hpaio' in `/usr/lib64/sane'
[dll] load: trying to load `/usr/lib64/sane/libsane-hpaio.so.1'
[dll] load: dlopen()ing `/usr/lib64/sane/libsane-hpaio.so.1'
[dll] init: initializing backend `hpaio'
[dll] init: backend `hpaio' is version 1.0.0
[dll] sane_get_devices: found 1 devices
[dll] sane_open: trying to open `smfp:usb;04e8;3413;8J21BAKY926596L '
scanimage: open of device smfp:usb;04e8;3413;8J21BAKY926596L failed: Device busy
[dll] sane_exit: exiting
[dll] sane_exit: calling backend `smfp's exit function
[dll] sane_exit: calling backend `hpaio's exit function
[dll] sane_exit: finished
Maybe they can help finding out whats wrong.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Samsung SCX-5635FN mfp (the scanner) thaiiceland LinuxQuestions.org Member Success Stories 0 06-29-2013 06:53 PM
Driver for samsung scx-4100 for suse dakimaki SUSE / openSUSE 2 01-25-2011 09:37 AM
[SOLVED] Samsung scx 4x16f carlitoco Slackware 1 10-30-2010 12:03 AM
Samsung SCX-4521F xbaez Linux - Hardware 2 01-29-2008 08:51 AM
Samsung SCX-4016 Failed port linderox Linux - Hardware 1 05-21-2007 12:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration