[SOLVED] Unable to add HP printer

Getting your soundcard to work, using Debian on non-i386 hardware, etc

[SOLVED] Unable to add HP printer

Postby Rezadora » 2019-10-23 15:54

Hello:
I'm having trouble trying to use my HP LaserJet 1018 printer. When I run hp-setup it detects the printer connected to the USB port and downloads the required plug-in. However, when the plug-in is downloaded and I click on "Next", the following message appears:
The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins.
Please run 'hp-plugin' as normal user to install plug-ins.
Visit http://hplipopensource.com for more infomation.

Despite it stated the plug-in was successfully installed.
Here's what appears on the terminal when running hp-setup:
Code: Select all
Creating directory plugin_tmp
Verifying archive integrity... All good.
Uncompressing HPLIP 3.18.12 Plugin Self Extracting Archive.........................................................

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

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

Plug-in version: 3.18.12
Installed HPLIP version: 3.18.12
Number of files to install: 55

note: Using PyQt5
 
Done.
 Plug-in installation successful

Done.
error:  The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins.  Please run 'hp-plugin' as normal user to install plug-ins.   Visit  http://hplipopensource.com  for more infomation.
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2458, resource id: 13105448, major code: 40 (TranslateCoords), minor code: 0

Done.

I tried to run hp-plugin like the error message said, and it downloaded the plug-in but running hp-setups afterwards asks to download the plug-in again. And hp-plugin doesn't specify where the plug-in was downloaded so I cannot add it manually. Here's what appears on the terminal when running hp-plugin:
Code: Select all
$ hp-plugin

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

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


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

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

Checking for network connection...
Downloading plug-in from:
Receiving digital keys: [...]
Creating directory plugin_tmp
Verifying archive integrity... All good.
Uncompressing HPLIP 3.18.12 Plugin Self Extracting Archive.........................................................

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

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

Plug-in version: 3.18.12
Installed HPLIP version: 3.18.12
Number of files to install: 55

note: Using PyQt5
 
Done.
 Plug-in installation successful
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1210, resource id: 13225182, major code: 40 (TranslateCoords), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1335, resource id: 13229729, major code: 40 (TranslateCoords), minor code: 0

Done.

I found that someone else had the same issue, but the solution provided is to use the foo2zjs free software printer driver and I would like to use HPLIP to work with the printer.

I also found another possible solution here, but I can't create the symbolic links the user said because the /usr/lib64/x86_64-linux-gnu/sane directory already exists, so I can't make it a symlink pointing to /usr/lib64/sane.

How can I get the printer to work?

I'm using Debian 10.1 Buster under amd64 architecture. If it matters, I'm using the MATE desktop environment.
Thanks in advance.
Last edited by Rezadora on 2019-10-25 17:20, edited 1 time in total.
Rezadora
 
Posts: 11
Joined: 2019-10-23 15:30

Re: Unable to add HP printer

Postby L_V » 2019-10-23 16:00

What did you "install" exactly ? hplip package does not work ?
Code: Select all
apt show hplip
apt install hplip

and then see: http://localhost:631/
L_V
 
Posts: 1125
Joined: 2007-03-19 09:04

Re: Unable to add HP printer

Postby Rezadora » 2019-10-23 16:28

L_V wrote:What did you "install" exactly ? hplip package does not work ?
Code: Select all
apt show hplip
apt install hplip


I installed the hplip and hplip-gui packages.

L_V wrote:and then see: http://localhost:631/

CUPS is working, but the printer doesn't appear in the "Printers" section.
Rezadora
 
Posts: 11
Joined: 2019-10-23 15:30

Re: Unable to add HP printer

Postby L_V » 2019-10-23 16:39

Rezadora wrote:CUPS is working, but the printer doesn't appear in the "Printers" section.
You have first to install it and associate the correct driver in the administration section @ http://localhost:631/
I suppose it is at last correctly detected with lsusb.
L_V
 
Posts: 1125
Joined: 2007-03-19 09:04

Re: Unable to add HP printer

Postby Rezadora » 2019-10-23 16:58

L_V wrote:You have first to install it and associate the correct driver in the administration section @ http://localhost:631/
I suppose it is at last correctly detected with lsusb.

