In Ubuntu 14.04, HP Device Manager for HP Laser Jet 1018 gives error "Device Communication Error, code 5012" and printer will not print.

Asked by Swarup Dev on 2014-05-28

I am running Ubuntu 14.04, have installed the latest version of hplip (3.14.4), and cannot get the HP Laser Jet 1018 printer to print. When I first installed hplip 3.14.4, the printer did print a test page. And over the past few weeks with many attempts I do get the occasional page to print. But 98% of the time it just gives that device communication error 5012. The HP software says it is printing, and it keeps flashing intermittent reports that it is printing, and at other times that there is an error-- but it virtually never prints. And the HP Device Manager always shows that communication error 5012.

 I found a similar question from several years ago [https://answers.launchpad.net/hplip/+question/119320] and tried the suggestion that worked there:

1. Please Unplug the USB cable.
2. Delete all the Print Queues from the CUPS.
3. Restart the system.
4. Plugin the USB Cable again. Device will get configured automatically.

But the above did not make any difference for me. It still does not print.

Below I am pasting the output of the hp diagnostics program. I also have an HP OfficeJet 5610 which is not connected. You can ignore the information showing below about that printer. I am just interested in getting the HP Laser Jet 1018 to print dependably.

====================

HP Linux Imaging and Printing System (ver. 3.14.4)
Self Diagnse Utility and Healing Utility ver. 1.0

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.

Checking for Deprecated items....
No Deprecated items are found

Checking for HPLIP updates....
Latest version of HPLIP is already installed.

Checking for Dependencies....

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

 Kernel: 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 GNU/Linux
 Host: swarup
 Proc: 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 GNU/Linux
 Distribution: ubuntu 14.04
 Bitness: 64 bit

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

HPLIP-Version: HPLIP 3.14.4
HPLIP-Home: /usr/share/hplip
HPLIP-Installation: Auto installation is supported for ubuntu distro 14.04 version

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf. Generated from hplip.conf.in by configure.

[hplip]
version=3.14.4

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-3.14.4
html=/usr/share/doc/hplip-3.14.4
icon=/usr/share/applications
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv/hp
bin=/usr/bin

# 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=no
foomatic-drv-install=no
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.14.4
restricted-build=no
ui-toolkit=qt4
qt3=no
qt4=yes
policy-kit=no
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no

Current contents of '/var/lib/hp/hplip.state' file:
[plugin]
installed = 1
eula = 1
version = 3.14.4

Current contents of '~/.hplip/hplip.conf' file:
[settings]
systray_visible = 0
systray_messages = 0

[last_used]
device_uri = "hp:/usb/HP_LaserJet_1018?serial=KP0SYPQ"
printer_name =
working_dir = .

[commands]
scan = /usr/bin/simple-scan %SANE_URI%

[refresh]
rate = 30
enable = true
type = 1

[polling]
enable = false
interval = 5
device_list =

[fax]
voice_phone =
email_address =

[upgrade]
notify_upgrade = true
last_upgraded_time = 1398824791
pending_upgrade_time = 0
latest_available_version = 3.14.4

[installation]
date_time = 05/27/2014 23:09:02
version = 3.14.4

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

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

 policykit Admin-Policy-framework OPTIONAL - 0.105 OK -
 gs Ghostscript REQUIRED 7.05 9.10 OK -
 network Network-wget OPTIONAL - 1.15 OK -
 scanimage Shell-Scanning OPTIONAL 1.0 1.0.23 OK -
 avahi-utils avahi-utils OPTIONAL - 0.6.31 OK -
 dbus DBus REQUIRED - 1.6.18 OK -
 cups CUPS REQUIRED 1.1 1.7.2 OK 'CUPS Scheduler is running'
 xsane SANE-GUI OPTIONAL 0.9 0.998 OK -

-------------------------
| General Dependencies |
-------------------------

 reportlab Python-PDF-Lib OPTIONAL 2.0 3.0 OK -
 libcrypto OpenSSL-Crypto-Lib REQUIRED - 1.0.1 OK -
 pil Python-Image-Lib OPTIONAL - 1.1.7 OK -
 pyqt4-dbus PyQt4-DBUS REQUIRED 4.0 4.10.4 OK -
 libjpeg JPEG-Lib REQUIRED - - OK -
 libpthread POSIX-Threads-Lib REQUIRED - 2.19 OK -
 python-dbus Python-DBUS REQUIRED 0.80.0 1.2.0 OK -
 python-devel Python-SDK REQUIRED 2.2 2.7.6 OK -
 pyqt4 Python-Qt4 REQUIRED 4.0 4.10.4 OK -
 cups-devel CUPS-SDK REQUIRED - 1.7.2 OK -
 sane-devel SANE-SDK REQUIRED - 1.0.23 OK -
 libusb USB-Lib REQUIRED - 1.0 OK -
 sane Scan-Lib REQUIRED - 1.0.23 OK -
 cups-image CUPS-Image-Lib REQUIRED - 1.7.2 OK -
 libnetsnmp-devel SNMP-Networking-SDK REQUIRED 5.0.9 5.7.2 OK -
 python-xml Python-XML-Lib REQUIRED - 2.1.0 OK -
 python-notify Desktop-notifications OPTIONAL - - OK -

------------------------------
| Compile Time Dependencies |
------------------------------

 gcc gcc-Compiler REQUIRED - 4.8.2 OK -
 libtool Build-tools REQUIRED - 2.4.2 OK -
 make GNU-Build-tools REQUIRED 3.0 3.81 OK -

----------------------
| Python Extentions |
----------------------

 cupsext CUPS-Extension REQUIRED - 3.14.4 OK -
 pcardext PhotoCard-Extension REQUIRED - 3.14.4 OK -
 hpmudext IO-Extension REQUIRED - 3.14.4 OK -

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

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

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

No Scanner found.

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

No devices found.

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

HP_LaserJet_1018_2
------------------
Type: Printer
Device URI: hp:/usb/HP_LaserJet_1018?serial=KP0SYPQ
PPD: /etc/cups/ppd/HP_LaserJet_1018_2.ppd
PPD Description: HP LaserJet 1018, hpcups 3.14.3, requires proprietary plugin
Printer status: printer HP_LaserJet_1018_2 is idle. enabled since Tue 27 May 2014 11:07Rendering completed
Required plug-in status: Installed
error: Unable to communicate with device (code=12): hp:/usb/HP_LaserJet_1018?serial=KP0SYPQ
error: Device not found
error: Communication status: Failed

Officejet-5600-series
---------------------
Type: Printer
Device URI: hp:/usb/Officejet_5600_series?serial=CN63IDE0B604CY
PPD: /etc/cups/ppd/Officejet-5600-series.ppd
PPD Description: HP Officejet 5600 Series, hpcups 3.14.3
Printer status: printer Officejet-5600-series is idle. enabled since Mon 28 Apr 2014 01:16:02 PM EDT
error: Unable to communicate with device (code=12): hp:/usb/Officejet_5600_series?serial=CN63IDE0B604CY
error: Device not found
error: Communication status: Failed

Officejet-5600-series-Fax
-------------------------
Type: Fax
Device URI: hpfax:/usb/Officejet_5600_series?serial=CN63IDE0B604CY
PPD: /etc/cups/ppd/Officejet-5600-series-Fax.ppd
PPD Description: HP Fax hpcups
Printer status: printer Officejet-5600-series-Fax is idle. enabled since Mon 28 Apr 2014 01:16:04 PM EDT
error: Unable to communicate with device (code=12): hpfax:/usb/Officejet_5600_series?serial=CN63IDE0B604CY
error: Device not found
error: Communication status: Failed

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

Checking Permissions....
Permissions are correct.

Checking for Configured Queues....

Queue(s) configured correctly using HPLIP.

Checking for HP Properitery Plugin's....
Plugin's already installed

Checking for Printer Status....
error: 'Officejet-5600-series-Fax' Printer is either Powered-OFF or Failed to communicate.
Turn On Printer and re-run hp-doctor
error: 'HP_LaserJet_1018_2' Printer is either Powered-OFF or Failed to communicate.
Turn On Printer and re-run hp-doctor
error: 'Officejet-5600-series' Printer is either Powered-OFF or Failed to communicate.
Turn On Printer and re-run hp-doctor

Diagnose completed...

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

Please close this terminal manually.

Question information

Language:
English Edit question
Status:
Expired
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
2015-07-21
Last reply:
2015-08-06

This question was reopened

Swarup Dev (swarup-bhai1) said : #1

It seems to me that this part of the above output is the critical ingredient. Although the printer is connected via USB, but the computer is not seeing the device. I have used this printer with many earlier distributions of Ubuntu and never had a problem. But now for some reason the printer is not being found as connected to the USB port.

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

No devices found.

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

HP_LaserJet_1018_2
------------------
Type: Printer
Device URI: hp:/usb/HP_LaserJet_1018?serial=KP0SYPQ
PPD: /etc/cups/ppd/HP_LaserJet_1018_2.ppd
PPD Description: HP LaserJet 1018, hpcups 3.14.3, requires proprietary plugin
Printer status: printer HP_LaserJet_1018_2 is idle. enabled since Wed 28 May 2014 07:48Rendering completed
Required plug-in status: Installed
error: Unable to communicate with device (code=12): hp:/usb/HP_LaserJet_1018?serial=KP0SYPQ
error: Device not found
error: Communication status: Failed

Sanjay Kumar (sanjay-kumar14) said : #2

Hi,

Thanks for reporting the issue in HPLIP. To help us understand and analyze the issue please follow below steps.
=> Download and install the latest HPLIP release from
http://hplipopensource.com/hplip-web/install/install/index.html (automatic installer)

=> Reconfigure print queue using below commands.
       => hp-setup -r (remove all print queues)
      => sudo hp-plugin
       => hp-setup
=>Try printing now.

If issue does not get resolved then please send me the output of "hp-check -t" command again.

Swarup Dev (swarup-bhai1) said : #3

Thank you so much for responding, Sanjay! I am very grateful to you for coming to help out. The solution hasn't quite been reached yet, as in the let step "hp-setup", the software could not find the HPLaserJet printer 1018 connected at the usb. The printer was in fact connected via usb at that very time, but for some reason it could not see it there. Please see the following output, wherein the last line shows: "error: No devices found on bus: usb".

-------------------------------------------------------------------

swarup@swarup:~$ hp-setup -r

HP Linux Imaging and Printing System (ver. 3.14.4)
Printer/Fax Setup Utility ver. 9.0

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.

Done.
swarup@swarup:~$ sudo hp-plugin
[sudo] password for swarup:

HP Linux Imaging and Printing System (ver. 3.14.4)
Plugin Download and Install Utility ver. 2.1

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.

Checking for network connection...
Downloading plug-in from:
Receiving digital keys: /usr/bin/gpg --no-permission-warning --keyserver pgp.mit.edu --recv-keys 0xA59047B9
Creating directory plugin_tmp
Verifying archive integrity... All good.
Uncompressing HPLIP 3.14.4 Plugin Self Extracting Archive...............................

HP Linux Imaging and Printing System (ver. 3.14.4)
Plugin Installer ver. 3.0

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.

Plug-in version: 3.14.4
Installed HPLIP version: 3.14.4
Number of files to install: 26

Done.
 Plug-in installation successful

Done.
swarup@swarup:~$ hp-setup

HP Linux Imaging and Printing System (ver. 3.14.4)
Printer/Fax Setup Utility ver. 9.0

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.

Searching... (bus=usb, search=(None), desc=0)
error: No devices found on bus: usb

-------------------------------------------------------------------

Please note that I have not repeated the following step:

=> Download and install the latest HPLIP release from
http://hplipopensource.com/hplip-web/install/install/index.html (automatic installer)

I have executed this very installation 7 days ago, and already have the latest HPLIP released. See above that my installed version is ver. 3.14.4, and that is the same version which is on the link you have given. As the latest version is already installed, I did not install it again.

Up till today, the LaserJet 1018 was listed among the available printers; it simply would not print. But after following the steps you have given today [=> hp-setup -r (remove all print queues), => sudo hp-plugin, => hp-setup], when I issue the command to print a document, the LaserJet 1018 is not even listed among the available printers. So there is no question of selecting this printer to try printing to it.

Here is the output you have requested for "hp-check -t". Please note that I also have an HP OfficeJet 5610 which is not connected. You can ignore the information showing below about that printer. I am just interested in getting the HP Laser Jet 1018 to print dependably. Here then is the output you have requested for "hp-check -t":

swarup@swarup:~$ hp-check -t
Saving output in log file: /home/swarup/hp-check.log

HP Linux Imaging and Printing System (ver. 3.14.4)
Dependency/Version Check Utility ver. 15.1

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.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the
HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies
are installed to successfully compile HPLIP.
2. Run-time check mode (-r or --run): Use this mode to determine if a distro
supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball
has the proper dependencies installed to successfully run.
3. Both compile- and run-time check mode (-b or --both) (Default): This mode
will check both of the above cases (both compile- and run-time dependencies).

Check types:
a. EXTERNALDEP - External Dependencies
b. GENERALDEP - General Dependencies (required both at compile and run time)
c. COMPILEDEP - Compile time Dependencies
d. [All are run-time checks]
PYEXT SCANCONF QUEUES PERMISSION

Status Types:
    OK
    MISSING - Missing Dependency or Permission or Plug-in
    INCOMPAT - Incompatible dependency-version or Plugin-version

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

 Kernel: 3.13.0-27-generic #50-Ubuntu SMP Thu May 15 18:06:16 UTC 2014 GNU/Linux
 Host: swarup
 Proc: 3.13.0-27-generic #50-Ubuntu SMP Thu May 15 18:06:16 UTC 2014 GNU/Linux
 Distribution: ubuntu 14.04
 Bitness: 64 bit

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

HPLIP-Version: HPLIP 3.14.4
HPLIP-Home: /usr/share/hplip
HPLIP-Installation: Auto installation is supported for ubuntu distro 14.04 version

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf. Generated from hplip.conf.in by configure.

[hplip]
version=3.14.4

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/HP
ppdbase=/usr/share/ppd
doc=/usr/share/doc/hplip-3.14.4
html=/usr/share/doc/hplip-3.14.4
icon=/usr/share/applications
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv/hp
bin=/usr/bin

# 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=no
foomatic-drv-install=no
foomatic-ppd-install=no
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.14.4
restricted-build=no
ui-toolkit=qt4
qt3=no
qt4=yes
policy-kit=no
lite-build=no
udev_sysfs_rules=no
hpcups-only-build=no
hpijs-only-build=no

Current contents of '/var/lib/hp/hplip.state' file:
[plugin]
installed = 1
eula = 1
version = 3.14.4

Current contents of '~/.hplip/hplip.conf' file:
[settings]
systray_visible = 0
systray_messages = 0

[last_used]
device_uri = "hp:/usb/HP_LaserJet_1018?serial=KP0SYPQ"
printer_name =
working_dir = .

[commands]
scan = /usr/bin/simple-scan %SANE_URI%

[refresh]
rate = 30
enable = true
type = 1

[polling]
enable = false
interval = 5
device_list =

[fax]
voice_phone =
email_address =

[upgrade]
notify_upgrade = true
last_upgraded_time = 1398824791
pending_upgrade_time = 0
latest_available_version = 3.14.4

[installation]
date_time = 06/02/2014 07:02:32
version = 3.14.4

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

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

 policykit Admin-Policy-framework OPTIONAL - 0.105 OK -
 gs Ghostscript REQUIRED 7.05 9.10 OK -
 network Network-wget OPTIONAL - 1.15 OK -
 scanimage Shell-Scanning OPTIONAL 1.0 1.0.23 OK -
 avahi-utils avahi-utils OPTIONAL - 0.6.31 OK -
 dbus DBus REQUIRED - 1.6.18 OK -
 cups CUPS REQUIRED 1.1 1.7.2 OK 'CUPS Scheduler is running'
 xsane SANE-GUI OPTIONAL 0.9 0.998 OK -

-------------------------
| General Dependencies |
-------------------------

 reportlab Python-PDF-Lib OPTIONAL 2.0 3.0 OK -
 libcrypto OpenSSL-Crypto-Lib REQUIRED - 1.0.1 OK -
 pil Python-Image-Lib OPTIONAL - 1.1.7 OK -
 pyqt4-dbus PyQt4-DBUS REQUIRED 4.0 4.10.4 OK -
 libjpeg JPEG-Lib REQUIRED - - OK -
 libpthread POSIX-Threads-Lib REQUIRED - 2.19 OK -
 python-dbus Python-DBUS REQUIRED 0.80.0 1.2.0 OK -
 python-devel Python-SDK REQUIRED 2.2 2.7.6 OK -
 pyqt4 Python-Qt4 REQUIRED 4.0 4.10.4 OK -
 cups-devel CUPS-SDK REQUIRED - 1.7.2 OK -
 sane-devel SANE-SDK REQUIRED - 1.0.23 OK -
 libusb USB-Lib REQUIRED - 1.0 OK -
 sane Scan-Lib REQUIRED - 1.0.23 OK -
 cups-image CUPS-Image-Lib REQUIRED - 1.7.2 OK -
 libnetsnmp-devel SNMP-Networking-SDK REQUIRED 5.0.9 5.7.2 OK -
 python-xml Python-XML-Lib REQUIRED - 2.1.0 OK -
 python-notify Desktop-notifications OPTIONAL - - OK -

------------------------------
| Compile Time Dependencies |
------------------------------

 gcc gcc-Compiler REQUIRED - 4.8.2 OK -
 libtool Build-tools REQUIRED - 2.4.2 OK -
 make GNU-Build-tools REQUIRED 3.0 3.81 OK -

----------------------
| Python Extentions |
----------------------

 cupsext CUPS-Extension REQUIRED - 3.14.4 OK -
 pcardext PhotoCard-Extension REQUIRED - 3.14.4 OK -
 hpmudext IO-Extension REQUIRED - 3.14.4 OK -

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

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

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

No Scanner found.

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

No devices found.

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

Officejet-5600-series
---------------------
Type: Printer
Device URI: hp:/usb/Officejet_5600_series?serial=CN63IDE0B604CY
PPD: /etc/cups/ppd/Officejet-5600-series.ppd
PPD Description: HP Officejet 5600 Series, hpcups 3.14.3
Printer status: printer Officejet-5600-series is idle. enabled since Mon 28 Apr 2014 01:16:02 PM EDT
error: Unable to communicate with device (code=12): hp:/usb/Officejet_5600_series?serial=CN63IDE0B604CY
error: Device not found
error: Communication status: Failed

Officejet-5600-series-Fax
-------------------------
Type: Fax
Device URI: hpfax:/usb/Officejet_5600_series?serial=CN63IDE0B604CY
PPD: /etc/cups/ppd/Officejet-5600-series-Fax.ppd
PPD Description: HP Fax hpcups
Printer status: printer Officejet-5600-series-Fax is idle. enabled since Mon 28 Apr 2014 01:16:04 PM EDT
error: Unable to communicate with device (code=12): hpfax:/usb/Officejet_5600_series?serial=CN63IDE0B604CY
error: Device not found
error: Communication status: Failed

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

-----------
| SUMMARY |
-----------

Missing Required Dependencies
-----------------------------
None

Missing Optional Dependencies
-----------------------------
None

Total Errors: 2
Total Warnings: 0

Done.
swarup@swarup:~$

Dvanzo (danielvanzo) said : #4

I have the very same problem... If the printer is On when Ubuntu starts then everything its ok, but If I starts Ubuntu and later start the printer, it doesn't print...

Swarup Dev (swarup-bhai1) said : #5

I became inspired to see your post Dvanzo! If it it works when the printer is first connected and turned on, and then Ubuntu is booted up, then at least printing could be achieved while a more permanent solution is achieved. And when I tried your approach yesterday, then when the Ubuntu desktop appeared, I was encouraged to hear the printer motor start running and the lights flashing-- indicating it had been activated. But alas , when I opened a document and hit [ctrl-p], the LaserJet Printer 1018 still is not showing up in the printer options. So I tried redoing the commands--

=> hp-setup -r
=> sudo hp-plugin
=> hp-setup

But hplip (3.14.4) is still not finding any printer connected on the usb port.

Swarup Dev (swarup-bhai1) said : #6

Today I received an announcement that hplip 3.14.6 is available, so I installed it hoping that it may solve the problem. The hplip (3.14.6) software first uninstalled 3.14.4, and then installed 3.14.6. Everything went smoothly-- but in the end it still did not recognize any printer attached to the usb port. At the end of the installation it requests the user to unplug and replug the printer for recognition purposes. After so doing it acted like it was thinking for some time, and then gave the message that no printer was recognized as connected to the usb port. So I tried Dvanzo's suggestion, and turned the computer off, then powered on and connected the HP Laserjet 1018 printer to the usb port, and then booted up the computer. It booted up with all the icons on the desktop with large size low resolution font-- looking like the video drivers were not functioning or something, and with the mouse not working. I tried it twice with the same result. As soon as I unplug the printer and reboot, the computer works fine. And my HP Laserjet 1018 printer works perfectly normally with other computers. It also was working perfectly with this computer, until I upgraded to Ubuntu 14.04.

Summary: The problem still exists with hplip 3.14.6.

Please kindly guide what should be done next to get this printer working with Ubuntu 14.04.

Swarup Dev (swarup-bhai1) said : #7

I would be really appreciative of receiving some sort of answer about this issue. This is a very commonly used printer and many people will benefit from the solution.

I myself will be forced to purchase another printer in the absence of a way to get 14.04 to see the printer with hplip 3.14.6.

Many thanks in advance, for your kind help.

Swarup Dev (swarup-bhai1) said : #8

Yesterday I connected my HP LaserJet 1018 Printer to my colleague's computer which is running Ubuntu 12.02. As soon as I connected the printer, the computer identified it as the HP LJ 1018, and asked if I would like to have the plug-in installed for it. I clicked "yes". Immediately a terminal window opened, the plug-in was installed, the printer motor was activated, and it is printing perfectly. I could not believe how easy it was-- it took merely 2 minutes to do. Given that, why would 14.04 not be able to do the same?

Suma Byrappa (suma-byrappa) said : #9

Hello,

HPLIP supports 14.04 too. The problem could be something specific to your Ubuntu setup. Can you please post the output from running the command "lsusb" ? Let's check if other tools can detect your printer connection.

Regards,
Suma

Swarup Dev (swarup-bhai1) said : #10

I have done a standard Ubuntu 14.04 install, and have tried running lsusb in a variety of situations over the last 6 weeks, in attempts to understand the source of the problem. Most of the time the printer does not show up there, but sometimes it does. Please see this thread, where the details of my findings with lsusb and syslog are given:

http://ubuntuforums.org/showthread.php?t=2226631

Arie Skliarouk (skliarie) said : #11

It is bug in ubuntu 14.04: https://bugs.launchpad.net/hplip/+bug/1315408

Consider to vote and contribute.

Swarup Dev (swarup-bhai1) said : #12

Ok-- so it is good news that a problem has been recognized. I am anxious for a solution to this bug. Are there any ideas for fixing it?

Arie Skliarouk (skliarie) said : #13

See the workaround in the bug report.

Swarup Dev (swarup-bhai1) said : #14

Here are the instructions for all interested. They worked great!

WORKAROUND: use hplip from ubuntu 13.10 (use "sudo su -")

1) Remove hplip of 14.04 (for some reason apt-get won't do that automatically)
apt-get remove hplip

2) Add repo strings for 13.10
cat > /etc/apt/sources.list.d/saucy.list <<EOF
deb http://il.archive.ubuntu.com/ubuntu/ saucy main restricted
deb http://il.archive.ubuntu.com/ubuntu/ saucy universe
deb http://il.archive.ubuntu.com/ubuntu/ saucy multiverse
EOF

3) apt-get update

4) install hplip of 13.10
apt-get install hplip=3.13.9-1 libhpmud0=3.13.9-1 libsane-hpaio=3.13.9-1 hplip-data=3.13.9-1 printer-driver-hpcups=3.13.9-1

5) pin hplip to protect from upgrades
echo hplip hold | dpkg --set-selections

Swarup Dev (swarup-bhai1) said : #15

In my earlier report above, I thought that the workaround was going to work for me just fine, as when it installed, the printer worked. And one subsequent time I used it, it worked again. But there are two problems now:

1) Every time I plug the printer in and turn it on, the computer asks for my password and reinstalls the driver plug in. I give permisison to install it, and usually then get a reply that the plug-in has successfully installed. But sometimes it gives two messages-- first one saying the installation failed, and then when I close that another message behind it saying the installation was successful. But I have to go through this every time I turn on the printer.

2) It is no longer printing. It installs the driver plug in every time I turn it on, but does not print. I have several print orders pending now, and in the status window it shows the print orders, and next to each is the status "pending - not connected ?". So it does not seem to be seeing the printer any more.

We definitely need a more dependable solution to this issue.

Dvanzo (danielvanzo) said : #16

Reported in bug https://bugs.launchpad.net/hplip/+bug/1315408
Just in case... I can print to my Hp-1018 just changing the usb port where it is connected, turning it off and again turning it on... Isn't elegant, but it is working...

