Any dinosaurs still using lpr*?

Forum: LinuxTotal Replies: 32
Author Content
tqk

Nov 09, 2010
5:54 PM EDT
This was working last week in Debian stable. Now, any attempt to print just blinks a couple of times. Manual test print still works fine.

Nov 9 11:42:58 phreaque kernel: [ 4.790741] parport_pc 00:07: reported by Plug and Play ACPI Nov 9 11:42:58 phreaque kernel: [ 4.790796] parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,ECP,DMA] Nov 9 11:42:58 phreaque kernel: [ 4.893697] parport0: Printer, Hewlett-Packard HP LaserJet 6L

Nov 9 11:42:58 phreaque kernel: [ 7.909198] lp0: using parport0 (interrupt-driven). Nov 9 11:42:58 phreaque kernel: [ 7.909205] lp0: console ready

lp|To Your Right: :lp=/dev/lp0: :force_localhost: :if=/usr/bin/foomatic-rip: :ppd=/usr/local/etc/HP-LaserJet_6L-ljet4.ppd: :sd=/var/spool/lpd/lp: :mx#0:sh:

I've checked that all those files are there. checkpc -V runs clean. dpkg-reconfigure lprng didn't help. I've even removed the trailing colon-space-backslash on suggestion from others.

This is on Sidux/aptosid. Ideas?
jdixon

Nov 09, 2010
7:28 PM EDT
First, the obvious. Do you have another computer/os to test the printer with? It's always possible your printer or cable has gone bad, and from experience the last thing you want is to spend ages troubleshooting a non-existent problem.
gus3

Nov 09, 2010
10:52 PM EDT
If the OS can identify the printer, the cable likely isn't the problem. If you test on another system/OS, be prepared for disappointment.

Random thoughts:

After the printer light blinks, can you eject a page? If so, is it empty?

Did you do a system update between last week and now? Did printing stop working after lpr or foomatic-rip got updated?

I see that the PPD is installed in /usr/local/etc. Are you sure lpr is picking it up and passing it properly to foomatic-rip?

Check the spooler logs. No output usually means an error logged somwhere.

If none of these turns up anything, I suggest a power-cycle on the printer, then "echo TESTING 1 2 3 > /dev/lp0" as root. Most printers come up ready to print raw text, in case something in the system needs to print plain-text diagnostics. If you can't even get that raw text on a page, it could be that the printer's rendering engine or something mechanical has gone haywire.
jdixon

Nov 09, 2010
11:06 PM EDT
> Most printers come up ready to print raw text

Most do, but the Laserjet 6L model is a strange beast for an HP Laserjet, and may not. It is worth a try, however. Cat'ing a small text file to the printer port should have the same effect. I'd still verify the printer and cable are good before I started troubleshooting the system though. A simple boot from a live CD should be sufficient to verify that it's working. If it doesn't work from the live CD, then it's probably a hardware issue.
hkwint

Nov 10, 2010
3:57 AM EDT
Oh no, not the 6L, it's a friggin' nightmare!

I remember spending over a week to have LPRng working with my Xerox 4510 (pre-6L era, that is). It was on OpenBSD, CUPS somehow didn't work either. Have to admit it was my first non-Windows experience ever, so probably it was due to a lack of UNIX-skills back then. The 4510 wasn't that well supported, very slow, a huge beast, so short on memory it took two pages to print a PDF (one half on the first page, other half on the second). Later I found a second hand 6L for €10 and wondered how a laser printer could be that cheap. Back home, I found out.

The 6L was a nightmare, though easy to get it working with CUPS. The 6L certainly reached 3.0 on the Richter-scale when in progress, it eat paper, the carton "patch" designed to prevent said issue failed, fixing resulting paper jam caused my clothes and carpet to be full of toner, to the point of becoming so frustrated I redirected the 6L to the trash bin.

Received a PSC1110 with 'embedded scanner' from a friend for free, and guess what, even while several years newer the thing still eats paper so you have to manually feed it sheets one by one.

As to suggestions:

Are we talking CUPS lpr or LPRng here? I vaguely remember foomatic logs being somewhere, once I had a non-working foomatic. It complained for some missing files in its log, but I can't remember the location of the log (probably the CUPS-log). There's also hp-check, it's included with hplip, and can give nice debugging-info. Also, I recommend reading this page (and maybe installing LPRng if CUPS fails?): http://www.lprng.com/LPRng-HOWTO/LPRng-Reference.html
cr

