LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   latest hplip on current64 (https://www.linuxquestions.org/questions/slackware-14/latest-hplip-on-current64-4175581023/)

reclusivewriter 05-30-2016 08:00 AM

latest hplip on current64
 
I know there have been some recent threads on hplip on current64, and I've been following those for the simple reason that the last few versions on current are broken, at least as far as the instructions on HP's website is concerned.

I'd like to use it, but I can't, because I need a firmware download and hp-setup can't find it. It's trying to use something called the "old algorhythm" and the cue never installs.

The version before this, I could download the plugins as a user, run hp-setup in a gui, and it would install the drivers. This version just didn't, and failed with the error I described above.

The version in 14.1 just works. hp-setup -i [printer address] as root does exactly what it's supposed to. In current, that workflow hasn't worked on my rig for quite a while, and downloading the drivers beforehand doesn't help.

Without casting blame or pointing fingers, I would like to point out that I've never had a problem on other distros with hplip. hp-setup -i in a terminal as root does the job. I get it that HP doesn't consider Slack a supported distro, but what I don't know is what these other distros are doing that Slack doesn't. I don't have the chops to even start debugging the problem.

Fortunately, for my p1102w, I can use foo2zjs and it works a treat. I'd prefer to use hplip, but if I can't, I can't. I have a sneaking suspicion that the newer versions require a dependency that we don't have to work properly. The program builds and installs, but the problem doesn't manifest until you try to use it to install the print cue.

(As an aside, I get the same behavior with foo2zjs if I try to build it with a SlackBuild. It builds and installs, but it never installs the ppd's. I have yet to find a SB that builds a working package with the latest versions, and I have to do the make/make install tango. I'm wondering if there isn't something related in the two programs that would help find the problem.)

I'm not sure how much this report helps, (I'm guessing not much.) and maybe there's just something in the instructions specific to Slack that I don't get, but I did want to put this out there for whatever value it may have.

Toutatis 05-30-2016 11:13 AM

My HP P1102 works very well with hplip. But it is true that the gui does not work.
I use "hp-plugin" (as root) and the plugins are installed. After that CUPS, by opening http://localhost:631/admin.
I never used "hp-setup".

reclusivewriter 05-30-2016 11:34 AM

Quote:

Originally Posted by Toutatis (Post 5553064)
My HP P1102 works very well with hplip. But it is true that the gui does not work.
I use "hp-plugin" (as root) and the plugins are installed. After that CUPS, by opening http://localhost:631/admin.
I never used "hp-setup".

I seem to remember trying that and it not working, but now I'm going to have to try again with the latest and see what happens.

kingbeowulf 05-30-2016 02:00 PM

I had a thread on this a while back. Something odd happened after hplip-3.14.10 or so that I haven't yet had time to figure out. I have 2 HP printers: Officejet Pro 8620 (no plugin needed); laserjet Pro M1212nf (plugin needed). On 14.1 all was fine. The GUI and HP CLI tools setup both printers. In -current, hp-setup could not find the correct driver or plugin. The workaround (see link below), was to install via CUPS using the URI from hp-makeuri. Then both HP device Manager, hp-plugin, etc worked. Note that CUPS doesn't give you the correct "hp:/net/..." URI option that hplip needs in order to work.

http://www.linuxquestions.org/questi...1/#post5480105

I haven't tested the newer hplip-3.16.5 since, once set up, upgradepkg works ok. You just have to run the hp-plugin tool (or click on "Install Required plugin in HP Device Manager).

reclusivewriter 05-30-2016 02:22 PM

hp-makeuri seems to be the piece I was missing. I either didn't see or didn't register that step in the older threads when I tried before. I may try re-installing hplip and seeing if that makes any difference.

I just wonder why all these extra steps are necessary now when they weren't before.

kjhambrick 05-30-2016 04:20 PM

Launfal --

I wonder if there's a missing daemon for hplip that's become necessary since systemd came along ?

I.E. I wonder if slackware current might need an /etc/rc.d/rc.hplip script ?

-- kjh

These are the systemd services in all packages:

Code:

# grep '/systemd/.*\.service$' /var/log/packages/* |grep -v 'SBo:'

/var/log/packages/gvfs-1.26.3-x86_64-1:usr/lib/systemd/user/gvfs-afc-volume-monitor.service
/var/log/packages/gvfs-1.26.3-x86_64-1:usr/lib/systemd/user/gvfs-daemon.service
/var/log/packages/gvfs-1.26.3-x86_64-1:usr/lib/systemd/user/gvfs-gphoto2-volume-monitor.service
/var/log/packages/gvfs-1.26.3-x86_64-1:usr/lib/systemd/user/gvfs-metadata.service
/var/log/packages/gvfs-1.26.3-x86_64-1:usr/lib/systemd/user/gvfs-mtp-volume-monitor.service
/var/log/packages/gvfs-1.26.3-x86_64-1:usr/lib/systemd/user/gvfs-udisks2-volume-monitor.service
/var/log/packages/hplip-3.16.5-x86_64-1:usr/lib/systemd/system/hplip-printer@.service
/var/log/packages/wicd-1.7.4-x86_64-2:lib/systemd/system/wicd.service

I've disabled NetworkManager and I installed wicd and I do have /etc/rd.d/rc.wicd but nothing for gvfs nor hplip ...

Then, this is the content of /usr/lib/systemd/system/hplip-printer@.service:

Code:

# cat /usr/lib/systemd/system/hplip-printer@.service

[Unit]
Description=Configure HP Plugged-In Printer

[Service]
ExecStart=/usr/bin/python /usr/bin/hp-config_usb_printer "%i"

and this is /usr/bin/hp-config_usb_printer

Code:


# ls -la /usr/bin/hp-config_usb_printer

lrwxrwxrwx 1 root root 36 May  5 10:28 /usr/bin/hp-config_usb_printer -> ../share/hplip/config_usb_printer.py*

and finally /usr/share/hplip/config_usb_printer.py:

Code:


# ls -la /usr/share/hplip/config_usb_printer.py

-rwxr-xr-x 1 root root 7148 May  4 14:21 /usr/share/hplip/config_usb_printer.py


reclusivewriter 05-30-2016 04:35 PM

^ Now that's interesting, and not even something I would have known to look for. Looking at those hooks, it sure looks like systemd is supplying some kind of notification service for the printers, which might explain why even the newer versions work right on distros like Debian and Fedora.

kjhambrick 05-30-2016 05:12 PM

Quote:

Originally Posted by Launfal (Post 5553192)
^ Now that's interesting, and not even something I would have known to look for. Looking at those hooks, it sure looks like systemd is supplying some kind of notification service for the printers, which might explain why even the newer versions work right on distros like Debian and Fedora.

I was wondering several months back, how are Pat and the team dealing with some newer programs that have been modified for systemd and I stumbled on these '.service files' ...

Looking further though, there is a udev rule for USB printers:

Code:


# ls -la /lib/udev/rules.d/*hp*

-rw-r--r-- 1 root root 921 May  4 14:21 /lib/udev/rules.d/56-hpmud.rules

That rule does invoke the `/usr/bin/hp-config_usb_printer` python script so this looks like a red herring unless systemd provides something that udev does not ...

-- kjh

Code:

# cat /lib/udev/rules.d/56-hpmud.rules

# HPLIP udev rules file. Notify console user if plugin support is required for this device.

ACTION!="add", GOTO="hpmud_rules_end"
SUBSYSTEM=="ppdev", OWNER="root", GROUP="lp", MODE="0664"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GOTO="hpmud_usb_rules"
GOTO="hpmud_rules_end"

LABEL="hpmud_usb_rules"

ENV{ID_USB_INTERFACES}=="", IMPORT{builtin}="usb_id"

# ENV{ID_HPLIP}="1" is for Ubuntu udev-acl
ATTR{idVendor}=="03f0", ENV{ID_USB_INTERFACES}=="*:0701??:*|*:08????:", OWNER="root", GROUP="lp", MODE="0664", ENV{libsane_matched}="yes", ENV{hp_test}="yes", ENV{ID_HPLIP}="1"

# This rule will check the smart install feature, plugin status and firmware download for the required printers.
ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c '/usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM}'"

LABEL="hpmud_rules_end"


reclusivewriter 05-30-2016 08:47 PM

I think you're right about the red herring, because the system knows the printer is there. The fault is somewhere between the download of the ppd and the installation of the cue.

I'm due for a reinstall anyway, so I uninstalled foo2zjs and reinstalled hplip.

1. makeuri -i 192.168.1.65 --> generates the CUPS URI
2. hp-plugin
3. hp-setup -i [CUPS URI] / select net / No PPD found using old algorhythm (unable to find an appropriate ppd file) --> This is where the old versions just worked with the old IP address.
4. elinks http://localhost:631 / select generic HP option (selecting the specific model doesn't let me choose a connection address) / enter CUPS URI
5. Fill in model/location information / select continue
6. Select make and model from the next two screens / hit continue
7. Select hpijs option for my model (p1102w) / hit add printer / hit select default options
8. Maintainance/Print Test Page/Go --> job stopped because "Filter failed"

My system knows that the printer's there. It even knows it's there with the old IP address. It's the software itself that can't seal the deal and install the print cue with the correct ppd. HP broke something since the version in 14.1 and the other distros must be doing/installing/fixing something that makes it work for them and not work for us. I just don't know what it is.

kjhambrick 05-31-2016 12:31 AM

1 Attachment(s)
launfal --

I 'found' this page at the hplip site:

http://hplipopensource.com/hplip-web...slackware.html

I wondered if the problem with the 14.2 / Current build of hplip is because the configure options in step 4 say:

Code:


--with-hpppddir=/usr/share/ppd/HP        # hplip recommendation

# vs

--with-hpppddir=/usr/share/cups/model/HP # 14.2 SlackBuild setting

So I tried it out via the KDE System Tray GUI ( I did not try the manual steps you listed above )
Code:

1. built a custom hplip using the attached SlackBuild  ... clean build ( diffs are below )
2. removepkg  hplip-3.16.5-x86_64-1                    ... there were a few warnings about 'stuff' left behind by python ...
3. installpkg hplip-3.16.5-x86_64-2kjh.txz            ... installed fine

4. added my wife's HP OfficeJet Pro via the KDE GUI    ... it worked.  there are new printer and FAX ppd files in /etc/cups/ppd/
5. printed a test page via the KDE GUI                ... it worked ( the KDE GUI has never worked for me on 14.2 before now )

Here's the cups ppd directory:

Code:

# ls -la /etc/cups/ppd
total 500
drwxr-xr-x 2 root lp  4096 May 30 23:42 ./
drwxr-xr-x 5 root lp  4096 May 30 23:43 ../
-rw-r----- 1 root lp 154481 May 30 23:42 HP_Officejet_Pro_X476dn_MFP.ppd
-rw-r----- 1 root lp  2651 May 30 23:42 HP_Officejet_Pro_X476dn_MFP_fax.ppd
-rw-r----- 1 root lp  15199 Feb 14 06:12 MelHP.ppd
-rw-r----- 1 root lp  15199 Feb 14 06:11 MelHP.ppd.O
-rw-r----- 1 root lp 154508 Feb 14 05:42 sahhp.ppd
-rw-r----- 1 root lp 154507 Feb 14 05:41 sahhp.ppd.O

YMMV but this worked for me ...

-- kjh

These are the SlackBuild diffs
Code:

# diff -Naur hplip.SlackBuild~01 hplip.SlackBuild

--- hplip.SlackBuild~01 2015-09-15 12:18:54.000000000 -0500
+++ hplip.SlackBuild    2016-05-30 23:47:26.807697618 -0500
@@ -25,7 +25,7 @@
 
 PKGNAM=hplip
 VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2kjh}
 
 NUMJOBS=${NUMJOBS:-" -j7 "}
 
