Discussion:
HP D1560 printer
(too old to reply)
Joe Rosevear
2018-07-07 12:37:20 UTC
Permalink
Raw Message
Howdy,

My wife has an HP Deskjet D1560 printer. It worked in Slackware 14.1,
but seems to not cooperate in Slackware 14.2. I'm not positive that I
haven't messed up somewhere as I didn't install in the traditional way.
But let's put those worries aside for now...

...and talk about what I think is happening. I found this in the log
(/var/log/cups/error_log):

Can\'t use \'defined(@array)\' (Maybe you should just omit the
defined()?) at /usr/lib/cups/filter/foomatic-rip-hplip line 1656.

CUPS, by the way, reported a filter failure.

So I looked at foomatic-rip-hplip. It is a perl script which
apparently is choking at line 1656. Sadly, I couldn't figure out what
was happening.

I did observe a few things though:

1. The code at 1656 is an if-block with an else. Line 1656 is
involved in the logic to choose a route through the else. Just for fun I
tried choosing arbitrarily a route through the else and in the process
I removed the line that was choking it. Well, ha! No more filter
error. And it actually printed something. It printed one page with
two characters on it, "?%", printed at the bottom of the page.

2. I compared the foomatic-rip-hplip files of past (Slackware
14.1), present (Slackware 14.2), and future (I downloaded a newer
foomatic-rip-hplip). Well, guess what? All three were identical.


So it seems that although this script contains the code that is
failing, the onset of the problem wasn't caused by a change in the
script.

Perhaps the solution will need a change in the script? Hmmm. We
really need to know what is happening.

I just wanted to run this up the flag pole. Have a go at it, if you
like.

By the way I tried several times to fix the problem by selecting
different printer ppd files. Some did not cause filter failures, but
none produced printed output.

I also took a look at gs. In particular I tried "gs -h" to see if
ghostscript had a filter I could use. No luck. It seems there isn't
much available for this cheap printer.

One more thing: I *can* print from the new Slackware 14.2 to a
different printer, an HP laser printer.

-Joe
King Beowulf
2018-07-07 17:46:13 UTC
Permalink
Raw Message
Post by Joe Rosevear
Howdy,
My wife has an HP Deskjet D1560 printer. It worked in Slackware 14.1,
but seems to not cooperate in Slackware 14.2. I'm not positive that I
haven't messed up somewhere as I didn't install in the traditional way.
But let's put those worries aside for now...
...and talk about what I think is happening. I found this in the log
defined()?) at /usr/lib/cups/filter/foomatic-rip-hplip line 1656.
CUPS, by the way, reported a filter failure.
You didn't mention it, but I assume you are using HPLIP 3.16.5 and the
D1560 is listed as partial support since 2.8.5. The ppd to use is:
hp-deskjet_d1500_series-hpijs.ppd

The D15xx series is listed as "host based" i.e. the old "winprint" issue.

Official bug reporting is here:
https://launchpad.net/hplip

I would check here:
https://developers.hp.com/hp-linux-imaging-and-printing/models/deskjet/
deskjet_d1500_series

as well as the rest of the KB articles:
https://developers.hp.com/search/site/D1560

Since this is a USB printer, did you test the HP Laser vua USB or via
ethernet? maybe there is a USB glitch? reinstall HPLIP and maybe CUPS as
something may have gotten scrambled.
Joe Rosevear
2018-07-08 11:27:06 UTC
Permalink
Raw Message
Post by King Beowulf
You didn't mention it, but I assume you are using HPLIP 3.16.5 and the
hp-deskjet_d1500_series-hpijs.ppd
It seems so.
Post by King Beowulf
The D15xx series is listed as "host based" i.e. the old "winprint" issue.
Host based. That's funny. You mean it's not postscript.
Post by King Beowulf
https://launchpad.net/hplip
https://developers.hp.com/hp-linux-imaging-and-printing/models/deskjet/
deskjet_d1500_series
https://developers.hp.com/search/site/D1560
Since this is a USB printer, did you test the HP Laser vua USB or via
ethernet? maybe there is a USB glitch? reinstall HPLIP and maybe CUPS as
something may have gotten scrambled.
Hey, thanks for your help. It is still broken, though.

I'm thinking there is a problem with the perl code. It uses a bit of
code that is now not allowed. Here is a web article about it.

https://github.com/kost/nmapxml/issues/1

The web article explains how to repair the wrong syntax and make it
right. So I modified /usr/lib/cups/filter/foomatic-rip-hplip per the
directions...

It was *so* exciting.

...and the error went away (in /var/log/cups/error_log) only to be
replaced by a different error. The new error was not a perl error, so
Ha! I fixed the perl script. Maybe. Something is still not right.
Here is the new error:

CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The
name org.freedesktop.ColorManager was not provided by any .service
files

I have no idea what this means. I googled it and found I was not
alone, but I'm still in the dark.

But hey thanks for your help, you had some good ideas and got me
thinking.

OK, I was going to say goodnight, but I googled a bit and found this:

https://www.linuxquestions.org/questions/slackware-14/error-in-foomatic-rip-hplip-14-2-cups-filters-package-4175584890/

The above tells a story of someone who two years ago someone was having
a problem very much like mine. The same script (foomatic-rip-hplip),
the same line of code (1656), the same suspicions about the perl
syntax, and a similar outcome: He modified the script, the error went
away, but the printer still didn't work.

OK that's all for now.

-Joe
Joe Rosevear
2018-07-10 08:54:23 UTC
Permalink
Raw Message
Post by Joe Rosevear
Howdy,
My wife has an HP Deskjet D1560 printer. It worked in Slackware 14.1,
but seems to not cooperate in Slackware 14.2. I'm not positive that I
haven't messed up somewhere as I didn't install in the traditional way.
But let's put those worries aside for now...
Hi,

I fixed it:

cd /usr/lib/cups/filter
mv foomatic-rip-hplip zfoomatic-rip-hplip
ln -s foomatic-rip foomatic-rip-hplip

You can read more about this at:

http://joeslife.org/news

-Joe

Loading...