Nov 10, 2010
9:33 AM EDT
@hkwint: URL to the "carton patch", please. I've got a LJ6L here. It likes to see how many sheets it can pull through for a one-sheet print. I shrug and give it back the extras. It'd be nice not to have to climb up to the shelf it's sitting on to do that.

@tqk: Yeah, my LJ-6L is parallel-port-connected and driven via lpr, but it's driven by a RedHat Linux 6.2 box, kinda apples-and-oranges to a decade-younger-Debian, so all I can do is pass along the printcap entry in case it'll do you some good:

##PRINTTOOL3## LOCAL ljet4 600x600 letter {} LaserJet4 Default 1 lp|HP_LJ_6L:\ :sd=/var/spool/lpd/lp:\ :mx=0:\ :sh:\ :lp=/dev/lp0:\ :if=/var/spool/lpd/lp/filter:

(stupid CMS message-poster: I had to double-up the backslashes to get them to show ...and bringing the message back in for an edit ate them, making me double them in again)

edit: @tqk: there's no space between the colon and its backslash in each of those sublines. I think a printcap entry's supposed to be a oneliner, so maybe putting back colon-backslash in all lines but the last will do...

fwiw --crb3
jdixon

Nov 10, 2010
10:27 AM EDT
> Oh no, not the 6L, it's a friggin' nightmare!

Well, I was trying to be more restrained than that, but pretty much, yeah. It doesn't work very well even under Windows.
cr

Nov 10, 2010
11:23 AM EDT
@jdixon: The LJ6L speaks PCL, which is escape-sequences on top of plain ASCII. If I throw plain text at it, I get that text in 12-point Courier, just as if it was a daisy-wheel (except for being faster and quieter and not being as good at hammering an impression into NCR paper).
mrider

Nov 10, 2010
1:17 PM EDT
I have an ancient 5L - so this may not be related. But I also had the problem of the printer pulling multiple pages through when printing. I used the kit from Fix Your Own Printer http://www.fixyourownprinter.com and it worked great for me.

(sorry to interrupt)
cr

Nov 10, 2010
1:31 PM EDT
@mrider: I've got a 5L here too. It's the same mechanism, so thanks for the link.
mrider

Nov 10, 2010
1:41 PM EDT
@cr:

In that case, you want this kit here -> http://www.fixyourownprinter.com/kits/hp/K30 .

It was fairly tedious to install, but if you're careful and meticulous and have a bit of mechanical abilities, you should be fine. The kit totally transformed the printer.
cr

Nov 10, 2010
1:57 PM EDT
@tqk: On reflection, I've a couple of things you can try.

1. Are the computer and printer fed from different wall-outlets? Try putting them on the same power-strip or such, so they're fed from the same outlet. Rationale: possible ground-loop conditions allowing RF noise-injection, just enough to cause trouble. That could even be seasonal -- leafy trees absorb some RF, but right about now the trees are temporarily ceasing to be leafy. I'm a few miles away from a 50kw AM station, so I'm familiar with 'RF on the line'; not all RF sources are so polite as to be continuous-power and voice-modulated so as to stand out on a 'scope. Put a pocket AM radio near a fluorescent light-fixture that's working hard to drive a tired bulb some time; you'll see what I mean. And that signal is still periodic, unlike what you'd get from corroded electrical equipment.

2. Unplug and replug every cable on the printer, at both ends of the cable. Reseat all connectors firmly. Rationale: loose connections allow oxidation beween contacts. At first there might be enough contact for current to flow, but then just a little vibration or bumping can jostle things to where the oxidized sections are all that's mating. Such problematic connections aren't all-or-nothing, either: they can result in increased resistance, resulting in no end of squirrely problems (including coupled-in RF). Most such contacts are designed to be "self-wiping", such that the contact face is scrubbed clean(er) by the mating contact at insertion.
skelband

Nov 10, 2010
3:12 PM EDT
I had the same paper feed problem with a LaserJet IID :D

Yeah, they all succumb to the "hard rubber" roller syndrome eventually. The paper is not properly separated because the rubber rollers (and/or bits of cork sheet) get hard and lose their grip. I did dream up all sorts of temp fixes like sticking balloon elastic to the rollers and abrading them with sandpaper, but the only real way to fix them is with new rollers.

If you have a good printer otherwise (LJs used to be really expensive to buy but otherwise top notch printers) the fixit kits are a pretty cost-effective buy.

Got a nice 5si in the garage at the moment. It's a cool printer, but starting to suffer from the same issue now. Time for some new rollers perhaps.....
Steven_Rosenber

Nov 10, 2010
4:13 PM EDT
I put my 5L out of its misery.
cr

Nov 10, 2010
4:25 PM EDT
@gus3: That "echo TESTING 1 2 3 > /dev/lp0" test won't result in anything until the printer gets a formfeed. I keep a text file containing only a ^L as /usr/local/bin/pff, and run "lpr /usr/local/bin/pff &" after sending the printer raw text, to get it to finish compositing the page and print it out. I suppose I could have echoed it, but I was going with what I understood at the time, and it worked.

@mrider: Mucho thanks for the URL.

@skelband: With deskjet inks priced about the same as blood these days, laserjets are about the cheapest practical monochrome printing around. (Ribbons for dot-matrix might be cheaper than cartridges, but how does the price of fanfold pinfeed paper compare to that of copy bond?) It makes sense to keep the old beasts working as long as possible. Every page that the 6L prints delays the day when the Officejet_Pro_L7500 holds scanning up for ransom again.
tqk

Nov 10, 2010
5:37 PM EDT
@all, thanks for the wealth of suggestions! I've been fighting with a half-useful ISP all morning, but now it's working, I can read through this.

It's heartening to see so many others also unwilling to consign themselves to CUPS purgatory. :-)
gus3

Nov 10, 2010
6:07 PM EDT
I have an ancient (c. 2000) Brother HL-1240, that I inherited from my workplace in 2005. I bought a small toner cartridge for it, hooked it up... and had to switch to CUPS to get it to work for me. Five years later, it's still on the same toner.
tqk

Nov 10, 2010
6:11 PM EDT
@jdixon Don't have another machine that contains a parallel port, drat. I'm going to have to find a parallel-->USB converter some day.

@cr I'm almost convinced it is just printcap syntax. Proof is that "echo TESTING 1 2 3 > /dev/lp0" followed by "lpr /usr/local/bin/pff" worked fine. Thanks.

I've noticed something else I hadn't seen yet: "Nov 10 14:41:09 phreaque kernel: [84433.561298] lp0 off-line". Hmm. Odd, and I saw that before I tried the echo command.

So, off to fiddle w printcap. Thx all.
hkwint

Nov 10, 2010
7:10 PM EDT
cr: I'm glad other people helped you out, because I got my 'carton patches' from the previous behind-neigbour of my parents, he had 5 of them lying around (!) and I could get one for free. Turned out the primary school were he works employed some 6L's and all of them eat paper back then.

However, sadly, the carton patch didn't help me at all.

tqk: Being able to print with 'echo' but not via the print-command of OOo / FF sounds familiar. Had that problem, it was indeed in the printcap. But sadly it's too long ago for me to help you, and I don't have my 2004 backups anymore (if I ever made any, ahem).

You still didn't share with us what 'lpr' you're using, because I think several packages (amongst wich CUPS) provide the command. Are you on LPRng?
jdixon

Nov 10, 2010
8:10 PM EDT
> Proof is that "echo TESTING 1 2 3 > /dev/lp0" followed by "lpr /usr/local/bin/pff" worked fine.

OK. You've got an issue with lpr then. I'm not going to pretend to know what though.

> I have an ancient (c. 2000) Brother HL-1240,

We bought an HL-1440 from Staples many moons ago. We finally had to replace its toner cartridge last year. It's been a workhorse, at least by home use standards.
jdixon

Nov 10, 2010
8:12 PM EDT
> You still didn't share with us what 'lpr' you're using,

>> ...dpkg-reconfigure lprng didn't help.

I'd say he's using lprng.
tqk

Nov 10, 2010
8:25 PM EDT
Solved! apt-get install ifhp fixed it. A day of trolling through manpages turned it up (along with aptitude search hp | grep -v php).

"ifhp - Almost Universal LPRng Print Filter" - that's pretty obvious. :-) I can't see that it's done anything but link /etc/lprng/printcap to /etc/printcap.

Thanks for your help all.
hkwint