@@ -77,6 +77,8 @@
 CFLAGS="$SLKCFLAGS" \
 CXXFLAGS="$SLKCFLAGS" \
 ./configure \
+  --with-hpppddir=/usr/share/ppd/HP \
+  --enable-doc-build                \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --with-cupsbackenddir=/usr/lib${LIBDIRSUFFIX}/cups/backend \
@@ -86,7 +88,6 @@
  --docdir=/usr/doc/hplip-$VERSION \
  --with-docdir=/usr/doc/hplip-$VERSION \
  --with-htmldir=/usr/doc/hplip-$VERSION/html \
-  --with-hpppddir=/usr/share/cups/model/HP \
  --with-drvdir=/usr/share/cups/drv/hp \
  --enable-hpijs-install \


reclusivewriter 05-31-2016 05:05 AM

We have a winner. hp-setup from the command-line still fails, even after running hp-plugin, but what worked was running hp-plugin, then hp-setup. Hit the buttons, and the driver installed and the test-page printed.

When I do a reinstall, I'll just run hp-setup without hp-plugin and see if that works as well, but for now it sure looks like you've solved the mystery.

Manual installation still fails, but nothing's perfect.

reclusivewriter 05-31-2016 05:52 AM

We have a winner
 
^^ As far as I can tell, you fixed it. Fresh install of current, running the gui from a terminal window downloads and installs the ppd and print cue properly. I run evilwm, so I don't have a system tray and it complains about that, but that's a niggle.

