xsane: Failed to start scanner: Invalid argument, attributes not found, unable to load library libm.so

Asked by Michael Steffens on 2021-01-13

OS: Ubuntu 20.04
HPLIP: release 3.20.9, with plugin installed
Printer: Color LaserJet Pro MFP M283fdw

I am trying to enable scanning via xsane and I have tried to apply several tweaks and hint from this launchpad to get it running. In parts successful, but the workaround look strange and incorrect. For printing I'm using the IPP Everywhere CUPS driver

After launch, xsane detects a preselected device

  hpaio:/net/hp_colorlaserjet_mfp_m282-m285?ip=192.168.178.254

along with two ESCL URIs of the same printer. Using the hpaio URI any attempt to scan fails with "Failed to start scanner: Invalid argument" and syslog

  xsane: protocol/discovery/avahiDiscovery.c 331: (Browser) NEW: service 'HP Color LaserJet MFP M283fdw (EFBB7A)' of type '_uscan._tcp' in domain 'local'
  xsane: protocol/discovery/avahiDiscovery.c 331: (Browser) NEW: service 'HP Color LaserJet MFP M283fdw (EFBB7A)' of type '_scanner._tcp' in domain 'local'
  xsane: io/hpmud/model.c 534: no colorlaserjet_mfp_m282-m285 attributes found in /usr/share/hplip/data/models/models.dat
  xsane: io/hpmud/model.c 545: no colorlaserjet_mfp_m282-m285 attributes found in /usr/share/hplip/data/models/unreleased/unreleased.dat
  xsane: common/utils.c 212: unable to load library libm.so: /usr/lib/x86_64-linux-gnu/libm.so: invalid ELF header
  xsane: scan/sane/soapht.c 949: invalid extents: tlx=22212 brx=22212 tly=88849 bry=19435744 minwidth=3196059 minheight3196059 maxwidth=14149222 maxheight=19459342

I can scan using

  $ scanimage -d hpaio:/net/hp_colorlaserjet_mfp_m282-m285?ip=192.168.178.253 --format=png > scan.png

though. According to https://bugs.launchpad.net/hplip/+bug/1871116 I have tried to address the "no colorlaserjet_mfp_m282-m285 attributes" issues. In /usr/share/hplip/data/models/models.dat I replicated the section

  [hp_colorlaserjet_mfp_m282-m285]
  align-type=0
  clean-type=0
  ...

as

  [colorlaserjet_mfp_m282-m285]
  align-type=0
  clean-type=0
  ...

Using this modification I'm getting a slightly modified URI

  hpaio:/net/colorlaserjet_mfp_m282-m285?ip=192.168.178.254&queue=false

and can actually use that for scanning with xsane! The syslog reports

  xsane: protocol/discovery/avahiDiscovery.c 331: (Browser) NEW: service 'HP Color LaserJet MFP M283fdw (EFBB7A)' of type '_uscan._tcp' in domain 'local'
  xsane: protocol/discovery/avahiDiscovery.c 331: (Browser) NEW: service 'HP Color LaserJet MFP M283fdw (EFBB7A)' of type '_scanner._tcp' in domain 'local'
  xsane: common/utils.c 212: unable to load library libm.so: /usr/lib/x86_64-linux-gnu/libm.so: invalid ELF header

so the infamous "unable to load library libm.so: /usr/lib/x86_64-linux-gnu/libm.so" remains. So I tried #5 from https://bugs.launchpad.net/hplip/+bug/1871116 for providing a printing URI beginning hp:/... for automatic scanning:

  $ lpadmin -p M283fdw_PPD -v "hp:/net/hp_colorlaserjet_mfp_m282-m285?ip=192.168.178.253" -E -m "postscript-hp:0/ppd/hplip/HP/hp-color_laserjet_m282-m285-ps.ppd"
  lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.

With that queue I get both URI offered:

  hpaio:/net/hp_colorlaserjet_mfp_m282-m285?ip=192.168.178.254
  hpaio:/net/colorlaserjet_mfp_m282-m285?ip=192.168.178.254&queue=false

The first fails as before, now reporting

  xsane: protocol/discovery/avahiDiscovery.c 331: (Browser) NEW: service 'HP Color LaserJet MFP M283fdw (EFBB7A)' of type '_uscan._tcp' in domain 'local'
  xsane: protocol/discovery/avahiDiscovery.c 331: (Browser) NEW: service 'HP Color LaserJet MFP M283fdw (EFBB7A)' of type '_scanner._tcp' in domain 'local'
  xsane: common/utils.c 212: unable to load library libm.so: /usr/lib/x86_64-linux-gnu/libm.so: invalid ELF header
  xsane: scan/sane/soapht.c 949: invalid extents: tlx=22212 brx=22212 tly=88849 bry=19435744 minwidth=3196059 minheight3196059 maxwidth=14149222 maxheight=19459342

So the attributes are found, but libm,so isn't, and that seems to matter with extents calculation. The second URI succeeds. Still unable to load library libm.so, but scans, as above.

What is the proper way of setting up the printer for scanning? What would I need the M283fdw_PPD queue for? What does the load failure of libm.so indicate?

Question information

Language:
English Edit question
Status:
Expired
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
2021-01-13
Last reply:
2021-01-30

Submission as bug was unintentional.

Launchpad Janitor (janitor) said : #2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.