HP Laserjet 1020, Ubuntu Hardy Heron, Linux 2.6.22-15-generic, USB, does not print test page

Asked by Martin Herdieckerhoff

The HP Laserjet 1020 is locally attached via USB.
The PC is 32-bit Intel.
The printer works fine when used from Windows XP (dual boot system).
I want to print to it from Ubuntu as well - from the same PC over the same USB port.
However, up to now I could not print a single page from Ubuntu.

HPLIP is installed. I used Synaptic to add hplip-doc and hplip-gui
(but I do not know how to find and use those on my machine now).

The printer is attached to an expansion card with four USB ports.

I used these commands (shorthand notation):
lsusb => ... Bus 004 Device 002: ID 03f0:2b17 Hewlett-Packard ...
sudo hp-setup > USB > no printer found ... entered 004:002 manually ... found the printer > ... > finish

I left the option for test page printing checked - but none was printed.

I have a german user interface and must guess what the menu items might be in English:
E: System > Management > Printing (?)
G: System > Systemverwaltung > Drucken
=> Device URI : hp:/usb/HP_LaserJet_1020?serial=JL1X3G0
           Brand and model : HP LaserJet 1020 Foomatic/foo2zjs (recommended)
E: System > Configuration > HPLIP Toolbox (?)
G: System > Einstellungen > HPLIP Toolbox

I used "System > Systemverwaltung > Drucken > ... print test page" - but none was printed.
I used "System > Einstellungen > HPLIP Toolbox" and it shows "Laserjet 1020"
and I went on with "Extras > Print test page" - but none was printed.

Here is the end of the output of dmesg:

[ 5281.996700] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[ 5281.996764] sd 2:0:0:0: Attached scsi generic sg3 type 0
[ 5801.646732] usb 4-2: USB disconnect, address 3
[ 5924.793907] APIC error on CPU0: 00(02)
[ 7896.495109] ppdev0: registered pardevice
[ 7896.543988] ppdev0: unregistered pardevice
[ 7899.526926] ppdev0: registered pardevice
[ 7899.574299] ppdev0: unregistered pardevice
[ 7900.296086] ppdev0: registered pardevice
[ 7900.345024] ppdev0: unregistered pardevice
[ 7901.415475] ppdev0: registered pardevice
[ 7901.462720] ppdev0: unregistered pardevice
[ 7915.215824] audit(1215888353.843:16): type=1503 operation="inode_permission" requested_mask="rw" denied_mask="rw" name="/dev/tty" pid=7561 profile="/usr/sbin/cupsd"
[ 7915.246163] audit(1215888353.843:17): type=1503 operation="inode_permission" requested_mask="rw" denied_mask="rw" name="/dev/tty" pid=7564 profile="/usr/sbin/cupsd"
[ 7924.826945] usb 4-1: usbfs: USBDEVFS_CONTROL failed cmd hp rqt 161 rq 1 len 1 ret -110
[ 7931.813731] usb 4-1: usbfs: USBDEVFS_CONTROL failed cmd hp rqt 161 rq 1 len 1 ret -110
[ 7938.800648] usb 4-1: usbfs: USBDEVFS_CONTROL failed cmd hp rqt 161 rq 1 len 1 ret -110
[ 7945.787557] usb 4-1: usbfs: USBDEVFS_CONTROL failed cmd hp rqt 161 rq 1 len 1 ret -110
[ 7952.774474] usb 4-1: usbfs: USBDEVFS_CONTROL failed cmd hp rqt 161 rq 1 len 1 ret -110
[ 7959.761259] usb 4-1: usbfs: USBDEVFS_CONTROL failed cmd hp rqt 161 rq 1 len 1 ret -110

I attached and removed a memory stick for finding my launchpad password -
that is what the first few lines are about.

What should I do to get my Linux installation printing via this printer?

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Martin Herdieckerhoff
Solved:
Last query:
Last reply:
Revision history for this message
Martin Herdieckerhoff (martin-herdieckerhoff) said :
#1

 hp-info
        HP Linux Imaging and Printing System (ver. 2.7.7)
        Device Information Utility ver. 3.4

hp-check
         hp-check: command not found

Revision history for this message
Martin Herdieckerhoff (martin-herdieckerhoff) said :
#2

Well, the system is Ubuntu 7.10 (Gutsy).
Meanwhile I installed the current HPLIP 2.8.6 (with auto installer) and rebooted.
Still I cannot print. Any ideas?

hp-check =>
HP Linux Imaging and Printing System (ver. 2.8.6)
Dependency/Version Check Utility ver. 14.0

