Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1694663 - Cannot scan with M281fdw LaserJet - failed: Error during device I/O
Summary: Cannot scan with M281fdw LaserJet - failed: Error during device I/O
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zdenek Dohnal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-01 11:25 UTC by Jan Vlug
Modified: 2019-04-09 02:19 UTC (History)
4 users (show)

Fixed In Version: hplip-3.18.12-9.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-09 02:19:13 UTC


Attachments (Terms of Use)
Printers window after removing all ColorLaserJet printers (deleted)
2019-04-01 15:18 UTC, Jan Vlug
no flags Details
Print Options window (deleted)
2019-04-01 15:19 UTC, Jan Vlug
no flags Details
Printer Details Window (deleted)
2019-04-01 15:19 UTC, Jan Vlug
no flags Details
Add Printer window (deleted)
2019-04-01 15:21 UTC, Jan Vlug
no flags Details
Printers window with newly added printer (deleted)
2019-04-01 15:22 UTC, Jan Vlug
no flags Details


Links
System ID Priority Status Summary Last Updated
Launchpad 1816226 None None None 2019-04-02 19:58:25 UTC
Launchpad 1822378 None None None 2019-04-01 11:40:11 UTC

Description Jan Vlug 2019-04-01 11:25:04 UTC
Description of problem:
I cannot scan with the HP M281fdw LaserJet.


Version-Release number of selected component (if applicable):
hplip.x86_64 3.18.12-6.fc29

How reproducible:
always

Steps to Reproduce:
1. scanimage -v -p -d hpaio:/net/hp_colorlaserjet_mfp_m278-m281?ip=192.168.178.16 > myscan

Actual results:
scanimage: open of device hpaio:/net/hp_colorlaserjet_mfp_m278-m281?ip=192.168.178.16 failed: Error during device I/O

Expected results:
A scanned image.


Additional info:
I executed the following commands:

[jan@nyx ~]$ scanimage -L
device `hpaio:/net/hp_colorlaserjet_mfp_m278-m281?ip=192.168.178.16&queue=false' is a Hewlett-Packard hp_colorlaserjet_mfp_m278-m281 all-in-one
device `hpaio:/net/officejet_4650_series?ip=192.168.178.12&queue=false' is a Hewlett-Packard officejet_4650_series all-in-one

[jan@nyx ~]$ scanimage -v -p -d hpaio:/net/hp_colorlaserjet_mfp_m278-m281?ip=192.168.178.16 > myscan
scanimage: open of device hpaio:/net/hp_colorlaserjet_mfp_m278-m281?ip=192.168.178.16 failed: Error during device I/O

[jan@nyx ~]$ hp-check
Saving output in log file: /home/jan/hp-check.log

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

Copyright (c) 2001-15 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

warning: 5-29 version is not supported. Using 5-28 versions dependencies to verify and install...

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

 Kernel: 5.0.4-200.fc29.x86_64 #1 SMP Mon Mar 25 02:27:33 UTC 2019 GNU/Linux
 Host: nyx
 Proc: 5.0.4-200.fc29.x86_64 #1 SMP Mon Mar 25 02:27:33 UTC 2019 GNU/Linux
 Distribution: 5 29
 Bitness: 64 bit


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

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

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

[hplip]
version=3.18.12

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-3.18.12
html=/usr/share/doc/hplip-3.18.12
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.18.12
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:
[last_used]
device_uri = hpaio:/net/hp_colorlaserjet_mfp_m278-m281?ip=192.168.178.16&queue=false

[installation]
date_time = 04/01/19 13:18:40
version = 3.18.12


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

-------------------------
| 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.26            OK         -
 xsane                xsane - Graphical scanner frontend for SANE                  OPTIONAL        0.9             0.999           OK         -
 scanimage            scanimage - Shell scanning program                           OPTIONAL        1.0             1.0.27          OK         -
 dbus                 DBus - Message bus system                                    REQUIRED        -               1.12.12         OK         -
 policykit            PolicyKit - Administrative policy framework                  OPTIONAL        -               0.115           OK         -
 network              network -wget                                                OPTIONAL        -               1.20.1          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        -               -               OK         -
 cups-image           CUPS image - CUPS image development files                    REQUIRED        -               -               OK         -
 libpthread           libpthread - POSIX threads library                           REQUIRED        -               b'2.28'         OK         -
 libusb               libusb - USB library                                         REQUIRED        -               1.0             OK         -
 sane                 SANE - Scanning library                                      REQUIRED        -               1.0.27          OK         -
 sane-devel           SANE - Scanning library development files                    REQUIRED        -               1.0.27          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.2           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.1          OK         -
 python3-pyqt4        PyQt 4- Qt interface for Python (for Qt version 4.x)         REQUIRED        4.0             4.12.1          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.6           OK         -
 python3-devel        Python devel - Python development files                      REQUIRED        2.2             3.7.2           OK         -
 python3-pil          PIL - Python Imaging Library (required for commandline scanning with hp-scan) OPTIONAL        -               1.1.7           OK         -
 python3-reportlab    Reportlab - PDF library for Python                           OPTIONAL        2.0             3.4.0           OK         -

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

 libtool              libtool - Library building support services                  REQUIRED        -               2.4.6           OK         -
 gcc                  gcc - GNU Project C and C++ Compiler                         REQUIRED        -               8.3.1           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.18.12         OK         -
 hpmudext             IO-Extension                                                 REQUIRED        -               3.18.12         OK         -

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

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

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

