HP PhotoSmart C5200 crashes when getting bitmap with wrong dimensions

Bug #917148 reported by Till Kamppeter
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned
ghostscript (Ubuntu)
Fix Released
Critical
Unassigned
hplip (Ubuntu)
New
Medium
Unassigned

Bug Description

From Oneiric on the default filter for turning PDF into the CUPS Raster format (which is needed by HPLIP's hpcups driver) is not the Poppler-based pdftoraster any more but the Ghostscript-based gstoraster.

The problems occur independently of the CUPS backend (component of CUPS to communicate with printer hardware) used: The original "usb" backend of CUPS (/usr/lib/cups/backend/usb, CUPS package in Oneiric and Oneiric SRUs issued so far, based on deprecated, unmaintained libusb 0.1.x), a port of the "usb" CUPS backend to libusb 1.0.x (also /usr/lib/cups/backend/usb, but of current Precise CUPS package, version 1.5.0-14, or my PPA, https://launchpad.net/~till-kamppeter/+archive/ppa, version 1.5.0-8ubuntu7~ppa2), HPLIP's "hp" backend (only HP printers, /usr/lib/cups/backend/hp, part of hplip-cups package), and also printing into a file (run "cupsctl FileDevice=yes" then change device URI of print queue to "file:/tmp/printout"), then loading usblp ("sudo modprobe usblp"), and sending the file directly to the printer through usblp ("sudo -s", "cat /tmp/printout > /dev/usb/lp0").

For me the data transfer of print jobs simply stops at a certain point, and always at the same point. It happens on the HP PhotoSmart C5280. According to the error_log of CUPS the filters and the driver do their jobs correctly, they do not show errors or crashes. The backend seems to freeze. The job does not complete according to the error_log, the backend process keeps running and the printer tells on its display that it is printing the job. Only after several minutes the display of the printer tells "Job canceled", probably due to a printer-internal timeout on not getting data any more. The CUPS backend keeps running infinitely then and the CUPS job does not terminate. This occurs the same way with all mentioned backends.

There are also other printers where the problem does not occur with all three backends: HP Color LaserJet CM3530, HP LaserJet 1020, HP LaserJet 3390, HP PhotoSmart C8180.

The problem occurs on both Oneiric and Precise. The systems are both up-to-date. Especially all SRUs for CUPS and the kernel are installed, so it is not bug 872711 (or this bug did not get completely fixed).

---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: till 2754 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfc020000 irq 47'
   Mixer name : 'Conexant CX20561 (Hermosa)'
   Components : 'HDA:14f15051,17aa211c,00100000'
   Controls : 17
   Simple ctrls : 9
Card29.Amixer.info:
 Card hw:29 'ThinkPadEC'/'ThinkPad Console Audio Control at EC reg 0x30, fw 7VHT12WW-1.01'
   Mixer name : 'ThinkPad EC 7VHT12WW-1.01'
   Components : ''
   Controls : 1
   Simple ctrls : 1
Card29.Amixer.values:
 Simple mixer control 'Console',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
DistroRelease: Ubuntu 11.10
EcryptfsInUse: Yes
HibernationDevice: RESUME=UUID=9185f036-2e72-40e6-bf31-d9a8926a7883
MachineType: LENOVO 7417CTO
Package: linux (not installed)
PccardctlIdent:
 Socket 0:
   product info: "MoGo Mouse BT", " ", "", ""
PccardctlStatus:
 Socket 0:
   5.0V 16-bit PC Card
   Subdevice 0 (function 0) [unbound]
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.0.0-15-generic root=/dev/mapper/hostname-root ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.0.0-15.25-generic 3.0.13
RelatedPackageVersions:
 linux-restricted-modules-3.0.0-15-generic N/A
 linux-backports-modules-3.0.0-15-generic N/A
 linux-firmware 1.60
StagingDrivers: mei
Tags: oneiric running-unity staging
Uname: Linux 3.0.0-15-generic x86_64
UpgradeStatus: Upgraded to oneiric on 2011-09-30 (107 days ago)
UserGroups: adm admin cdrom dialout libvirtd lpadmin plugdev sambashare
dmi.bios.date: 10/13/2009
dmi.bios.vendor: LENOVO
dmi.bios.version: 7UET79WW (3.09 )
dmi.board.name: 7417CTO
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:bvr7UET79WW(3.09):bd10/13/2009:svnLENOVO:pn7417CTO:pvrThinkPadT400:rvnLENOVO:rn7417CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 7417CTO
dmi.product.version: ThinkPad T400
dmi.sys.vendor: LENOVO

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 917148

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Till Kamppeter (till-kamppeter) wrote : AcpiTables.txt

apport information

tags: added: apport-collected oneiric running-unity staging
description: updated
Revision history for this message
Till Kamppeter (till-kamppeter) wrote : AlsaDevices.txt

apport information

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

apport information

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

apport information

Revision history for this message
Till Kamppeter (till-kamppeter) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
Till Kamppeter (till-kamppeter) wrote : Card0.Codecs.codec.0.txt

apport information

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

apport information

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

apport information

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

apport information

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

apport information

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

apport information

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

apport information

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

apport information

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

apport information

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

apport information

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

apport information

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

apport information

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

apport information

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

apport information

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

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote : Re: Kernel problems when accessing USB printers

Bug 898385 is perhaps the same problem.

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

USB printing is an essential feature of a PC operating system, so we cannot release without this working, especially not an LTS.

Changed in linux (Ubuntu):
importance: Undecided → High
importance: High → Critical
summary: - Kernel problems when accessing USB printers
+ HP PhotoSmart C5200 crashes when getting bitmap with wrong dimensions
affects: linux (Ubuntu) → ghostscript (Ubuntu)
Changed in ghostscript (Ubuntu):
status: Confirmed → Triaged
Changed in hplip (Ubuntu):
importance: Undecided → Medium
description: updated
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I investigated the problem more and found its cause. On the transition from Natty to Oneiric Ghostscript got used instead of Poppler to convert PDF to CUPS Raster. Poppler did everything right and rotated the landscape-oriented pages by 90 degrees so that they fit into the A4 paper which the printer can only use in portrait orientation. Due to some incorrectly defined paper dimensions in the input PDF file and/or the PPD file Ghostscript failed to rotate the pages and so they got printed in the wrong orientation, cut off at the right. In addition, the bitmap not fitting into the printer's dimensions made the printer crash after some time, not accepting more data any more, blocking the completion of the job.

Probably this is a bug in the printer's firmware as all other HP printers keep printing with the "too much" on the right being cut off.

I have fixed Ghostscript's failure to rotate the pages when using the hpcups driver in Ghostscript upstream. This fix will appear in the next Ghostscript package on Ubuntu.

To the HPLIP developer's at HP, can you do something with hpcups so that printers do not crash any more if the CUPS Raster bitmap input is of wrong dimensions?

To reproduce: Print the attached file via the command line ("lpr -P <printer> launch_leaflet.pdf") to an HP inkjet. On most printer models the job will finished but with the page content not correctly rotated. Some printers will crash (no accepting data any more, need to get power-cycled).

The Ghostscript fix should avoid for most cases that unsuitably dimensioned bitmaps get sent to HP inkjets.

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

This bug was fixed in the package ghostscript - 9.05~dfsg~20120202-0ubuntu1

---------------
ghostscript (9.05~dfsg~20120202-0ubuntu1) precise; urgency=low

  * New upstream release
     - GIT snapshot from February, 2 2012.
     - Ghostscript 9.05rc1 + fix of paper size matching in CUPS Raster
       output device (LP: #917148).
 -- Till Kamppeter <email address hidden> Thu, 02 Feb 2012 22:16:15 +0100

Changed in ghostscript (Ubuntu):
status: In Progress → 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.