When selecting the printer model in CUPS, a lot of possible options appear. The recommended one is "HP LaserJet 1018 Foomatic/foo2zjs-z1", the rest say that a proprietary plugin is required. If I add the recommended model, won't it be use foo2zjs?

The main reason why I want to use HPLIP is because it allows me to use HP utilities (useful for checking the toner level). I also have a DeskJet scanner and I used to manage both devices conveniently with HPLIP. The DeskJet scanner is much easier to add than the LaserJet printer. I just have to plug it and it's working. Maybe I'm wrong, but what I said can't be achieved with CUPS.
Rezadora
 
Posts: 11
Joined: 2019-10-23 15:30

Re: Unable to add HP printer

Postby L_V » 2019-10-23 17:02

What did you install in your first post ? Not Hplip but hp-linux-imaging-and-printing.
Are you sure you now don't mix two kind of drivers which creates confusion ?
L_V
 
Posts: 1125
Joined: 2007-03-19 09:04

Re: Unable to add HP printer

Postby Rezadora » 2019-10-23 17:20

L_V wrote:What did you install in your first post ? Not Hplip but hp-linux-imaging-and-printing.
Are you sure you now don't mix two kind of drivers which creates confusion ?

I only installed two packages: hplip and hplip-gui. The latter depends on the former. hp-setup is a GUI printer installer, so it needs the hplip-gui package. Here are the commands I ran to add the printer, pasted from my history:
Code: Select all
sudo apt-get install hplip hplip-gui
hp-setup
# Here the installer failed and told me to run hp-plugin, so I ran it
hp-plugin # And it said the plug-in was downloaded, so I tried to run hp-setup again
hp-setup # Failed again

I haven't installed anything else.
Rezadora
 
Posts: 11
Joined: 2019-10-23 15:30

Re: Unable to add HP printer

Postby L_V » 2019-10-23 17:28

See here if it can help
http://www.openprinting.org/printer/HP/HP-LaserJet_1018
+ is printer-driver-foo2zjs installed ?
L_V
 
Posts: 1125
Joined: 2007-03-19 09:04

Re: Unable to add HP printer

Postby Rezadora » 2019-10-23 17:41


I already checked that site because it's linked in the post of these forums, and it uses the foo2zjs driver. Like I said I would like to use HPLIP if it's possible. It looks like something's wrong with the version of HPLIP found in the repositories (3.18.12), because in the another post I mentioned the user has issues with this exact version.

L_V wrote:+ is printer-driver-foo2zjs installed ?

Well, it is:
Code: Select all
$ dpkg -s printer-driver-foo2zjs
Package: printer-driver-foo2zjs
Status: install ok installed
Priority: optional
Section: text
[...]

I don't know why, though. I haven't installed it manually. Unless it's part of a fresh Debian installation. What should I do with that package?
Rezadora
 
Posts: 11
Joined: 2019-10-23 15:30

Re: Unable to add HP printer

Postby L_V » 2019-10-23 17:50

I don't have a HP printer to help you more.
You should find some instructions @ /usr/share/doc/printer-driver-foo2zjs/manual.pdf
L_V
 
Posts: 1125
Joined: 2007-03-19 09:04

Re: Unable to add HP printer

Postby shep » 2019-10-23 20:31

These printers require firmware and if the firmware is loaded it will be logged in your dmesg.
Code: Select all
# /sbin/dmesg | grep firmware


The firmware has to be downloaded from HP's website - it is not provided in a Debian package.

For your particular printer, HP removed or changed where the firmware was archived so there is a possibility that HP-setup gui could not download it.

In your prior link http://forums.debian.net/viewtopic.php?f=7&t=143923, success required manually downloading the firmware.

Also think about why you would want to use bloated python scripts in hplip. Python scripts written by HP who moved/removed the firmware and did not update the location (maybe a push from HP to buy their latest model?). Mate's printer gui also does not play well with them.

If you use foo2zfs with just cups, the Mate gui will work fine and you will be able to get rid of many, many python dependencies.
shep
 
Posts: 325
Joined: 2011-03-15 15:22

Re: Unable to add HP printer

Postby stevepusser » 2019-10-24 01:40

Well, the current hplip-3.19.8 in Bullseye is a trivial backport to Buster, but you have to force it to build with only one thread for Stretch backports or get a build error--at least that's my experience in doing them for MX Linux. https://repology.org/project/hplip/versions

