FS#64188 - [hplip] 13.9.8-1: device comm. error to USB printer

Attached to Project: Arch Linux
Opened by Stefan Förster (HotblackDesiato) - Sunday, 20 October 2019, 11:53 GMT
Last edited by Andreas Radke (AndyRTR) - Sunday, 15 December 2019, 13:38 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture x86_64
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

I recently updated Arch Linux. I found that neither XSane nor HPLIP's HP Device Manager can access my HP Printer "HP Laserjet M1120 MFP", which is connected via USB. CUPS is still able to print on that printer. before the update I had no poroblems accessing the printer and to scan from it.

I get the following error messages:

In HP Device Manager: Device communication error (5012)


[stefan@stefan ~]$ lsusb
[...]
Bus 003 Device 002: ID 03f0:5617 HP, Inc LaserJet M1120 MFP
[...]
[stefan@stefan ~]$ hp-config_usb_printer 003:002
error: This is not a valid device


[stefan@stefan ~]$ hp-doctor

HP Linux Imaging and Printing System (ver. 3.19.8)
Self Diagnse Utility and Healing Utility ver. 1.0

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.


HP Linux Imaging and Printing System (ver. 3.19.8)
Self Diagnse Utility and Healing Utility ver. 1.0

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.



Checking for Deprecated items....
error: This distro (i.e unknown rolling) is either deprecated or not yet supported.
The diagnosis is limited on unsupported platforms. Do you want to continue?(y=yes*, n=no):y


Checking for HPLIP updates....

HP Linux Imaging and Printing System (ver. 3.19.8)
HPLIP upgrade latest version ver. 1.0

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.

error: HPLIP upgrade is disabled by Archlinux for security reasons, see https://bugs.archlinux.org/task/38083 - if you like to upgrade HPLIP, use the Archlinux software package manager pacman.

Done.
error: Failed to upgrade latest HPLIP. Is hp-upgrade already running (i.e. foreground or background)?


Checking for Dependencies....
warning: 0-rolling version is not supported. Using 0-0 versions dependencies to verify and install...

---------------
| SYSTEM INFO |
---------------

Kernel: 4.19.71 #1 SMP PREEMPT Sun Sep 8 13:06:03 +08 2019 GNU/Linux
Host: stefan
Proc: 4.19.71 #1 SMP PREEMPT Sun Sep 8 13:06:03 +08 2019 GNU/Linux
Distribution: 0 rolling
Bitness: 64 bit


-----------------------
| HPLIP CONFIGURATION |
-----------------------

HPLIP-Version: HPLIP 3.19.8
HPLIP-Home: /usr/share/hplip
warning: HPLIP-Installation: Auto installation is not supported for 0 distro rolling version

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf. Generated from hplip.conf.in by configure.

[hplip]
version=3.19.8

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-3.19.8
html=/usr/share/doc/hplip-3.19.8
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=no
foomatic-drv-install=no
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.19.8
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:
[plugin]
installed = 1
eula = 1
version = 3.19.8


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

[fax]
email_address =
voice_phone =

[installation]
date_time = 10/20/19 19:48:56
version = 3.19.8

[last_used]
device_uri = "hp:/usb/HP_LaserJet_M1120_MFP?serial=MF36M9H"
printer_name =
working_dir = .

[polling]
device_list =
enable = false
interval = 5

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

[settings]
systray_messages = 0
systray_visible = 0

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


<Package-name> <Package-Desc> <Required/Optional> <Min-Version> <Installed-Version> <Status> <Comment>

-------------------------
| External Dependencies |
-------------------------

cups CUPS - Common Unix Printing System REQUIRED 1.1 2.3.0 OK 'CUPS Scheduler is running'
gs GhostScript - PostScript and PDF language interpreter and previewer REQUIRED 7.05 9.50 OK -
xsane xsane - Graphical scanner frontend for SANE OPTIONAL 0.9 0.999 OK -
scanimage scanimage - Shell scanning program OPTIONAL 1.0 1.0.28 OK -
dbus DBus - Message bus system REQUIRED - 1.12.16 OK -
error: policykit PolicyKit - Administrative policy framework OPTIONAL - 0.116 MISSING 'policykit needs to be installed'
network network -wget OPTIONAL - 1.20.3 OK -
avahi-utils avahi-utils OPTIONAL - 0.7 OK -

------------------------
| General Dependencies |
------------------------

libjpeg libjpeg - JPEG library REQUIRED - - OK -
cups-devel CUPS devel- Common Unix Printing System development files REQUIRED - 2.3.0 OK -
cups-image CUPS image - CUPS image development files REQUIRED - 2.3.0 OK -
libpthread libpthread - POSIX threads library REQUIRED - b'2.30' OK -
libusb libusb - USB library REQUIRED - 1.0 OK -
sane SANE - Scanning library REQUIRED - 1.0.28 OK -
sane-devel SANE - Scanning library development files REQUIRED - 1.0.28 OK -
libnetsnmp-devel libnetsnmp-devel - SNMP networking library development files REQUIRED 5.0.9 5.8 OK -
libcrypto libcrypto - OpenSSL cryptographic library REQUIRED - 1.1.1 OK -
python3X Python 2.2 or greater - Python programming language REQUIRED 2.2 3.7.4 OK -
python3-notify2 Python libnotify - Python bindings for the libnotify Desktop notifications OPTIONAL - - OK -
python3-pyqt4-dbus PyQt 4 DBus - DBus Support for PyQt4 OPTIONAL 4.0 4.12.3 OK -
python3-pyqt4 PyQt 4- Qt interface for Python (for Qt version 4.x) REQUIRED 4.0 4.12.3 OK -
python3-dbus Python DBus - Python bindings for DBus REQUIRED 0.80.0 1.2.8 OK -
python3-xml Python XML libraries REQUIRED - 2.2.9 OK -
python3-devel Python devel - Python development files REQUIRED 2.2 3.7.4 OK -
python3-pil PIL - Python Imaging Library (required for commandline scanning with hp-scan) OPTIONAL - 6.1.0 OK -
python3-reportlab Reportlab - PDF library for Python OPTIONAL 2.0 3.5.28 OK -

--------------
| COMPILEDEP |
--------------

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

---------------------
| Python Extentions |
---------------------

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

----------------------
| Scan Configuration |
----------------------

hpaio HPLIP-SANE-Backend REQUIRED - 3.19.8 OK 'hpaio found in /etc/sane.d/dll.conf'
scanext Scan-SANE-Extension REQUIRED - 3.19.8 OK -

------------------------------
| DISCOVERED SCANNER DEVICES |
------------------------------

device `hpaio:/net/HP_PageWide_Pro_577_MFP?ip=192.168.1.76' is a Hewlett-Packard HP_PageWide_Pro_577_MFP all-in-one


--------------------------
| DISCOVERED USB DEVICES |
--------------------------

No devices found.

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------


HP_LaserJet_M1120_MFP_Stefan
----------------------------
Type: Printer
Device URI: hp:/usb/HP_LaserJet_M1120_MFP?serial=MF36M9H
PPD: /etc/cups/ppd/HP_LaserJet_M1120_MFP_Stefan.ppd
warning: Failed to read /etc/cups/ppd/HP_LaserJet_M1120_MFP_Stefan.ppd ppd file
PPD Description:
Printer status: Drucker HP_LaserJet_M1120_MFP_Stefan ist im Leerlauf. Aktiviert seit So 20 Okt 2019 19:36:42 +08
error: Unable to communicate with device (code=12): hp:/usb/HP_LaserJet_M1120_MFP?serial=MF36M9H
error: Device not found
error: Communication status: Failed

HP_PageWide_Pro_577_MFP
-----------------------
Type: Printer
Device URI: hp:/net/HP_PageWide_Pro_577_MFP?ip=192.168.1.76
PPD: /etc/cups/ppd/HP_PageWide_Pro_577_MFP.ppd
warning: Failed to read /etc/cups/ppd/HP_PageWide_Pro_577_MFP.ppd ppd file
PPD Description:
Printer status: Drucker HP_PageWide_Pro_577_MFP ist im Leerlauf. Aktiviert seit Sa 23 Jun 2018 11:52:39 +08
error: Unable to communicate with device (code=12): hp:/net/HP_PageWide_Pro_577_MFP?ip=192.168.1.76
error: unable to open channel
error: Communication status: Failed


--------------
| PERMISSION |
--------------



Checking Permissions....


Checking for Configured Queues....
warning: Fail to read ppd=/etc/cups/ppd/HP_LaserJet_M1120_MFP_Stefan.ppd file
warning: Insufficient permission to access file /etc/cups/ppd/HP_LaserJet_M1120_MFP_Stefan.ppd
warning: Could not complete Queue(s) configuration check


Checking for HP Properitery Plugin's....
No plug-in printers are configured.


Checking for Printer Status....
error: 'HP_LaserJet_M1120_MFP_Stefan' Printer is either Powered-OFF or Failed to communicate.
Turn On Printer and re-run hp-doctor
error: 'HP_PageWide_Pro_577_MFP' Printer is either Powered-OFF or Failed to communicate.
Turn On Printer and re-run hp-doctor

Diagnose completed...




Steps to reproduce:
- Attach HP printer via USB and run HP Device Manager and/or XSane.
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Sunday, 15 December 2019, 13:38 GMT
Reason for closing:  Fixed
Comment by Andreas Radke (AndyRTR) - Sunday, 20 October 2019, 12:42 GMT
Check your pacman.log for updated packages. Feel free to roll back related ones until the cause if found. USB failure could be kernel related or how the bus is contacted (python, dbus,...). You will have to track down this more. Looks Could be some hostname related issue (lots of search results found):
e.g. https://ubuntuforums.org/showthread.php?t=1249019
Comment by Stefan Förster (HotblackDesiato) - Sunday, 20 October 2019, 13:43 GMT
I wll check pacman.log. The printer incl. scanning worked for many years and now some update broke this. In the other bug report some 10 years ago (!) the problem is with wireless connection, but my printer is connected by USB.
Comment by Stefan Förster (HotblackDesiato) - Saturday, 26 October 2019, 04:05 GMT
Unfortunately, checking pacman.log is not an option, since the update was much too big. I hadn't updated the machine for many months, since I feared breaking something essential (like hplip...) and I needed the machine up and running.

I removed the hplip and hplip-plugin packages for now and compiled hplip from source. I let hp-plugin install the plugin.

PYTHON=/usr/bin/python3 PYTHONINCLUDEDIR=/usr/include/python3.7m/Python.h ./configure --prefix=/usr --enable-qt5 --disable-fax-build

hp-doctor still gives me this error:

HP_LaserJet_M1120_MFP_Stefan
----------------------------
Type: Printer
Device URI: hp:/usb/HP_LaserJet_M1120_MFP?serial=MF36M9H
PPD: /etc/cups/ppd/HP_LaserJet_M1120_MFP_Stefan.ppd
PPD Description: HP LaserJet m1120 MFP, hpcups 3.17.11, requires proprietary plugin
Printer status: Drucker HP_LaserJet_M1120_MFP_Stefan ist im Leerlauf. Aktiviert seit So 20 Okt 2019 19:36:42 +08
error: Unable to communicate with device (code=12): hp:/usb/HP_LaserJet_M1120_MFP?serial=MF36M9H
error: Device not found
error: Communication status: Failed

My other printer, connected via ethernet (HP PageWide) is being found by hp-doctor ("Connection status: Good"). My M1120 MFP can only be connected via USB, no other option.

I never had such problems before. Cups still works, i.e. printing is OK, but no scanning. lsusb sees the device. Any further ideas?
Comment by Stefan Förster (HotblackDesiato) - Saturday, 26 October 2019, 04:26 GMT
I removed my own hplip installation again and installed hplip & hplip-plugin again from the repository. I deleted the printer in the CUPS administration page (localhost:631) and installed it newly. The version number of the hpcups driver is now updated to "HP LaserJet m1120 MFP, hpcups 3.19.8, requires proprietary plugin". Test page prints fine. Still no scanning.

error: Unable to communicate with device (code=12): hp:/usb/HP_LaserJet_M1120_MFP?serial=MF36M9H

Any chance to downgrade to a previous version of hplip? I would also need that version's plugin. How can I downgrade AUR packages?
Comment by Stefan Förster (HotblackDesiato) - Saturday, 26 October 2019, 08:41 GMT
I just realise that USB thumb drives are no longer accepted by the system, no device node created. Other USB devices (wireless mouse, keyboard) work. I get the following messages when I insert a USB thumb drive in one of the front USB ports:

dmesg:
[...]
[19330.433762] usb 1-8: new high-speed USB device number 36 using ehci-pci
[19330.977061] usb 1-8: device not accepting address 36, error -71
[19331.100402] usb 1-8: new high-speed USB device number 37 using ehci-pci
[19331.233751] usb 1-8: device descriptor read/64, error -71
[19331.499464] usb 1-8: device descriptor read/all, error -71
[19331.503729] usb usb1-port8: attempt power cycle
[19331.940394] usb 1-8: new high-speed USB device number 38 using ehci-pci

This looks like it is not a problem of HPLIP. Any idea what the reason for this could be? I will google.
Comment by Andreas Radke (AndyRTR) - Saturday, 26 October 2019, 19:23 GMT
Try a different kernel (mainline/lts/...).
Comment by Stefan Förster (HotblackDesiato) - Saturday, 26 October 2019, 23:59 GMT
I tried already, but no change. I usally use my own kernel (4.19.71), but tried official 5.3 kernel yesterday and no change. But update of packages broke USB, not update of kernel.

Maybe udev updated recently, I have to check.
Comment by Stefan Förster (HotblackDesiato) - Sunday, 27 October 2019, 12:41 GMT
I installed a USB PCI card (Belkin) and plugged the printer into one of the 4 USB ports. lsusb sees the printer, but I still get the HPLIP device communication error. I don't believe that it is a hardware issue.
Comment by Andreas Radke (AndyRTR) - Wednesday, 20 November 2019, 20:54 GMT
Check
https://bugs.launchpad.net/hplip/+bug/1830719
https://bugs.launchpad.net/hplip/+bug/1722059
and maybe more when searching there for "Device communication error"

Feel free to ask in a corresponding report or file your own bug there.
Comment by Andreas Radke (AndyRTR) - Wednesday, 11 December 2019, 11:39 GMT
How's status with recent hplip 3.19.11-6 and recent kernel updates?
Comment by Stefan Förster (HotblackDesiato) - Sunday, 15 December 2019, 00:39 GMT
I uninstalled hplip today,manually deleted /usr/share/hplip and re-installed version 3.19.11 of 'hplip' and 'hplip-plugin' packages. The scanner works again. I am not sure what has changed, maybe the new version fixed it.

Loading...