[upstream] Cannot print double-sided on HP Officejet

Bug #376193 reported by Evan Huus
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
HPLIP
Confirmed
Undecided
Unassigned
OpenOffice
Invalid
Undecided
Unassigned
hplip (Ubuntu)
Incomplete
High
Till Kamppeter

Bug Description

Binary package hint: hplip

Up-to-date jaunty. HP Officejet 7410 on network. The first page prints, and then an error message pops up. I followed the instructions and attached a debug log which may be useful.

Printing one-sided works fine.

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

Can you attach the file which you tried to print and tell what application you have used. Tell also which settings you used for printing.

Changed in hplip (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Evan Huus (eapache) wrote :

I created the attached ODT file in OpenOffice 3.0.1 which ships with Jaunty.

Paper Size: Letter
Orientation: Portrait
Duplex: Long Edge (Standard)
Paper Tray: Printer default
Printout Mode: Draft Grayscale

Do you need anything else?

Revision history for this message
Evan Huus (eapache) wrote :

I'm on 64-bit if that makes a difference.

affects: hplip (Ubuntu) → openoffice.org (Ubuntu)
Changed in openoffice.org (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have captured the PostScript which OpenOffice.org sends to CUPS by disabling my print queue (printer with HPIJS driver), sending the job from OOo (with Duplex set to "Long Edge" in the printing dialog) and then copying the /var/spool/cups/d* file. After that I have re-enabled the queue so that I could capture the error_log of the filtering process.

Neither the PostScript file nor the IPP attributes (line "... [Job <number>] argv[5]="...") sent with the job contain the information that I have set the duplex option.

The arguments sent are the following:

D [30/May/2009:02:17:16 +0200] [Job 1707] argv[5]="document-name=2wgZXI PrintoutMode=Draft PageSize=Letter InputSlot=Default job-uuid=urn:uuid:09757477-add1-34b6-66f2-80031c279057"

The PostScript file is attached.

This means that OOo has a bug, not including the Duplex setting in the print job. OOo should add "Duples=DuplexNoTumble" to the arguments.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :
Revision history for this message
Removed by request (removed908762) wrote :

This happens with any kind of document, simple text and PDFs included.
I don'think it's an Open Office bug, but something deeper in postscript output

Chris Cheney (ccheney)
summary: - Cannot print double-sided on HP Officejet
+ [upstream] Cannot print double-sided on HP Officejet
Revision history for this message
Konstantin Thierbach (konstantin-phil) wrote :

This bug affects me too, since I updated to:
libpoppler-glib4 (0.10.5-1ubuntu2.1)
libcups2 (1.3.9-17ubuntu3.2)
and depending packages.

Yesterday I was able to print double-sided with my generic postcript printer...

Revision history for this message
Evan Huus (eapache) wrote :

Konstantin, those packages don't seem to be available on my system. Are you using a PPA or Karmic?

Revision history for this message
Konstantin Thierbach (konstantin-phil) wrote :

No, neither nor. But I am using jaunty-proposed and jaunty-backports mabybe this is causing
the problem.

Revision history for this message
Evan Huus (eapache) wrote :

Given that those aren't upstream version changes, they're likely coming from proposed. I'll give it a week and see if they show up in main.

Revision history for this message
Chris Cheney (ccheney) wrote :

zilvia,

What program were you using to print the other files that didn't duplex correctly?

Revision history for this message
Removed by request (removed908762) wrote : Re: [Bug 376193] Re: [upstream] Cannot print double-sided on HP Officejet

22/06/2009 alle 16.48 +0000, Chris Cheney:
> What program were you using to print the other files that didn't duplex
> correctly?

I tried:

evince
open office writer
gedit
firefox

none of these worked
zilvia

Revision history for this message
Chris Cheney (ccheney) wrote :

zilvia,

Thanks

Reassigning to cups.

Changed in openoffice:
status: New → Invalid
affects: openoffice.org (Ubuntu) → cups (Ubuntu)
Changed in cups (Ubuntu):
assignee: nobody → Till Kamppeter (till-kamppeter)
importance: Medium → High
status: Triaged → New
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

This is neither a problem of CUPS nor of OpenOffice.org. If you have another printer, the job will most probably print without problems. The problem is that the printer driver executable, hpijs crashes.

One can test it easily without CUPS, Foomatic, and OpenOffice.org. One simply runs the Ghostscript command line as logged in the error_log manually, using an arbitrary PDF file with more than one page:

gs -dFirstPage=1 -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -sDeviceManufacturer="HEWLETT-PACKARD" -sDeviceModel="deskjet 5600" -dDuplex=true -dTumble=false -r300 -sIjsParams=Quality:Quality=4,Quality:ColorMode=0,Quality:MediaType=0,Quality:PenSet=2,Quality:SpeedMech=1,PS:MediaPosition=7 -dIjsUseOutputFD -sOutputFile=- 3-pages-test.pdf > test.prn

After some error messages a Segmentation Fault is reported. /var/log/syslog contains:

Jun 22 21:37:02 till-laptop hpijs[29685]: prnt/hpijs/hpijs.cpp 381: unable to set key=Quality:SpeedMech, value=1
Jun 22 21:37:03 till-laptop last message repeated 16 times
Jun 22 21:37:03 till-laptop kernel: [625096.106277] hpijs[29685]: segfault at 18 ip 00007f7fc4a7ed88 sp 00007fff62356c40 error 4 in libc-2.9.so[7f7fc4a05000+168000]

Once it seems that hpijs gets supplied a parameter which is not available, at least for the currently selected printer. Second, hpijs (not Ghostscript) crashes with a segmentation fault.

The segmentation fault is perhaps a consequence of the wrong parameter, but in such a case hpijs should exit with a decent error message. For example it could be made to exit at the first "unable to set key=Quality:SpeedMech, value=1".

So this is an upstream bug of HPLIP.

eapache, can you remove your print queue and create it again to see whether this makes the problem go away?

eapache, can you try a live CD of Karmic to see whether the bug disappears there?

affects: cups (Ubuntu) → hplip (Ubuntu)
Changed in hplip (Ubuntu):
status: New → Incomplete
Changed in hplip:
status: New → Confirmed
Revision history for this message
Evan Huus (eapache) wrote :

Removing and re-adding the print queue did not fix the problem. I found the following line in /var/log/messages after printing failed:

Jun 23 22:18:24 evan-ubuntu kernel: [ 3933.312709] hpijs[7384]: segfault at 0 ip 00007f4f0359f11b sp 00007fff0d83fda8 error 6 in libc-2.9.so[7f4f0351b000+168000]

I have discovered that printing double-sided works fine with printing quality set to Normal. It is only when set to Draft Grayscale that hpijs segfaults on my system.

I would like to note, although I doubt this makes a difference, that I am not running the default kernel. I am running the kernel patched for https://bugs.launchpad.net/ubuntu/+source/linux/+bug/368809

I will test other quality settings (Normal Grayscale etc.) as well as the Karmic version when I get the chance.

Revision history for this message
Evan Huus (eapache) wrote :

On Jaunty, the driver only crashes when using the combination of a draft mode (either "Draft" or "Draft Grayscale") and double-sided printing.

On Karmic, despite the fact that the setup now asks me if I have duplex installed, I cannot print double-sided at all. Long-edge and Short-edge are no longer options for the "Duplex" setting. I can choose only "Off" or "<ignore>". Printing otherwise seems to work fine. I have tried removing and readding the print queue to no avail. Should this be split into a separate bug?

Revision history for this message
Bruce Arnold (barnold) wrote :

I get the same problem with a Photosmart D7160 HP printer set for Draft and DoubleSided. Normal quality and Doublesided is OK.
Ubuntu 9.04 with all updates. 32 bit.
Printing anything stalls the printer after it finishes side one. Finally, after 5 minutes, the printer cancels the job.
Tested with Firefox.

Bruce

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

Bruce, your problem is bug 406074.

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

Bruce, sorry, I was not right. You are on Jaunty and therefore still with hpijs and not with the new hpcups driver of Karmic.

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

eapache, have you really set the "Duplex installed" option in system-config-printer?

You can also set it in the right tab of the Properties window of the OpenOffice.org printing dialog and after that the duplex settings appear in the option on the left tab.

Revision history for this message
Evan Huus (eapache) wrote :

I have done a little more digging, and these are the results I have found:

- firefox allows me to choose between long-edge, short-edge, and none
- openoffice allows me to choose between none and whatever is set as default in System->Admin->Printing, but not the third option.
- gedit and evince do not allow me to choose double-sided printing

I have confirmed that "Duplex installed" is true in all cases.

This bug, at least, is fixed though: printing draft and double-sided in open-office worked fine in Karmic, as long as double-sided is set default so that it gives you the option.

Revision history for this message
Jag Dragon (jagdragon-deactivatedaccount) wrote :

I can replicate this: I cannot print in both draft and duplex mode at the same time, my printer prints most (95%) of the first page, then terminates the job. Printing duplex with Normal mode (not draft) works.

I tested this with a 3-page Gedit document.
I am using Ubuntu 9.04, 32 bit, all updates (as of 03/08/2009)
I have an HP Photosmart C8180, and I am connecting to it purely across the network (it is not piggybacked onto another computer).

I found this line by using `grep segfault < /var/log/messages`:
Aug 3 20:04:37 elite kernel: [ 269.771636] hpijs[3923]: segfault at 0 ip b7ab6896 sp bfb7b208 error 6 in libc-2.9.so[b7a3d000+15c000]

Revision history for this message
Andrew Walbran (qwandor) wrote :
Download full text (5.0 KiB)

I have observed the same problem on an up-to-date Jaunty machine: printing normal onesided, normal duplex or draft one-sided works fine, but the combination of draft grayscale and duplex consistently crashes. The relevant part of /var/log/cups/error_log is:

D [08/Aug/2009:20:28:09 +1200] PID 7033 (/usr/lib/cups/filter/pstopdf) exited with no errors.
D [08/Aug/2009:20:28:09 +1200] [Job 60] Filetype: PDF
D [08/Aug/2009:20:28:09 +1200] [Job 60] Storing temporary files in /var/spool/cups/tmp
D [08/Aug/2009:20:28:09 +1200] PID 7034 (/usr/lib/cups/filter/pdftopdf) exited with no errors.
D [08/Aug/2009:20:28:09 +1200] [Job 60] File contains 4 pages
D [08/Aug/2009:20:28:09 +1200] [Job 60] Starting renderer with command: gs -dFirstPage=1 -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -sDeviceManufacturer="HEWLETT-PACKARD" -sDeviceModel="deskjet 5600" -dDuplex=true -dTumble=false -r300 -sIjsParams=Quality:Quality=4,Quality:ColorMode=0,Quality:MediaType=0,Quality:PenSet=2,Quality:SpeedMech=1,PS:MediaPosition=7 -dIjsUseOutputFD -sOutputFile=- /var/spool/cups/tmp/foomatic-8htL5x
D [08/Aug/2009:20:28:09 +1200] [Job 60] Starting process "kid3" (generation 1)
D [08/Aug/2009:20:28:09 +1200] [Job 60] Starting process "kid4" (generation 2)
D [08/Aug/2009:20:28:09 +1200] [Job 60] Starting process "renderer" (generation 2)
D [08/Aug/2009:20:28:09 +1200] [Job 60] JCL: 12345X@PJL
D [08/Aug/2009:20:28:09 +1200] [Job 60] <job data>
D [08/Aug/2009:20:28:09 +1200] [Job 60]
I [08/Aug/2009:20:28:10 +1200] Saving subscriptions.conf...
D [08/Aug/2009:20:28:10 +1200] cupsdAcceptClient: 21 from localhost (Domain)
D [08/Aug/2009:20:28:10 +1200] cupsdReadClient: 21 POST / HTTP/1.1
D [08/Aug/2009:20:28:10 +1200] cupsdAuthorize: No authentication data provided.
D [08/Aug/2009:20:28:10 +1200] Get-Notifications /
D [08/Aug/2009:20:28:10 +1200] cupsdIsAuthorized: requesting-user-name="janet" ...

Read more...

Revision history for this message
Sebastián Fontana (sebafontana) wrote :

I have the same problem with a HP Photosmart C5200 series printer. Please let me know how can I help to solve this issue. Thanks.

Revision history for this message
Daniel Tamm (daniel-tamm-tamm) wrote :

Same problem with Photosmart C6280 on Jaunty.

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.