LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Scanner not working on HP printer/scanner combo (https://www.linuxquestions.org/questions/linux-newbie-8/scanner-not-working-on-hp-printer-scanner-combo-4175712952/)

kernelhead 06-03-2022 03:17 AM

Scanner not working on HP printer/scanner combo
 
Ubuntu 22.04 lts

Scanner not working on HP printer/scanner combo. The printer works. I have tried 4 different scanner program from the Ubuntu Software center. Some will recognize the name of the device but won't scan. I have also installed the following from the Software center: ps-printer-app, ipp-usb, and hplip-printer-app.

hazel 06-03-2022 04:13 AM

If you look at the man page for sane, it contains a big section on how to debug this kind of problem. Go through the steps they suggest and then report back.

ferrari 06-03-2022 04:19 AM

Can you show if the scanner is reported by the following command?
Code:

scanimage -L
Show the printer device URI as well
Code:

lpstat -t

Soadyheid 06-03-2022 08:42 AM

How's your printer/scanner hooked up to your PC? I've got an HP Photosmart 5520 attached to my Mint 20.2 system. The printer worked fine via WiFi but the scanner wouldn't till I connected them together via a USB cable. Weird! No idea what the problem was but all happy now.

Play Bonny!

:hattip:

kernelhead 06-03-2022 12:42 PM

Quote:

Originally Posted by ferrari (Post 6358379)
Can you show if the scanner is reported by the following command?
Code:

scanimage -L
Show the printer device URI as well
Code:

lpstat -t

Code:

michael@michael-HP-EliteDesk-800-G1-SFF:~$ scanimage -L
device `hpaio:/usb/HP_LaserJet_Pro_MFP_M127fn?serial=CNB9H7FDXQ' is a Hewlett-Packard HP_LaserJet_Pro_MFP_M127fn all-in-one
michael@michael-HP-EliteDesk-800-G1-SFF:~$ lpstat -t
scheduler is running
system default destination: HP-LaserJet-Pro-MFP-M127fn
device for HP-LaserJet-Pro-MFP-M127fn: hp:/usb/HP_LaserJet_Pro_MFP_M127fn?serial=CNB9H7FDXQ
device for HP-LaserJet-Pro-MFP-M127fn-Fax-2: hpfax:/usb/HP_LaserJet_Pro_MFP_M127fn?serial=CNB9H7FDXQ
HP-LaserJet-Pro-MFP-M127fn accepting requests since Thu 05 May 2022 04:12:28 PM EDT
HP-LaserJet-Pro-MFP-M127fn-Fax-2 accepting requests since Thu 05 May 2022 04:12:28 PM EDT
printer HP-LaserJet-Pro-MFP-M127fn is idle.  enabled since Thu 05 May 2022 04:12:28 PM EDT
printer HP-LaserJet-Pro-MFP-M127fn-Fax-2 is idle.  enabled since Thu 05 May 2022 04:12:28 PM EDT
michael@michael-HP-EliteDesk-800-G1-SFF:~$


kernelhead 06-03-2022 12:42 PM

Quote:

Originally Posted by Soadyheid (Post 6358410)
How's your printer/scanner hooked up to your PC? I've got an HP Photosmart 5520 attached to my Mint 20.2 system. The printer worked fine via WiFi but the scanner wouldn't till I connected them together via a USB cable. Weird! No idea what the problem was but all happy now.

Play Bonny!

:hattip:

It's USB

uteck 06-03-2022 01:25 PM

Make sure your user is in the scanner group, Ubuntu has a history of not adding users to that group.
To list what groups you are in run the 'groups' command.

hazel 06-03-2022 01:29 PM

Quote:

Originally Posted by uteck (Post 6358487)
Make sure your user is in the scanner group, Ubuntu has a history of not adding users to that group.
To list what groups you are in run the 'groups' command.

For an all-in-1 printer/scanner the relevant usb port might be assigned to either the lp or the scanner group. It depends on your udev rules. Better make sure you're in both of them.

There's a useful command sane-find-scanner which detects the scanner simply as a usb device. If this doesn't work as you but works as root, it's a permissions problem on the usb port.

kernelhead 06-03-2022 03:42 PM

Not really sure what I'm doing. Perhaps this will shed some light on it (?) :

Code:

michael@michael-HP-EliteDesk-800-G1-SFF:~$ sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

could not open USB device 0x8087/0x8000 at 002:002: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 002:001: Access denied (insufficient permissions)
could not open USB device 0x8087/0x8008 at 001:002: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 001:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0003 at 004:001: Access denied (insufficient permissions)
could not open USB device 0x0781/0xb6b7 at 003:004: Access denied (insufficient permissions)
found possible USB scanner (vendor=0x03f0 [Hewlett-Packard], product=0x322a [HP LaserJet Pro MFP M127fn]) at libusb:003:003
could not open USB device 0x25a7/0xfa23 at 003:005: Access denied (insufficient permissions)
could not open USB device 0x046d/0x0825 at 003:002: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 003:001: Access denied (insufficient permissions)
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.

  # You may want to run this program as root to find all devices. Once you
  # found the scanner devices, be sure to adjust access permissions as
  # necessary.
michael@michael-HP-EliteDesk-800-G1-SFF:~$ scanimage -L
device `hpaio:/usb/HP_LaserJet_Pro_MFP_M127fn?serial=CNB9H7FDXQ' is a Hewlett-Packard HP_LaserJet_Pro_MFP_M127fn all-in-one
michael@michael-HP-EliteDesk-800-G1-SFF:~$ % sudo su –
bash: fg: %: no such job
michael@michael-HP-EliteDesk-800-G1-SFF:~$ sudo su -
[sudo] password for michael:
root@michael-HP-EliteDesk-800-G1-SFF:~# sane-find-scanner

  # sane-find-scanner will now attempt to detect your scanner. If the
  # result is different from what you expected, first make sure your
  # scanner is powered up and properly connected to your computer.

  # No SCSI scanners found. If you expected something different, make sure that
  # you have loaded a kernel SCSI driver for your SCSI adapter.

found possible USB scanner (vendor=0x03f0 [Hewlett-Packard], product=0x322a [HP LaserJet Pro MFP M127fn]) at libusb:003:003
  # Your USB scanner was (probably) detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

  # Not checking for parallel port scanners.

  # Most Scanners connected to the parallel port or other proprietary ports
  # can't be detected by this program.
root@michael-HP-EliteDesk-800-G1-SFF:~#


uteck 06-03-2022 03:59 PM

Quote:

found possible USB scanner (vendor=0x03f0 [Hewlett-Packard], product=0x322a [HP LaserJet Pro MFP M127fn]) at libusb:003:003
The scanner was found, so it seems that it is a matter of permissions. Is your user in the scanner and lp groups?

ferrari 06-03-2022 05:57 PM

Quote:

Originally Posted by kernelhead (Post 6358511)
Not really sure what I'm doing. Perhaps this will shed some light on it (?) :

The output you shared shows that the USB-connected scanner is detected. That's a good sign. However, I've seen some reports that ipp-usb (for airscan support) might break communication when using the HPLIP hpaio driver.

https://groups.google.com/g/linux.de...3DUb_GeM?pli=1

So, you could try removing that package. Just speculation on my part of course.

Also, check if the firmare (plugin) is required.
Code:

hp-doctor
https://developers.hp.com/hp-linux-i...l#howtocheck11

ferrari 06-03-2022 05:58 PM

Quote:

Originally Posted by uteck (Post 6358514)
The scanner was found, so it seems that it is a matter of permissions. Is your user in the scanner and lp groups?

No, it is not a permissions issue. The commands were run as user, and found successfully. Some other issue at play.

hazel 06-04-2022 04:05 AM

Quote:

Originally Posted by ferrari (Post 6358536)
No, it is not a permissions issue. The commands were run as user, and found successfully. Some other issue at play.

So the next step according to the Sane man page is to run scanimage -L in debug mode. The page tells you how to do it. Start by setting the usb debug parameter to 256 and see if you get a visible error there. If you do, it's a libusb connection problem. If not, look at the man page for hpaio; it has a debug parameter that you can set similarly for maximum info. At some point you should see some operation that crashes and it can usually be fixed by editing the configuration files in /etc/sane.d.

kernelhead 06-04-2022 05:16 PM

Quote:

Originally Posted by ferrari (Post 6358535)
The output you shared shows that the USB-connected scanner is detected. That's a good sign. However, I've seen some reports that ipp-usb (for airscan support) might break communication when using the HPLIP hpaio driver.

https://groups.google.com/g/linux.de...3DUb_GeM?pli=1

So, you could try removing that package. Just speculation on my part of course.

Also, check if the firmare (plugin) is required.
Code:

hp-doctor
https://developers.hp.com/hp-linux-i...l#howtocheck11

ok, I removed that package. It didn't work before it was installed & likewise the scanner doesn't work after it is removed....

kernelhead 06-04-2022 05:19 PM

Quote:

Originally Posted by hazel (Post 6358627)
So the next step according to the Sane man page is to run scanimage -L in debug mode. The page tells you how to do it. Start by setting the usb debug parameter to 256 and see if you get a visible error there. If you do, it's a libusb connection problem. If not, look at the man page for hpaio; it has a debug parameter that you can set similarly for maximum info. At some point you should see some operation that crashes and it can usually be fixed by editing the configuration files in /etc/sane.d.

ok, if you could provide me with a link to the Sane man (main?) page, I will attempt to do all that I can understand - is this it?: http://www.sane-project.org/ I suspect, however, that some or much of this will be above my head/beyond my understanding...

Mean time:

Code:

michael@michael-HP-EliteDesk-800-G1-SFF:~$ scanimage -L
device `hpaio:/usb/HP_LaserJet_Pro_MFP_M127fn?serial=CNB9H7FDXQ' is a Hewlett-Packard HP_LaserJet_Pro_MFP_M127fn all-in-one
michael@michael-HP-EliteDesk-800-G1-SFF:~$



All times are GMT -5. The time now is 04:17 PM.