Launchpad Janitor (janitor) said : #17

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

skywriter (xxxiter) said : #18

I have found the workaround: just removed hplip and installed foo2zjs driver.
After that I get the error in /var/log/syslog: "foo2zjs: Missing HP LaserJet 1018 firmware file /lib/firmware/hp/sihp1018.dl".
I killed this error by executing from root: "getweb 1018".
Now printer works OK, including after reboot.

Swarup Dev (swarup-bhai1) said : #19

Great News!

So it is printing normally now? It does not ask to reinstall the driver every time you print?

If it is working perfectly for you, then please give step by step instructions on what you did for removing hpilp and installing the foo2zjs driver. I guess for removing hplip it would be "apt-get remove hplip", right? If so, then kindly provide the remaining steps in pastable fashion for the terminal window. This will be helpful for many people :-)

Launchpad Janitor (janitor) said : #20

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

valdiks (valdiks) said : #21

I've had same problem on Ubuntu 14.04 with printer HP LJ 1020 - communication error with fresh hplip and older one 3.13.9. Reboot didn't helped.
I could not get printer to work. But found error that there is no file /home/$user/.cups/lpoptions.
Then I created this file and printer work without problems.

Can someone check this?

Sebastian (castanedacs) said : #22

I experienced similar problems, as cited in this forum, trying to configure the HP Laserjet 1018 printer with ubuntu desktop 14.04 and 14.10. At the begining I used HPLIP installed manually, and the printer worked fine for a while, I was able to print 3 or 4 documents, but then the printer started to fail with "communication error". After some combinations of unplug and re-plug, turn off on or reboot the printer works again, but this is an annoying situation, specially because I wanted to make the printer works for common users without any knowledge.

So I decided to try the solution installing the foo2zjs driver, these are the steps I followed, after reading many forums and potential solutions:

1) Uninstall HPLIP completely

1.1) Uninstall HPLIP if it was installed by default in ubuntu

    $sudo apt-get remove hplip

1.2) In my case, I had installed HPLIP manually, after downloading the tarball distribution from

http://hplipopensource.com/hplip-web/index.html

So I followed the instructions cited here

http://hplipopensource.com/node/188

to completely unistall it.

2) Install the "foo2zjs" driver, to do this I used the instructions cited here

http://foo2zjs.rkkda.com/INSTALL

I transcribe them here:

2.1) Install build-essential, tix, foomatic-filters, groff, dc FIRST:

$ sudo apt-get install build-essential tix foomatic-filters groff dc

2.2) Unpack:

$ wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz
    $ tar zxf foo2zjs.tar.gz
    $ cd foo2zjs

2.3) Compile:

      $ make

2.4) Get extra files from the web, such as .ICM profiles (for color correction)
and firmware. Select the model number for your printer, In this case:

       $ ./getweb 1018 # Get HP LaserJet 1018 firmware file

2.5) Install driver, foomatic XML files, PPD files, and extra files:

       $ sudo make install

2.6) Install hotplug (for HP LJ 1000/1005/1018/1020/P100[5678]/P1505):

       $ sudo make install-hotplug

Unplug and re-plug the USB printer

2.7) If you use CUPS to manage your printers, you must restart cupsd:

    $ sudo make cups

3) Add a new printer

I use the WEB APP to do this

http://localhost:631

Once created it, I printed a test page to test that the printer is working correctly

In my case I experienced problems using cups, so I reinstalled it with

      $sudo apt-get -y install cups

NOTE:
I suggest to watch the log /var/log/syslog to detect any possible error.
For example, after installing foo2zjs, I detect the following error in syslog

"foo2zjs: Missing HP LaserJet 1018 firmware file /lib/firmware/hp/sihp1018.dl".

So, I fixed it by getting the firmware throught

$getweb 1018

Then I copied the file "sihp1018.dl" to the directory specified in the syslog error.

You may need to reboot both the computer and the printer.

After these steps I was able to print using the HP LaserJet 1018 printer without problems, I did differents test like print a test page, print a LibreOffice doc, print a pdf doc. I reboot the machine and printed again and the printer worked perfectly.
I tested using both Ubuntu 14.04 and 14.10.

Hope this can help.

Thanks a lot Sebastian for the excellent instructions!

Very useful!

Pjotr12345 (computertip) said : #24

Thank you, Sebastian! My HP Laserjet 1018 works like a charm now. Excellent!

I've placed an edited version of your how-to on my website, with acknowledgement of you and your original how-to: https://sites.google.com/site/easylinuxtipsproject/14#TOC-HP-Laserjet-1018-and-1020-and-possibly-the-whole-range-of-1006-to-1028-
(item 3, right column)

It might even be, that a wide range of HP Laserjets is affected (from the 1006 to the 1028).

@Sebastian and Pjotr: I have also created a howto on my Wordpress website, based on Sebastian's procedure:

https://mark911.wordpress.com/2014/10/31/how-to-install-printer-drivers-for-hp-laserjet-1020-in-ubuntu-14-04-lts-without-needing-access-to-openprinting-org-website/

Thanks again!

Swarup Dev (swarup-bhai1) said : #26

Pjotr - I just executed all the steps you put on your google sites, and it worked perfectly. I've been waiting a long time for this moment!! Kudos to both you and Sebastian. This was very much needed.

There is one remaining issue that needs solving, however. I hoping that perhaps it is just a simple setting.

Here is the matter:

Every time I print a document, after the document finishes printing, the printer always wants to print one more page-- a report of the Job ID, driver, printer name etc. This is a huge waste of paper and forces me to count the exact number of pieces of paper I put in the printer so that this will not be uselessly printed. How can this be turned off??

Swarup Dev (swarup-bhai1) said : #27

And one more issue: In the process of uninstalling HPLIP and installing HP1018, the driver for my other printer HP Officejet 5610, got removed. That printer used to work perfectly with no issues whatsoever. I use it all the time for its scanner, and need to get this set up again. But I am afraid to start installing HPLIP or anything else, for fear it may affect the setup with the HP1018. Please give me some guidance here as to what should be done to get my HP Officejet 5610 working.

Pjotr12345 (computertip) said : #28

@Mark Rijckenberg: thanks for your simplification and improvement of the how-to on your blog! Als ik je tref in de kroeg, dan krijg je 'n trappist van me. :-)

@Swarup Dev: I fear that both situations are mutually exclusive. Either you have the 1018 working, without HPLIP installed, or you have the 5610, with HPLIP installed. You might work around it by dual booting with two Linux Mints, one with the foo2zjs driver and one with the HPLIP.

I don't have the extra printed page myself, by the way. That's probably a wrong setting that you can correct yourself. I've simplified the how-to even further, with the blog of Mark Rijckenberg as base (some small improvements):
https://sites.google.com/site/easylinuxtipsproject/14#TOC-HP-Laserjet-1018-and-1020-and-possibly-more-models-in-the-range-1006-to-1028-
(item 3, right column)

You might try repeating the foo2zjs procedure with the simplified how-to. Maybe this will get rid of the extra page.

Swarup Dev (swarup-bhai1) said : #29

@Pjotr12345:

1) So do you mean that if I now install HPLIP to work with the 5610, then it will ruin the setup I have with the 1018? I need to have both printers working in the same OS. It should be possible to achieve, shouldn't it? I would have thought that if I install HPLIP now for the 5610, it won't interfere with the setup we've done for the 1018.

2) With regard to the printing of the extra page, your wrote "That's probably a wrong setting that you can correct yourself". Where are the settings for such things? I would gladly correct it if I knew where the settings were.

3) You have suggested repeating the foo2zjs procedure with the simplified how-to. Before I repeat it, do I need to uninstall the current setup? Or would the repeat install of foo2zjs just work fine on top of what is already there?

Pjotr12345 (computertip) said : #30

@Swarup Dev:

1): Yes, installing HPLIP again will probably ruin things.

2) Try the application Printers. Right-click on the instance of the 1018, select Properties and poke around a bit in the settings.... With a bit of luck the setting you seek is there.

3) No need to uninstall; the how-to takes care of cleaning previous installs. However, it probably won't help for the extra page, although it won't hurt to try.

Swarup Dev (swarup-bhai1) said : #31

1) This news that I can't have both the 1018 and the 5610 working at the same time is indeed distressing, as I need both printer and scanner capability. Although a work-around has been created to get the 1018 working, but due to this serious shortcoming, I can't consider this as a solution.

So is it the case then that regardless of the order of install-- i.e. even if I install HPLIP and then after that to a reinstall of your how-to -- even then it is not going to work?

2) I will have a look at the Properties options as you mentioned.

In the face of the obstacle confronting me in #1, my enthusiasm for the current solution has been blunted.

Before uninstalling HPLIP yesterday, I had a totally workable situation. Every time I wanted to use the 1018, I had to download and install the driver for it but it was a quick process, and there was no extra page getting printed at the end. It wasn't perfect, as I had to deal with the driver any time I wanted to print. But the 5610 was working perfectly. When I saw your update, I thought it would be GREAT if I don't have to install the driver every time I print. But in the face of 5610 now not working at all, it looks like I am going to have to reinstall HPLIP, and there potential have to struggle with the 1018 not working at all-- as used to happen in the past.

Pjotr12345 (computertip) said : #32

Yes, well.... If it's only the scanner feature that you need from the 5610, then maybe it doesn't matter if the printer feature of the 5610 doesn't work. If you're lucky, the scanner feature of the 5610 doesn't depend on the HPLIP, but uses another driver of its own.

I myself have only one printer, the 1018, and a separate HP flatbed scanner. That scanner continues to work fine after removing HPLIP....

Pjotr12345 (computertip) said : #33

Addition to my previous comment: you can launch the application Simple Scan in order to check whether your system still recognizes the scanner feature of the 5610.

