Kyocera FS-1300DN cannot print with gs backend

Bug #1025061 reported by Felix Möller
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GS-GPL
Fix Released
Medium
ghostscript (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

This is a follow up for bug #980616.

To create the performance data I checked the printer with gs and pdftops backend and had to find out, that the gs backend does not print the attached file of bug #980616 at all.

Instead the printer produces a page with the following content:
ERROR:
undefined
OFFENDING COMMAND:
m
STACK:
--nostringval--
179

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: cups 1.5.3-0ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-27.43-generic 3.2.21
Uname: Linux 3.2.0-27-generic x86_64
ApportVersion: 2.0.1-0ubuntu11
Architecture: amd64
Date: Mon Jul 16 00:12:33 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120331)
Lpstat:
 device for Canon-MP280-series: usb://Canon/MP280%20series?serial=71DACC&interface=1
 device for Kyocera_FS-1350DN: socket://192.168.178.3
MachineType: LENOVO 6474A46
Papersize: a4
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
PpdFiles:
 Canon-MP280-series: Canon PIXMA MP280 - CUPS+Gutenprint v5.2.8-pre1
 Kyocera_FS-1350DN: Kyocera FS-1350DN (KPDL)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-27-generic root=UUID=b32d85c9-d1fb-49ca-8c94-c64d321221b3 ro quiet splash vt.handoff=7
SourcePackage: cups
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/19/2010
dmi.bios.vendor: LENOVO
dmi.bios.version: 7UET86WW (3.16 )
dmi.board.name: 6474A46
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr7UET86WW(3.16):bd04/19/2010:svnLENOVO:pn6474A46:pvrThinkPadT400:rvnLENOVO:rn6474A46:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 6474A46
dmi.product.version: ThinkPad T400
dmi.sys.vendor: LENOVO

Revision history for this message
Felix Möller (felix-derklecks) wrote :
Revision history for this message
Felix Möller (felix-derklecks) wrote :

The attached file is gatherd according to the instructions at https://wiki.ubuntu.com/DebuggingPrintingProblems#Capturing_print_job_data

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Felix, thanks. Seems that there is an incompatibility between Ghostscript and your Kyocera printer. I am CCing Ghostscript developer Chris Liddell as he could perhaps help finding a workaround.