As far as I can see, the problems's been solved, and I'm going to mark it that way.

I put a link to here in the current-requests thread to maybe get it fixed for everybody.

Thanks for taking the time.

kjhambrick 05-31-2016 06:02 AM

Y.W. Launfal.

It bothered me that the KDE hp Tray icon didn't work and I wanted them to work so I could occasionally use my wife's color MFP ...

I pulled an end-around and set up my her OfficeJet ProX476 by printing remotely via cups thru a CentOS box in my Lab where hplip was working.

Didn't help with FAX or SCAN but I rarely do those things.

I've not tested it yet but it looks like FAX and SCAN are both 'there' for the testing now.

Curious ...

What did you mean when you said hp-setup still fails from the commandline ?

-- kjh

TarFile 05-31-2016 03:31 PM

Well I have tried everything and still can't get my HP DeskJet 3511 to work with current. CUPS sees it but the print job fails with a filter failed Status Message.

Works fine on 14.1.

I hope this gets sorted out but it may will be the HP stuff.

kjhambrick 05-31-2016 04:05 PM

Quote:

Originally Posted by TarFile (Post 5553642)
Well I have tried everything and still can't get my HP DeskJet 3511 to work with current. CUPS sees it but the print job fails with a filter failed Status Message.

Works fine on 14.1.