device `hpaio:/net/hp_colorlaserjet_mfp_m278-m281?ip=192.168.178.16&queue=false' is a Hewlett-Packard hp_colorlaserjet_mfp_m278-m281 all-in-one
device `hpaio:/net/officejet_4650_series?ip=192.168.178.12&queue=false' is a Hewlett-Packard officejet_4650_series all-in-one


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

No devices found.

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

 
HP-ColorLaserJet
----------------
Type: Unknown
Device URI: dnssd://HP%20Color%20LaserJet%20MFP%20M281fdw%20(A997CD)._ipp._tcp.local/?uuid=564e424e-4c44-5744-4e58-e4e749a997cd
PPD: /etc/cups/ppd/HP-ColorLaserJet.ppd
warning: Failed to read /etc/cups/ppd/HP-ColorLaserJet.ppd ppd file
PPD Description: 
Printer status: printer HP-ColorLaserJet is idle.  enabled since za 30 mrt 2019 16:47:09 CET
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.

OfficeJet-4650
--------------
Type: Unknown
Device URI: dnssd://HP%20OfficeJet%204650%20series%20%5B7CDFA5%5D._ipp._tcp.local/?uuid=1c852a4d-b800-1f08-abcd-9457a57cdfa5
PPD: /etc/cups/ppd/OfficeJet-4650.ppd
warning: Failed to read /etc/cups/ppd/OfficeJet-4650.ppd ppd file
PPD Description: 
Printer status: printer OfficeJet-4650 is idle.  enabled since di 26 feb 2019 11:34:36 CET
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.


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

 
-----------
| SUMMARY |
-----------

Missing Required Dependencies
-----------------------------
error: 'cups' package is missing or 'cups' service is not running.

Missing Optional Dependencies
-----------------------------
None


Total Errors: 1
Total Warnings: 2


Done.

=> The other printer/scanner that I have in the network works fine.

Comment 2 Zdenek Dohnal 2019-04-01 11:54:26 UTC
Hi Jan!

Thank you for filing a separate issue! Do you find the same error messages in journal as mentioned in https://bugs.launchpad.net/hplip/+bug/1797501 ?

Comment 3 Jan Vlug 2019-04-01 12:12:56 UTC
I found these messages in my journal:

apr 01 13:35:14 nyx python3[32556]: io/hpmud/pp.c 627: unable to read device-id ret=-1
apr 01 13:35:15 nyx python3[32556]: io/hpmud/model.c 532: no colorlaserjet_mfp_m278-m281 attributes found in /usr/share/hplip/data/models/models.dat
apr 01 13:35:15 nyx python3[32556]: io/hpmud/model.c 543: no colorlaserjet_mfp_m278-m281 attributes found in /usr/share/hplip/data/models/unreleased/unreleased.dat
apr 01 13:35:22 nyx /hp-scan[32556]: hp-scan[32556]: warning: No destinations specified. Adding 'file' destination by default.
apr 01 13:35:25 nyx /hp-scan[32556]: io/hpmud/pp.c 627: unable to read device-id ret=-1
apr 01 13:35:26 nyx /hp-scan[32556]: io/hpmud/model.c 532: no colorlaserjet_mfp_m278-m281 attributes found in /usr/share/hplip/data/models/models.dat
apr 01 13:35:26 nyx /hp-scan[32556]: io/hpmud/model.c 543: no colorlaserjet_mfp_m278-m281 attributes found in /usr/share/hplip/data/models/unreleased/unreleased.dat
apr 01 13:35:26 nyx /hp-scan[32556]: common/utils.c 245: unable to load library libm.so: /lib64/libm.so: invalid ELF header
apr 01 13:35:26 nyx /hp-scan[32556]: common/utils.c 112: unable to open /var/lib/hp/hplip.state: No such file or directory
apr 01 13:35:26 nyx /hp-scan[32556]: common/utils.c 162: validate_plugin_version() Failed to get Plugin version from [/var/lib/hp/hplip.state]
apr 01 13:35:26 nyx /hp-scan[32556]: common/utils.c 206: Plugin version is not matching
apr 01 13:35:26 nyx /hp-scan[32556]: common/utils.c 277: Invalid Library hanlder pLibHandler = NULL.
apr 01 13:35:26 nyx /hp-scan[32556]: hp-scan[32556]: error: SANE: Error during device I/O (code=9)

I have no /usr/share/hplip/data/models/unreleased/unreleased.dat file.

In the file /usr/share/hplip/data/models/models.dat I have an [hp_colorlaserjet_mfp_m278-m281] entry. Note the hp_ prefix, which is not there in the journal entries.

