Can't print with HP printer

Hi,
I am using Fedora 35 workstation with gnome.
This distribution version was installed several months ago and printing was fine. I use HP deskjet 4515 connected via USB.
Last time i used my printer was 2 weeks ago and everything was fine. But yesterday i send pdf document for printing and nothing happened, printer section in settings menu showed that printing process was running but printer was not reacting in any way.
Today i can see the same problem. I tried to delete printer and reinstall it in settings menu, it didnā€™t help me. I have installed hplib gui an tried to reinstall printer again but it didnā€™t help me. Hplib gui always shows in status menu ā€œdevice communication errorā€.
I thought that the printer itself was damaged in some way. So i tried to boot from live usb with Fedora 35 workstation and printing was fine. I also tried to boot from Linux Mint live usb and printing was also fine. So it is obvious that something went wrong with my installed system.
I can also mention that when i try to reboot or shutdown my system while printer is turned on and connected via USB the system can not properly reboot because IPP over USB printer support daemon can not shutdown so system waits 1.5 minutes and force stops it.
Can anyone help?

1 Like

Can I confirm if you install source for the hplib was from this source:

https://developers.hp.com/hp-linux-imaging-and-printing/gethplip

Also could you tell me if you are printing in the same application as you were earlier when it was working.

The reason is some applications are sandboxed (flathub apps) and do not have access to the printer port (cups socket).

Have you tried printing in another application ?

hplib package by itself was already installed in the system when i tried to install it. hplib-gui was installed from official Fedora repositories.

I tested printing pdf using evince and okular, both installed from official Fedora repositories. Today also tested .doc and .docx documents from libreoffice. Results all the same.

I have also tested system with hp-check util. It shows error: ā€˜cupsā€™ package is missing or ā€˜cupsā€™ service is not running. Still i can connect to cups interface with localhost:631. I found information on Redhat bugzilla about this error, but it was said that it is OK. Here are results:

Š”ŠæŠ¾Š¹Š»ŠµŃ€

/usr/bin/hp-check:685: SyntaxWarning: ā€œis notā€ with a literal. Did you mean ā€œ!=ā€?
if ā€˜getfaclā€™ not in g and ā€˜ā€™ is not g and ā€˜fileā€™ not in g:
Saving output in log file: /home/denis/hp-check.log

HP Linux Imaging and Printing System (ver. 3.22.2)
Dependency/Version Check Utility ver. 15.1

Copyright (c) 2001-18 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: hp-check can be run in three modes:

  1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies are
    installed to successfully compile HPLIP.
  2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball has the proper
    dependencies installed to successfully run.
  3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases (both compile- and run-time dependencies).

Check types:
a. EXTERNALDEP - External Dependencies
b. GENERALDEP - General Dependencies (required both at compile and run time)
c. COMPILEDEP - Compile time Dependencies
d. [All are run-time checks]
PYEXT SCANCONF QUEUES PERMISSION

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

\Gtk-Message: 16:29:55.162: Failed to load module ā€œpk-gtk-moduleā€


SYSTEM INFO

Kernel: 5.16.18-200.fc35.x86_64 #1 SMP PREEMPT Mon Mar 28 14:10:07 UTC 2022 GNU/Linux
Host: denis
Proc: 5.16.18-200.fc35.x86_64 #1 SMP PREEMPT Mon Mar 28 14:10:07 UTC 2022 GNU/Linux
Distribution: 5 35
Bitness: 64 bit


HPLIP CONFIGURATION

HPLIP-Version: HPLIP 3.22.2
HPLIP-Home: /usr/share/hplip
HPLIP-Installation: Auto installation is supported for fedora distro 35 version

Current contents of ā€˜/etc/hp/hplip.confā€™ file:

hplip.conf. Generated from hplip.conf.in by configure.

[hplip]
version=3.22.2

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-3.22.2
html=/usr/share/doc/hplip-3.22.2
icon=/usr/share/applications
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv/hp
bin=/usr/bin
apparmor=/etc/apparmor.d

Following values are determined at configure time and cannot be changed.

[configure]
network-build=yes
libusb01-build=no
pp-build=yes
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=yes
foomatic-drv-install=yes
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.22.2
restricted-build=no
ui-toolkit=qt5
qt3=no
qt4=no
qt5=yes
policy-kit=no
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no
apparmor_build=no
class-driver=no

Current contents of ā€˜/var/lib/hp/hplip.stateā€™ file:
Plugins are not installed. Could not access file: No such file or directory

Current contents of ā€˜~/.hplip/hplip.confā€™ file:
[commands]
scan = /usr/bin/xsane -V %SANE_URI%

[fax]
email_address =
voice_phone =

[installation]
date_time = 04/02/22 16:29:55
version = 3.22.2

[last_used]
device_uri = ā€œhp:/usb/Deskjet_4510_series?serial=CN535462V905XMā€
printer_name =
working_dir = .

[polling]
device_list =
enable = false
interval = 5

[refresh]
enable = true
rate = 30
type = 1

[settings]
systray_messages = 0
systray_visible = 0

[upgrade]
last_upgraded_time = 1648485481
notify_upgrade = false
pending_upgrade_time = 0

<Required/Optional>


External Dependencies

error: cups CUPS - Common Unix Printing System REQUIRED 1.1 - INCOMPAT ā€˜CUPS may not be installed or not runningā€™
gs GhostScript - PostScript and PDF language interpreter and previewer REQUIRED 7.05 9.55.0 OK -
Gtk-Message: 16:29:56.497: Failed to load module ā€œpk-gtk-moduleā€
Gtk-Message: 16:29:56.506: Failed to load module ā€œpk-gtk-moduleā€
xsane xsane - Graphical scanner frontend for SANE OPTIONAL 0.9 0.999 OK -
scanimage scanimage - Shell scanning program OPTIONAL 1.0 1.1.1 OK -
dbus DBus - Message bus system REQUIRED - 1.12.22 OK -
error: policykit PolicyKit - Administrative policy framework OPTIONAL - 0.120 MISSING ā€˜policykit needs to be installedā€™
network network -wget OPTIONAL - 1.21.3 OK -
avahi-utils avahi-utils OPTIONAL - 0.8 OK -


General Dependencies

libjpeg libjpeg - JPEG library REQUIRED - - OK -
cups-devel CUPS devel- Common Unix Printing System development files REQUIRED - - OK -
cups-image CUPS image - CUPS image development files REQUIRED - - OK -
libpthread libpthread - POSIX threads library REQUIRED - bā€™2.34ā€™ OK -
libusb libusb - USB library REQUIRED - 1.0 OK -
sane SANE - Scanning library REQUIRED - 1.1.1 OK -
sane-devel SANE - Scanning library development files REQUIRED - 1.1.1 OK -
libavahi-dev libavahi-dev REQUIRED - - OK -
libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED 5.0.9 5.9.1 OK -
libcrypto libcrypto - OpenSSL cryptographic library REQUIRED - - OK -
python3X Python 2.2 or greater - Python programming language REQUIRED 2.2 3.10.4 OK -
python3-notify2 Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL - - OK -
python3-pyqt5-dbus PyQt 5 DBus - DBus Support for PyQt5 OPTIONAL 5.0 5.15.6 OK -
python3-pyqt5 PyQt 5- Qt interface for Python (for Qt version 4.x) REQUIRED 5.0 5.15.6 OK -
python3-dbus Python DBus - Python bindings for DBus REQUIRED 0.80.0 1.2.18 OK -
python3-xml Python XML libraries REQUIRED - 2.4.7 OK -
python3-devel Python devel - Python development files REQUIRED 2.2 3.10.4 OK -
python3-pil PIL - Python Imaging Library (required for commandline scanning with hp-scan) OPTIONAL - 8.3.2 OK -
python3-reportlab Reportlab - PDF library for Python OPTIONAL 2.0 3.6.2 OK -


COMPILEDEP

libtool libtool - Library building support services REQUIRED - 2.4.6 OK -
gcc gcc - GNU Project C and C++ Compiler REQUIRED - 11.2.1 OK -
make make - GNU make utility to maintain groups of programs REQUIRED 3.0 4.3 OK -


Python Extentions

cupsext CUPS-Extension REQUIRED - 3.22.2 OK -
hpmudext IO-Extension REQUIRED - 3.22.2 OK -


Scan Configuration

hpaio HPLIP-SANE-Backend REQUIRED - 3.22.2 OK ā€˜hpaio found in /etc/sane.d/dll.confā€™
scanext Scan-SANE-Extension REQUIRED - 3.22.2 OK -


DISCOVERED SCANNER DEVICES

device `hpaio:/usb/Deskjet_4510_series?serial=CN535462V905XMā€™ is a Hewlett-Packard Deskjet_4510_series all-in-one


DISCOVERED USB DEVICES

Device URI Model


hp:/usb/Deskjet_4510_series?serial=CN535462V905XM HP Deskjet 4510 series


INSTALLED CUPS PRINTER QUEUES

Deskjet_4510

Type: Printer
Device URI: hp:/usb/Deskjet_4510_series?serial=CN535462V905XM
PPD: /etc/cups/ppd/Deskjet_4510.ppd
PPD Description: HP Deskjet 4510 Series, hpcups 3.22.2
Printer Rendering completedkjet_4510 сŠµŠ¹Ń‡Š°Ń ŠæŠµŃ‡Š°Ń‚Š°ŠµŃ‚ Deskjet_4510-0. Š’ŠŗŠ»ŃŽŃ‡ŠµŠ½ с Š¼Š¾Š¼ŠµŠ½Ń‚Š° Š”Š± 02 Š°Šæр 2022 16:24:40
error: Device busy: hp:/usb/Deskjet_4510_series?serial=CN535462V905XM
error: Device not found
error: Communication status: Failed


PERMISSION

USB Deskjet_4510 Required - - OK Node:ā€˜/dev/bus/usb/005/002ā€™ Perm:ā€™ root lp rw- rw- rw- rw- rā€“ā€™


SUMMARY

Missing Required Dependencies

error: ā€˜cupsā€™ package is missing or ā€˜cupsā€™ service is not running.

Missing Optional Dependencies

error: ā€˜polkitā€™ package is missing/incompatible
error: ā€˜polkit-gnomeā€™ package is missing/incompatible

Total Errors: 3
Total Warnings: 0

Done.

Same here in XFCE on Fedora 35 with an HP Officejet 4650 series printer.

Did either of you do an update after the last time the printer worked?
Do you by chance have a package ipp-usb installed? dnf list installed ipp-usb

If that package is installed and you already had a usb printer connected and configured it breaks printing.

The package was distributed with updates then pulled because of this error. The error only occurs with usb connected printers.

I suggest that you do sudo dnf remove ipp-usb then reboot and the printers should work again.

3 Likes

That did the trick.

Thanks a lot. Iā€™ve removed ipp-usb package and now everything works as it should