Samsung SCX-4200 on Debian
De JacoboTarrioOrg
The Samsung SCX-4200 is an affordable (i.e. cheap) laser multifunction device which is supported under Linux via a proprietary device driver.
Unfortunately, that proprietary device driver causes several problems when it comes to actually using the device. This page discusses what I did to make both printer and scanner work under Debian GNU/Linux in a i386 platform computer.
This piece of advice may be useful for users of other MFP/distribution combinations, such as a SCX-4100 under Fedora or SuSE (SLES or otherwise), so I'm listing these keywords for Google to direct people here.
(Warning: this fix is for old versions of Samsung's driver. I don't have this scanner anymore, so I cannot prepare new fixed versions. See the bottom of this page if you'd like to prepare new versions).
| Índice |
|
|
Problems with the standard installation
- Everything tries to use MFP ports (a device managed by a proprietary kernel module by Samsung), but the module is not distributed by Samsung.
- Sometimes, you cannot scan anything as a normal user (for example, xsane works, but saned does not).
Fix for the MFP port issue
Enter your printer configuration utility and change the SCX-4200 to use the device /dev/usb/lp0
For example, open the Samsung Unified Driver Configurator, select the SCX-4200 and click Properties. Click on /dev/usb/lp0 and click Ok. Then click Exit to quit the Configurator.
The “can't read mfpport.ko” message is annoying but harmless.
Fix for the scanning as normal user issue
You have this problem if you run the command “scanimage -L” as a normal user and something like this happens:
$ scanimage -L insmod: can't read '/lib/modules/2.6.16-1-686/kernel/drivers/mfpportctrl/mfpport.ko': No such file or directory Segmentation fault (core dumped)
However, this happens if you run the command as root:
# scanimage -L insmod: can't read '/lib/modules/2.6.16-1-686/kernel/drivers/mfpportctrl/mfpport.ko': No such file or directory device `smfp:SAMSUNG SCX-4200 Series on USB:0' is a SAMSUNG SCX-4200 Series on USB:0 Flatbed Scanner
The problem is that the driver is trying to access your computer's parallel port to detect any printers there, but as a normal user you cannot do it, so the system stops your program with a Segmentation Fault signal.
I didn't see any way to set the driver up not to access the parallel port, so I modified the binary driver to disable the parallel port detection. This makes the driver not work with parallel port devices anymore, so don't try this if you are using a parallel port device.
WARNING: Following these instructions may make your system unstable. You are given enough data to make an informed decision about the suitability of this file. Jacobo Tarrio is not to be held responsible if anything goes wrong. If something breaks, you get to keep both pieces.
This said...
Download the fix
There are several versions of Samsung's Unified Driver, and every version of the fix is made for only one version of the Unified Driver. You must download the fix for the version of the Unified Driver you use. If you don't know what version you have, try the latest fix; if it does not work, the next one, and so on. If none works, I'm afraid I cannot help you. I don't have this device anymore, so I cannot test the fixes for new versions of this driver. See the bottom of this page.
If you use GnuPG or PGP you can use the .asc file to check that the first file has not been tampered with. My PGP key ID is 0x149cddb2 and has been signed by several well-connected key IDs.
If you use neither, use the md5sum command on the .tar.gz file and compare it to the MD5 sum supplied here. If they match, your file is probably correct.
Driver versions 2.00.95 and 2.00.97
Download these files for the driver versions 2.00.95 and 2.00.97:
- http://jacobo.tarrio.org/files/soft/scx/fix-nopar-scx4200-2.00.95-2007061201.tar.gz
- http://jacobo.tarrio.org/files/soft/scx/fix-nopar-scx4200-2.00.95-2007061201.tar.gz.asc
# md5sum fix-nopar-scx4200-2.00.95-2007061201.tar.gz f0deea1fb758332c0aa01e238857c043 fix-nopar-scx4200-2.00.95-2007061201.tar.gz
Driver version 2.00.92
Download these files for the driver version 2.00.92:
- http://jacobo.tarrio.org/files/soft/scx/fix-nopar-scx4200-2.00.92-2007011301.tar.gz
- http://jacobo.tarrio.org/files/soft/scx/fix-nopar-scx4200-2.00.92-2007011301.tar.gz.asc
# md5sum fix-nopar-scx4200-2.00.92-2007011301.tar.gz 2007072b63c987722dcb8afb580e7521 fix-nopar-scx4200-2.00.92-2007011301.tar.gz
Driver version 2.00.90
Download these files for the driver version 2.00.90:
- http://jacobo.tarrio.org/files/soft/scx/fix-nopar-scx4200-2.00.90-2006121801.tar.gz
- http://jacobo.tarrio.org/files/soft/scx/fix-nopar-scx4200-2.00.90-2006121801.tar.gz.asc
# md5sum fix-nopar-scx4200-2.00.90-2006121801.tar.gz 0b4ad4b2f250600edaebe544f2580b62 fix-nopar-scx4200-2.00.90-2006121801.tar.gz
Test and apply the fix
Then, run this:
# tar xvfz fix-nopar-scx4200-2.00.95-2007061201.tar.gz # cd fix-nopar
There are two versions of the fixed files: the “i386” one is for 32-bit x86 machines; the “x86_64” one is for 64-bit x86 machines. I recommend that you run the “check.sh” script to make sure you know which one you have to install:
# ./check.sh The 32-bit library has been found at /usr/lib You may replace it with the one in the "i386" directory
In this example, the script found the 32-bit version, so you would use the fix in the “i386” directory. You might also have both versions installed at the same time; in that case, you only have to follow the instructions for both versions.
After you enter each directory, you'll find some useful information in the README and differences.txt files. Read them as to be informed about what's going on.
I recommend checking the MD5 sums against those that appear in the README file, and aborting the procedure if they don't match:
# md5sum libmfp.so.1.0.1 090c0bf644399e5b4fef73506c64dd47 libmfp.so.1.0.1 # md5sum /usr/lib/libmfp.so.1.0.1 501cee139bc4b3b097f2d9789959abf6 /usr/lib/libmfp.so.1.0.1
They match, so now you can make a backup of the original, unmodified file, and copy the fixed file over it:
# cp /usr/lib/libmfp.so.1.0.1 /usr/lib/oldlibmfp.so.1.0.1 # cp libmfp.so.1.0.1 /usr/lib
Now check that you can run “scanimage -L” as a normal user:
$ scanimage -L insmod: can't read '/lib/modules/2.6.16-1-686/kernel/drivers/mfpportctrl/mfpport.ko': No such file or directory device `smfp:SAMSUNG SCX-4200 Series on USB:0' is a SAMSUNG SCX-4200 Series on USB:0 Flatbed Scanner
If it doesn't work yet, try this:
# adduser YOUR_USER_NAME lp
Substitute your user name for YOUR_USER_NAME. And then, as a normal user:
$ newgrp lp $ scanimage -L insmod: can't read '/lib/modules/2.6.16-1-686/kernel/drivers/mfpportctrl/mfpport.ko': No such file or directory device `smfp:SAMSUNG SCX-4200 Series on USB:0' is a SAMSUNG SCX-4200 Series on USB:0 Flatbed Scanner
Now try xsane. If it complains for being ran as root, just reinstall it. It should work.
If the fix doesn't work, you can undo it with:
# mv /usr/lib/oldlibmfp.so.1.0.1 /usr/lib/libmfp.so.1.0.1
Contact information and thanks
If you have any comments or questions, send them to jacobo (a) tarrio dot org. I'd also like to hear from you if this helped you or if it didn't. However, if you need a version for a newer version of this driver, I'm afraid I cannot help you. I don't use this device anymore, so I cannot test this fix in newer versions of this driver. Sorry.
However, if you know enough about x86 machine language to be able to replicate (or even improve) this fix for newer versions of this driver using the information I give in the README files, please do prepare newer versions and make them available in your page. I'll link to it from here. I assure you that many users have found this driver useful, so your effort won't have been wasted :)
Thanks go to Albert Zeyer for the 64-bit fix, and to Andre Lesnik and Juan Jesús García de Soria Lucena for nudging me to do the fix for 2.00.95.