[jan@nyx ~]$ avahi-browse -r _scanner._tcp
+ enp30s0 IPv6 ColorLaserJet MFP M278-M281                   _scanner._tcp        local
+ enp30s0 IPv6 HP OfficeJet 4650 series [7CDFA5]             _scanner._tcp        local
+ enp30s0 IPv4 ColorLaserJet MFP M278-M281                   _scanner._tcp        local
+ enp30s0 IPv4 HP OfficeJet 4650 series [7CDFA5]             _scanner._tcp        local
= enp30s0 IPv4 ColorLaserJet MFP M278-M281                   _scanner._tcp        local
   hostname = [NPIA997CD.local]
   address = [192.168.178.16]
   port = [8289]
   txt = ["note=" "flatbed=T" "feeder=T" "button=T" "usb_MDL=HP ColorLaserJet MFP M278-M281" "usb_MFG=HP" "mdl=ColorLaserJet MFP M278-M281" "mfg=HP" "ty=HP ColorLaserJet MFP M278-M281" "adminurl=http://NPIA997CD.local." "txtvers=1" "UUID=564e424e-4c44-5744-4e58-e4e749a997cd"]
= enp30s0 IPv6 ColorLaserJet MFP M278-M281                   _scanner._tcp        local
   hostname = [NPIA997CD.local]
   address = [192.168.178.16]
   port = [8289]
   txt = ["note=" "flatbed=T" "feeder=T" "button=T" "usb_MDL=HP ColorLaserJet MFP M278-M281" "usb_MFG=HP" "mdl=ColorLaserJet MFP M278-M281" "mfg=HP" "ty=HP ColorLaserJet MFP M278-M281" "adminurl=http://NPIA997CD.local." "txtvers=1" "UUID=564e424e-4c44-5744-4e58-e4e749a997cd"]
= enp30s0 IPv4 HP OfficeJet 4650 series [7CDFA5]             _scanner._tcp        local
   hostname = [HP9457A57CDFA5.local]
   address = [192.168.178.12]
   port = [8080]
   txt = ["feeder=T" "flatbed=T" "button=T" "UUID=1c852a4d-b800-1f08-abcd-9457a57cdfa5" "note=" "adminurl=http://HP9457A57CDFA5.local." "mdl=OfficeJet 4650 series" "mfg=HP" "ty=HP OfficeJet 4650 series" "txtvers=1"]
= enp30s0 IPv6 HP OfficeJet 4650 series [7CDFA5]             _scanner._tcp        local
   hostname = [HP9457A57CDFA5.local]
   address = [192.168.178.12]
   port = [8080]
   txt = ["feeder=T" "flatbed=T" "button=T" "UUID=1c852a4d-b800-1f08-abcd-9457a57cdfa5" "note=" "adminurl=http://HP9457A57CDFA5.local." "mdl=OfficeJet 4650 series" "mfg=HP" "ty=HP OfficeJet 4650 series" "txtvers=1"]

Comment 4 Jan Vlug 2019-04-01 12:25:05 UTC
As a test, I changed [hp_colorlaserjet_mfp_m278-m281] to [colorlaserjet_mfp_m278-m281] in /usr/share/hplip/data/models/models.dat

Then I executed:
[jan@nyx ~]$ scanimage -v -p -d hpaio:/net/hp_colorlaserjet_mfp_m278-m281?ip=192.168.178.16 > myscan
scanimage: open of device hpaio:/net/hp_colorlaserjet_mfp_m278-m281?ip=192.168.178.16 failed: Operation not supported

So not that the "Error during device I/O" changed to "Operation not supported".

And the journal now states:
apr 01 14:21:47 nyx scanimage[10761]: io/hpmud/model.c 532: no hp_colorlaserjet_mfp_m278-m281 attributes found in /usr/share/hplip/data/models/models.dat
apr 01 14:21:47 nyx scanimage[10761]: io/hpmud/model.c 543: no hp_colorlaserjet_mfp_m278-m281 attributes found in /usr/share/hplip/data/models/unreleased/unreleased.dat

Comment 5 Jan Vlug 2019-04-01 12:31:29 UTC
Maybe this is of interest as well: I have been experimenting previously to fix this issue. I disabled AirPrint, and changed the AirPrint Bonjour service name in the webinterface of the printer. Unfortunately, I did not write down the original AirPrint Bonjour service name. Currentlly it is "ColorLaserJet MFP M278-M281" I guess that the original was "HP ColorLaserJet MFP M278-M281", but as said, I'm not sure about that. I think that I also experimented with replacing spaces by underscores.

Comment 6 Jan Vlug 2019-04-01 12:57:00 UTC
Another remark: The webinterface of the LaserJet printer/scanner is quite confusing.
There is a screen "AirPrint Status".
In this screen, I disabled AirPrint.
In the same screen there is also a "Bonjour Service Name:" field. This field can still be changed when AirPrint is disabled. And the value of this field is actually used for the service name in the mDNS advertisements even when AirPrint is disabled.

It looks like that the Bonjour service name is not used for determining the model. This seems correct to me.

These are the mDNS properties that I currently have:

