Create a gist now

Instantly share code, notes, and snippets.

@benlk /0-problem.md Secret
Last active May 11, 2016

What would you like to do?

I have a HP Photosmart D110 Series printer/scanner all-in-one, connected via USB.

Printing works. I was able to auto-configure it with hp-tools, part of hplip 3.14.3 on Ubuntu 14.04.4 LTS, Linux 3.16.0-71-generic on x86_64

Scanning does not work, as a user or as root.

$ lsusb
Bus 002 Device 003: ID 03f0:8d11 Hewlett-Packard 
<snip>

That is the printer; unplugging it causes it to disappear.

sane-find-scanner does not find the scanner as root, even though the scanner is readable to non-root users:

$ ls
$ 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/0x0020 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 0x1d6b/0x0003 at 004:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 003:001: Access denied (insufficient permissions)
could not open USB device 0x04f2/0xb15e at 001:005: Access denied (insufficient permissions)
could not open USB device 0x138a/0x0007 at 001:004: Access denied (insufficient permissions)
could not open USB device 0x8087/0x0020 at 001:002: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0002 at 001:001: Access denied (insufficient permissions)
  # No USB scanners found. If you expected something different, make sure that
  # you have loaded a kernel driver for your USB host controller and have setup
  # the USB system correctly. See man sane-usb for details.

  # 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.

$ sudo 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 USB scanner (vendor=0x138a, product=0x0007) at libusb:001:004
  # 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.

The libusb:001:004 device is a fingerprint scanner on this computer.

The scanner/printer would be 002:003, not that it is not found in this scan.

Here's the permissions on the 002:003 usb device:

$ ls -AlFG -h /dev/bus/usb/002/003
crw-rw-rw-+ 1 root 189, 130 May 11 13:19 /dev/bus/usb/002/003

The output of hp-check is attached here as 1-hp-check.txt, the next file in this gist.

scanimage sees the scanner:

