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


All times are GMT -5. The time now is 05:25 PM.