I’ve been using Samsung ML-2160 printer on Gentoo Linux for some time without problems but then I connected it to a box running Arch Linux and I some problems came up. It was printing almost completely black pages (with a few narrow white strips).
I installed samsung-unified-driver-printer from AUR first and thought the problem is in the packaging but the same problem appeared when installed unsing official install script.
From the CUPS error log it was clear that rastertospl crashes and despite the crash, CUPS sends the rastertospl output to the printer.
These errors are logged before the crash:
– double free or corruption (!prev)
– corrupted double-linked list
– free(): invalid next size (fast)
A stack trace points to the gnutls/libasm1 and the bug appears to occur at the end of the program execution when the program tries to do a cleanup. I suspect that a memory bug ocurrs sooner in the execution, also damaging some of the internal gnutls structures.
These error messages are all glibc memory operation checks which can be disabled by MALLOC_CHECK_=0 env variable but disabling them doesn’t help in any way – CUPS apparently sends the filter output to the printer despite filter being abort()’d by this check.
A crash happened for me only when “Edge Control=On” AND “Toner Save=Off”. When I turned the Edge control “Off”, I could enable/disable the toner save and it wouldn’t crash anymore. BTW “edge control” probably doesn’t refer to the page edges; it probably controls how edges of black elements (characters) are rendered and there appears to be a minimal difference so keeping it Off is not a big deal.
So if your Samsung is printing black pages on GNU/Linux, try disabling “Edge Control” and send complains to Samsung about their buggy rastertospl.
During my thoubleshooting, I found out that rastertospl is able to output more debugging messages. It didn’t help to solve this problem but in case anyone is interested, to enable verbose log, create a file “/tmp/rastertospl.lcf” with content LOG_LEVEL=9 and the next time the rastertospl is executed, it will output a more verbose log into “/tmp/rastertospl.log”.