$ scanimage -L
device `hpaio:/usb/Photosmart_D110_series?serial=CN11MG30KT05N9' is a Hewlett-Packard Photosmart_D110_series all-in-one

But cannot scan, even when the device is specified, even as root:

$ scanimage 
scanimage: open of device hpaio:/usb/Photosmart_D110_series?serial=CN11MG30KT05N9 failed: Invalid argument
$ scanimage -d hpaio:/usb/Photosmart_D110_series?serial=CN11MG30KT05N9
scanimage: open of device hpaio:/usb/Photosmart_D110_series?serial=CN11MG30KT05N9 failed: Invalid argument
$ sudo scanimage -d hpaio:/usb/Photosmart_D110_series?serial=CN11MG30KT05N9
scanimage: open of device hpaio:/usb/Photosmart_D110_series?serial=CN11MG30KT05N9 failed: Invalid argument
$ hp-scan

HP Linux Imaging and Printing System (ver. 3.14.3)
Scan Utility ver. 2.2

Copyright (c) 2001-13 Hewlett-Packard 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.

Using device: hpaio:/usb/Photosmart_D110_series?serial=CN11MG30KT05N9

warning: No destinations specified. Adding 'file' destination by default.
Using device hpaio:/usb/Photosmart_D110_series?serial=CN11MG30KT05N9
Opening connection to device...
error: SANE: Invalid argument (code=4)
hp-check[10868]: info: :
hp-check[10868]: info: :[01mHP Linux Imaging and Printing System (ver. 3.14.3)[0m
hp-check[10868]: info: :[01mDependency/Version Check Utility ver. 15.1[0m
hp-check[10868]: info: :
hp-check[10868]: info: :Copyright (c) 2001-13 Hewlett-Packard Development Company, LP
hp-check[10868]: info: :This software comes with ABSOLUTELY NO WARRANTY.
hp-check[10868]: info: :This is free software, and you are welcome to distribute it
hp-check[10868]: info: :under certain conditions. See COPYING file for more details.
hp-check[10868]: info: :
hp-check[10868]: info: :[01mNote: hp-check can be run in three modes:[0m
hp-check[10868]: info: :1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied
hp-check[10868]: info: :tarball (.tar.gz or .run) to determine if the proper dependencies are installed to successfully
hp-check[10868]: info: :compile HPLIP.
hp-check[10868]: info: :2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb,
hp-check[10868]: info: :.rpm, etc) or an already built HPLIP supplied tarball has the proper dependencies installed to
hp-check[10868]: info: :successfully run.
hp-check[10868]: info: :3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the
hp-check[10868]: info: :above cases (both compile- and run-time dependencies).
hp-check[10868]: info: :
hp-check[10868]: info: :Check types:
hp-check[10868]: info: :a. EXTERNALDEP - External Dependencies
hp-check[10868]: info: :b. GENERALDEP - General Dependencies (required both at compile and run time)
hp-check[10868]: info: :c. COMPILEDEP - Compile time Dependencies
hp-check[10868]: info: :d. [All are run-time checks]
hp-check[10868]: info: :PYEXT SCANCONF QUEUES PERMISSION
hp-check[10868]: info: :
hp-check[10868]: info: :Status Types:
hp-check[10868]: info: : OK
hp-check[10868]: info: : MISSING - Missing Dependency or Permission or Plug-in
hp-check[10868]: info: : INCOMPAT - Incompatible dependency-version or Plugin-version
hp-check[10868]: info: :
warning: [01mubuntu-14.04 version is not supported. Using ubuntu-13.10 versions dependencies to verify and install...[0m
hp-check[10868]: info: :
hp-check[10868]: info: :---------------
hp-check[10868]: info: :| SYSTEM INFO |
hp-check[10868]: info: :---------------
hp-check[10868]: info: :
hp-check[10868]: info: : Kernel: 3.16.0-71-generic #91~14.04.1-Ubuntu SMP Mon Apr 18 19:43:36 UTC 2016 GNU/Linux
Host: silverleaf
Proc: 3.16.0-71-generic #91~14.04.1-Ubuntu SMP Mon Apr 18 19:43:36 UTC 2016 GNU/Linux
Distribution: ubuntu 14.04
hp-check[10868]: info: : Bitness: 64 bit
hp-check[10868]: info: :
hp-check[10868]: info: :-----------------------
hp-check[10868]: info: :| HPLIP CONFIGURATION |
hp-check[10868]: info: :-----------------------
hp-check[10868]: info: :
hp-check[10868]: info: :HPLIP-Version: HPLIP 3.14.3
hp-check[10868]: info: :HPLIP-Home: /usr/share/hplip
warning: HPLIP-Installation: Auto installation is not supported for ubuntu distro 14.04 version
hp-check[10868]: info: :
hp-check[10868]: info: :[01mCurrent contents of '/etc/hp/hplip.conf' file:[0m
hp-check[10868]: info: :# hplip.conf. Generated from hplip.conf.in by configure.
[hplip]
version=3.14.3
[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/hplip/HP
ppdbase=/usr/share/ppd/hplip
doc=/usr/share/doc/hplip-doc/HTML
html=/usr/share/doc/hplip-3.14.3
icon=no
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv
bin=/usr/bin
# 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=yes
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.14.3
restricted-build=no
ui-toolkit=qt4
qt3=no
qt4=yes
policy-kit=yes
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no
hp-check[10868]: info: :
hp-check[10868]: info: :[01mCurrent contents of '/var/lib/hp/hplip.state' file:[0m
hp-check[10868]: info: :[plugin]
installed = 1
eula = 1
version = 3.14.3
hp-check[10868]: info: :
hp-check[10868]: info: :[01mCurrent contents of '~/.hplip/hplip.conf' file:[0m
hp-check[10868]: info: :[last_used]
device_uri = hpaio:/usb/Photosmart_D110_series?serial=CN11MG30KT05N9
printer_name = photosmart_7550
working_dir = .
[settings]
systray_visible = 0
systray_messages = 1
[commands]
scan = /usr/bin/simple-scan %SANE_URI%
[refresh]
rate = 30
enable = false
type = 1
[polling]
enable = false
interval = 5
device_list =
[fax]
voice_phone =
email_address =
[upgrade]
notify_upgrade = false
last_upgraded_time = 1462971737.30416
pending_upgrade_time = 0
[installation]
date_time = 05/11/2016 13:23:57
version = 3.14.3
hp-check[10868]: info: : <Package-name> <Package-Desc> <Required/Optional> <Min-Version> <Installed-Version> <Status> <Comment>
hp-check[10868]: info: :
hp-check[10868]: info: :--------------------------
hp-check[10868]: info: :| External Dependencies |
hp-check[10868]: info: :--------------------------
hp-check[10868]: info: :
hp-check[10868]: info: : policykit Admin-Policy-framework OPTIONAL - 0.105 OK -
hp-check[10868]: info: : gs Ghostscript REQUIRED 7.05 9.10 OK -
hp-check[10868]: info: : network Network-wget OPTIONAL - 1.15 OK -
hp-check[10868]: info: : scanimage Shell-Scanning OPTIONAL 1.0 1.0.23 OK -
hp-check[10868]: info: : avahi-utils avahi-utils OPTIONAL - 0.6.31 OK -
hp-check[10868]: info: : dbus DBus REQUIRED - 1.6.18 OK -
hp-check[10868]: info: : cups CUPS REQUIRED 1.1 1.7.2 OK 'CUPS Scheduler is running'
hp-check[10868]: info: : xsane SANE-GUI OPTIONAL 0.9 0.998 OK -
hp-check[10868]: info: :
hp-check[10868]: info: :-------------------------
hp-check[10868]: info: :| General Dependencies |
hp-check[10868]: info: :-------------------------
hp-check[10868]: info: :
hp-check[10868]: info: : reportlab Python-PDF-Lib OPTIONAL 2.0 3.0 OK -
hp-check[10868]: info: : libcrypto OpenSSL-Crypto-Lib REQUIRED - 1.0.1 OK -
hp-check[10868]: info: : pil Python-Image-Lib OPTIONAL - 1.1.7 OK -
hp-check[10868]: info: : pyqt4-dbus PyQt4-DBUS REQUIRED 4.0 4.10.4 OK -
hp-check[10868]: info: : libjpeg JPEG-Lib REQUIRED - - OK -
hp-check[10868]: info: : libpthread POSIX-Threads-Lib REQUIRED - 2.19 OK -
hp-check[10868]: info: : python-dbus Python-DBUS REQUIRED 0.80.0 1.2.0 OK -
hp-check[10868]: info: : python-devel Python-SDK REQUIRED 2.2 2.7.6 OK -
hp-check[10868]: info: : pyqt4 Python-Qt4 REQUIRED 4.0 4.10.4 OK -
hp-check[10868]: info: : cups-devel CUPS-SDK REQUIRED - 1.7.2 OK -
hp-check[10868]: info: : sane-devel SANE-SDK REQUIRED - 1.0.23 OK -
hp-check[10868]: info: : libusb USB-Lib REQUIRED - 1.0 OK -
hp-check[10868]: info: : sane Scan-Lib REQUIRED - 1.0.23 OK -
hp-check[10868]: info: : cups-image CUPS-Image-Lib REQUIRED - 1.7.2 OK -
hp-check[10868]: info: : libnetsnmp-devel SNMP-Networking-SDK REQUIRED 5.0.9 5.7.2 OK -
hp-check[10868]: info: : python-xml Python-XML-Lib REQUIRED - 2.1.0 OK -
hp-check[10868]: info: : python-notify Desktop-notifications OPTIONAL - - OK -
hp-check[10868]: info: :
hp-check[10868]: info: :------------------------------
hp-check[10868]: info: :| Compile Time Dependencies |
hp-check[10868]: info: :------------------------------
hp-check[10868]: info: :
hp-check[10868]: info: : gcc gcc-Compiler REQUIRED - 4.8.4 OK -
hp-check[10868]: info: : libtool Build-tools REQUIRED - 2.4.2 OK -
hp-check[10868]: info: : make GNU-Build-tools REQUIRED 3.0 3.81 OK -
hp-check[10868]: info: :
hp-check[10868]: info: :----------------------
hp-check[10868]: info: :| Python Extentions |
hp-check[10868]: info: :----------------------
hp-check[10868]: info: :
hp-check[10868]: info: : cupsext CUPS-Extension REQUIRED - 3.14.3 OK -
hp-check[10868]: info: : pcardext PhotoCard-Extension REQUIRED - 3.14.3 OK -
hp-check[10868]: info: : hpmudext IO-Extension REQUIRED - 3.14.3 OK -
hp-check[10868]: info: :
hp-check[10868]: info: :-----------------------
hp-check[10868]: info: :| Scan Configuration |
hp-check[10868]: info: :-----------------------
hp-check[10868]: info: :
hp-check[10868]: info: : hpaio HPLIP-SANE-Backend REQUIRED - 3.14.3 OK 'hpaio found in /etc/sane.d/dll.conf'
hp-check[10868]: info: : scanext Scan-SANE-Extension REQUIRED - 3.14.3 OK -
hp-check[10868]: info: :
hp-check[10868]: info: :------------------------------
hp-check[10868]: info: :| DISCOVERED SCANNER DEVICES |
hp-check[10868]: info: :------------------------------
hp-check[10868]: info: :
hp-check[10868]: info: :device `hpaio:/usb/Photosmart_D110_series?serial=CN11MG30KT05N9' is a Hewlett-Packard Photosmart_D110_series all-in-one
hp-check[10868]: info: :
hp-check[10868]: info: :--------------------------
hp-check[10868]: info: :| DISCOVERED USB DEVICES |
hp-check[10868]: info: :--------------------------
hp-check[10868]: info: :
hp-check[10868]: info: : Device URI Model
hp-check[10868]: info: : ---------------------------------------- -------------------------
hp-check[10868]: info: : hp:/usb/Photosmart_D110_series?serial=CN HP Photosmart D110 series
11MG30KT05N9
hp-check[10868]: info: :
hp-check[10868]: info: :---------------------------------
hp-check[10868]: info: :| INSTALLED CUPS PRINTER QUEUES |
hp-check[10868]: info: :---------------------------------
hp-check[10868]: info: :
hp-check[10868]: info: :
hp-check[10868]: info: :[01mPhotosmart-D110-series[0m
hp-check[10868]: info: :[01m----------------------[0m
hp-check[10868]: info: :Type: Unknown
hp-check[10868]: info: :Device URI: usb://HP/Photosmart%20D110%20series?serial=CN11MG30KT05N9&interface=1
hp-check[10868]: info: :PPD: /etc/cups/ppd/Photosmart-D110-series.ppd
hp-check[10868]: info: :PPD Description: HP Photosmart d110 Series, hpcups 3.14.3
hp-check[10868]: info: :Printer status: printer Photosmart-D110-series is idle. enabled since Wed 11 May 2016 09:22:11 AM EDT
warning: Printer is not HPLIP installed. Printers must use the hp: or hpfax: CUPS backend for HP-Devices.
hp-check[10868]: info: :
hp-check[10868]: info: :[01mphotosmart_7550[0m
hp-check[10868]: info: :[01m---------------[0m
hp-check[10868]: info: :Type: Printer
hp-check[10868]: info: :Device URI: hp:/usb/photosmart_7550?serial=CN32E410WR63
hp-check[10868]: info: :PPD: /etc/cups/ppd/photosmart_7550.ppd
hp-check[10868]: info: :PPD Description: HP Photosmart 7550, hpcups 3.14.3
hp-check[10868]: info: :Printer status: printer photosmart_7550 is idle. enabled since Wed 06 Apr 2016 10:15:47 PM EDT
error: Unable to communicate with device (code=12): hp:/usb/photosmart_7550?serial=CN32E410WR63
error: Device not found
error: Communication status: Failed
hp-check[10868]: info: :
hp-check[10868]: info: :[01mPhotosmart_D110[0m
hp-check[10868]: info: :[01m---------------[0m
hp-check[10868]: info: :Type: Printer
hp-check[10868]: info: :Device URI: hp:/usb/Photosmart_D110_series?serial=CN11MG30KT05N9
hp-check[10868]: info: :PPD: /etc/cups/ppd/Photosmart_D110.ppd
hp-check[10868]: info: :PPD Description: HP Photosmart d110 Series, hpcups 3.14.3
hp-check[10868]: info: :Printer status: printer Photosmart_D110 is idle. enabled since Wed 11 May 2016 09:22:11 AM EDT
hp-check[10868]: info: :Communication status: Good
hp-check[10868]: info: :
hp-check[10868]: info: :
hp-check[10868]: info: :--------------
hp-check[10868]: info: :| PERMISSION |
hp-check[10868]: info: :--------------
hp-check[10868]: info: :
hp-check[10868]: info: :USB Photosmart_D110 Required - - OK Node:'/dev/bus/usb/002/003' Perm:' root lp rw- rw- rw- rw- rw-'
hp-check[10868]: info: :
hp-check[10868]: info: :-----------
hp-check[10868]: info: :| SUMMARY |
hp-check[10868]: info: :-----------
hp-check[10868]: info: :
hp-check[10868]: info: :[01mMissing Required Dependencies[0m
hp-check[10868]: info: :[01m-----------------------------[0m
hp-check[10868]: info: :None
hp-check[10868]: info: :
hp-check[10868]: info: :[01mMissing Optional Dependencies[0m
hp-check[10868]: info: :[01m-----------------------------[0m
hp-check[10868]: info: :None
hp-check[10868]: info: :
hp-check[10868]: info: :Total Errors: 1
hp-check[10868]: info: :Total Warnings: 1
hp-check[10868]: info: :
hp-check[10868]: info: :
hp-check[10868]: info: :Done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment