HPLIP doesn't work... can't finish loading printer

I have been out of FreeBSD land for awhile, but I've had the same problem in Linux using hplip 3.19.12. Solution:
  1. run hp-setup -g and look for a line like this: hp-setup[5160]: debug: Cache miss: hp_colorlaserjet_mfp_m178-m181
  2. exit setup
  3. find the models.dat file (in linux it's under /usr/share/hplip/data/models/models.dat). make a backup of the file.
  4. find your printer model in the file, and change the appropriate entry to the entry hp-setup is looking for like this: [hp_colorlaserjet_mfp_m178-m181]
  5. re-run hp-setup and see if it finds the printer.
  6. got this from here: https://bugs.archlinux.org/task/64801
 
Thanks, xxvikxx! Didn't know about the -g option for hp-setup.

I get the following output:

hp-setup[47219]: debug: Cache miss: hp_officejet_pro_8610
hp-setup[47219]: debug: Reading file: /usr/local/share/hplip/data/models/models.dat
hp-setup[47219]: debug: Searching for section [hp_officejet_pro_8610] in file /usr/local/share/hplip/data/models/models.dat
hp-setup[47219]: debug: Found section [hp_officejet_pro_8610] in file /usr/local/share/hplip/data/models/models.dat
hp-setup[47219]: debug: Unable to open file /var/lib/hp/hplip.state for reading.
hp-setup[47219]: debug: {}
hp-setup[47219]: debug: HP_Officejet_Pro_8610
hp-setup[47219]: debug: (CUPS 1.2.x) Getting list of PPDs using CUPS_GET_PPDS...
hp-setup[47219]: debug: CUPS PPD base path = /usr/local/share/cups/model
hp-setup[47219]: debug: Foomatic PPD base path = /usr/local/share/ppd
hp-setup[47219]: debug: Matching PPD list to model officejet_pro_8610...
hp-setup[47219]: debug: []
hp-setup[47219]: debug: No PPD found for model officejet_pro_8610 using new algorithm. Trying old algorithm...
hp-setup[47219]: debug: 1st stage edit distance match
hp-setup[47219]: debug: Determining edit distance from officejet_pro_8610 (only showing edit distances < 4)...
hp-setup[47219]: debug: Min. dist = 9223372036854775807
hp-setup[47219]: debug: {}
hp-setup[47219]: debug: []
hp-setup[47219]: debug: []
error: No PPD found for model officejet_pro_8610 using old algorithm.
error: No appropriate print PPD file found for model hp_officejet_pro_8610


If I grep my models.data file for the string "8610" I see

[hp_officejet_pro_8610]
model1=HP OfficeJet Pro 8610 e-All-in-One Printer

So it looks like the models file is correct.

My /usr/local/share/cups/model directory is empty. /usr/local/share/ppd has one subdirectory in it, "HP", that in turn has many ppd files. The only one with "8610" in the name is:

hp-officejet_pro_8610.ppd.gz

I tried renaming this file to "hp_officejet_pro_8610.ppd.gz" and that does not work. I also had no luck renaming the file to "officejet_pro_8610.ppd.gz".
 
Agreed, your models.dat file looks correct.

In my notes I had to manually point hp-setup to the PPD file location for some reason. Is it possible for you to do the same?
Also, when I set up hplip I ran (as root in console mode so no gui required):
hp-setup -i -g <ip_of_printer>

The only other thing that looked odd was the "Unable to open file /var/lib/hp/hplip.state for reading." Not sure if that is an issue though.
 
Let me give you my complete set of notes for setting up hplip in Linux:
NOTE: had an annoying issue with hplip 3.19.12-r1: the models.dat had the
wrong name and so hp-setup said it couldn't find the printer.
From here: https://bugs.archlinux.org/task/64801
-edit /usr/share/hplip/data/models/models.dat:
change [hp_laserjet_100_colormfp_m175] to [hp_laserjet_100_colormfp_m175nw]

-had to download hplip-3.19.12-plugin.run and hplip-3.19.12-plugin.asc from

hp-setup -i <printer_ip>
-specify folder path (not the individual .run file) to downloaded plugin files
-specify path to PPD:
/usr/share/ppd/HP/hp-laserjet_100_color_mfp_m175-ps.ppd.gz
-print test page doesn't work from hp-setup, that's fine.
rc-service cupsd start
rc-update add cupsd default

-go into cups and make sure it's the default printer.
-https://localhost:631
-under printers, click the hp printer, administration, set as server default

-as normal user, run hp-device-manager from drun
-print test page

-fire up xsane
-load test page into automatic document feeder (adf), face up

-set xsane to save, type = pdf
-scan
-make sure pdf looks ok

Tips:
-whenever updating hplip, it is recommended to remove and add the printer again.
-sane, once installed, creates the scanner group. make sure to add my user to it: gpasswd -a <username> scanner
-to make sure hp-setup can find the printer on the network:
snmpwalk -Os -c public -v 1 139.30.204.37 1.3.6.1.4.1.11.2.3.9.1.1.7.0
 
Hi xxvikxx,

Thanks for the info! With your tips and some hacking I was able to get it working. Here's what I did:

(1) From the console:

I first tried "hp-setup -i" per your suggestion, and got much farther than in the GUI. It didn't ask me for the plugin but that didn't seem to matter. I added the following to /etc/rc.conf
Code:
cupsd_enable="YES"
and then started the cupsd service manually
Code:
service cupsd onestart
I was then able to get to the cups management screen at http://localhost:631 and could print a test page. However, printing PDFs (from okular, for example) still did not work.

I then opened the "HP Device Manager" that was installed in my desktop system tray, and selected "Diagnose Queues". This didn't report anything, but in /var/log/messages I saw the line:
Code:
Jul 29 09:36:08 tuval /hp-diagnose_queues[4371]: hp-daignose-queues[4371]: warning: Insufficient permission to access file /usr/local/etc/cups/ppd/HP_Officejet_Pro_8610.ppd

I did not find /usr/local/etc/cups/ppd/HP_Officejet_Pro_8610.ppd, so I did the following to create it:
Bash:
cd /tmp
cp /usr/local/share/ppd/HP/hp-officejet_pro_8610.ppd.gz .
gunzip hp-officejet_pro_8610.ppd.gz
mv hp-officejet_pro_8610.ppd /usr/local/etc/cups/ppd/HP_Officejet_Pro_8610.ppd
and then restarted cupsd. I am now able to print PDF files.


(2) In the hp-setup GUI:

I wanted to see if I could get the hp-setup GUI working, at least as well as "hp-setup -i" worked. So I stopped cupsd, moved aside /usr/local/etc/cups/printers.conf and the .ppd file I put into /usr/local/etc/cups/ppd, and started hacking.

The problem was that the PPD files were not being found. The key function is "getSystemPPDs()" in /usr/local/share/hplip/prnt/cups.py. On my system it was failing the "if major == 1 and minor < 2" test and thus trying to use cupsext.getPPDList(). This is an external module in /usr/local/lib/python3.7/site-packages/cupsext.so and appears to be broken - it was not returning any PPD files. I changed the "if" condition so that it would use "utils.walkFiles()", as follows:

Python:
if True or (major == 1 and minor < 2):

It then found the correct PPD file and I was able to add the printer. The same steps to start the cupsd service were required as in the "hp-setup -i" case. I also had to manually copy the ppd file to /usr/local/etc/cups, just as above.

Haven't tried setting up the scanner yet. If I run into anything worth reporting, I'll do so here.
 
Thanks for sharing! I'm sure that will help someone else here.
I'm not really sure why hp-setup wouldn't let you specify the ppd path, but I'm glad you figured it out.
 
Back
Top