The Fugue Counterpoint by Hans Fugal

20Oct/071

Gutsy breaks Samsung’s Unified Driver

I have a Samsung SCX-4100 monochrome laser printer and scanner. I am quite happy with it as a printer, but it occasionally gives me heartburn because of the driver situation. Samsung has put together a binary driver, and not an especially bad one at that. It has a nice installer, and for the most part it Just Works™ and works well. But if you're a sysadmin or FSF (free software freak), it will get on your nerves. It futzes about with cups and sane, though it hasn't broken either in a long time. It has a history of changing apps like xsane, OpenOffice, etc. to setuid, though it no longer does this either. The biggest problem is that just about every other time you update Ubuntu it stops working.

This time, there's one and possibly two problems. The first and primary problem is that /usr/lib/cups/backend/mfp segfaults. I don't know why, but my best guess is version incompatibilties (maybe cups version or system libraries). The second problem, which I came across while googling around, may be that there's going to be a problem with AppArmor. If you get past the segfault, you might try disabling AppArmor for cups. I don't know much about AppArmor, but it looks like this is the mantra: sudo aa-complain cups. Or, turn it off entirely with /etc/init.d/apparmor stop. Neither of these fixed things, but the logs did change so it might be a needed step.

In the meantime I'm hooking the printer up to my Debian server, and thanks to cups things will be completely transparent. Until I want to scan something, of course, but I can probably use NX in a pinch if it still doesn't work in Ubuntu by then.

27Jul/062

SCX-4100 on Dapper

It seems I was a little premature with my last post. It does work just as I
said on Debian, but the scanner wouldn't work on Dapper.

First, the problem in detail. There's actually a couple problems. The first is
that the sane backend Samsung provides apparently has a bug that prevents it
from working remotely. That is, I can't scan on gwythaint (my Dapper box) when
the scanner is attached to falcon (my Debian box). Yes, sane can do this. The
client crashes with a complaint about memory allocation. This is why I decided
to move the printer over to the Dapper box. This problem can only be fixed by
Samsung, and hopefully they will do so but I'm looking for a now solution.

On Dapper, the scanner was not found at all, but the printer worked fine. A
little detective work revealed that Samsung's sane backend is looking for
/dev/usb/lp0, which does not exist. You need to symlink /dev/usblp0 to it,
which you can do with this entry in /etc/udev/rules.d/10-local.rules (create
it if necessary):

BUS=="usb", KERNEL=="lp[0-9]*", SYMLINK+="usb/%k"

That didn't do the whole trick, though. The version of libusb on Dapper looks
in /proc/bus/usb which is not mounted by default on Dapper. (At least, it's
not mounted on my Dapper which is running a vanilla 2.6.17 kernel) It seems the
latest and greatest way to mess up udev/usb (I swear they sit up late at night
thinking of how to mess this up) is to move /proc/bus/usb to /dev/bus/usb.
The fix is easy. Add this line to /etc/fstab:

none            /proc/bus/usb   usbfs        defaults        0       0

Then mount /proc/bus/usb as root.

I still haven't figured out why, but no matter the permissions on any of the
above, any libsane-using program will segfault if it is not setuid root (or run
as root). If anyone can figure that one out I'd love to hear it, but I probably
won't fuss with it much more myself. See the output of strace scanimage
-L
when not root.

27Jul/060

Samsung Printer

My old Deskjet 712C bit the dust (it's probably still fixable to some degree if
you're interested), and my wife has never been pleased with the
partially-working scanner we got from who-knows-where, so we broke down and got
a Samsung
SCX-4100

monochrome laser printer+scanner/copier.

We didn't just pick this out of the blue of course, I did some research on what
would be a good but affordable printer for linux. First stop,
linuxprinting.org's suggested printers
page
. This printer wasn't mentioned
by name, but they did recommend Samsung laser printers as a possibility. This
printer was available and the price was right on NewEgg, so I googled a bit and
found Shane's post and the many
helpful comments. What a small world. The comments got more and more
encouraging as the page (and time) wore on, and I concluded that it would be a
good printer for linux.

It arrived maybe half an hour or an hour ago, and it's already working
perfectly as a printer, scanner, and copier. Anyone who's fussed with printing
in UNIX before will confirm that this is very good indeed. I ran Samsung's
latest drivers for linux installer (dated 2006-07-19) and it installed without
a hitch. I then replaced the /usr/bin/lpr symlink back to the original
non-GUI version. That's it. No Qt problems, no messing with kernel modules (I'm
using USB, parallel may be a different story).

I'm running Debian testing (etch) and a vanilla 2.6.14 kernel.

Kudos to Samsung for recognizing and supporting linux, and for providing good
drivers (after some growing pains), and kudos to Samsung for making a
multifunction laser that's affordable.