Some bugs and fixes for HPLIP 3.20.6

Bug #1891736 reported by Andy Power
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned

Bug Description

I recently purchased an HP Color LaserJet Pro MFP M479fdw and have been trying to get it to work on Linux (Ubuntu 18.04). The hp-setup app has caused me a lot of problems.

First, a lot of the python scripts (hp-setup and others) won't execute due to a "permission denied" error. I traced it back to the hplip AppArmor settings (since if I rename the script it works and the kernel long shows an AppArmor error message if I don't). The relevant kernel log excerpt:

  audit: type=1400 audit(XXXXXXXX.XXX:XXX): apparmor="DENIED" operation="exec" profile="/usr/share/hplip/sendfax.py" name="/usr/bin/python" pid=8721 comm="sendfax.py" requested_mask="x" denied_mask="x" fsuid=1000 ouid=0

I don't know AppArmor syntax so I don't have a fix for this.

Second, I found a bug in base/utils.py. In particular line 2175:

    dst_data = dst_data+ src_data[index:buf_len+index+2]

should instead be:

    dst_data = dst_data+ src_data[index+2:buf_len+index+2]

so that you also skip past the /n/r after the hex value for the next chunk size. As it was, an XML tag was being broken in half which broke the parsing and hence hp-setup.

In the end, all of this was just to figure out the printer's IP address, which I knew already as I had set it from the printer's console! It would have been nice if I had an option to just enter the IP address at the setup dialog when it is asking to configure, rather than requiring me to hook up the USB cable (the Windows installer does not require that step) and go about trying to figure it out.

Unfortunately, this did not set up the scanner, nor indicate how to set it up. So I ran hp-scan, but it failed because I had not installed the hplip-3.20.6-plugin package - the reason being is that none of hp-setup, the hplip page (https://developers.hp.com/hp-linux-imaging-and-printing/gethplip) and the hplip install instructions (https://developers.hp.com/hp-linux-imaging-and-printing/install/install/index) indicated one should do that.

After installing that, it finally worked.

However, it took about 12 hours figuring this all out. I hope you can improve your Linux support, mostly just by updating the instructions (e.g. pointing out that you can just add the IP address as an argument to hp-setup instead of going through the USB cable hassle on the install instructions page, and noting that some scanners require the plugin package) and fixing the utils.py bug, but also improving the hp-setup UI would be great.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.