Print hangs with N-up (2 pages per sheet) and odd number of pages

Bug #288666 reported by Stefan Lucke
4
Affects Status Importance Assigned to Milestone
HPLIP
Incomplete
Undecided
Unassigned

Bug Description

I'm trying to print 2 pages per sheet with my C7280 network attached printer initiated from KDE program kate.
When the document has an odd number of pages, the last sheet stucks in the printer and nothing is printed on.
After a while the empty last sheet is ejected.
Thereis no difference using gentoo's 2.8.6b or 2.8.9 compiled myself.

Printing the same document to LJ 4P (via 3rd party printserver) all sheets are printed correctly.

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) wrote :

Please retest with HPLIP 2.8.10 if same problem run hp-check -t and post the output.

Thanks.

Aaron

Changed in hplip:
status: New → Incomplete
Revision history for this message
Stefan Lucke (stefan-lucke) wrote :

Thanks for your response.

I upgraded to hplip-2.8.10 and the issue is still the same.
A even numbered document prints fine, but the odd numbered one still hangs (see above).

Stefan

Revision history for this message
Stefan Lucke (stefan-lucke) wrote :

I enabled LogLevel debug in my cupsd.conf and made two cups traces available here: http://www.lucke.in-berlin.de/hplip-c7280/ . The 2 page print finished without problems.

Stefan

Revision history for this message
Stefan Lucke (stefan-lucke) wrote :

No one interested ?
With 3.9.2 it is the same problem.
Is there anyone who can print 2 pages on one sheet with a C7280 network attached printer, in case the document has only 3, 5 etc. pages ?

Revision history for this message
Stefan Lucke (stefan-lucke) wrote :
Revision history for this message
Stefan Lucke (stefan-lucke) wrote :
Revision history for this message
brabax (brabax2) wrote :

hplip-3.9.2 (Kubuntu Jaunty):
I tried to print a PDF document with 4 pages in duplex mode. The C7280 stops after 3 pages. The third pages only leaves the printer after switching the printer off with the power button.

The problem might be related to page size, because the top and bottom edge of my printed pages are cut away.

Revision history for this message
Stefan Lucke (stefan-lucke) wrote :

Still no one interested ! :-(((
I modified foomatic-rip-hplip like that (around line 3959):

            print $logh "---- start read write STDOUT\n";

            # The rest of the job data
     my $buf;
            while (read(KID4_IN, $buf, 1024)) {
                my $len = length ($buf);
                print $logh "---- read, try to write STDOUT ".$len."\n";
                print $fileh $buf;
                print $logh "---- written, retry to read STDOUT\n";
            }
            print $logh "---- stop read write STDOUT\n";

     # A JCL trailer
     if (( @jclprepend > 1 ) && (!$driverjcl)) {
  print $fileh @jclappend;
     }

            if (!close $fileh) {

and got the following logging information:
D [02/Oct/2009:19:22:09 +0200] [Job 541] ---- written, retry to read STDOUT
D [02/Oct/2009:19:22:09 +0200] [Job 541] ---- read, try to write STDOUT 1024
D [02/Oct/2009:19:22:09 +0200] [Job 541] ---- written, retry to read STDOUT
D [02/Oct/2009:19:22:09 +0200] [Job 541] ---- read, try to write STDOUT 1024
D [02/Oct/2009:19:22:43 +0200] Report: clients=0
D [02/Oct/2009:19:22:43 +0200] Report: jobs=278

So foomatic-rip-hplip is sitting at: print $fileh $buf;

Some out her with another idea ?

Revision history for this message
Stefan Lucke (stefan-lucke) wrote :

I made some progress in search te cause of the hang.
I modified 'prnt/backend/hp.c' in a way so that all data written to the network printer
is written to a dump file too. This happens even when timeout happens.
By this I can 'nc printer_host_name 9100 < dump_file' to reproduce some effects.
The printer hangs when doing 'nc hp-c7280 9100 < hplip-trace-03-orig-hangs.dmp'
Interresting is that, if I cut out the first sheet of paper from the dump file, 2nd
sheet gets printed fine.

Fix is by treating DATA_FORMAT for printer as RASTER_LINE instead of RASTER_STRIP
and optimizing all white/blank transmissing by a skip command.
'nc hp-c7280 9100 < hplip-trace-03-patched-ok.dmp' prints fine.

Patch to fix it for me is:
http://lucke.in-berlin.de/hplip-c7280/hplip-trace-03-patched-ok.dmp

The last and final mod to cure the hang was:
if (0) //skipcount >= 200)

You'll find above mentioned dump files at:
http://lucke.in-berlin.de/hplip-c7280/

Revision history for this message
Stefan Lucke (stefan-lucke) wrote :
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.