Copyright (c) 2001-8 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).

Saving output in log file: hp-check.log

Initializing. Please wait...

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

Basic system information:
Linux herdi 2.6.22-15-generic #1 SMP Tue Jun 10 09:21:34 UTC 2008 i686 GNU/Linux

Distribution:
ubuntu 7.10

HPOJ running?
No, HPOJ is not running (OK).

Checking Python version...
OK, version 2.5.1 installed

Checking PyQt version...
OK, version 3.17 installed.

Checking SIP version...
OK, Version 4.7 installed

Checking for CUPS...
Status: Scheduler wird ausgeführt
Version: 1.3.2
error_log is set to level: warn
note: For troubleshooting printing issues, it is best to have the CUPS 'LogLevel'
note: set to 'debug'. To set the LogLevel to debug, edit the file /etc/cups/cupsd.conf (as root),
note: and change the line near the top of the file that begins with 'LogLevel' to read:
note: LogLevel debug
note: Save the file and then restart CUPS (see your OS/distro docs on how to restart CUPS).
note: Now, when you print, helpful debug information will be saved to the file:
note: /var/log/cups/error_log
note: You can monitor this file by running this command in a console/shell:
note: tail -f /var/log/cups/error_log

Checking for dbus/python-dbus...
dbus daemon is running.
python-dbus version: 0.82.0

------------------------------------
| COMPILE AND RUNTIME DEPENDENCIES |
------------------------------------

note: To check for compile-time only dependencies, re-run hp-check with the -c parameter (ie, hp-check -c).
note: To check for run-time only dependencies, re-run hp-check with the -r parameter (ie, hp-check -r).

Checking for dependency: cups - Common Unix Printing System...
OK, found.

Checking for dependency: cups-ddk - CUPS driver development kit...
OK, found.

Checking for dependency: cups-devel- Common Unix Printing System development files...
OK, found.

Checking for dependency: dbus - Message bus system...
OK, found.

Checking for dependency: gcc - GNU Project C and C++ Compiler...
OK, found.

Checking for dependency: GhostScript - PostScript and PDF language interpreter and previewer...
OK, found.

Checking for dependency: libcrypto - OpenSSL cryptographic library...
OK, found.

Checking for dependency: libjpeg - JPEG library...
OK, found.

Checking for dependency: libnetsnmp-devel - SNMP networking library development files...
OK, found.

Checking for dependency: libpthread - POSIX threads library...
OK, found.

Checking for dependency: libtool - Library building support services...
OK, found.

Checking for dependency: libusb - USB library...
OK, found.

Checking for dependency: make - GNU make utility to maintain groups of programs...
OK, found.

Checking for dependency: PIL - Python Imaging Library (required for commandline scanning with hp-scan)...
OK, found.

Checking for dependency: ppdev - Parallel port support kernel module....
OK, found.

Checking for dependency: PyQt - Qt interface for Python...
OK, found.

Checking for dependency: python-ctypes - A foreign function library for Python...
OK, found.

Checking for dependency: python-dbus - Python bindings for dbus...
OK, found.

Checking for dependency: python-devel - Python development files...
OK, found.

Checking for dependency: Python 2.3 or greater - Required for fax functionality...
OK, found.

Checking for dependency: Python 2.2 or greater - Python programming language...
OK, found.

Checking for dependency: Reportlab - PDF library for Python...
OK, found.

Checking for dependency: SANE - Scanning library...
OK, found.

Checking for dependency: SANE - Scanning library development files...
OK, found.

Checking for dependency: scanimage - Shell scanning program...
warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly.
To install this dependency, execute this command:
sudo apt-get install --yes --force-yes libsane

Checking for dependency: xsane - Graphical scanner frontend for SANE...
OK, found.

----------------------
| HPLIP INSTALLATION |
----------------------

Currently installed HPLIP version...
HPLIP 2.8.6 currently installed in '/usr/share/hplip'.

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

[hplip]
version=2.8.6

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

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
pp-build=no
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
foomatic-drv-install=yes
foomatic-ppd-install=no
foomatic-rip-hplip-install=yes
internal-tag=2.8.6.20

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

  Device URI Model
  --------------------------------------- -------------------
  hp:/usb/HP_LaserJet_1020?serial=JL1X3G0 HP LaserJet 1020

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

warning: No queues found.

----------------------
| SANE CONFIGURATION |
----------------------

'hpaio' in '/etc/sane.d/dll.conf'...
OK, found. SANE backend 'hpaio' is properly set up.