Swarup Dev (swarup-bhai1) said : #34

I use XSane as my image scanning program; it always sees the 5610 perfectly and scans great using the 5610. After having removed HPLIP, XSane no longer sees the 5610. When I start up XSane, it says there are no scanners connected to scan with. I could try with Simple Scan, but based on the behavior with XSane, it looks to me like HPLIP is needed. Do you think other scanner programs may recognize the 5610 where XSane doesn't?

Swarup Dev (swarup-bhai1) said : #35

In the 5610 I need only the scanner and occasionally, fax feature. I never ever print using the 5610. It's scanner feature is critically needed almost daily; fax feature occasionally needed.

Pjotr12345 (computertip) said : #36

OK, well, maybe you can try installing an older version of HPLIP. As both the 1018 and the 5610 are relatively old, that could maybe be a solution:
http://sourceforge.net/projects/hplip/files/hplip

But I advise to check carefully the commands that you executed for the solution for the 1018, because you may have to undo some of them as well. Do you have a separate test machine on which you can test an older HPLIP?

Swarup Dev (swarup-bhai1) said : #37

It is an interesting suggestion you give about an old version of HPLIP-- as for years, the 1018 worked perfectly. It was only the advent of one of the newer versions of HPLIP I suppose, that 1018 problems developed. Although if an older version can really solve the problem (and it makes sense that it would), then it seems odd this idea has not come up earlier, and for everyone. Because an old version of HPLIP would have been such an easy and universal solution. Which makes me wonder whether there may perhaps be a reason i.e. that it won't work with Ubuntu 14.04 or something like that....

Pjotr12345 (computertip) said : #38

I've succeeded in simplifying the how-to even further:
https://sites.google.com/site/easylinuxtipsproject/14#TOC-HP-Laserjet-1018-and-1020-and-possibly-more-models-in-the-range-1006-to-1028-
(item 3, right column)

I love simple. :-)

Swarup Dev (swarup-bhai1) said : #39

Which old version of HPLIP would you suggest I try? There are 69 of them starting from 2006. I am guessing that the very oldest ones make not have good functionality. But it needs to be sufficiently old as to be from a period when HPLIP was working with the 1018.

Pjotr12345 (computertip) said : #40

@Swarup Dev: I don't know.... I'm afraid that only trial and error can answer your question.

I'm not going to try it myself, because the HP Laserjet 1018 printer is the only one I have and I'm very happy with the current solution.

Gaurav Sood (gaurav-sood) said : #41

To debug the problem in HPLIP can you provide the kernel log.
Please follow the steps

1. Clear the /var/log/kern.log by running

        "sudo cp /dev/null /var/log/kern.log"

2. Plug the 1018 device using usb cable

3. Attach the file "kern.log" here

Swarup Dev (swarup-bhai1) said : #42

Well, the 1018 is working perfectly now. It only printed an extra page the very first time I used it; since then it hasn't happened again. So I have no complaints at all about 1018's functionality now.

What I do need is to get the scanner function of the 5610 working. And it appears that HPLIP is going to be needed for that. I haven't tried installing an old version of HPLIP yet. It is a bit of a daunting task, and I have no idea which one to use.

This problem I consider to be integral to the 1018 solution as the current 1018 solution prevents one from using any other HP printer. It excludes all other HP printers. For anyone who needs to use more than one printer, as I do for the scanner of the 5610, the current fix is not a solution.

@Gaurav Sood: Here is the output of the kernel log which you requested:

Jul 21 11:12:11 swarup kernel: [179674.320199] usb 1-1: new high-speed USB device number 12 using ehci-pci
Jul 21 11:12:11 swarup kernel: [179674.472806] usb 1-1: New USB device found, idVendor=03f0, idProduct=4117
Jul 21 11:12:11 swarup kernel: [179674.472813] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 21 11:12:11 swarup kernel: [179674.472817] usb 1-1: Product: HP LaserJet 1018
Jul 21 11:12:11 swarup kernel: [179674.472821] usb 1-1: Manufacturer: Hewlett-Packard
Jul 21 11:12:11 swarup kernel: [179674.472824] usb 1-1: SerialNumber: KP0SYPQ
Jul 21 11:12:11 swarup kernel: [179674.475985] usblp 1-1:1.0: usblp0: USB Bidirectional printer dev 12 if 0 alt 0 proto 2 vid 0x03F0 pid 0x4117

Launchpad Janitor (janitor) said : #43

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

Vályi István (valyi-istvan) said : #44

Dear Sebastian,
Many, many thanks I was struggling with this problem under Mint 17.1 upwards until I found this discussion with your solution using foo2zjs. Works great.
Istvan

Steps for solving hp 1018 problems

sudo apt-get remove hplip*
sudo apt-get install hannah-foo2zjs printer-driver-foo2zjs-common printer-driver-foo2zjs
sudo getweb 1018

reconect printer, no need for restart

Arie Skliarouk (skliarie) said : #46

@Aleksandar: Thank you so much! Your solution worked great on ubuntu 16.04!

@Arie to be more precise, last step is connect printer (not reconect) for first time