Service Type: _scanner._tcp
Service Name: Jan HP ColorLaserJet MFP M278-M281 <= Note that I changed this one in the webinterface of the printer/scanner
Domain Name: local
Interface: enp30s0 IPv4
Address: NPIA997CD.local/192.168.178.16:8289
TXT flatbed = T
TXT mdl = ColorLaserJet MFP M278-M281
TXT mfg = HP
TXT usb_MFG = HP
TXT button = T
TXT ty = HP ColorLaserJet MFP M278-M281
TXT UUID = 564e424e-4c44-5744-4e58-e4e749a997cd
TXT feeder = T
TXT note = 
TXT adminurl = http://NPIA997CD.local.
TXT txtvers = 1
TXT usb_MDL = HP ColorLaserJet MFP M278-M281

Comment 7 Zdenek Dohnal 2019-04-01 14:18:55 UTC
Thank you for all the info! It really looks like issue #1797501 from launchpad... but there is other log about plugin, would you mind reinstalling it? 

About the string-cutting issue - would you mind removing models.dat, reinstalling hplip packages and setting your default printer settings? It would be better to have default settings than work on something obscure. I would try to use Brian's patch, just to cross it out.

The patch should be in https://koji.fedoraproject.org/koji/taskinfo?taskID=33867700 , would you mind trying it out?

Comment 8 Jan Vlug 2019-04-01 15:16:19 UTC
I did the following:

[root@nyx ~]# rm /usr/share/hplip/data/models/models.dat
rm: remove regular file '/usr/share/hplip/data/models/models.dat'? y
[root@nyx ~]# rm /usr/share/hplip/data/models/models.dat.org 
rm: remove regular file '/usr/share/hplip/data/models/models.dat.org'? y
[root@nyx ~]# dnf reinstall hplip*
Last metadata expiration check: 2:19:23 ago on ma 01 apr 2019 14:33:26 CEST.
Dependencies resolved.
======================================================================================================================================================================
 Package                                   Architecture                        Version                                     Repository                            Size
======================================================================================================================================================================
Reinstalling:
 hplip                                     x86_64                              3.18.12-6.fc29                              updates                               16 M
 hplip-common                              x86_64                              3.18.12-6.fc29                              updates                               74 k
 hplip-gui                                 x86_64                              3.18.12-6.fc29                              updates                              1.3 M
 hplip-libs                                x86_64                              3.18.12-6.fc29                              updates                              148 k

Transaction Summary
======================================================================================================================================================================

Total download size: 18 M
Installed size: 28 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): hplip-common-3.18.12-6.fc29.x86_64.rpm                                                                                         561 kB/s |  74 kB     00:00    
(2/4): hplip-libs-3.18.12-6.fc29.x86_64.rpm                                                                                           1.4 MB/s | 148 kB     00:00    
(3/4): hplip-gui-3.18.12-6.fc29.x86_64.rpm                                                                                            2.7 MB/s | 1.3 MB     00:00    
(4/4): hplip-3.18.12-6.fc29.x86_64.rpm                                                                                                 19 MB/s |  16 MB     00:00    
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                  15 MB/s |  18 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                              1/1 
  Reinstalling     : hplip-common-3.18.12-6.fc29.x86_64                                                                                                           1/8 
  Reinstalling     : hplip-libs-3.18.12-6.fc29.x86_64                                                                                                             2/8 
  Running scriptlet: hplip-3.18.12-6.fc29.x86_64                                                                                                                  3/8 
  Reinstalling     : hplip-3.18.12-6.fc29.x86_64                                                                                                                  3/8 
  Running scriptlet: hplip-3.18.12-6.fc29.x86_64                                                                                                                  3/8 
  Reinstalling     : hplip-gui-3.18.12-6.fc29.x86_64                                                                                                              4/8 
  Cleanup          : hplip-gui-3.18.12-6.fc29.x86_64                                                                                                              5/8 
  Cleanup          : hplip-3.18.12-6.fc29.x86_64                                                                                                                  6/8 
  Cleanup          : hplip-libs-3.18.12-6.fc29.x86_64                                                                                                             7/8 
  Cleanup          : hplip-common-3.18.12-6.fc29.x86_64                                                                                                           8/8 
  Running scriptlet: hplip-common-3.18.12-6.fc29.x86_64                                                                                                           8/8 
  Verifying        : hplip-3.18.12-6.fc29.x86_64                                                                                                                  1/8 
  Verifying        : hplip-3.18.12-6.fc29.x86_64                                                                                                                  2/8 
  Verifying        : hplip-common-3.18.12-6.fc29.x86_64                                                                                                           3/8 
  Verifying        : hplip-common-3.18.12-6.fc29.x86_64                                                                                                           4/8 
  Verifying        : hplip-gui-3.18.12-6.fc29.x86_64                                                                                                              5/8 
  Verifying        : hplip-gui-3.18.12-6.fc29.x86_64                                                                                                              6/8 
  Verifying        : hplip-libs-3.18.12-6.fc29.x86_64                                                                                                             7/8 
  Verifying        : hplip-libs-3.18.12-6.fc29.x86_64                                                                                                             8/8 

