-   Linux - Software (
-   -   Printer stopping randomly (logs added) (

Dutchy_ 05-16-2010 12:34 PM

Printer stopping randomly (logs added)
I am trying to print a file on my HP Photosmart 2575 + Ubuntu 10.04

This could very well be a hardware error because the printer behaves weird on windows too!

Anyway, it stops randomly when printing things, however always on the same place. For example this file. It always stops after the third page (printing reverse, so 3rd from the last).

This is the (debug enabled) logs from /var/log/cups/error_log:
line 114: start of page 1
line 230: start of page 2
line 359: start of page 3
line 488: start of page 4
line 621: start of page 5

So, it sends 5 pages, but prints only 3...

But just before page 5, line 617:

D [16/May/2010:18:04:17 +0200] PID 11786 (/usr/lib/cups/backend/hp) stopped with status 4!
D [16/May/2010:18:04:17 +0200] [Job 38] prnt/backend/hp.c 625: ERROR: 5021 device communication error!
E [16/May/2010:18:04:18 +0200] PID 11785 (/usr/lib/cups/filter/hpcups) crashed on signal 13!
D [16/May/2010:18:04:18 +0200] PID 11784 (/usr/lib/cups/filter/pdftoraster) stopped with status 1!

This doesn't say much... I've googled the error code but I couldn't find any relevant info.

At this point I'm stuck... Is this a bug in cups/hplip or is my printer broken?

fruttenboel 05-16-2010 01:05 PM


Originally Posted by Dutchy_ (Post 3970585)
I am trying to print a file on my HP Photosmart 2575 + Ubuntu 10.04

Ubuntu 10.4. The majority of trouble mentioned here lately has that prefix. So it might be that the whory herring met its maker.. :o)


Originally Posted by Dutchy_ (Post 3970585)
D [16/May/2010:18:04:17 +0200] [Job 38] prnt/backend/hp.c 625: ERROR: 5021 device communication error!

This doesn't say much... I've googled the error code but I couldn't find any relevant info.

It doesn't say much but it does say that there was a comms error with the printer. It did not respond anymore. Probably no more ACK handshaking. Looks like a printer buffer error. Try printing the big file (which resembled a work of Niklaus Wirth) ihn two or three pieces. If that works, it's the printer buffer memory. If that fails as well, it may be some data in the printer data, like a software reset command that is interpreted literally.

Print the data to a PS file and examine the file at the point where the printer always stops. Which character is there? Is it a Ctrl-Z? Or a Ctrl-[? Or some other printer command?

Dutchy_ 05-16-2010 02:29 PM

Thanks for the advice. I tried printing in batches of 3, and that seemed to work, until i tried pages 1-3 and it only printed 2 and 3... That part did have quite some images in there though. Printer buffer memory problems sounds logical, however I've printed bigger files and even different versions of this same file without problems in one batch.

I don't think examining the ps file will result in anything at this point, since the page where it stopped earlier printed fine in a batch.

PS. I think I had similar printing issues in Ubuntu 9.10
PPS. -offtopic- I googled Niklaus Wirth and I can see why you think it resembles that :) this file is my answers to an assignment for a course, "Compiler Construction".

EDIT: After re-enabling the printer it printed that batch just fine. I don't get it :S...

fruttenboel 05-17-2010 05:49 AM


The compilerbook "Vertalerbouw" published by 'Academic Services' looks very much like Wirths magnum epos "Compiler construction". As this one :

On my webpage are a lot more books by Niklaus Wirth.

And don't forget this: Look the movie. Wirth makes minced meat of all the silly OOP languages...

ebischoff 01-23-2011 06:34 AM

The problem lies in the communication method with the HP Photosmart 2575 printer.

A simple way to work around the problem is to open a web browser (Firefox for example) and to open localhost:631 address. There, you remove and then re-add your printer. You let CUPS autodetect the model, and then just follow the default choices.

Once done, in /etc/cups/printers.conf, the DeviceURI will start with "usb:" instead of "lp:". The communication method with the printer has changed and that solves the problem.

I don't know why there is a communication error in driver "hp.c" that triggers the message "ERROR: 5021 device communication error!". That should be fixed. But meanwhile, this workaround works.

Dutchy_ 01-24-2011 04:39 AM

By pure coincidence I am no longer in possession of this printer, but thanks for posting the workaround-solution in this fairly old thread anyway :)
I do have another HP printer now and if I encounter this problem again I shall surely try it. Thanks!

All times are GMT -5. The time now is 10:25 AM.