I hope this gets sorted out but it may will be the HP stuff.

TarFile --

Are you running the stock Slackware Current hplip ?

If so, give it a day or so, there may be an update released by Slackware Development Team.

-- kjh

volkerdi 05-31-2016 04:19 PM

Quote:

Originally Posted by kjhambrick (Post 5553662)
TarFile --

Are you running the stock Slackware Current hplip ?

If so, give it a day or so, there may be an update released by Slackware Development Team.

-- kjh

There already has been an update. Thanks again!

TarFile 05-31-2016 04:52 PM

Interesting I have been keeping up to date with current but I will check and see. But unless that is as of today I already have the most recent.

kjhambrick 05-31-2016 05:02 PM

Quote:

Originally Posted by TarFile (Post 5553685)
Interesting I have been keeping up to date with current but I will check and see. But unless that is as of today I already have the most recent.

Sorry TarFile.

I wasn't clear.

I believe Pat and the Developer Team will be releasing a new build of hplip in the next day-or-two.

There's nothing out there yet.

Edit: Oops I spoke too soon

a new version of hplip and more is out there 'now'

-- kjh

TarFile 05-31-2016 05:08 PM

Actually there is an update as of today. It works with CUPS now but the HP setup still does not work for me. I had problems with it on 14.1 and had to try several times until it finally worked. Not sure exactly what is going on but this is better than nothing. I will see if it will load the scanner and fax stuff under cups. The printer does not show up in the HP device manager.

reclusivewriter 05-31-2016 05:24 PM

Quote:

What did you mean when you said hp-setup still fails from the commandline ?

-- kjh
hp-setup -i 192.168.1.65 still fails as it always has with the can't find ppd message I quoted earlier. I had to download the ppd's and install the print cue from the gui.

It would be nice if the command-line setup worked again, since it was less hassle, but this is certainly more than good enough.

TarFile 05-31-2016 05:37 PM

Hum you mean from the hp-setup gui or from CUPS? I get error: Printer queue setup failed. Error : successful-ok-ignored-or-substituted-attributes from either the command line or the hp-setup. hplip does not work but CUPS does I get the CUPS Printer Test Page when I tell it to print a test page. It shows up as a valid printer in the KDE system settings. Nothing on the HP side works for me. It shows up as HP Deskjet 3510 Series, hpcups 3.16.5 in the KDE Printers - System Settings.

reclusivewriter 05-31-2016 10:12 PM

The new version works here
 
Zero problems here with Pat's updated version, except for the command-line errors I noted before. Running the hp-setup gui does exactly what it's supposed to do and printing here is fine. I can even print from vim now with the stock :ha which I haven't been able to do since 14.1.

kjhambrick 06-01-2016 05:17 AM

Interesting ...

I removed the FAX and Paper printers I set up via the GUI.

And then added them back using: hp-setup -i 192.168.1.5

I was logged into KDE as a 'regular user' but then I ran hp-setup from a Konsole where I had become root via: su -

It worked with and without the firewall turned on.

edit Another tidbit: I am running Current with Alien's multilib which I keep up-to-date via his massconvert.sh script

I am stumped ...

-- kjh

Code:

[root@kjhlt6 rc.d]# lpstat -t
scheduler is running
system default destination: MelHP
device for HP_Officejet_Pro_X476dn_MFP: hp:/net/HP_Officejet_Pro_X476dn_MFP?ip=192.168.1.5
device for HP_Officejet_Pro_X476dn_MFP_fax: hpfax:/net/HP_Officejet_Pro_X476dn_MFP?ip=192.168.1.5
device for lp2pdf2email: ///dev/null
device for MelHP: smb://192.168.0.88/MelHP
device for sahhp: socket://sahhp:9100
HP_Officejet_Pro_X476dn_MFP accepting requests since Wed Jun  1 04:58:01 2016
HP_Officejet_Pro_X476dn_MFP_fax accepting requests since Wed Jun  1 04:57:19 2016
lp2pdf2email accepting requests since Sun Feb 14 07:22:51 2016
MelHP accepting requests since Sun May 29 07:46:51 2016
sahhp accepting requests since Sun Feb 14 05:42:43 2016
printer HP_Officejet_Pro_X476dn_MFP is idle.  enabled since Wed Jun  1 04:58:01 2016
        ready to print