Nov 10, 2010
9:35 PM EDT
jdixon: Yeah, coming to think of it, I guess you're right!

tqk: Glad it's solved. Shouldn't 'ifhp' be a dependency of 'lprng' in Debian then?
gus3

Nov 10, 2010
9:44 PM EDT
You're welcome.
tqk

Nov 11, 2010
11:41 AM EDT
Update: Sigh. I was trying a few tests successfully, until I tried "enscript -2r .profile". It printed fine, then the last edge of the page just sat in the rollers. I pulled it free undamaged, but now the printer sits with a solid unblinking yellow top light indicator. frobbing/cycling has done nothing so far.

Grrr.
gus3

Nov 11, 2010
12:00 PM EDT
Is the print queue empty?
cr

Nov 11, 2010
12:26 PM EDT
Before assuming that the machine died, try flushing the page with another formfeed.

And replenish/reseat the paper in the paper reservoir first: mine shows a yellow error-light when it successfully prints a page and then discovers that it has no more paper (I know this because of mine's appetite for bundles of paper).
hkwint

Nov 11, 2010
8:27 PM EDT
I can remember the week I spent half an hour diagnosing my 6L, and trying to make it work. I thought it didn't work, I didn't configure it proper yet, I was not sure I installed all needed software yet. Don't know why, but I had this whole mentality of "this is complex, it will take time to get this printer working". Probably my bad LPRng / OpenBSD experience with the Xerox 4510 or something.

Then my mom visited me, she asked why I just didn't put paper in the printer.

And it worked!

My mom also taught me this great and best never way to handle 'stuck MS Windows': Don't think about hitting the power button!

Pull the power cord instead.

So, did you already give your 6L the Windows-treatment?
tqk

Nov 13, 2010
12:39 AM EDT
(0) phreaque /home/keeling_ lpq
Printer: lp@localhost 'To Your Right'
 Queue: no printable jobs in queue
 Status: lp: Wait_for_pid: IF filter 'foomatic-rip' filter died with signal 'Hangup' at 21:12:30.159
(0) phreaque /home/keeling_ lpstat
Printer: lp@localhost 'To Your Right'
 Queue: no printable jobs in queue
 Status: lp: Wait_for_pid: IF filter 'foomatic-rip' filter died with signal 'Hangup' at 21:12:30.159
(0) phreaque /home/keeling_ su -


How long's it take to flush memory on these things. Maybe I didn't give it long enough yesterday. Trying again, five min.

Reseating paper isn't the problem; I've been suspicious of that all along, to no effect.

Ah, !@#$

Just on the off chance, ... At the same time, I fiddled with the paper for the umpteenth time. Green light.

Hates computers, we hates them!

Thanks. Much chagrin. Also out of paper.
cr

Nov 13, 2010
2:33 AM EDT
Jerry Pournelle, in his monthly "Chaos Manor" column in Byte magazine in the late 80's, always went on about your having to "hold your mouth just right" to get recalcitrant computing equipment to work. When it's that fiddly due to borderline hardware issues, maybe there is some such magic-of-intent involved to get it to run right.

Paper does break off as fibers, even from copy bond (microperf pinfeed is way worse). Perhaps it's time to open up that printer and vacuum out everywhere a small nozzle can reach, using a soft brush to sweep surfaces clean. At the least, it might make the paper-out sensor less twitchy if it's not half-coated with fibers.

Also, I have noticed that the 5L and 6L treat paper like celery. If it's been out the package awhile and starting to look wilted, it finds it unappetizing. Forcefeed it with the stuff anyway, and it'll see how fast it can put it all through itself. (I think I'll drop the analogy right there...)
hkwint

Nov 14, 2010
1:39 PM EDT
Don't you just hate browsers who have their own opinion!
tqk

Nov 14, 2010
3:42 PM EDT
Quoting:Perhaps it's time to open up that printer and vacuum out everywhere
That is a very good idea, thanks.
jdixon

Nov 14, 2010
4:16 PM EDT
> Just on the off chance, ... At the same time, I fiddled with the paper for the umpteenth time. Green light.

Notice that of all the comments here, not one has been a recommendation for the HP Laserjet 5L or 6L series of printers. :)

The 6P, while still a fairly poor printer by HP's standards, was much better.

Now, if you can get your hands on a Laserjet 4 you're probably good. Those things were almost indestructible.

You cannot post until you login.