Changed in ghostscript (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Chris, can you help here? It is again a compatibility issue between Ghostscript's PostScript and a PostScript printer.

Revision history for this message
cliddell (cjl) wrote :

I can't find a gs command line anywhere in the logs. Could someone post the command line cups gives to GS these days? Perhaps that could be added to the cups logging? Also any PS that gets prepended.....

Revision history for this message
cliddell (cjl) wrote :

Oh, it looks like this is one of the printers we opted to disable page "stream" compression, but IIRC, Till, you put in user controls to allow disabling of font compression - that might be a good place to start.....

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

cliddell, for the command line and workaround code insertion see bug 977912, comment #15.

Revision history for this message
cliddell (cjl) wrote :

I'll need the Postscript that gets sent to the printer, too.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Felix, can you run the following commands:

cupsctl FileDevice=yes
lpadmin -p test -E -v file:/tmp/printout -P /etc/cups/ppd/Kyocera_FS-1350DN.ppd
lpr -P test printout.pdf

printout.pdf is the file which you have attached to comment #2.

Please attach the resulting /tmp/printout to this bug report.

cliddell, this /tmp/printout file will contain exactly the PostScript which has gone to the printer.

Changed in ghostscript (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Felix Möller (felix-derklecks) wrote :

Here is the postscript file generated by Till's commands.

Changed in ghostscript (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
cliddell (cjl) wrote :

Felix,

that's the poppler emitted PS (which is useful, I would probably have asked for it down the line anyway), but I really need the PS generated by Ghostscript, if you could.... thanks.

Revision history for this message
Felix Möller (felix-derklecks) wrote :

This is the postscript document after executing
lpadmin -p test -o pdftops-renderer-default=gs
on my virtual printer.

Revision history for this message
cliddell (cjl) wrote :

Felix,

First of all, (and I may have told you this before, but I would like it recorded in this, and all relevant bugs): this is *not* a bug with the Ghostscript Postscript output. The GS Postscript is valid - we spent a lot of time confirming that when these bugs started to come to light. The fault is with the printer, and the problem really should be reported to Kyocera. Even if they can't fix it in printers "in the field" they should be able to debug the problem "directly" on the printer, rather than the kind of arm's length "reverse engineering" we'll have to undertake.

If we're going to track down the problem it will probably involve many interations of me "instrumenting" the Postscript file, you running the revised PS, and telling me the result.

However, based on past experience, tells me to look at compression filters first, and the only one left in there was LZW. So, as a first punt, can you try:
http://www.ghostscript.com/~chrisl/nolzw.ps

IMPORTANT: it must be send directly to the printer (not opened in evince or other viewer, and printed from there - that would lose all my changes!). So you need to use:

lpr -P <printer name> -oraw nolzw.ps

There is also a method using netcat but I cannot remember the details......

If you can try that, and let us know the result.

Thanks,

Chris

Revision history for this message
Felix Möller (felix-derklecks) wrote :

I cannot print your file at all.

Executing
fm@thinkpad:~$ lpr -P Kyocera_FS-1350DN -oraw nolzw.ps

I get a printout with the following:
%!PS-Adobe-3.0
                             %%BoundingBox: 0 0 595 841
                                                                                   %%Creator : GPL Ghostscript GIT PRERELEA

Revision history for this message
cliddell (cjl) wrote :

Darn it! Sorry, I forgot I needed to add the device specific stuff to the file.

http://www.ghostscript.com/~chrisl/nolzw2.ps

Should be more what we want.... apologies again.

Chris

Revision history for this message
Felix Möller (felix-derklecks) wrote :

My printout contains
ERROR:
undefined
OFFENDING COMMAND:
m
STACK:
--nostringval--
181
now.

It seems the number on the stack has changed ...

Revision history for this message
cliddell (cjl) wrote :

Okay, so it is not a problem with the LZW filter. That still leaves another (non-compressing) filter that could be at fault, but I'll try to narrow things down a bit before we get to that. On that basis, I'll work on modifying the version with the compression, since it's a lot smaller (obviously!).

http://www.ghostscript.com/~chrisl/printout-002.ps

Please use the same method to send that to the printer.

All I have done in this one is add a blank first page. The reason for this is to narrow down whether the error is happening during the "prolog" of the file, or during the actual marking operations.

Revision history for this message
cliddell (cjl) wrote :

Felix,

by the way, if there is a more convenient way of communicating for you than using launchpad (e-mail or IRC or something) then let me know. I can summarise progress on the problem here as required.

Chris

Revision history for this message
Felix Möller (felix-derklecks) wrote :

I will leave now, but otherwise IRC might offer faster turnaround...

My printer just created _both_ pages with the following content:
ERROR:
undefined
OFFENDING COMMAND:
m
STACK:
--nostringval--
181

When I come back home tonight I can print another ps ...

Revision history for this message
cliddell (cjl) wrote :

Hmm, I did *not* expect that :-(

If you can try this one:
http://www.ghostscript.com/~chrisl/printout-003.ps

In this one I have removed all the ps2write "marking content", and replaced it with just a blank page.

If IRC would be easier, I'm on #ghostscript on freenode most days (I'm on UK time) - my nick is "chrisl".

Revision history for this message
Felix Möller (felix-derklecks) wrote :

This is a bit better I guess.

It creates a blank page first and on the second I have:
ERROR:
undefined
OFFENDING COMMAND:
m
STACK:
--nostringval--
179

Revision history for this message
cliddell (cjl) wrote :

<sigh> Again, I really didn't expect that :-(

http://www.ghostscript.com/~chrisl/printout-004.ps

That one should (on a fully functional printer) produce no output at all - not even a blank page.

Revision history for this message
cliddell (cjl) wrote :

Felix joined us on #ghostscript and with his help, I narrowed the problem down to the fonts in the file.

The way ps2write currently works is that it writes a pfb (binary encoded Type 1 Postscript font) and ASCII85 encodes it so the binary data doesn't trip up the communications channels.

The Kyocera printer here seems unable to cope with the pfb font data, it seems to require it in pfa (ASCII encoded Type 1 Postscript font).

We'll investigate solutions, and report back.

Revision history for this message
cliddell (cjl) wrote :

For tracking the Ghostscript end of this, see:

http://bugs.ghostscript.com/show_bug.cgi?id=693197

Changed in ghostscript (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 9.05~dfsg-6ubuntu4

---------------
ghostscript (9.05~dfsg-6ubuntu4) quantal; urgency=low

  * debian/patches/020120720-01dc18e-ps2write-use-pfa-fonts.patch:
    Embed fonts as PFA and not ASCII85-encoded PFB in the PostScript
    output, some PostScript printers (Kyocera) cannot cope with the
    latter (LP: #1025061).
 -- Till Kamppeter <email address hidden> Sat, 21 Jul 2012 10:58:13 +0200

Changed in ghostscript (Ubuntu):
status: Triaged → Fix Released
Changed in gs-gpl:
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.