Page 1 of 1

<solved>scanner does not work

Posted: Mon Sep 12, 2022 1:46 am
by davidwillis
I installed hplip, but my scanner still does not work. When I try to scan it says Driver plug-in installation is required, but when I click next to install it, it says the filed does not match its checksum. file may have been corrupted or altered.

Re: scanner does not work

Posted: Mon Sep 12, 2022 1:50 am
by davidwillis
Also when I run hp-setup, it finds my printer but it also fails.

Re: scanner does not work

Posted: Mon Sep 12, 2022 2:27 am
by Eadwine Rose
Have you installed HP Printing using the MX Package Installer?

Re: scanner does not work

Posted: Mon Sep 12, 2022 3:09 am
by davidwillis
Yes, I have hp printing installed

Re: scanner does not work

Posted: Wed Sep 14, 2022 10:12 am
by razor2021
So, instead of doing the above. Can you manually add the HP Printer first? Once added, and you can print to the HP printer and see if the driver chosen will work to print. If possible assign a fixed IP address for the HP Printer. Afterwards, once the printer is working, then check to see if scanner will detect the printer. And then try scanning to see if scanner works for free. That's how I got my Samsung printer/scanner to work. I also added the IP into the /etc/sane.d/xerox_mfp.conf; via following example;

# installing printers
sudo vi /etc/sane.d/xerox_mfp.conf:

#Samsung CLX-xxxx Series: Samsung CLX xxxx
tcp 192.168.1.10 <======== I added this line for the fixed IP address
usb 0x04e8 0x343d

It might be different between HP and Samsung.

Re: scanner does not work

Posted: Wed Sep 14, 2022 10:29 pm
by davidwillis
The printer was added automatically, and I can print with it. However I have not configured the printer with a static ip address. This has always worked without issues before, so I am not sure why I am having problems now.

Re: scanner does not work

Posted: Wed Sep 14, 2022 11:49 pm
by figueroa
Try switching repositories then try installing the driver plugin. If it is a SANE supported scanner you should be able to get this to go.

Re: scanner does not work

Posted: Thu Sep 15, 2022 4:35 am
by gor9
and if above does not work, I suggest an alternative....but I can not see what your actual model is?
It will always helps to provide details please.

1) mx manual for scanner shows list
http://www.sane-project.org/sane-mfgs.html
which leads us to a smallish hp list. IMHO

So...
2) xsane is a GUI or front end to sane

Code: Select all

sudo apt update 
sudo apt install xsane
scanimage -L
# NOT OP  ...device `pixma:04A9180B_0581C8' is a CANON Canon PIXMA MG3000 Series multi-function peripheral
xsane
and post any errors you see for xsane or scanimage
If you have no errors....a GUI will open called xsane and then your scanner will work

You will probably want to change the output and resolutions etc. I prefer png and your scanner may support higher DPI

Re: scanner does not work

Posted: Fri Sep 16, 2022 4:57 pm
by davidwillis
I have used this printer in mx linux before, but it doesn't work now. I am not sure why....

Here is the output:
scanimage -L
device `hpaio:/net/hp_laserjet_pro_mfp_m225dn?ip=192.168.0.104&queue=false' is a Hewlett-Packard hp_laserjet_pro_mfp_m225dn all-in-one

As you can see from that output, it is a hp laserjet mfp m225dn

I have attached an in image of what happens when I run xsane.

I am not really sure what is meant by "switching repositories then try installing the driver plugin"

Re: scanner does not work

Posted: Fri Sep 16, 2022 6:51 pm
by JayM
Since you never assigned a static IP address your printer's DHCP lease may have expired and your router may have given it a new one with a different IP. If you rerun HPLIP's printer setup wizard does it detect your printer? If the printer's IP changed and you haven't rerun HPLIP's printer detection thing it may be sending print jobs to the old IP address.

Re: scanner does not work

Posted: Fri Sep 16, 2022 7:01 pm
by davidwillis
Yes, it detects and finds the printer, but then gives an error when it tries to install the plugin. I think if I could just get the plugin installed it would work fine.

Re: scanner does not work

Posted: Fri Sep 16, 2022 7:25 pm
by JayM
Can I please see your Quick System Info and the exact text of the error message you're getting (not a screenshot, the actual text in code tags.)

Re: scanner does not work

Posted: Fri Sep 16, 2022 7:29 pm
by gor9
in addition to JayM advice,

your printer needs a plugin according to this page
https://developers.hp.com/hp-linux-imag ... lugin.html

Once you have re-run hplip as root, re-test scanner and if it does not work then run

Code: Select all

sudo hp-plugin
I do not own a hp anymore but in theory it should download the plugin (say) for the hplip v 3.21.4 from here
https://developers.hp.com/hp-linux-imag ... ng/plugins

Re: scanner does not work

Posted: Fri Sep 16, 2022 7:42 pm
by davidwillis
HP plugin gives me this:

Code: Select all

Checking for network connection...
Downloading plug-in from: 
Downloading plug-in: [\                               ] 0%  error: Plugin download failed with error code = 8

error:  file does not match its checksum. File may have been corrupted or altered
I think this is my problem.

Code: Select all

System:    Kernel: 5.18.0-4mx-amd64 [5.18.16-1~mx21+1] x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.18.0-4mx-amd64 
           root=UUID=<filter> ro quiet splash 
           Desktop: KDE Plasma 5.20.5 wm: kwin_x11 vt: 7 dm: SDDM 
           Distro: MX-21.2_KDE_x64 Wildflower 27 August 2022 base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Desktop System: Micro-Star product: MS-7D32 v: 1.0 serial: <filter> 
           Mobo: Micro-Star model: MAG Z690 TOMAHAWK WIFI DDR4 (MS-7D32) v: 1.0 serial: <filter> 
           UEFI: American Megatrends LLC. v: 1.10 date: 12/17/2021 
Battery:   Device-1: hidpp_battery_0 model: Logitech M510 serial: <filter> 
           charge: 55% (should be ignored) rechargeable: yes status: Discharging 
           Device-2: hidpp_battery_1 model: Logitech K350 serial: <filter> 
           charge: 70% (should be ignored) rechargeable: yes status: Discharging 
CPU:       Info: 12-Core model: 12th Gen Intel Core i9-12900K bits: 64 type: MT MCP 
           arch: Alder Lake family: 6 model-id: 97 (151) stepping: 2 microcode: 1F cache: 
           L2: 30 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 152985 
           Speed: 621 MHz min/max: 800/6500 MHz Core speeds (MHz): 1: 621 2: 604 3: 600 4: 1431 
           5: 600 6: 601 7: 600 8: 1059 9: 2707 10: 849 11: 800 12: 814 13: 635 14: 801 15: 800 
           16: 801 17: 800 18: 600 19: 678 20: 600 21: 600 22: 600 23: 600 24: 600 
           Vulnerabilities: Type: itlb_multihit status: Not affected 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: mmio_stale_data status: Not affected 
           Type: retbleed status: Not affected 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 
           mitigation: Enhanced IBRS, IBPB: conditional, RSB filling, PBRSB-eIBRS: SW sequence 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel AlderLake-S GT1 vendor: Micro-Star MSI driver: i915 v: kernel 
           bus-ID: 00:02.0 chip-ID: 8086:4680 class-ID: 0380 
           Device-2: NVIDIA GA106 [GeForce RTX 3060 Lite Hash Rate] vendor: Micro-Star MSI 
           driver: nvidia v: 510.73.08 bus-ID: 01:00.0 chip-ID: 10de:2504 class-ID: 0300 
           Device-3: EMEET HD Webcam eMeet C960 type: USB driver: snd-usb-audio,uvcvideo 
           bus-ID: 1-1.2:4 chip-ID: 328f:003f class-ID: 0102 serial: <filter> 
           Display: x11 server: X.Org 1.20.14 compositor: kwin_x11 driver: 
           loaded: modesetting,nvidia unloaded: fbdev,nouveau,vesa alternate: nv display-ID: :0 
           screens: 1 
           Screen-1: 0 s-res: 7680x2160 s-dpi: 162 s-size: 1204x341mm (47.4x13.4") 
           s-diag: 1251mm (49.3") 
           Monitor-1: DP-0 res: 3840x2160 hz: 60 dpi: 163 size: 600x340mm (23.6x13.4") 
           diag: 690mm (27.2") 
           Monitor-2: DP-2 res: 3840x2160 hz: 60 dpi: 163 size: 600x340mm (23.6x13.4") 
           diag: 690mm (27.2") 
           OpenGL: renderer: NVIDIA GeForce RTX 3060/PCIe/SSE2 v: 4.6.0 NVIDIA 510.73.08 
           direct render: Yes 
Audio:     Device-1: Intel Alder Lake-S HD Audio vendor: Micro-Star MSI driver: snd_hda_intel 
           v: kernel alternate: snd_sof_pci_intel_tgl bus-ID: 00:1f.3 chip-ID: 8086:7ad0 
           class-ID: 0403 
           Device-2: NVIDIA vendor: Micro-Star MSI driver: snd_hda_intel v: kernel bus-ID: 01:00.1 
           chip-ID: 10de:228e class-ID: 0403 
           Device-3: EMEET HD Webcam eMeet C960 type: USB driver: snd-usb-audio,uvcvideo 
           bus-ID: 1-1.2:4 chip-ID: 328f:003f class-ID: 0102 serial: <filter> 
           Device-4: JOUNIVO JV601 type: USB driver: snd-usb-audio bus-ID: 1-11:8 
           chip-ID: 5679:1002 class-ID: 0300 serial: <filter> 
           Device-5: Micro Star USB Audio type: USB driver: hid-generic,snd-usb-audio,usbhid 
           bus-ID: 1-5:5 chip-ID: 0db0:b202 class-ID: 0300 
           Sound Server-1: ALSA v: k5.18.0-4mx-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Intel Alder Lake-S PCH CNVi WiFi driver: iwlwifi v: kernel modules: wl 
           port: 5000 bus-ID: 00:14.3 chip-ID: 8086:7af0 class-ID: 0280 
           IF: wlan0 state: down mac: <filter> 
           Device-2: Intel Ethernet I225-V vendor: Micro-Star MSI driver: igc v: kernel port: 4000 
           bus-ID: 07:00.0 chip-ID: 8086:15f3 class-ID: 0200 
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter> 
Bluetooth: Device-1: Intel type: USB driver: btusb v: 0.8 bus-ID: 1-14:12 chip-ID: 8087:0026 
           class-ID: e001 
           Report: hciconfig ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 3.0 lmp-v: 5.2 
           sub-v: 3181 hci-v: 5.2 rev: 3181 
           Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff link-mode: slave accept 
           service-classes: rendering, capturing, object transfer, audio 
Drives:    Local Storage: total: 12.96 TiB used: 2.78 TiB (21.4%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/nvme0n1 maj-min: 259:2 vendor: Samsung model: SSD 980 PRO 2TB size: 1.82 TiB 
           block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s lanes: 4 type: SSD 
           serial: <filter> rev: 5B2QGXA7 temp: 40.9 C scheme: GPT 
           ID-2: /dev/nvme1n1 maj-min: 259:0 model: PCIe SSD size: 3.64 TiB block-size: 
           physical: 512 B logical: 512 B speed: 63.2 Gb/s lanes: 4 type: SSD serial: <filter> 
           rev: EIFM31.4 temp: 39.9 C scheme: GPT 
           ID-3: /dev/nvme2n1 maj-min: 259:6 vendor: Samsung model: SSD 970 EVO Plus 250GB 
           size: 232.89 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 
           type: SSD serial: <filter> rev: 1B2QEXM7 temp: 36.9 C scheme: GPT 
           ID-4: /dev/sda maj-min: 8:0 type: USB vendor: Seagate model: Expansion Desk 
           size: 7.28 TiB block-size: physical: 4096 B logical: 512 B type: N/A serial: <filter> 
           rev: 9401 scheme: GPT 
Partition: ID-1: / raw-size: 969.44 GiB size: 953.15 GiB (98.32%) used: 92.17 GiB (9.7%) fs: ext4 
           dev: /dev/nvme0n1p3 maj-min: 259:5 
           ID-2: /boot/efi raw-size: 477 MiB size: 476.7 MiB (99.95%) used: 32.3 MiB (6.8%) 
           fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:3 
Swap:      Alert: No swap data was found. 
Sensors:   System Temperatures: cpu: 27.8 C mobo: N/A gpu: nvidia temp: 51 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 0% 
Repos:     Packages: note: see --pkg apt: 2484 lib: 1396 flatpak: 0 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/google-chrome.list 
           1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://la.mxrepo.com/mx/repo/ bullseye main non-free
           2: deb http://la.mxrepo.com/mx/repo/ bullseye ahs
           Active apt repos in: /etc/apt/sources.list.d/skype-stable.list 
           1: deb [arch=amd64] https://repo.skype.com/deb stable main
           Active apt repos in: /etc/apt/sources.list.d/vivaldi.list 
           1: deb [arch=amd64] https://repo.vivaldi.com/stable/deb/ stable main
Info:      Processes: 511 Uptime: 2h 55m wakeups: 28 Memory: 31.15 GiB used: 11.52 GiB (37.0%) 
           Init: SysVinit v: 2.96 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: 10.2.1 
           alt: 10 Client: shell wrapper v: 5.1.4-release inxi: 3.3.06 
Boot Mode: UEFI

Re: scanner does not work

Posted: Fri Sep 16, 2022 8:30 pm
by JayM
Where are you getting this plugin and why do you need it?

Re: scanner does not work

Posted: Fri Sep 16, 2022 8:40 pm
by davidwillis
When I try to scan something, it tells me I need the plugin. I have just been using the window that opens to try to install it, but then this last time I used the command sudo hp-plugin

Re: scanner does not work

Posted: Fri Sep 16, 2022 9:15 pm
by JayM
davidwillis wrote: Fri Sep 16, 2022 8:40 pm When I try to scan something, it tells me I need the plugin. I have just been using the window that opens to try to install it, but then this last time I used the command sudo hp-plugin
Please provide sufficient information. What scanning app are you using? What specifically is "the plugin?"

Re: scanner does not work

Posted: Fri Sep 16, 2022 9:32 pm
by gor9
to all
I think this is my problem.
I agree this is at least one problem. There may be more.
JayM writes in part...
this plugin and why do you need it?
my link in post 13 shows that scanner support is required as
HP LaserJet Pro MFP m225dn Required 3.14.10 1.Scanning support. 2.Faxing support.
The 3.14 but is the minimum plugin version.

the link suggests its extra firmware required for some services. OP should be able to print ok

Re: scanner does not work

Posted: Fri Sep 16, 2022 9:54 pm
by gor9
an internet search shows one of the issues may be with the key server itself.

a possible solutions from the past is showing in this link
https://askubuntu.com/questions/1151526 ... successful

for the OP I suggest, assuming pathways are still correct

Code: Select all

sudo apt update
sudo apt-get install apparmor-utils
sudo aa-disable /usr/share/hplip/plugin.py
# next command must be non-root
hplip-plugin
if plugin downloads by bypassing the key server issue....give it a shot

####
below are my attempts to get the key

Code: Select all

gpg --keyserver pgp.mit.edu --recv-keys 0xA59047B9
gpg: keyserver receive failed: No data
and that key comes from
https://developers.hp.com/hp-linux-imag ... icate.html

Re: scanner does not work

Posted: Sat Sep 17, 2022 1:08 am
by davidwillis
Everything seemed to go fine until:

Code: Select all

$ sudo aa-disable /usr/share/hplip/plugin.py
Profile for /usr/share/hplip/plugin.py not found, skipping
david@mx:~
$ hplip-plugin
hplip-plugin: command not found
david@mx:~

Re: scanner does not work

Posted: Sat Sep 17, 2022 1:17 am
by JayM
What is your printer model?

Re: scanner does not work

Posted: Sat Sep 17, 2022 2:12 am
by gor9
I found a post here
https://bugs.launchpad.net/hplip/+bug/1818629

to get around the gpg error do this.....you can not use sudo ....needs full root

Code: Select all

sudo su
echo '162.213.33.8 pgp.mit.edu' >> /etc/hosts
hp-setup -i
should now work.

(2) if it does not run the below command with as a local user and also with sudo at beginning
hp-setup -i needs root powers

# below as local user is key import success compared to older post

Code: Select all

gpg --keyserver pgp.mit.edu --recv-keys 0xA59047B9
gpg: /home/gor/.gnupg/trustdb.gpg: trustdb created
gpg: key 73D770CDA59047B9: public key "HPLIP (HP Linux Imaging and Printing) <hplip@hp.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1

Re: scanner does not work

Posted: Sat Sep 17, 2022 9:56 am
by davidwillis
JayM wrote: Sat Sep 17, 2022 1:17 am What is your printer model?
It is a HP LaserJet Pro MFP m225dn
gor9 wrote: Sat Sep 17, 2022 2:12 am I found a post here
https://bugs.launchpad.net/hplip/+bug/1818629

to get around the gpg error do this.....you can not use sudo ....needs full root

Code: Select all

sudo su
echo '162.213.33.8 pgp.mit.edu' >> /etc/hosts
hp-setup -i
should now work.

(2) if it does not run the below command with as a local user and also with sudo at beginning
hp-setup -i needs root powers

# below as local user is key import success compared to older post

Code: Select all

gpg --keyserver pgp.mit.edu --recv-keys 0xA59047B9
gpg: /home/gor/.gnupg/trustdb.gpg: trustdb created
gpg: key 73D770CDA59047B9: public key "HPLIP (HP Linux Imaging and Printing) <hplip@hp.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
After running hp-setup-i, it seemed to work fine, setting up the printer, but it didn't install the plugin, and still did not work with the scanner.

I then tried (2), and now I get a different error when running hp-setup

Code: Select all

$ gpg --keyserver pgp.mit.edu --recv-keys 0xA59047B9
gpg: directory '/home/david/.gnupg' created
gpg: keybox '/home/david/.gnupg/pubring.kbx' created
gpg: /home/david/.gnupg/trustdb.gpg: trustdb created
gpg: key 73D770CDA59047B9: public key "HPLIP (HP Linux Imaging and Printing) <hplip@hp.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
david@mx:~
$ hp-setup

HP Linux Imaging and Printing System (ver. 3.21.4)
Printer/Fax Setup Utility ver. 9.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.

Searching... (bus=net, timeout=5, ttl=4, search=(None) desc=0, method=slp)
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/setupdialog.py", line 1343, in NextButton_clicked
    self.showAddPrinterPage()
  File "/usr/share/hplip/ui5/setupdialog.py", line 710, in showAddPrinterPage
    self.findPrinterPPD()
  File "/usr/share/hplip/ui5/setupdialog.py", line 804, in findPrinterPPD
    self.print_ppd = cups.getPPDFile2(self.mq, self.model, self.ppds)         
  File "/usr/share/hplip/prnt/cups.py", line 539, in getPPDFile2
    family_class=getFamilyClassName(model)
  File "/usr/share/hplip/prnt/cups.py", line 181, in getFamilyClassName
    family_type= dict[m]['family-class']
KeyError: 'family-class'
Aborted

Re: scanner does not work

Posted: Sat Sep 17, 2022 10:09 am
by gor9
EDIT
my bad. Even tho you did not disable python script extra line to be sure.

1)

Code: Select all

sudo su
gpg --keyserver pgp.mit.edu --recv-keys 0xA59047B9
/usr/bin/aa-enabled /usr/share/hplip/plugin.py
# stay as root
hp-setup -i
2) as local user

Code: Select all

sudo hp-plugin
allegedly as we have imported gpg key as local and root user, it should work in theory. but I am getting tired and so to bed

Re: scanner does not work

Posted: Sat Sep 17, 2022 10:22 am
by davidwillis
gor9 wrote: Sat Sep 17, 2022 10:09 am my bad....we need to re-enable the python script first me thinks

Code: Select all

sudo su
/usr/bin/aa-enabled /usr/share/hplip/plugin.py
# stay as root
hp-setup -i

Code: Select all

# /usr/bin/aa-enabled /usr/share/hplip/plugin.py
unknown option '/usr/share/hplip/plugin.py'
/usr/bin/aa-enabled: [options]
  options:
  -q | --quiet        Don't print out any messages
  -h | --help         Print help

Re: scanner does not work

Posted: Sat Sep 17, 2022 10:25 am
by gor9
sorry I have editted above post good luck

edit ignore the re-enable command pls

Re: scanner does not work

Posted: Sat Sep 17, 2022 10:32 am
by davidwillis
Still no luck.... But I just thought of something. my wifi/bluetooth did not work, so I installed kernel 5.18. Do you think that could have anything to do with this problem?

https://forum.mxlinux.org/viewtopic.php?t=71613

Re: scanner does not work  [Solved]

Posted: Sat Sep 17, 2022 10:41 am
by davidwillis
So I got it working.
I just went to https://developers.hp.com/hp-linux-imag ... ng/plugins
Downloeded the plugin hplip-3.21.4-plugin.run
as root # hp-setup
Choose select path to the plugin (advanced)
put the path to where I downloaded it

And it installed and is now working!

Re: <solved>scanner does not work

Posted: Sat Sep 17, 2022 7:04 pm
by gor9
davidwillis

great solution!

can you go to post 28 and and click tick .....that marks which post was the solution.