Reinstalled:
  hplip-3.18.12-6.fc29.x86_64          hplip-common-3.18.12-6.fc29.x86_64          hplip-gui-3.18.12-6.fc29.x86_64          hplip-libs-3.18.12-6.fc29.x86_64         

Complete!

Then I opened GNOME Settings went to Printers and removed all ColorLaserJet entries.

After a short while Jan_HP_ColorLaserJet_MFP_M278_M281 appeared automatically (screenshot_0.png). When I click on the gear icon | Print Options, I see a nearly blank window (screenshot_1.png). The Test Page button does not print a test page. The Printer Details window is shown in screenshot_2.png.

Then I clicked the Add... button. Selected HP-ColorLaserJet-MFP-M278-M281 (screenshot_3.png), clicked the Add button. The Printers window looked like screenshot_4.png.

I clicked the gear icon of the newly added HP-ColorLaserJet-MFP-M278-M281. The menu seems correct and contains: Printing Options, Printer Details, Use Printer by Default, Clean Print Heads, Remove Printer. Selecting Printing Options, and then clicking the Test Page button did not print a test page, but crashed GNOME Settings. I will try to report the crash via ABRT and put a link here.

Question: how do I apply the patch? Can I download an rpm? I'm willing to test it.

Comment 9 Jan Vlug 2019-04-01 15:18:18 UTC
Created attachment 1550575 [details]
Printers window after removing all ColorLaserJet printers

Comment 10 Jan Vlug 2019-04-01 15:19:09 UTC
Created attachment 1550588 [details]
Print Options window

Comment 11 Jan Vlug 2019-04-01 15:19:59 UTC
Created attachment 1550589 [details]
Printer Details Window

Comment 12 Jan Vlug 2019-04-01 15:21:13 UTC
Created attachment 1550590 [details]
Add Printer window

Comment 13 Jan Vlug 2019-04-01 15:22:26 UTC
Created attachment 1550591 [details]
Printers window with newly added printer

Comment 14 Zdenek Dohnal 2019-04-01 15:45:07 UTC
There are links to rpms in the link I provided in my last commentary, just install them with dnf (dnf can take links as input too)

Comment 15 Jan Vlug 2019-04-01 15:52:39 UTC
GNOME Settings crashed multiple times when trying to print a test page. ABRT has difficulties reporting most of the crashes, but one crash was reported as a duplicate of bug 1662583.
I will test the patch.
At the moment (i.e. without the patch) I cannot print a test page any more. When I click the Test Page button, the LCD in the printer states: Unable to print file. File is corrupt.
Usually GNOME settings crashes soon after this.

Comment 16 Jan Vlug 2019-04-01 16:42:40 UTC
(In reply to Zdenek Dohnal from comment #7)
> Thank you for all the info! It really looks like issue #1797501 from
> launchpad... but there is other log about plugin, would you mind
> reinstalling it? 
> 
What exactly do you mean by "reinstalling it"? A plugin? Or just the (patched) hplip packages? I did not install a separate plugin.

What exactly should be improved/fixed with your patch? Should I be able to scan? How should I test it?

Comment 17 Jan Vlug 2019-04-01 16:58:45 UTC
First of all, the whole problem with printing a test page is probably completely a separate bug. I will create a bug for that later. I noticed that I can print from Libreoffice, but the printing a test page from GNOME Settings does not work.

I installed your patch:

[root@nyx ~]# dnf list installed | grep hplip
hplip.x86_64                                       3.18.12-8.fc29                      @@commandline          
hplip-common.x86_64                                3.18.12-8.fc29                      @@commandline          
hplip-debuginfo.x86_64                             3.18.12-8.fc29                      @@commandline          
hplip-debugsource.x86_64                           3.18.12-8.fc29                      @@commandline          
hplip-gui.x86_64                                   3.18.12-8.fc29                      @@commandline          
hplip-libs.x86_64                                  3.18.12-8.fc29                      @@commandline          
hplip-libs-debuginfo.x86_64                        3.18.12-8.fc29                      @@commandline 

But everything seems the same:
[jan@nyx ~]$ scanimage -L
device `hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.178.16&queue=false' is a Hewlett-Packard colorlaserjet_mfp_m278-m281 all-in-one
device `hpaio:/net/officejet_4650_series?ip=192.168.178.12&queue=false' is a Hewlett-Packard officejet_4650_series all-in-one

[jan@nyx ~]$ scanimage -v -p -d hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.178.16 > scanimage
scanimage: open of device hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.178.16 failed: Error during device I/O

journal entries:
apr 01 18:57:49 nyx scanimage[6019]: io/hpmud/jd.c 214: invalid uri model colorlaserjet_mfp_m278-m281 != HP_ColorLaserJet_MFP_M278-M281
apr 01 18:57:49 nyx scanimage[6019]: scan/sane/soapht.c 478: unable to open device hp:/net/colorlaserjet_mfp_m278-m281?ip=192.168.178.16
apr 01 18:57:49 nyx scanimage[6019]: common/utils.c 277: Invalid Library hanlder pLibHandler = NULL.
apr 01 18:57:49 nyx scanimage[6019]: common/utils.c 277: Invalid Library hanlder pLibHandler = NULL.
apr 01 18:57:49 nyx scanimage[6019]: common/utils.c 277: Invalid Library hanlder pLibHandler = NULL.

Comment 18 Jan Vlug 2019-04-01 17:06:45 UTC
Because of the log messages I changed the URI in the command I executed:

 ~]$ scanimage -v -p -d hpaio:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.178.16 > scanimage
scanimage: open of device hpaio:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.178.16 failed: Error during device I/O

corresponding journal messages:
apr 01 18:59:39 nyx scanimage[6361]: common/utils.c 245: unable to load library libm.so: /usr/lib64/libm.so: invalid ELF header
apr 01 18:59:39 nyx scanimage[6361]: common/utils.c 112: unable to open /var/lib/hp/hplip.state: No such file or directory
apr 01 18:59:39 nyx scanimage[6361]: common/utils.c 162: validate_plugin_version() Failed to get Plugin version from [/var/lib/hp/hplip.state]
apr 01 18:59:39 nyx scanimage[6361]: common/utils.c 206: Plugin version is not matching
apr 01 18:59:39 nyx scanimage[6361]: common/utils.c 277: Invalid Library hanlder pLibHandler = NULL.

What is this Plugin or hplip.state?

According to this page: https://developers.hp.com/hp-linux-imaging-and-printing/supported_devices/index
No Driver plug-in is needed for the "HP Color LaserJet Pro MFP M281fdw".

Comment 19 Jan Vlug 2019-04-01 17:21:03 UTC
I created bug 1694797 for the issue with printing a test page.

Comment 20 Zdenek Dohnal 2019-04-02 06:36:36 UTC
(In reply to Jan Vlug from comment #18)
> Because of the log messages I changed the URI in the command I executed:
> 
>  ~]$ scanimage -v -p -d
> hpaio:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.178.16 > scanimage
> scanimage: open of device
> hpaio:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.178.16 failed: Error
> during device I/O
> 
> corresponding journal messages:
> apr 01 18:59:39 nyx scanimage[6361]: common/utils.c 245: unable to load
> library libm.so: /usr/lib64/libm.so: invalid ELF header
> apr 01 18:59:39 nyx scanimage[6361]: common/utils.c 112: unable to open
> /var/lib/hp/hplip.state: No such file or directory
> apr 01 18:59:39 nyx scanimage[6361]: common/utils.c 162:
> validate_plugin_version() Failed to get Plugin version from
> [/var/lib/hp/hplip.state]
> apr 01 18:59:39 nyx scanimage[6361]: common/utils.c 206: Plugin version is
> not matching
> apr 01 18:59:39 nyx scanimage[6361]: common/utils.c 277: Invalid Library
> hanlder pLibHandler = NULL.
> 
> What is this Plugin or hplip.state?
> 
> According to this page:
> https://developers.hp.com/hp-linux-imaging-and-printing/supported_devices/
> index
> No Driver plug-in is needed for the "HP Color LaserJet Pro MFP M281fdw".

Please try to run 'hp-plugin -i' - it would not be the first time when hplip pages says one thing and sw does the other. And since they reply on the cases once a several months, it is difficult. If it would help with the issue, then it is worth to investigate more.

Comment 21 Zdenek Dohnal 2019-04-02 06:45:38 UTC
Plus, would you mind installing a printer with hp-setup -i <your_printer_ip> ?

Comment 22 Jan Vlug 2019-04-02 08:06:36 UTC
First, I installed the plugin with
$ hp-plugin -i
After this, I could make a scan with:
$ scanimage -v -p -d hpaio:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.178.16 > scanimage
I verified that the scanimage had content. There was, very low resolution, no color.

Next I ran
$ hp-setup -i 192.168.178.16
After this, I could still make a scan with 
$ scanimage -v -p -d hpaio:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.178.16 > scanimage2
I noticed no differences.
Though a new printer shows up in GNOME Settings Printers.
For this new printer in GNOME Settings I clicked Test Page. Which correctly printed the test page (after I accepted via the printer touch LCD screen that it was ok to print a letter format to my loaded A4 paper.

Next, I tried with the previously installed entry for the printer in GNOME Settings Printers to print a test page by clicking the Test Page button. This still resulted in "Unable to print file. File is corrupt" message on the printer LCD.

The next thing that I intended to try was to test scanning with simplescan, but because both printer instances in GNOME Settings Printers (the old one and the one installed with hp-setup) have the same name, I could not select the printer. So I went back to GNOME Settings Printers to remove the old instance. But even before I got there GNOME Settings crashed again. Gnome Settings crashes very often, and usually there is not enough information for ABRT to create a Bugzilla issue. Now I first will try to report the crash. Later I will test scanning with simplescan or whatever you suggest. So there is progress, thanks for your work on this!

Comment 23 Jan Vlug 2019-04-02 08:30:56 UTC
I created bug 1694979 for the crashes in GNOME Settings Printers (gnome-control-center).

Comment 24 Zdenek Dohnal 2019-04-02 09:53:14 UTC
(In reply to Jan Vlug from comment #22)
> First, I installed the plugin with
> $ hp-plugin -i
> After this, I could make a scan with:
> $ scanimage -v -p -d
> hpaio:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.178.16 > scanimage
> I verified that the scanimage had content. There was, very low resolution,
> no color.

IMO it is expectable, scanimage is by default set to some low resolution.

> 
> Next I ran
> $ hp-setup -i 192.168.178.16
> After this, I could still make a scan with 
> $ scanimage -v -p -d
> hpaio:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.178.16 > scanimage2
> I noticed no differences.
> Though a new printer shows up in GNOME Settings Printers.
> For this new printer in GNOME Settings I clicked Test Page. Which correctly
> printed the test page (after I accepted via the printer touch LCD screen
> that it was ok to print a letter format to my loaded A4 paper.

Ok, that's good to know, thank you!

> 
> Next, I tried with the previously installed entry for the printer in GNOME
> Settings Printers to print a test page by clicking the Test Page button.
> This still resulted in "Unable to print file. File is corrupt" message on
> the printer LCD.

Oh, so that's the error on printer LCD? Ok, then we can check what goes to CUPS and what's go to printer. Please tell me more about it in CUPS issue you reassigned.
> 
> The next thing that I intended to try was to test scanning with simplescan,
> but because both printer instances in GNOME Settings Printers (the old one
> and the one installed with hp-setup) have the same name, I could not select

You can set different name during hp-setup.

> the printer. So I went back to GNOME Settings Printers to remove the old
> instance. But even before I got there GNOME Settings crashed again. Gnome
> Settings crashes very often, and usually there is not enough information for
> ABRT to create a Bugzilla issue. Now I first will try to report the crash.
> Later I will test scanning with simplescan or whatever you suggest. So there
> is progress, thanks for your work on this!

Btw your device seems to have one of scanning handles which needs the plugin for scanning support (according the code - because loading functions for device handlers escl, marvell, orblite, soap and soapht calls load_plugin_library(), which checks the plugin...), so the record on website is wrong. I'll update the record in source tarball, but nothing I can do (then filing other report...) about upstream website.

Comment 25 Zdenek Dohnal 2019-04-02 10:04:56 UTC
Plugin issue is reported as https://bugs.launchpad.net/hplip/+bug/1822762 .

Comment 26 Zdenek Dohnal 2019-04-02 10:14:31 UTC
I added the patch for parsing issue and plugin. Now hp-setup will know your device needs plugin for scanning, so it will be prompted to install - however, gnome-control-center does not know anything about plugin, so scanning will not work with automatically created print queue. It is like that because of plugin's license, which is incompatible to Fedora, so it could not download automatically (only on user's request - with hp-setup or hp-plugin).

Comment 27 Jan Vlug 2019-04-02 10:43:20 UTC
Hi Zdenek,

I was able to scan now with simple-scan, using the new instance of the driver, also in high resolution.
One thing that I note, is that the new printer representation (the one that appeared after running hp-setup) in GNOME Settings Printers does not visualize the ink levels. Should I create a separate bug for that? Or add this to bug 1694797?

Another thing: the other scanner that I have in my network (HP OfficeJet 4650) is now not visible anymore in simple-scan.

[jan@nyx ~]$ scanimage -L
device `hpaio:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.178.16' is a Hewlett-Packard HP_ColorLaserJet_MFP_M278-M281 all-in-one
device `hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.178.16&queue=false' is a Hewlett-Packard colorlaserjet_mfp_m278-m281 all-in-one

[jan@nyx ~]$ hp-makeuri 192.168.178.12

HP Linux Imaging and Printing System (ver. 3.18.12)
Device URI Creation Utility ver. 5.0

Copyright (c) 2001-15 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.

CUPS URI: hp:/net/OfficeJet_4650_series?ip=192.168.178.12
SANE URI: hpaio:/net/OfficeJet_4650_series?ip=192.168.178.12
HP Fax URI: hpfax:/net/OfficeJet_4650_series?ip=192.168.178.12

Done.

[jan@nyx ~]$ scanimage -L
device `hpaio:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.178.16' is a Hewlett-Packard HP_ColorLaserJet_MFP_M278-M281 all-in-one
device `hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.178.16&queue=false' is a Hewlett-Packard colorlaserjet_mfp_m278-m281 all-in-one

I installed this device again with:
hp-setup -i 192.168.178.12

Now I see this scanner again:
[jan@nyx ~]$ scanimage -L
device `hpaio:/net/OfficeJet_4650_series?ip=192.168.178.12' is a Hewlett-Packard OfficeJet_4650_series all-in-one
device `hpaio:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.178.16' is a Hewlett-Packard HP_ColorLaserJet_MFP_M278-M281 all-in-one
device `hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.178.16&queue=false' is a Hewlett-Packard colorlaserjet_mfp_m278-m281 all-in-one

How do I remove the disfuctional: device `hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.178.16&queue=false' is a Hewlett-Packard colorlaserjet_mfp_m278-m281 all-in-one ?

Regarding the plugin: I agree with you. Unfortunately, I have to install non free software now because of the incorrect data on the HP website.

Thanks for your support, feedback and work. I expect that installing this printer might be a bit easier for user in the future.

Comment 28 Zdenek Dohnal 2019-04-02 11:54:36 UTC
(In reply to Jan Vlug from comment #27)
> Hi Zdenek,
> 
> I was able to scan now with simple-scan, using the new instance of the
> driver, also in high resolution.
> One thing that I note, is that the new printer representation (the one that
> appeared after running hp-setup) in GNOME Settings Printers does not
> visualize the ink levels. Should I create a separate bug for that? Or add
> this to bug 1694797?

IMO these ink levels can be negotiated only for dnssd/ipp backends (and if the printer can do it at the same time), so it is expected.


> [jan@nyx ~]$ scanimage -L
> device `hpaio:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.178.16' is a
> Hewlett-Packard HP_ColorLaserJet_MFP_M278-M281 all-in-one
> device
> `hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.178.16&queue=false' is a
> Hewlett-Packard colorlaserjet_mfp_m278-m281 all-in-one
> 
> I installed this device again with:
> hp-setup -i 192.168.178.12

General advice for HP scanners and MFD - try hp-setup - because hpaio backend (which is run when searching for scanners) needs exact uri as it goes from hp-setup for correct work. It will put 'queue=false' for other cases and scanning will not work.

> 
> Now I see this scanner again:
> [jan@nyx ~]$ scanimage -L
> device `hpaio:/net/OfficeJet_4650_series?ip=192.168.178.12' is a
> Hewlett-Packard OfficeJet_4650_series all-in-one
> device `hpaio:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.178.16' is a
> Hewlett-Packard HP_ColorLaserJet_MFP_M278-M281 all-in-one
> device
> `hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.178.16&queue=false' is a
> Hewlett-Packard colorlaserjet_mfp_m278-m281 all-in-one
> 
> How do I remove the disfuctional: device
> `hpaio:/net/colorlaserjet_mfp_m278-m281?ip=192.168.178.16&queue=false' is a
> Hewlett-Packard colorlaserjet_mfp_m278-m281 all-in-one ?
> 

You do not need to remove it - it is not saved anywhere, it is harmless. (My guess it is a remnant of some previous gnome created print queue - because hplip does printer discovery and asking CUPS on its own and based on that tries to create scanner URI for devices which has support for it).

> Regarding the plugin: I agree with you. Unfortunately, I have to install non
> free software now because of the incorrect data on the HP website.
> 
> Thanks for your support, feedback and work. I expect that installing this
> printer might be a bit easier for user in the future.

You're welcome!

Comment 29 Jan Vlug 2019-04-02 19:54:39 UTC
Note that there is a very similar and detailed bug here: https://bugs.launchpad.net/hplip/+bug/1816226 .

Comment 30 Fedora Update System 2019-04-03 09:42:47 UTC
hplip-3.18.12-8.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-98e3f81c61

Comment 31 Jan Vlug 2019-04-03 15:05:49 UTC
I did another test to see if the plugin is really needed.

I moved /usr/share/hplip/scan/plugins/ aside with:
[root@nyx ~]# mv /usr/share/hplip/scan/plugins /usr/share/hplip/scan/plugins-back

Tried to do a scan.
[jan@nyx ~]$ scanimage -v -p -d hpaio:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.178.16 > janscan
scanimage: open of device hpaio:/net/HP_ColorLaserJet_MFP_M278-M281?ip=192.168.178.16 failed: Error during device I/O

journal log messages:
apr 03 17:00:16 nyx scanimage[17754]: common/utils.c 245: unable to load library libm.so: /usr/lib64/libm.so: invalid ELF header
apr 03 17:00:16 nyx scanimage[17754]: common/utils.c 245: unable to load library /usr/share/hplip/scan/plugins/bb_soapht.so: /usr/share/hplip/scan/plugins/bb_soapht.so: cannot open shared object file: No such file or directory
apr 03 17:00:16 nyx scanimage[17754]: common/utils.c 277: Invalid Library hanlder pLibHandler = NULL.

So it looks that indeed bb_soapht.so is required.

I moved the plugins back into place:
mv /usr/share/hplip/scan/plugins-back/ /usr/share/hplip/scan/plugins

And scanning works again.

The journal log messages are now:
apr 03 17:02:28 nyx scanimage[18214]: common/utils.c 245: unable to load library libm.so: /usr/lib64/libm.so: invalid ELF header

But apparently, this does not prevent a good scan.

Comment 32 Fedora Update System 2019-04-04 04:24:46 UTC
hplip-3.18.12-8.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-98e3f81c61

Comment 33 Fedora Update System 2019-04-05 07:46:50 UTC
hplip-3.18.12-9.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-1c52d4180d

Comment 34 Fedora Update System 2019-04-06 20:50:50 UTC
hplip-3.18.12-9.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-1c52d4180d

Comment 35 Fedora Update System 2019-04-09 02:19:13 UTC
hplip-3.18.12-9.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.