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



## dhenzler (Feb 13, 2018)

I have a network IP printer using JetDirect.  Use HPLIP to communicate with it from Linux or GhostBSD, but FreeBSD refuses to complete the install.  Printer file is there, but program has permanent message NOT FOUND...  printer def files were gunzipped, I unzipped the one I neededd with NO results.  Same message.

HELP !


----------



## shepper (Feb 13, 2018)

You are not giving the forum much to go on.
You could be having a network problem:  can you ping the printer? 

hplip is Hewlett Packard's enhancement to cups and in contrast to Linux, it is not the default print spooler,  Have you the started the cups daemon?  Does the web configuration interface show up in a browser with the url http://localhost:631?  Is the printer discovered the cups configuration interface?  If you manually set the IP in the cups interface, for JetDirect it needs to specify port 9100.

I assume your printer is an HP.  The ppd files do not need to be gunzip'd.  You should be able to select your printer's ppd in the interface.


----------



## Oko (Feb 13, 2018)

shepper said:


> You are not giving the forum much to go on.
> You could be having a network problem:  can you ping the printer?
> 
> hplip is Hewlett Packard's enhancement to cups and in contrast to Linux, it is not the default print spooler,  Have you the started the cups daemon?  Does the web configuration interface show up in a browser with the url http://localhost:631?  Is the printer discovered the cups configuration interface?  If you manually set the IP in the cups interface, for JetDirect it needs to specify port 9100.
> ...


HPLIP is a set of Hewlett Packard open source drivers, small programs which take PostScript stream and convert to whatever proprietary language cheap HP printer speak. Good printers speak PostScript, can print ASCII code out of box and speak LPD (Line Printing Daemon protocol) as well IPP (Internet Printing Protocol). Those not so good speak Printer Command Language (PCL5 or PCL6). And those that speak neither PostScript nor PCL5/6 should not be used IMHO. Printing spooler is a queueing system. Examples include but not limited to LPD, LPDng, CUPS. LPD is the default queuening system on the derivatives of the original BSD UNIX. You could find all this looking at the Wikipedia which begs the advice:"It's better to keep your mouth shut and appear stupid than open it and remove all doubt."


----------



## dhenzler (Feb 14, 2018)

No network problems... the software just denies the existence of the required files despite the fact that they do exist on the machine...

files were gz format... I unzipped it and still same issue...

You've skirted the issue of the blocked file totally...   I know a thing or two about printer setup, and this printer works fine on the same machine when running GhostBSD.  It's yet another FreeBSD failing...

Load the software... whether or not you have any of the printers... try to install one at random...

you'll see what I mean ...  not found always present...


----------



## dhenzler (Feb 14, 2018)

If I had a network problem... it wouldn't discover the printer...




The file below does exist in the folder shown... however FreeBSD doesn't allow this pkg to open it... (freebsd problem).  The identical package works flawlessly in GhostBSD, Linux Mint.


----------



## sidetone (Feb 14, 2018)

Oko said:


> You could find all this looking at the Wikipedia which begs the advice:"It's better to keep your mouth shut and appear stupid than open it and remove all doubt."


Wikipedia is not a FreeBSD specific resource. FreeBSD wikis, man pages, BSD Forums and the handbooks are. Not everyone likes Wikipedia, it's not endorsed at FreeBSD, and official works for any subject don't reference Wikipedia.


----------



## shepper (Feb 14, 2018)

You are using python configuration gui's to setup and troubleshoot your printer software. And if you want to get picky, hplip is not "endorsed" by FreeBSD.

The official printing spooler (print-job queuing/accounting) is LPD and it is described in Chapter 9 of the Handbook.  Section 9.6 briefly describes other printing systems and gives a link to hplip.  The author of that chapter essentially washes his hands of hplip beyond that link.


----------



## sidetone (Feb 14, 2018)

Wikipedia is not Unix, Opensource software, FreeBSD, BSD nor Unix specific. So it is not redeemed by a non-endorsement. It shouldn't be anyway.

Case in point, don't expect people to look for information from a community that is run like a Copenhagen zoo.


----------



## dhenzler (Feb 14, 2018)

Oko, Sidetone & Shepper.... you seem to be more interested in Wikipedia BS than answering my question.  Besides if the software wasn't supposed to work under FreeBSD why is it in the /usr/ports collection ?  Try that one on!   I get tired of you FreeBSD folks defending the fact that it's not very good for all of the software they say it will work with.  Another area is CD/DVD burners... not being able to find the Optical Drive.  What absolute BS!

Remember GhostBSD runs HPLIP just fine... they draw their files from the same roots.  This is so reminiscent of Solaris back in 1998.  Couldn't get it working unless you bought just the right video card... screens, mice, keyboard all problematic Xorg issues.  I worked through it and used it up until they published wrong information,and deleted my comment on how it was incorrect, and put out the correction.  Solaris is in my past now... and the Unix "CLUB" attitude of "If you haven't been working with it forever" forget asking for help is such BS.

So... do you have any answers for the question posed, or are you going to continue with the Wikipedia BS?


----------