Maybe someone would do it for buster-backports if requested on the mailing list.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Clipgrab 3.8.6, Hedgewars 1.0.0, PulseEffects 4.6.8, Telegram-desktop 1.8.15, Pale Moon 28.7.2, KeepassXC 2.5.1
User avatar
stevepusser
 
Posts: 11254
Joined: 2009-10-06 05:53

Re: Unable to add HP printer

Postby brian_p » 2019-10-24 12:33

It is not unknown for the HPLIP software to foul up from time to time when
it comes to downloading and installing the plugin, and, on occasion, to issue
conflicting messages. However, there a number of ways to get round this.

First, let us see whether the needed firmware actually got installed.What do
get for the command

Code: Select all
ls /usr/share/hplip/data/firmware/hp_laserjet_1018.fw.gz ?
--
Brian.
brian_p
 
Posts: 87
Joined: 2015-11-05 10:32

Re: Unable to add HP printer

Postby Rezadora » 2019-10-25 17:16

L_V wrote:I don't have a HP printer to help you more.
You should find some instructions @ /usr/share/doc/printer-driver-foo2zjs/manual.pdf

The printer is working now. I added it using CUPS easily choosing the "HP LaserJet 1018 Foomatic/foo2zjs-z1 (en)" option.

shep wrote:These printers require firmware and if the firmware is loaded it will be logged in your dmesg.
Code: Select all
# /sbin/dmesg | grep firmware


The firmware has to be downloaded from HP's website - it is not provided in a Debian package.

Before trying to use the printer with CUPS I downloaded the plug-in HPLIP was looking for (hplip-3.18.12-plugin.run) from the HPLIP website and it still didn't work. I'm aware the firmware required is not provided by Debian, that's the problem I was having: it wasn't being downloaded. Or like you said, HP changed the location of the firmware.

shep wrote:These printers require firmware and if the firmware is loaded it will be logged in your dmesg.
Also think about why you would want to use bloated python scripts in hplip. Python scripts written by HP who moved/removed the firmware and did not update the location (maybe a push from HP to buy their latest model?). Mate's printer gui also does not play well with them.

If you use foo2zfs with just cups, the Mate gui will work fine and you will be able to get rid of many, many python dependencies.

Good point. I have nothing against CUPS and using it. In fact, I've added many printers at work using CUPS. It's just that I was used to manage my HP printers via HPLIP. But I decided to forget about HPLIP and use CUPS instead. Realistically, I never used any advanced option provided by HPLIP like checking the toner level. So I think I'll be fine without HPLIP.

stevepusser wrote:Well, the current hplip-3.19.8 in Bullseye is a trivial backport to Buster, but you have to force it to build with only one thread for Stretch backports or get a build error--at least that's my experience in doing them for MX Linux. https://repology.org/project/hplip/versions

Maybe someone would do it for buster-backports if requested on the mailing list.

As I already got it to work I don't think I'll ever need to use the backports package. Nevertheless, it's good to know I have the possibility to use it.

brian_p wrote:First, let us see whether the needed firmware actually got installed.What do
get for the command

Code: Select all
ls /usr/share/hplip/data/firmware/hp_laserjet_1018.fw.gz ?

The file exists:
Code: Select all
$ ls /usr/share/hplip/data/firmware/hp_laserjet_1018.fw.gz
/usr/share/hplip/data/firmware/hp_laserjet_1018.fw.gz

brian_p, even if I managed to get the printer to work and I marked the topic as solved I'm interested in the way to get around it you mention, if you don't mind. I created a virtual machine in VirtualBox with the USB port shared in order to follow your instructions without changing anything in my actual system. I read the forums guidelines and it doesn't break any, but if it does I will gladly create another topic.

Thank you all for your help.
Rezadora
 
Posts: 11
Joined: 2019-10-23 15:30

Re: Unable to add HP printer

Postby L_V » 2019-10-25 18:02

Rezadora wrote:The printer is working now. I added it using CUPS easily choosing the "HP LaserJet 1018 Foomatic/foo2zjs-z1 (en)" option.

Then what was your problem ? Just package printer-driver-foo2zjs missing ?
Normally, if HP drivers are provided by Debian package, you don't need anything external (as far as I remember with HP printer).
L_V
 
Posts: 1125
Joined: 2007-03-19 09:04

Next

Return to Hardware

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable