Upgrade from LEAP 15.2 to LEAP 15.3 kills scanner

I performed an OS upgrade from Leap 15.2 to Leap 15.3 and the scanner now reports an error; print function works fine. Yast see the scanner; If I invoke a test scan from Yast->Scanner->Other->Test, I get the following error dialogue:

Error
Test with 'scanimage -d hpaio:/net/HP_Color_Laserjet_MFP_M477fdw?ip=192.168.1.28 -v' failed.
The results are:

Output format is not set, using pnm as a default.
scanimage: open of device hpaio:/net/HP_Color_Laserjet_MFP_M477fdw?ip=192.168.1.28 failed: Error during device I/O

I performed the same Leap 15.2 to Leap 15.3 upgrade on a laptop and everything is still fine; I cannot see any differences.

Check HPLIP diagnostics…

hp-doctor

Check that the scanner plugin (firmware package) is installed.

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

You can download and install as explained here…
https://forums.opensuse.org/showthread.php/557128-Failed-to-install-HP-driver-plug-in-for-a-HP-ColorLaserJet-MFP-M282nw-scanner?p=3049870#post3049870

The sequence:

cd
wget https://developers.hp.com/sites/default/files/hplip-3.21.10-plugin.run -O hplip-3.21.10-plugin.run
wget https://developers.hp.com/sites/default/files/hplip-3.21.10-plugin.run.asc -O hplip-3.21.10-plugin.run.asc
hp-plugin -i -p .

Gives the following output:


[01mHP Linux Imaging and Printing System (ver. 3.21.10)[0m
[01mPlugin Download and Install Utility ver. 2.1[0m

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.


[01mHP Linux Imaging and Printing System (ver. 3.21.10)[0m
[01mPlugin Download and Install Utility ver. 2.1[0m

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: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)


------------------------------------------
| PLUG-IN INSTALLATION FOR HPLIP 3.21.10 |
------------------------------------------


---------------
| COPY PLUGIN |
---------------

Downloading plug-in from: file:///home/ajw/hplip-3.21.10-plugin.run
Traceback (most recent call last):
  File "/usr/bin/hp-plugin", line 361, in <module>
    pm = tui.ProgressMeter("Downloading plug-in:")
  File "/usr/share/hplip/base/tui.py", line 222, in __init__
    self.max_size = ttysize()[1] - len(prompt) - 25
  File "/usr/share/hplip/base/tui.py", line 200, in ttysize
    ln1 = subprocess.getoutput('stty -a').splitlines()[0]
  File "/usr/lib64/python3.6/subprocess.py", line 556, in getoutput
    return getstatusoutput(cmd)[1]
  File "/usr/lib64/python3.6/subprocess.py", line 537, in getstatusoutput
    data = check_output(cmd, shell=True, universal_newlines=True, stderr=STDOUT)
  File "/usr/lib64/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib64/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/bin/sh'

Python script breaks with a permission error on ‘/bin/sh’ at the very end?

hp-doctor provides the following out:


[01mHP Linux Imaging and Printing System (ver. 3.21.10)[0m
[01mSelf Diagnse Utility and Healing Utility ver. 1.0[0m

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.


[01mHP Linux Imaging and Printing System (ver. 3.21.10)[0m
[01mSelf Diagnse Utility and Healing Utility ver. 1.0[0m

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.

[01m

Checking for Deprecated items....[0m
No Deprecated items are found
[01m

Checking for HPLIP updates....[0m

[01mHP Linux Imaging and Printing System (ver. 3.21.10)[0m
[01mHPLIP upgrade latest version ver. 1.0[0m

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.

[31;01merror: HPLIP upgrade is disabled by openSUSE for security reasons, see https://bugzilla.suse.com/show_bug.cgi?id=853405 - if you like to upgrade HPLIP, use an openSUSE software package manager like YaST or zypper.[0m

Done.
[31;01merror: Failed to upgrade latest HPLIP. Is hp-upgrade already running (i.e. foreground or background)?[0m
[01m

Checking for Dependencies....[0m

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

 Kernel: 5.3.18-150300.59.63-default #1 SMP Tue Apr 5 12:47:31 UTC 2022 (d77db66) GNU/Linux
 Host: addanc.mere
 Proc: 5.3.18-150300.59.63-default #1 SMP Tue Apr 5 12:47:31 UTC 2022 (d77db66) GNU/Linux
 Distribution: 3 15.3
 Bitness: 64 bit


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

HPLIP-Version: HPLIP 3.21.10
HPLIP-Home: /usr/share/hplip
HPLIP-Installation: Auto installation is supported for suse distro  15.3 version 

[01mCurrent contents of '/etc/hp/hplip.conf' file:[0m
# hplip.conf.  Generated from hplip.conf.in by configure.

[hplip]
version=3.21.10

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/cups/model/manufacturer-PPDs/hplip
ppdbase=/usr/share/cups/model/manufacturer-PPDs
doc=/usr/share/doc/packages/hplip
html=/usr/share/doc/packages/hplip
icon=/usr/share/applications
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/lib/cups/driver
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=no
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=no
foomatic-ppd-install=yes
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=no
cups-ppd-install=yes
internal-tag=3.21.10
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


[01mCurrent contents of '/var/lib/hp/hplip.state' file:[0m
[plugin]
installed = 1
eula = 1
version = 3.21.2



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

[fax]
email_address = 
voice_phone = 

[last_used]
device_uri = "hp:/net/HP_Color_LaserJet_MFP_M477fdw?ip=192.168.1.28"
printer_name = HP_Color_LaserJet_MFP_M477fdw
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 = 1620056903
notify_upgrade = true
pending_upgrade_time = 0
latest_available_version = 3.17.10

[installation]
date_time = 05/11/22 19:18:23
version = 3.21.10


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

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

 cups                 CUPS - Common Unix Printing System                           REQUIRED        1.1             2.2.7           OK         'CUPS Scheduler is running'
 gs                   GhostScript - PostScript and PDF language interpreter and previewer REQUIRED        7.05            9.52            OK         -
 xsane                xsane - Graphical scanner frontend for SANE                  OPTIONAL        0.9             0.999           OK         -
 scanimage            scanimage - Shell scanning program                           OPTIONAL        1.0             1.0.32          OK         -
 dbus                 DBus - Message bus system                                    REQUIRED        -               1.12.2          OK         -
 policykit            PolicyKit - Administrative policy framework                  OPTIONAL        -               0.116           OK         -
 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.2.7           OK         -
 cups-image           CUPS image - CUPS image development files                    REQUIRED        -               2.2.7           OK         -
 libpthread           libpthread - POSIX threads library                           REQUIRED        -               b'2.31'         OK         -
 libusb               libusb - USB library                                         REQUIRED        -               1.0             OK         -
 sane                 SANE - Scanning library                                      REQUIRED        -               1.0.32          OK         -
 sane-devel           SANE - Scanning library development files                    REQUIRED        -               1.0.32          OK         -
 libavahi-dev         libavahi-dev                                                 REQUIRED        -               -               OK         -
 libnetsnmp-devel     libnetsnmp-devel - SNMP networking library development files REQUIRED        5.0.9           5.7.3           OK         -
 libcrypto            libcrypto - OpenSSL cryptographic library                    REQUIRED        -               1.1.1           OK         -
 python3X             Python 2.2 or greater - Python programming language          REQUIRED        2.2             3.6.15          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.13.1          OK         -
 python3-pyqt5        PyQt 5- Qt interface for Python (for Qt version 4.x)         REQUIRED        5.0             5.13.1          OK         -
 python3-dbus         Python DBus - Python bindings for DBus                       REQUIRED        0.80.0          1.2.16          OK         -
 python3-xml          Python XML libraries                                         REQUIRED        -               2.2.5           OK         -
 python3-devel        Python devel - Python development files                      REQUIRED        2.2             3.6.15          OK         -
 python3-pil          PIL - Python Imaging Library (required for commandline scanning with hp-scan) OPTIONAL        -               7.2.0           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        -               7.5.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.21.10         OK         -
 hpmudext             IO-Extension                                                 REQUIRED        -               3.21.10         OK         -

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

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

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

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


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

No devices found.

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


01mHP_Color_LaserJet_MFP_M477fdw0m
01m-----------------------------0m
Type: Printer
Device URI: hp:/net/HP_Color_LaserJet_MFP_M477fdw?ip=192.168.1.28
PPD: /etc/cups/ppd/HP_Color_LaserJet_MFP_M477fdw.ppd
PPD Description: HP Color LaserJet Pro MFP M477 Postscript (recommended)
Printer status: printer HP_Color_LaserJet_MFP_M477fdw is idle.  enabled since Tue 10 May 2022 19:34:07 BST
Communication status: Good

01mHP_Color_LaserJet_MFP_M477fdw_fax0m
01m---------------------------------0m
Type: Fax
Device URI: hpfax:/net/HP_Color_LaserJet_MFP_M477fdw?ip=192.168.1.28
PPD: /etc/cups/ppd/HP_Color_LaserJet_MFP_M477fdw_fax.ppd
PPD Description: HP Fax2 hpcups
Printer status: printer HP_Color_LaserJet_MFP_M477fdw_fax is idle.  enabled since Tue 10 May 2022 19:31:57 BST
Communication status: Good


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

01m

Checking for Configured Queues....0m

Queue(s) configured correctly using HPLIP.
01m

Checking for HP Properitery Plugin's....0m
No plug-in printers are configured.
01m
Diagnose completed...
0m


More information on Troubleshooting,How-To's and Support is available on http://hplipopensource.com/hplip-web/index.html

I can only see two errors near the start highlight in red; looking at hplip through yast, the latest available version in opensuse 15.3 is installed (version 3.21.10).

Try again with sudo…

Using sudo I get the following:

HP Linux Imaging and Printing System (ver. 3.21.10)
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.

error: hp-doctor should not be run as root/superuser

What logging can I switch on for sane? I’m struggling to get any useful info with the systemd logging.

No, I meant the hp-plugin command.

This guide may be of value

sudo hp-plugin -i -p .

gives the following:


[01mHP Linux Imaging and Printing System (ver. 3.21.10)[0m
[01mPlugin Download and Install Utility ver. 2.1[0m

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.

[35;01mwarning: It is not recommended to run 'hp-plugin' in a root mode.[0m

[01mHP Linux Imaging and Printing System (ver. 3.21.10)[0m
[01mPlugin Download and Install Utility ver. 2.1[0m

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: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)


------------------------------------------
| PLUG-IN INSTALLATION FOR HPLIP 3.21.10 |
------------------------------------------


---------------
| COPY PLUGIN |
---------------

Downloading plug-in from: file:///home/ajw/hplip-3.21.10-plugin.run
Traceback (most recent call last):
  File "/usr/bin/hp-plugin", line 361, in <module>
    pm = tui.ProgressMeter("Downloading plug-in:")
  File "/usr/share/hplip/base/tui.py", line 222, in __init__
    self.max_size = ttysize()[1] - len(prompt) - 25
  File "/usr/share/hplip/base/tui.py", line 200, in ttysize
    ln1 = subprocess.getoutput('stty -a').splitlines()[0]
  File "/usr/lib64/python3.6/subprocess.py", line 556, in getoutput
    return getstatusoutput(cmd)[1]
  File "/usr/lib64/python3.6/subprocess.py", line 537, in getstatusoutput
    data = check_output(cmd, shell=True, universal_newlines=True, stderr=STDOUT)
  File "/usr/lib64/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib64/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/bin/sh'

Looks similar to non sudo output apart from warning about running it as root.

sudo hp-plugin gives the following:


[01mHP Linux Imaging and Printing System (ver. 3.21.10)[0m
[01mPlugin Download and Install Utility ver. 2.1[0m

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.

[35;01mwarning: It is not recommended to run 'hp-plugin' in a root mode.[0m

[01mHP Linux Imaging and Printing System (ver. 3.21.10)[0m
[01mPlugin Download and Install Utility ver. 2.1[0m

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: Defaults for each question are maked with a '*'. Press <enter> to accept the default.)


------------------------------------------
| PLUG-IN INSTALLATION FOR HPLIP 3.21.10 |
------------------------------------------


---------------
| COPY PLUGIN |
---------------

Downloading plug-in from: file:///home/ajw/hplip-3.21.10-plugin.run
Traceback (most recent call last):
  File "/usr/bin/hp-plugin", line 361, in <module>
    pm = tui.ProgressMeter("Downloading plug-in:")
  File "/usr/share/hplip/base/tui.py", line 222, in __init__
    self.max_size = ttysize()[1] - len(prompt) - 25
  File "/usr/share/hplip/base/tui.py", line 200, in ttysize
    ln1 = subprocess.getoutput('stty -a').splitlines()[0]
  File "/usr/lib64/python3.6/subprocess.py", line 556, in getoutput
    return getstatusoutput(cmd)[1]
  File "/usr/lib64/python3.6/subprocess.py", line 537, in getstatusoutput
    data = check_output(cmd, shell=True, universal_newlines=True, stderr=STDOUT)
  File "/usr/lib64/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib64/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/bin/sh'

Apart from a warning about not running as root looks similar to non-root version.

On the basis that the hp-plugin failed, I tried the following:

sh hplip-3.21.10-plugin.run

which gave the following:

Verifying archive integrity... All good.
Uncompressing HPLIP 3.21.10 Plugin Self Extracting Archive..............................................................
Error importing HPLIP modules.  Is HPLIP installed?

hplip python files appear to be installed under /usr/share/hplip

Where is the script looking?

To qualify the last comment, what controls the search path of python scripts?

I have actually managed to get the install script to run using the follow sequence:

The following retains the unpacked archive.

sh hplip-3.21.10-plugin.run --keep

The following allowed me to determine that bash script hplip-plugin-install was the next script in the chain of execution.

bash -x hplip-3.21.10-plugin.run --keep

hplip-plugin-install

#!/bin/bash

# su/sudo wrapper for HPLIP installer

if  $# -eq 6 ]
then
   `$6 --version &&gt; /dev/null`
    if  $? -eq 0 ]
    then
        $6 ./plugin_install.py $1 $2 $3 $4 $5
    else
        python ./plugin_install.py $1 $2 $3 $4 $5
    fi
else
    if  -f /usr/bin/python ]
    then
        python ./plugin_install.py $1 $2 $3 $4 $5
    else
        python3 ./plugin_install.py $1 $2 $3 $4 $5
    fi
fi

I’m still not sure whether Leap 15.3 should be defaulting to Python2 or Python3; I opted for Python3; I ran the following command under “pdb”:

python3 -m pdb ./plugin_install.py -v 3.21.10 -c 64

I stepped through the python install script and it worked under pdb; this suggests there is something wrong with the python environment.