## dhenzler (Feb 14, 2018)

shepper said:


> You are using python configuration gui's to setup and troubleshoot your printer software. And if you want to get picky, hplip is not "endorsed" by FreeBSD.
> 
> The official printing spooler (print-job queuing/accounting) is LPD and it is described in Chapter 9 of the Handbook.  Section 9.6 briefly describes other printing systems and gives a link to hplip.  The author of that chapter essentially washes his hands of hplip beyond that link.


----------



## dhenzler (Feb 14, 2018)

Not using HPLIP to troubleshoot anything sir... simply using a GUI tool that that provides good interface for determining toner status, print status, print cancellation, and more...  if you don't understand the software don't criticize it or me for wanting to use it.


----------



## dhenzler (Feb 14, 2018)

shepper said:
"You are using python configuration gui's to setup and troubleshoot your printer software. And if you want to get picky, hplip is not "endorsed" by FreeBSD.

The official printing spooler (print-job queuing/accounting) is LPD and it is described in Chapter 9 of the Handbook.  Section 9.6 briefly describes other printing systems and gives a link to hplip.  The author of that chapter essentially washes his hands of hplip beyond that link."

*irrelevant !  answer my question or please remain silent.   If you can't answer the question don't change the topic.
*


----------



## sidetone (Feb 14, 2018)

dhenzler
I'm not the one who expected you to reference that resource. My only argument here is don't have an expectation for people to use that.

I just restated a response that was self explanatory in response to semantics.


----------



## bookwormep (Feb 14, 2018)

Two cents of advice. Printers can be tedious and finicky...I know because....
Anyway, try and be patient with troubleshooting.

My advice is regroup your focus on reading the man pages and come back with refreshed information and understanding (like hplip). Finally, look at how GhostBSD 
sets up the configuration files (you said that was working), then, try and replicate that on your FreeBSD boxen.


----------



## shepper (Feb 14, 2018)

dhenzler said:


> Remember GhostBSD runs HPLIP just fine... they draw their files from the same roots.



GhostBSD is a desktop oriented system that chose CUPS as the default spooler.  I do not run GhostBSD but I would bet that if you review GhostBSD's /etc/rc.conf, cups is enabled.  That is not the case in FreeBSD.  Running HPLIP on FreeBSD is more that just installing it, you have to start the cups daemon.  As far as CD/DVD burning, the link I provided tells you to enable user access, you just need to read it.  And while you are at it you could read the handbook link to the cups spooler.  HPLIP utilizes the cups spooler, it does not have it's own.


----------



## Oko (Feb 15, 2018)

dhenzler said:


> Oko, Sidetone & Shepper.... you seem to be more interested in Wikipedia BS than answering my question.
> ...
> So... do you have any answers for the question posed, or are you going to continue with the Wikipedia BS?


Listen kid. My kids will be heading to college in few years. I am done changing diapers and babysitting. I have no interest in helping somebody who showed 0 effort based on this and your question about K3b to read the documentation and make an attempt to understand how FreeBSD works. Go get yourself pre-configured computer from Walmart and enjoy the life. The only reason I got involved into this thread was that somebody was posting incorrect information.

P.S. You don't understand how the open source works. There is nothing that turns people off more than telling them to do something for you while showing 0 effort, and doing that with the attitude in rude tone.


----------



## shepper (Feb 15, 2018)

Oko said:


> The only reason I got involved into this thread was that somebody was posting incorrect information.


From the standpoint of not wanting to disseminate incorrect information, what was incorrect?

The original posters screenshot shows him attempting to select a postscript ppd in an HPLIP configuration gui.  HPLIP has cups-filters as a runtime dependency https://www.freshports.org/print/hplip/ which in turn has print/cups as a runtime dependency.


----------



## scottro (Feb 15, 2018)

This isn't as bad as some forums, but in general, if you come on here criticizing FreeBSD there will be those who jump on that.  Tribalism is alive and well, look at US politics.  (Or other countries, but I live in the US, so that's the one I know best).

Quick answer--try using the CLI for hplip rather than the GUI, it often, in my experience, works better.

Long answer.
Even with Linux, which, at least in many distributions makes the desktop easier to do than FreeBSD, I would see people having trouble with the hplip GUI tool, but succeeding if they used the command line one. That might have only been with Fedora, and I want to say that I think they had a broken hplip, even the CLI version, and you were better off building it from source, but I may be misremembering.  Anyway, you could file a bug, pointing out that it's working on GhostBSD, but they will ask you for further information, and you have to decide for yourself if you want to spend the time.  

If you want to use FreeBSD as your desktop, you will often have to do more work than you would with Linux.  If your job is FreeBSD based, or you're eager to learn it, and want to use it as much as possible, you can certainly do it, but there will be the odd annoyances, such as the one you're having now.  


Personally, I use CUPS for printing, though I did use the lpr method just to see if I could do it.  wblock@ has a nice page on getting it to work at http://www.wonkity.com/~wblock/docs/html/lpdprinting.html.   CUPS might Just Work(TM) for you, but if you definitely want to use hplip, then I go back to my quick answer, try the CLI version and see if it works.  Afterwards, the usual suspects, printer pingable, etc.


----------



## Oko (Feb 15, 2018)

shepper said:


> From the standpoint of not wanting to disseminate incorrect information, what was incorrect?


Your English appears to be as bad as mine. On the second read I realized that you were referring to CUPS as non-default print spooler rather than HPLIP. Originally I read that you were referring to HPLIP as a printing spooler. Either way you can use printing drivers from HPLIP print/hpijs with LPD so unless you want to use one of those all-in-one HP devices you don't need to use CUPS. Unfortunately the last time I used HPLIP with all-in-one devices CUPS was dependency not an option.


----------



## dhenzler (Feb 16, 2018)

Oko said:


> Listen kid. My kids will be heading to college in few years. I am done changing diapers and babysitting. I have no interest in helping somebody who showed 0 effort based on this and your question about K3b to read the documentation and make an attempt to understand how FreeBSD works. Go get yourself pre-configured computer from Walmart and enjoy the life. The only reason I got involved into this thread was that somebody was posting incorrect information.
> 
> P.S. You don't understand how the open source work. There is nothing that turns people off more than telling them to do something for you while showing 0 effort, and doing that with the attitude in rude tone.


*Excuse Me...  I thought this was a FORUM to HELP users... NOT CRITICIZE THEM for their lack of understanding.  People like you... who respond to questions with aloof criticism are annoying.  By the way... I didn't TELL anyone to help me... only asked!     Let me reiterate...  If you can't answer the question in a helpful manner, but choose to be critical of someone who overlooked or missed something... BUZZ OFF!*


----------



## Ryan Root (Feb 16, 2018)

Can you take a look at the page I'll put at the bottom and after reading it note at the bottom the "Binary plug-in information" and the specific mention that some of the code cannot be open source.  There is also a page to a list of printers that require accepting the license agreement that cannot be binary and on that page a mention also that the page is outdated.  If your printer is one that requires accepting a non open source license then that may be part of your problem.  Some of the other operating systems you mentioned may just be making the assumption that they can safely ignore the fact that the users should be being prompted with a license agreement that isn't open source.  When you install these drivers on those other operating systems you mentioned do they prompt you with anything that indicates you have to agree to a type of license agreement?  Maybe your printer isn't one that requires using non open source code but it nonetheless may be part of the problem you are having with FreeBSD.  It's even possible FreeBSD has asked for clarity and an updated list from HP of which printers require the agreement to a non open source license and hasn't got it, I'm not sure.  I personally don't like operating systems that would hide from me that I should have been prompted to read an agreement and had the option to decline it or not and just assume I will accept it because its just another ignore the text and click OK prompt.

https://developers.hp.com/hp-linux-imaging-and-printing/IsHPLIPLicensed.html


----------



## sidetone (Feb 16, 2018)

scottro 's post is correct. I remember that I had to set it up as root to get HPLIP to work. I either used the Command Line Interface (CLI) as root, or I logged into the root desktop account (which is not recommended) to make it work. After that, I was able to use it without using root to start it up.

Another problem I had with HPLIP, which doesn't appear to be your problem is, I had to remove all derivatives of ghostscript's drivers, set the options right, then compile it so that the right drivers would be included. That was trial and error, until the right port with the correct set of drivers installed.


----------



## sidetone (Feb 16, 2018)

I was wondering, what the settings were so that HPLIP/CUPS/ULPT/driver can access configuration without needing to perform set up as root.

I was thinking in terms of /etc/group, and setting `devfs_system_ruleset="localrules"` in /etc/rc.conf to use /etc/devfs.rules, devfs.rules(5).

I haven't tried this when I did have my printer set up, and I'm not setting up my printer now.


----------



## scottro (Feb 16, 2018)

I forgot to mention that, but I'm almost sure that I did have to use sudo or su to use CLI.  Thanks for reminding me.


----------



## jssd (Jul 13, 2020)

Having the exact same problem as dhenzler, over 2 years later in 12.1-STABLE:  The GUI will not accept my PPD file selection.  Anyone have any luck?


----------



## xxvikxx (Jul 22, 2020)

I have been out of FreeBSD land for awhile, but I've had the same problem in Linux using hplip 3.19.12.  Solution:

run hp-setup -g and look for a line like this: hp-setup[5160]: debug: Cache miss: hp_colorlaserjet_mfp_m178-m181
exit setup
find the models.dat file (in linux it's under /usr/share/hplip/data/models/models.dat).  make a backup of the file.
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]
re-run hp-setup and see if it finds the printer.
got this from here: https://bugs.archlinux.org/task/64801


----------



## jssd (Jul 23, 2020)

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".


----------



## xxvikxx (Jul 24, 2020)

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.


----------



## xxvikxx (Jul 24, 2020)

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 Developers Portal | Plugins
		


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


----------



## jssd (Jul 29, 2020)

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

```
cupsd_enable="YES"
```
and then started the cupsd service manually

```
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:

```
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:

```
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:


```
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.


----------



## xxvikxx (Aug 11, 2020)

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.


----------

