You are not logged in.

#1 2016-10-20 08:37:10

Registered: 2016-10-15
Posts: 54

[SOLVED] hplip and LaserJet 1020 issues

I have created this topic not to ask for help, but rather give help, because I spent hours trying to make it work on my system and I know that lots of people still use the good old LJ1020 and have lots of problems with making them work correctly. Se lets begin the topic and excuse me if it is not correctly placed ( ͡° ͜ʖ ͡°)

Let's start with my current system:

4.8.2-1-ARCH #1 SMP PREEMPT it's pretty fresh and up to date.

First, some "hi-tech" info about this printer, so you can understand how it works. The printer is connected to the USB and every single time it is turned on it waits for the firmware to be uploaded giving device IDs to the workstation. The workstation's kernel first recognizes the device by ID and activates program which uploads firmware to the device and the proper cups driver/ppd is responsible for the communication with the device. If the printer is unplugged or restarted the workstation has to recognize the device and send the firmware once again. From my observation I can tell if the firmware is uploaded and wrong driver gets the communication then the printer stops sending device IDs and is not recognized by the kernel no more.
So, first I tried to install the `hplip` package and I used `sudo hp-setup -i` and for first few minutes the printer worked and after few hours it stopped responding and `system-config-printer` reported that it is unplugged. So I went to to `journalctl` and I found some of these messeges:

/hp-testpage[4566]: io/hpmud/musb.c 153: unable get_string_descriptor -7: Resource temporarily unavailable
/hp-testpage[4566]: io/hpmud/musb.c 605: invalid product id string ret=-7
/hp-testpage[4566]: io/hpmud/musb.c 1150: unable to open hp:/usb/HP_LaserJet_1020?serial=XXXXXXX
/hp-testpage[4566]: [4566]: error: Unable to communicate with device (code=12): hp:/usb/HP_LaserJet_1020?serial=XXXXXXX
/hp-testpage[4566]: hp-testpage[4566]: error: Unable to print to printer. Please check device and try again.

So I took the wiki and tried most of tricks with`hplip` and none of them helped. Then I started playing with `foomatic` packages from pacman repository - and no changes to the above. Then I found out that there is a package named `foo2zjs` in AUR repository, so I installed it without touching `hplip`. One thing has changed - after every printer restart I could see that foo2zjs is trying to upload the firmware to the printer, but every time `journalctl` reported an error at the end:

/usr/bin/foo2zjs-loadfw[3858]: loading HP LaserJet 1020 firmware /usr/share/foo2zjs/firmware/sihp1020.dl to /dev/usb/lp3 ...
udev-configure-printer[3850]: add usb-002-016
udev-configure-printer[3850]: device devpath is /devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.2/2-3.2.2
udev-configure-printer[3850]: MFG:Hewlett-Packard MDL:HP LaserJet 1020 SERN:- serial:XXXXXXX
kernel: usblp3: removed
/usr/bin/foo2zjs-loadfw[3872]: ... download successful.
udev-configure-printer[3850]: no corresponding CUPS device found
kernel: usbcore: deregistering interface driver usblp

So, if there was a movement forward after trying `foo2zjs` then I started experimenting and I finished with this...

"The solution for having LaserJet 1020 to work properly on Arch"
1. Forget about `hplip` package - it is useless, it will work until first printer restart, unplug & plug or desktop reboot. The hplip driver has some problems with the communication after sending the firmware to the device once again and in the system it will be reporting that printer is unplugged. In the end it will throw exceptions and wrong exit codes and you will have to deal with udev rules and other unwanted stuff. So uninstall it with `pacman -R hplip` and corresponding dependencies if you installed them as well.

2. After uninstalling `hplip` reboot the system or not if you know which CUPS services should be restarted - still the easiest and safest way is to reboot system.

3. Install `foo2zjs` from AUR if you do not have it already and also I have below foomatic and cups packages installed (they might occur useful, I don't know which in particular is required but it's better to have them all and does not cost much):
- extra/cups-filters
- extra/foomatic-db-engine
- extra/foomatic-db-gutenprint
- extra/foomatic-db-gutenprint-ppds
- extra/foomatic-db-nonfree
- extra/foomatic-db-nonfree-ppds
- extra/foomatic-db-ppds
Do not install `extra/foomatic-db` because it will replace `foo2zjs`. If you will have problems such as dependencies then uninstall `foo2zjs`, install these packages first and install `foo2zjs` after.
Also remember that `foo2zjs` and `hplip` should not exist on the system at once because `foo2zjs` will atempt to send firmware whilst `hplip` will attempt to make the communication or sometimes it will be the other way round.

4. Also recommended way is to install `system-config-printer` with `pacman -S system-config-printer` if you have the GTK environment like me or `print-manager` if you have QT.

5. Install the printer with `system-config-printer` or `print-manager` or CUPS web interface, either way your LJ1020 connected to USB should be recognized right away and the recommended ppd from database is named `HP LaserJet 1020 Foomatic/foo2zjs-z1`. Give your printer name, description and location, save the configuration and it should work like a dream. If it is not recognized or recognized as "unknown" or some other USB device then make sure you have removed all `hplip` packages and rebooted system or restarted CUPS.

With this solution you do not have to deal with udev rules and do other tricks. Every time the printer is turned on, system is rebooted or the device is unplugged and plugged again the foo2zjs will attempt to upload firmware to the printer and PPD installed will be responsible for the communication with the printer. I hope it will help someone...

Last edited by Inixi (2016-10-20 08:40:14)

2020 ASUS Zephyrus G14


#2 2016-10-20 14:24:41

From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,132

Re: [SOLVED] hplip and LaserJet 1020 issues

Nice job.  Could I encourage you to roll that information into the wiki?

I have this printer -- it is a nice little laser printer. As I always work with a laptop, I keep the printer attached to my wife's Window 10 Desktop with WOL which acts as the print server.  The foo2zjs drivers work well over Samba; of course Windows gets the job of uploading the firmware smile

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
How to Ask Questions the Smart Way


#3 2018-05-30 22:05:22

Registered: 2016-06-06
Posts: 200

Re: [SOLVED] hplip and LaserJet 1020 issues

At the time of this writing the AUR has only foo2zjs-nightly. Further, to the best of my knowledge, foo2zjs-nightly and hplip are mutually exclusive in the sense that each support different devices. Either a printer is supported by hplip, or by foo2zjs-nightly.
In my case, I have two devices. One that is supported by foo2zjs-nightly, and the other supported by hplip. Which is why lnixi@message #1 solution to remove hplip can't solve the collision between hplip and foo2zjs-nightly for me. What I did is:

# cp /usr/lib/udev/rules.d/56-hpmud.rules /etc/udev/rules.d/56-hpmud.rules
# sed -i '2a\# Hewlett-Packard DeskJet F300 Series\
ATTR{idVendor}!="03f0", GOTO="hpmud_rules_end"\
ATTR{idProduct}!="5511", GOTO="hpmud_rules_end"\
' /etc/udev/rules.d/56-hpmud.rules

Where one will probably want to replace `F300 Series' and `5511' from the above lines with what is suitable for his model. These lines designate the rest of the hplip file to the specific single hplip device that one owns. The other way around, namely dealing with a foo2zjs-nightly device when an hplip device had to be dealt with, doesn't happen in the first place.

Last edited by regid (2018-05-30 22:17:29)

pantum-p1000-p2000-p3000-m5100-m5200-ppd-driver (AUR): PPDs, drivers, for Pantum P1000, P2000, P3000, M5100, M5200 printers.
powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.


#4 2018-05-31 07:26:57

Forum Moderator
Registered: 2012-10-16
Posts: 18,732

Re: [SOLVED] hplip and LaserJet 1020 issues

Thanks for sharing, however this has only tangential relevance to OP at hand and it has been 2 years

Please don't necrobump in the future. … bumping.22


Last edited by V1del (2018-05-31 07:27:39)


Board footer

Powered by FluxBB