Hp Laserjet 1018 doesn't work after reboot

Hi,
I’ve installed Fedora 32. Everything works well except Hp Laserjet 1018.

It works (I can print) after installation of hplip and hplip-gui (and related) packages. If I reboot my machine…it doesn’t work.

If I remove hplip and hplip-gui, reboot, then reinstall hplip and hplip-gui it works again but If i reboot…nothing again.

What’s wrong?

*lsusb:*
`Bus 001 Device 003: ID 03f0:4117 HP, Inc LaserJet 1018`
 *journalctl -u cups -e* 
    mag 16 11:05:26 localhost.localdomain hp[1929]: io/hpmud/musb.c 153: unable get_string_descriptor -7: Resource temporarily unavailable
    mag 16 11:05:26 localhost.localdomain hp[1929]: io/hpmud/musb.c 605: invalid product id string ret=-7
    mag 16 11:05:26 localhost.localdomain hp[1929]: io/hpmud/musb.c 1151: unable to open hp:/usb/HP_LaserJet_1018?serial=KP0936V
    mag 16 11:05:26 localhost.localdomain hp[1929]: prnt/backend/hp.c 825: INFO: open device failed stat=12: hp:/usb/HP_LaserJet_1018?serial=KP0936V; will retry in 30 seconds...

Edit:

*hp-plugin-i*
------------------------
| DOWNLOADING FIRMWARE |
------------------------

Downloading firmware to device hp:/usb/HP_LaserJet_1018?serial=KP0936V...
error: Unable to communicate with device (code=12): hp:/usb/HP_LaserJet_1018?serial=KP0936V
error: unable to open channel
error: Unable to communicate with device (code=12): hp:/usb/HP_LaserJet_1018?serial=KP0936V
error: unable to open channel
error: Channel write error
error: An error occured: Device I/O error

Edit: hp-check command gives me a lot of warning, but these two caught my attention:

Status Types:
    OK
    MISSING       - Missing Dependency or Permission or Plug-in
    INCOMPAT      - Incompatible dependency-version or Plugin-version

warning: 5-32 version is not supported. Using 5-31 versions dependencies to verify and install...
-----------------------
| HPLIP CONFIGURATION |
-----------------------

HPLIP-Version: HPLIP 3.20.3
HPLIP-Home: /usr/share/hplip
warning: HPLIP-Installation: Auto installation is not supported for 5 distro  32 version

Edit 2: I’ve tried to manually install hplip 3.20.5 upstream, but the printer doesn’t work. Same happen if I disable SELinux.

Solved! :grinning:

Hp Laserjet 1018 (and maybe hp 1020) needs foo2zjs driver downloaded from http://foo2zjs.rkkda.com/.

I don’t know if there is a bug in upstream hplip (downloaded from fedora repository or directly from hplip website), but it doesn’t print after a reboot. Even if you install foo2zjs from Fedora repository the printer doesn’t work.

So, these are the right steps:

  1. Remove all hplip packages
  2. Remove system-config-printer-udev
  3. Temporay disable SELinux (set it to permissive)
  4. Remove kde-print manager (if you use Kde spin) or system-config-printer (if you use Gnome)
  5. Reboot and keep printer switched off
  6. Download and install foo2zjs and follow the instructions in the website (or below)
wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz
tar zxf foo2zjs.tar.gz
sudo dnf install tix foomatic\* kde-print manager # replace kde-print manager with system-config-printer if you use Gnome)
grep udev-configure-printer /var/log/messages /var/log/messages:Jan 23 07:32:54 dual udev-configure-printer: \invalid or missing IEEE 1284 Device ID

After reboot:

cd foo2zjs
make
./getweb 1018 #replace this number with your model number, eg. ./getweb 1020 for Laserjet 2020
sudo make install
make install-hotplug
  1. Switch on printer
  2. Open Kde print manager or system-config-printer if you use Gnome
  3. Add new printer and select Foomatic/foo2zjs-z1 driver
  4. Re-enable SELinux
  5. Reboot

That’s all folks. :partying_face:

Sources:
I am unable to install my printer HP laserjet 1020

It may be worth filing a bug in bugzilla.
Every file that was installed when SELinux was disabled won’t have the right context and if you ever need to relabel your filesystem, you are likely to encounter problems.

Sorry but I’m new to Fedora and SELinux and I don’t understand what you said. Did I make some wrong steps? Installing Hplip or foo2zjs from Fedora repositories or hplip from official website didn’t work. The only way was to manually install foo2zjs.

Thanks.

Since the foo2zjs package exists in the official repositories, it would be ideal if it worked with your printer model. You should file a bug on the package explaining your situation and what you did to get it working. Do not forget to include the identifier of the device on the bus, ID 03f0:4117 HP, Inc LaserJet 1018.

Depending on how you accomplished that (i.e. was it actually disabled, or was it switched from enforcing to permissive?), you may run into trouble:

Disabled mode is strongly discouraged; not only does the system avoid enforcing the SELinux policy, it also avoids labeling any persistent objects such as files, making it difficult to enable SELinux in the future.

Source, section 1.4.

Ok, I’ll do it.

I temporary switched to permissive. Was this wrong? Thanks.

In that case, you should be ok. Out of curiosity, did you encounter any problems with SELinux set to enforcing?

No, any problems with SELinux but I I thought was better to set it to permissive.

I had a problem with this procedure because the website ```
http://foo2zjs.rkkda.com

Found this alternative from the ubuntoo forum

> By using GitHub repository as a source, just run following:
> 
> git clone https://github.com/koenkooi/foo2zjs.git
> cd foo2zjs
> make
> 
> Also, since source code from github already contains all firmware images, there is no need to run
> 
> ./getweb 1018 # or some other printer

This fixed my long-standing problem above for the hp1018. I can confirm that as of May 2021 the hplip version distributed with fedora 33 is bad.
# printer (hp laserjet 1018)
sudo dnf remove hplip* cups-filters cups system-config-printer-udev -y
sudo rm -v -rf /usr/share/hplip
sudo dnf install foo2zjs git -y

git clone https://github.com/koenkooi/foo2zjs
cd foo2zjs && make && sudo make install && sudo make install-hotplug
sudo cp /usr/share/foo2zjs/firmware/sihp1018.dl /lib/firmware/
sudo sed -i 's/usr\/share\/foo2zjs/lib/' /etc/hotplug/usb/hplj1000
cd .. && sudo rm -rf foo2zjs

sudo systemctl enable --now cups 

# http://localhost:631/admin << add print