Checking output of 'scanimage -L'...
error: scanimage not found.

---------------------
| PYTHON EXTENSIONS |
---------------------

Checking 'cupsext' CUPS extension...
OK, found.

Checking 'pcardext' Photocard extension...
OK, found.

Checking 'hpmudext' I/O extension...
OK, found.

Checking 'scanext' SANE scanning extension...
error: NOT FOUND OR FAILED TO LOAD! Please reinstall HPLIP and check for the proper installation of scanext.

-----------------
| USB I/O SETUP |
-----------------

Checking for permissions of USB attached printers...

HP Device 0x2b17 at 004:002:
    Device URI: hp:/usb/HP_LaserJet_1020?serial=JL1X3G0
    Device node: /dev/bus/usb/004/002
    Mode: 0666

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

error: 2 errors and/or warnings.

Summary of needed commands to run to satisfy missing dependencies:
sudo apt-get install --yes --force-yes libsane

Please refer to the installation instructions at:
http://hplip.sourceforge.net/install/index.html

Done.

----
I assume that the reported errors regarding scanimage and scanext are not relevant for my case
because I my device does not provide scanning functionality.

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#3

Run:

sudo apt-get install python-qt

Then

sudo hp-setup

Does it print?

A

Revision history for this message
Martin Herdieckerhoff (martin-herdieckerhoff) said :
#4

Hi,

I tried this and it seems very promising ...
Because apt-get found no python-qt, I checked with synaptic and found:
- python-qt3 installed on my system
- python-qt4 available for installation
so I got the latter and ran hp-setup.
This installed a plugin from HP for the first time and took a while.
Eventually it hang with the message given below.
I stopped it with some button in the GUI and tried to print the test-page - but nothing happened.
Any ideas what I might do next to get the printer working?

Martin

---- output of hp-setup -----
[...]
Copying file hp_laserjet_p1008.fw.gz to /usr/share/hplip/data/firmware/hp_laserjet_p1008.fw.gz...
Copying file hp_laserjet_p1505-hpijs.ppd to /usr/share/ppd/hpijs/HP/hp_laserjet_p1505-hpijs.ppd...
Copying file hp_laserjet_p1505.fw.gz to /usr/share/hplip/data/firmware/hp_laserjet_p1505.fw.gz...
Copying file hp_laserjet_p1505n-hpijs.ppd to /usr/share/ppd/hpijs/HP/hp_laserjet_p1505n-hpijs.ppd...
Copying file license.txt to /usr/share/hplip/data/plugins/license.txt...
Creating directory /usr/share/hplip/data/plugins
Copying file lj-x86_32.so to /usr/share/hplip/prnt/plugins/lj-x86_32.so (link=/usr/share/hplip/prnt/plugins/lj.so)...
Creating directory /usr/share/hplip/prnt/plugins
Creating symlink /usr/share/hplip/prnt/plugins/lj.so (link) to file /usr/share/hplip/prnt/plugins/lj-x86_32.so (target)...
Setting plugin installed flag to 1.

Done.

Downloading firmware to device hp:/usb/HP_LaserJet_1020?serial=JL1X3G0...
Firmware download successful.

Traceback (most recent call last):
  File "/usr/share/hplip/ui/setupform.py", line 302, in showPage
    self.setupPrinter()
  File "/usr/share/hplip/ui/setupform.py", line 870, in setupPrinter
    self.installed_print_devices = device.getSupportedCUPSDevices(['hp'])
  File "/usr/share/hplip/base/device.py", line 601, in getSupportedCUPSDevices
    parseDeviceURI(p.device_uri)
  File "/usr/share/hplip/base/device.py", line 668, in parseDeviceURI
    m = pat_deviceuri.match(device_uri)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xdf' in position 13: ordinal not in range(128)

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#5

Try running:

LANG=C.iso8859.1 hp-setup

and configure the printer does it work?

Aaron

Revision history for this message
Martin Herdieckerhoff (martin-herdieckerhoff) said :
#6

I did what you said - and it worked.
It was easy, fast and smooth.
I am happy and you made my day.
Thank you very much!

I am not sure why - but I had to use
a slight modification of your recommendation:
    sudo bash; <enter password>; LANG=C.iso8859.1 hp-setup

Martin

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#7

Great!

There are some problems with other language sets, we are working on having a better implementation in a future release.

Thanks for your support of HPLIP!

Aaron

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#8

As a side note if you use any of the HPLIP tools you'll probably have to run them the same way.

sudo bash; <enter password>; LANG=C.iso8859.1 hp-toolbox

and so forth.

A