printer HP_Officejet_Pro_X476dn_MFP_fax is idle.  enabled since Wed Jun  1 04:57:19 2016
printer lp2pdf2email is idle.  enabled since Sun Feb 14 07:22:51 2016
printer MelHP is idle.  enabled since Sun May 29 07:46:51 2016
printer sahhp is idle.  enabled since Sun Feb 14 05:42:43 2016

[root@kjhlt6 rc.d]# lpadmin -x HP_Officejet_Pro_X476dn_MFP_fax
[root@kjhlt6 rc.d]# lpadmin -x HP_Officejet_Pro_X476dn_MFP
[root@kjhlt6 rc.d]# hp-setup -i 192.168.1.5

HP Linux Imaging and Printing System (ver. 3.16.5)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

(Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)


Setting up device: hp:/net/HP_Officejet_Pro_X476dn_MFP?ip=192.168.1.5



---------------------
| PRINT QUEUE SETUP |
---------------------


Please enter a name for this print queue (m=use model name:'HP_Officejet_Pro_X476dn_MFP'*, q=quit) ?
Using queue name: HP_Officejet_Pro_X476dn_MFP
Locating PPD file... Please wait.

Found PPD file: lsb/usr/HP/hp-officejet_pro_476_576_series-ps.ppd.gz
Description:

Note: The model number may vary slightly from the actual model number on the device.

Does this PPD file appear to be the correct one (y=yes*, n=no, q=quit) ?
Enter a location description for this printer (q=quit) ?SAH Office on HOME LAN
Enter additonal information or notes for this printer (q=quit) ?

Adding print queue to CUPS:
Device URI: hp:/net/HP_Officejet_Pro_X476dn_MFP?ip=192.168.1.5
Queue name: HP_Officejet_Pro_X476dn_MFP
PPD file: lsb/usr/HP/hp-officejet_pro_476_576_series-ps.ppd.gz
Location: SAH Office on HOME LAN
Information:


-------------------
| FAX QUEUE SETUP |
-------------------


Please enter a name for this fax queue (m=use model name:'HP_Officejet_Pro_X476dn_MFP_fax'*, q=quit) ?
Using queue name: HP_Officejet_Pro_X476dn_MFP_fax
Enter a location description for this printer (q=quit) ?
Enter additonal information or notes for this printer (q=quit) ?

Adding fax queue to CUPS:
Device URI: hpfax:/net/HP_Officejet_Pro_X476dn_MFP?ip=192.168.1.5
Queue name: HP_Officejet_Pro_X476dn_MFP_fax
PPD file: /usr/share/ppd/HP/HP-Fax4-hpcups.ppd.gz
Location:
Information:

--------------------
| FAX HEADER SETUP |
--------------------


Would you like to perform fax header setup (y=yes*, n=no, q=quit) ?n

---------------------
| PRINTER TEST PAGE |
---------------------


Would you like to print a test page (y=yes*, n=no, q=quit) ? y
warning: hp-testpage should not be run as root/superuser.

HP Linux Imaging and Printing System (ver. 3.16.5)
Testpage Print Utility ver. 6.0

Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Printing test page to printer HP_Officejet_Pro_X476dn_MFP...
Test page has been sent to printer.

note: If an error occured, or the test page failed to print, refer to the HPLIP website
note: at: http://hplip.sourceforge.net for troubleshooting and support.


Done.

Done.

[root@kjhlt6 rc.d]# lpstat -t
scheduler is running
system default destination: MelHP
device for HP_Officejet_Pro_X476dn_MFP: hp:/net/HP_Officejet_Pro_X476dn_MFP?ip=192.168.1.5
device for HP_Officejet_Pro_X476dn_MFP_fax: hpfax:/net/HP_Officejet_Pro_X476dn_MFP?ip=192.168.1.5
device for lp2pdf2email: ///dev/null
device for MelHP: smb://192.168.0.88/MelHP
device for sahhp: socket://sahhp:9100
HP_Officejet_Pro_X476dn_MFP accepting requests since Wed Jun  1 05:04:40 2016
HP_Officejet_Pro_X476dn_MFP_fax accepting requests since Wed Jun  1 05:04:09 2016
lp2pdf2email accepting requests since Sun Feb 14 07:22:51 2016
MelHP accepting requests since Sun May 29 07:46:51 2016
sahhp accepting requests since Sun Feb 14 05:42:43 2016
printer HP_Officejet_Pro_X476dn_MFP now printing HP_Officejet_Pro_X476dn_MFP-42.  enabled since Wed Jun  1 05:04:40 2016
printer HP_Officejet_Pro_X476dn_MFP_fax is idle.  enabled since Wed Jun  1 05:04:09 2016
printer lp2pdf2email is idle.  enabled since Sun Feb 14 07:22:51 2016
printer MelHP is idle.  enabled since Sun May 29 07:46:51 2016
printer sahhp is idle.  enabled since Sun Feb 14 05:42:43 2016
HP_Officejet_Pro_X476dn_MFP-42 root            422912  Wed Jun  1 05:04:40 2016

[root@kjhlt6 rc.d]# lpstat -t
scheduler is running
system default destination: MelHP
device for HP_Officejet_Pro_X476dn_MFP: hp:/net/HP_Officejet_Pro_X476dn_MFP?ip=192.168.1.5
device for HP_Officejet_Pro_X476dn_MFP_fax: hpfax:/net/HP_Officejet_Pro_X476dn_MFP?ip=192.168.1.5
device for lp2pdf2email: ///dev/null
device for MelHP: smb://192.168.0.88/MelHP
device for sahhp: socket://sahhp:9100
HP_Officejet_Pro_X476dn_MFP accepting requests since Wed Jun  1 05:04:50 2016
HP_Officejet_Pro_X476dn_MFP_fax accepting requests since Wed Jun  1 05:04:09 2016
lp2pdf2email accepting requests since Sun Feb 14 07:22:51 2016
MelHP accepting requests since Sun May 29 07:46:51 2016
sahhp accepting requests since Sun Feb 14 05:42:43 2016
printer HP_Officejet_Pro_X476dn_MFP is idle.  enabled since Wed Jun  1 05:04:50 2016
        ready to print
printer HP_Officejet_Pro_X476dn_MFP_fax is idle.  enabled since Wed Jun  1 05:04:09 2016
printer lp2pdf2email is idle.  enabled since Sun Feb 14 07:22:51 2016
printer MelHP is idle.  enabled since Sun May 29 07:46:51 2016
printer sahhp is idle.  enabled since Sun Feb 14 05:42:43 2016


reclusivewriter 06-01-2016 06:04 AM

You're not going to believe this. I don't believe this. It's a locale issue. Check this out...

Running hp-setup -i 192.168.1.65 gives me the errors I've been talking about. This fixed it:

# export LANG=en
# hp-setup -i 192.168.1.65
it finds the ppd and offers to set up the cue.

It seems that cups sends out more detailed info about LANG than hp-setup can handle. So setting LANG to the plain language works. Why it craps out with such an arcane error message I can't answer.

That also doesn't explain why you're not getting the error and I am with the default LANG settings, but that's beyond my debugging capabilities.

NOW, at least in my case, this thread really IS solved.

[edit: clarify thread status for my situation]

kjhambrick 06-01-2016 06:54 AM

Dang !

I set LC_ALL=C in my local profile ( the way god intended ) :)

-- kjh

Code:

# cat /etc/profile.d/zzz-kjh-stuff.sh

#!/bin/sh
#
# kjh added these
#
PATH="/home/local/bin:$PATH:$HOME/bin"
PRINTER="MelHP"
LESS="-iXG -e -m -Pm ?f%f .?lbLine %lb of %L:?pb%pb\%:?bbByte %bb:-..."
MANPATH="/usr/local/share/man:${MANPATH}"    # CPAN Loads manpages here

LC_ALL=C

export PRINTER LESS LC_ALL

set -o vi
stty -echoctl


reclusivewriter 06-01-2016 07:43 AM

Aha! Last mystery solved!

Just for giggles, I left LANG alone and changed LC_COLLATE=C to LC_ALL=C in /etc/profile.d/lang.sh and reran hp-setup -i. That worked, too, and it found the ppd file just fine.

volkerdi 06-01-2016 11:41 AM

Perhaps this patch to setup.py would do the trick:

Code:

--- setup.py.orig        2016-05-31 12:50:07.000000000 -0500
+++ setup.py        2016-06-01 11:39:39.977051151 -0500
@@ -42,6 +42,8 @@
    pass
 
 
+# Set LC_ALL=C so that we can properly parse info from CUPS:
+os.environ["LC_ALL"] = "C"
 
 # Local
 from base.g import *


TarFile 06-01-2016 12:51 PM

The

export LANG=en

did the trick for me.

I was going to try the patch to setup.py but the source from HP leaves out most of the drivers including the one I need and I did not feel up to fixing the package from 05/31/16.

Well anyway that seems to be the problem and solution.

Thanks for the continued attention even though the OP got it working earlier.

kjhambrick 06-01-2016 12:58 PM

Quote:

Originally Posted by volkerdi (Post 5554065)
Perhaps this patch to setup.py would do the trick:
<<snip>>

Thank you Pat !

I created /usr/share/hplip/setup.py.patch ; created setup.py.orig ; applied the patch.

It worked fine for me after removing LC_ALL=C for the session.

That's a keeper !

It should fix Launfal's issue.

I wonder if it will also fix TarFile's issue ?

-- kjh

1. Apply the patch to /usr/share/hplip/setup.py

Code:


# cd /usr/share/hplip
# ls -la *setup.py

-rwxr-xr-x 1 root root  2628 May 31 12:50 faxsetup.py
-rwxr-xr-x 1 root root 38026 May 31 12:50 setup.py

# cp -p setup.py setup.py.orig      # make a clone
# vim setup.py.patch                # paste Pat's patch
# patch <setup.py.patch              # exec the patch
patching file setup.py

# diff -Naur setup.py.orig setup.py  # check the results

--- setup.py.orig      2016-05-31 12:50:07.000000000 -0500
+++ setup.py    2016-06-01 12:24:23.153282158 -0500
@@ -42,6 +42,8 @@
    pass
 
 
+# Set LC_ALL=C so that we can properly parse info from CUPS:
+os.environ["LC_ALL"] = "C"
 
 # Local
 from base.g import *

2. Test Pat's Patch ...

Code:


[konrad@kjhlt6 ~]$ su -

# vi /etc/profile.d/zzz-kjh-stuff.sh  # pound out LC_ALL=C
# exit

[konrad@kjhlt6 ~]$ su -

# env |grep LC
LC_COLLATE=C                          # check for Slackware-Standard LC_*

# lpstat -t |grep '^device'
device for HP_Officejet_Pro_X476dn_MFP: hp:/net/HP_Officejet_Pro_X476dn_MFP?ip=192.168.1.5
device for HP_Officejet_Pro_X476dn_MFP_fax: hpfax:/net/HP_Officejet_Pro_X476dn_MFP?ip=192.168.1.5
device for lp2pdf2email: ///dev/null
device for MelHP: smb://192.168.0.88/MelHP
device for sahhp: socket://sahhp:9100

# lpadmin -x HP_Officejet_Pro_X476dn_MFP_fax
# lpadmin -x HP_Officejet_Pro_X476dn_MFP
# hp-setup -i 192.168.1.5

HP Linux Imaging and Printing System (ver. 3.16.5)
Printer/Fax Setup Utility ver. 9.0

Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

(Note: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)


Setting up device: hp:/net/HP_Officejet_Pro_X476dn_MFP?ip=192.168.1.5



---------------------
| PRINT QUEUE SETUP |
---------------------


Please enter a name for this print queue (m=use model name:'HP_Officejet_Pro_X476dn_MFP'*, q=quit) ?
Using queue name: HP_Officejet_Pro_X476dn_MFP
Locating PPD file... Please wait.

Found PPD file: lsb/usr/HP/hp-officejet_pro_476_576_series-ps.ppd.gz
Description:

Note: The model number may vary slightly from the actual model number on the device.

Does this PPD file appear to be the correct one (y=yes*, n=no, q=quit) ?
Enter a location description for this printer (q=quit) ?SAH Office
Enter additonal information or notes for this printer (q=quit) ?

Adding print queue to CUPS:
Device URI: hp:/net/HP_Officejet_Pro_X476dn_MFP?ip=192.168.1.5
Queue name: HP_Officejet_Pro_X476dn_MFP
PPD file: lsb/usr/HP/hp-officejet_pro_476_576_series-ps.ppd.gz
Location: SAH Office
Information:


-------------------
| FAX QUEUE SETUP |
-------------------


Please enter a name for this fax queue (m=use model name:'HP_Officejet_Pro_X476dn_MFP_fax'*, q=quit) ?
Using queue name: HP_Officejet_Pro_X476dn_MFP_fax
Enter a location description for this printer (q=quit) ?SAH Office FAX
Enter additonal information or notes for this printer (q=quit) ?

Adding fax queue to CUPS:
Device URI: hpfax:/net/HP_Officejet_Pro_X476dn_MFP?ip=192.168.1.5
Queue name: HP_Officejet_Pro_X476dn_MFP_fax
PPD file: /usr/share/ppd/HP/HP-Fax4-hpcups.ppd.gz
Location: SAH Office FAX
Information:

--------------------
| FAX HEADER SETUP |
--------------------


Would you like to perform fax header setup (y=yes*, n=no, q=quit) ?n

---------------------
| PRINTER TEST PAGE |
---------------------


Would you like to print a test page (y=yes*, n=no, q=quit) ? y
warning: hp-testpage should not be run as root/superuser.

HP Linux Imaging and Printing System (ver. 3.16.5)
Testpage Print Utility ver. 6.0

Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Printing test page to printer HP_Officejet_Pro_X476dn_MFP...
Test page has been sent to printer.

note: If an error occured, or the test page failed to print, refer to the HPLIP website
note: at: http://hplip.sourceforge.net for troubleshooting and support.


Done.

Done.

# lpstat -o
HP_Officejet_Pro_X476dn_MFP-43 root            422912  Wed Jun  1 12:27:24 2016

# lpstat -t
scheduler is running
system default destination: MelHP
device for HP_Officejet_Pro_X476dn_MFP: hp:/net/HP_Officejet_Pro_X476dn_MFP?ip=192.168.1.5
device for HP_Officejet_Pro_X476dn_MFP_fax: hpfax:/net/HP_Officejet_Pro_X476dn_MFP?ip=192.168.1.5
device for lp2pdf2email: ///dev/null
device for MelHP: smb://192.168.0.88/MelHP
device for sahhp: socket://sahhp:9100
HP_Officejet_Pro_X476dn_MFP accepting requests since Wed Jun  1 12:27:35 2016
HP_Officejet_Pro_X476dn_MFP_fax accepting requests since Wed Jun  1 12:26:55 2016
lp2pdf2email accepting requests since Sun Feb 14 07:22:51 2016
MelHP accepting requests since Sun May 29 07:46:51 2016
sahhp accepting requests since Sun Feb 14 05:42:43 2016
printer HP_Officejet_Pro_X476dn_MFP is idle.  enabled since Wed Jun  1 12:27:35 2016
        ready to print
printer HP_Officejet_Pro_X476dn_MFP_fax is idle.  enabled since Wed Jun  1 12:26:55 2016
printer lp2pdf2email is idle.  enabled since Sun Feb 14 07:22:51 2016
printer MelHP is idle.  enabled since Sun May 29 07:46:51 2016
printer sahhp is idle.  enabled since Sun Feb 14 05:42:43 2016


TarFile 06-01-2016 01:25 PM

Well I patched the setup.py file in /usr/share/hplip and tried to add another queue but I got the same error. I also could not remove the old queue. I may have needed to

export LANG=en
not sure.

OK I just tried that and it let me delete the old queue but I could not add the printer queue back until I did the

export LANG=en

Well it all works for me that way not sure about the setup.py patch which seemed to have no effect on my end unless I did it wrong?

reclusivewriter 06-01-2016 03:50 PM

OK, assuming I'm testing it right, Pat's patch works here, too.

I commented out LC_ALL=C in /etc/profile/lang.sh to set the sorting rules back to en_US like they're supposed to be, applied Pat's patch (That's the first patch I've ever applied, ever, so thanks for making me learn how to do that, btw) and hp-setup -i 192.168.1.65 found the ppd and offered to set up the new printer cue.

so for the problems that I and others have had, it looks like we got 3 solutions to fix them:

1. export LANG=en before running hp-setup -i
2. export LC_ALL=C before running hp-setup -i
3. use Pat's patch on /usr/share/hplip/setup.py

Kudos and thanks to kjhambrick and Pat for taking the time to look at the problem and finding the answer.

volkerdi 06-01-2016 04:09 PM

Quote:

Originally Posted by Launfal (Post 5554197)
OK, assuming I'm testing it right, Pat's patch works here, too.

Awesome, thanks for testing it! Since I'm a bit of a Luddite, that's the only line of Python I've ever written.

kjhambrick 06-01-2016 04:35 PM

Thanks all !

I certainly learned a lot about hplip.

I never needed it before my wife got her MFP printer / FAX / scanner.

Now it all 'just' works for me.

Thanks again !

-- kjh

p.s. as for being a python luddite -- I am still a complete luddite having never written a single line of python code :)

reclusivewriter 06-01-2016 07:48 PM

OK, my final, final, super final last test:

Clean install of latest current, didn't touch any LANG or LC settings. I had backed up the patched setup.py, so all I did was copy that over to /usr/share/hplip and run hp-setup -i 192.168.1.65 and ...

it worked exactly the same way that I've come to expect from other distros. Found the printer, downloaded the ppd, setup the print cue and printed the test page. I finished it off with a lpoptions -d [printer] and Bob was my uncle. (A generic Bob, not THE Bob.)

So now this thread is finally, super-duper really solved, hopefully for the rest of forever.

kingbeowulf 06-10-2016 06:27 PM

Loooks like there were a couple of updates. I'll be doing a fresh -current install on a laptop and will see if that fixes this issue here.
Quote:

Thu Jun 2 19:08:13 UTC 2016
...
ap/hplip-3.16.5-x86_64-3.txz: Rebuilt.
Patched setup.py to set LC_ALL=C, which should fix parsing CUPS output.
...
+--------------------------+
Tue May 31 20:05:12 UTC 2016
...
ap/hplip-3.16.5-x86_64-2.txz: Rebuilt.
Recompiled with these changed paths:
--with-hpppddir=/usr/share/ppd/HP
--with-drvdir=/usr/share/cups/drv/HP
This matches what is expected for Slackware in the distros.dat file and is
hardcoded in core_install.py. Thanks to kjhambrick.
EDIT: I really need to refresh my browser pages more often....


All times are GMT -5. The time now is 06:47 PM.