Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Unable to add HP printer

Need help with peripherals or devices?
Post Reply
Message
Author
Rezadora
Posts: 13
Joined: 2019-10-23 15:30

[SOLVED] Unable to add HP printer

#1 Post by Rezadora »

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.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Unable to add HP printer

#2 Post by L_V »

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/

Rezadora
Posts: 13
Joined: 2019-10-23 15:30

Re: Unable to add HP printer

#3 Post by Rezadora »

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.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Unable to add HP printer

#4 Post by L_V »

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.

Rezadora
Posts: 13
Joined: 2019-10-23 15:30

Re: Unable to add HP printer

#5 Post by Rezadora »

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.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Unable to add HP printer

#6 Post by L_V »

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 ?

Rezadora
Posts: 13
Joined: 2019-10-23 15:30

Re: Unable to add HP printer

#7 Post by Rezadora »

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.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Unable to add HP printer

#8 Post by L_V »

See here if it can help
http://www.openprinting.org/printer/HP/HP-LaserJet_1018
+ is printer-driver-foo2zjs installed ?

Rezadora
Posts: 13
Joined: 2019-10-23 15:30

Re: Unable to add HP printer

#9 Post by Rezadora »

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?

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Unable to add HP printer

#10 Post by L_V »

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

shep
Posts: 423
Joined: 2011-03-15 15:22

Re: Unable to add HP printer

#11 Post by shep »

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.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Unable to add HP printer

#12 Post by stevepusser »

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.
MX Linux packager and developer

brian_p
Posts: 196
Joined: 2015-11-05 10:32
Has thanked: 1 time
Been thanked: 5 times

Re: Unable to add HP printer

#13 Post by brian_p »

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.

Rezadora
Posts: 13
Joined: 2019-10-23 15:30

Re: Unable to add HP printer

#14 Post by Rezadora »

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.

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Unable to add HP printer

#15 Post by L_V »

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

brian_p
Posts: 196
Joined: 2015-11-05 10:32
Has thanked: 1 time
Been thanked: 5 times

Re: [SOLVED] Unable to add HP printer

#16 Post by brian_p »

You have changed your direction of travel. That's ok. My input is not needed.

--
Brian.
--
Brian.

brian_p
Posts: 196
Joined: 2015-11-05 10:32
Has thanked: 1 time
Been thanked: 5 times

Re: [SOLVED] Unable to add HP printer

#17 Post by brian_p »

Just to make my postion clear:

Rezadora originally said:
The main reason why I want to use HPLIP is because it allows me to use HP utilities
(useful for checking the toner level).
Now HPLIP is no longer in the picture, pursuiing the matter (even when, as we know, the
firmware is already installed) is a waste of time and energy.
--
Brian.


scary-rob
Posts: 23
Joined: 2018-06-22 15:57

Re: [SOLVED] Unable to add HP printer

#19 Post by scary-rob »

An addendum for anyone who actually needs HPLIP (like I did because I have a LaserJet M1132 MFP and wanted the use of my scanner).

The method in the linuxquestions.org link provided by Rezadora in their first post does work. But for some reason my version of Buster (10.6) was missing a crucial folder. So my steps became:

Code: Select all

cd usr/lib
sudo mkdir i386-linux-gnu
cd
sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64/
sudo ln -s /usr/lib/sane /usr/lib/i386-linux-gnu/
hp-plugin
I now have a working printer.

Post Reply