SULDR Forums Supported Printers Printing Questions Scanning Questions General Questions Samsung Installer

Modern CUPS can cause printer to power-reset without printing

Started by iam_TJ, April 27, 2023, 02:51:12

Previous topic - Next topic


This is a warning of a serious issue and a solution I've discovered through many hours digging into the problem. The summary is that CUPS PDF filter drivers use recent versions of the PDF standard (in this case V1.4) but the printer doesn't and therefore certain PDF operation codes can cause the printing to fail - in this case by causing a complete power reset!

I've been using the suld drivers with a Samsung CLX6220FX colour laser multi-function printer since around 2012. Bought originally for infrequent high-quality printing and rarely used over the last three years and sometimes effectively out of service (unconnected) for 12 months or more!.

It used to be operated over the Ethernet network but due to the printer not supporting IPP over IPv6 and my network being IPv6-only I connected it via USB directly to my workstation (although the printer DOES do IPv6 and its administration interface is reachable over it the IPP service isn't bound to the IPv6 port).

This week I had need to print a formal letter. So, using Debian 11 Bullseye LibreOffice Writer I created a two page document and attempted to print it. The document arrives in the printer, the LCD display shows the processing moving progress bar, then at the point the printer starts to warm up its physical components the printer does a power-reset - LCD goes blank, all noise ceases, then there's a relay-click and it powers up, initialises, and returns to normal.

At first I suspected it was caused by my using a specific font, but then after trying with several others, found the same problem. Then I tried printing individual pages, both with and without "images and graphical objects" (turns out out-of-line text frames for addressee, date, etc., are treated (by Writer) as graphical objects). On one occasion when printing single pages from the document in case the entire thing was too complex I was able to get page 1 (of 2!) to print but never able to repeat that success.

I began to think the file being created by CUPS and sent to /var/spool/cups/ might be corrupt so I inspected some using Okular. They appeared correct, so then I opened them in a text editor (vim) and found that they are almost entirely composed of Filter/FlateDecode compressed sections. I put together a small Python program that deflates those sections and confirmed that the resulting PDF instructions looked sane - there was nothing obviously wrong.

I did note that the CUPS document header shows PDF-1.4 as the version. Later, whilst looking for a "debug/error" log in the printer menus (there isn't one) I had it print out its configuration and noticed that it shows it has PDF v1.00.82 support (from 2009).

I deduce that something in the PDF v1.4 output that doesn't exist in PDF v1.0 is causing this power-reset.

Anyhow, to the solution. That configuration report also shows the printer supports:
PCL5E Version PCL5Ce 5.96 11-25-2009
PCLXL Version PCL6 6.49 11-25-2009
PS Version 11-27-2009
PDF Version PDF V1.00.00.82 08-19-2009
and as I'd also used the printer's report menu to print lists of both the PCL (Printer Command Language) and PS (Postscript) fonts it has internally, I wondered if I could edit the printer's PPD (Postscript Printer Description) file to use the internal fonts - this was when I suspected the computer's font was being sent to the printer and causing the issue.

The listing of PCL5/PCLXL had me investigating how to use it instead of the default CUPS PDF output.

There is a package of drivers and printer descriptions by the Open Printing group/community that is called foomatic and includes support for PCLXL colour printing using Generic PCL 6/PCL XL Printer and the recommended driver is pxlcolor.

So I installed these packages with:
sudo apt install --install-suggests foomatic-db
I then used the web-based local host CUPS Administrator user interface to create a copy of the existing Printer.

To do that I first started to Modify the existing printer entry only to get to the Connection URI and copy it. In my case that is Current Connection: usb://samsung/CLX-6220%20Series?serial=Z32BB1CZ200553M&interface=1. Armed with this information I then cancelled the Modify operation and started creating a new printer.

I gave the connection URI and then when asked for the printer manufacturer instead of selecting Samsung selected "Generic" and for the Model selected "Generic PCL 6/PCL XL Printer Foomatic/pxlcolor (recommended)".

I tested initially with the standard CUPS test page and it looks identical to the earlier test page so the graphics, colour, and text output was identical.

Then the big test - send the original document with the preferred font... and it works!

Now I've got this far, and seen the printers internal fonts list, I have set myself a challenge to figure out how to make use of the internal printer fonts. I know in theory it is possible via Font declarations in the PPD but have to figure out how those can be mapped to the computer's fonts so for example, when an application says "use font FancyFont" the printer uses its internal "Candid" .


Thanks for sharing.  I have added a link on the main pages to this post as an alternative driver option.

Repository Information Legal Contact Alternative Drivers