You are not logged in.

#1 2012-07-11 16:18:03

nick761
Member
Registered: 2012-07-11
Posts: 3

Trouble printing with my HP Deskjet printer using CUPS and hplip

tl;dr This 1,646 word post describes my frustration with CUPS and hplip. I cannot get my HP Deskjet F4400 set up with CUPS, and all the solutions I've tried don't work.

I'm running Arch Linux ARM on my Seagate DockStar, a small ARM-based "plug computer" that I use as a home server. My printer is the HP Deskjet F4480, which is part of the HP Deskjet F4400 series.

I previously had CUPS set up to share my printer with my home network, using hplip for the printer driver. I never upgraded CUPS or hplip because those versions worked fine, and I didn't want to break anything avoid breaking anything. The versions that I was using had to have been at least one to two years old.

Everything was working very smoothly... until a few days ago. The drive I was running Arch Linux ARM on became corrupt, so I had to install a fresh copy of the operating system. That meant losing all of the working versions and configuration files each application I had installed, including CUPS. I thought I had a backup image of the drive, but it didn't work when I tried to restore it. (Yes, it was stupid of me not to test my backup.)

Setting up CUPS was one of the first things that I wanted to do after reinstalling, since my family depends on the network printing functionality almost daily. Unfortunately, I could not get CUPS to work with my printer correctly. It wouldn't be able to display a list of drivers, HP's setup utility encountered an error adding it, and it threw various errors when I tried to print test pages. I ended up reading hundreds of forum posts, wiki articles, and CUPS/hplip tutorials to try to figure out how to properly set it up. I ended up spending a total of nearly ten hours trying to get the printer to print with CUPS, and it's still not working after all that work.

I'm going to explain in this post some of the many things that I've tried so far. I just removed all of the printing packages from my system and any extra files that were left behind. I'm now going to be installing all of the packages again and documenting everything that I have been trying to do to get it to work. I'll try to include exact error messages and logs where necessary.

1. I first found this article on the Arch Linux ARM website on how to set up a CUPS printer. I didn't really want to use webmin, but I did it anyway so that I could follow the guide. I installed all the packages mentioned except for cups-pdf, since I didn't need print to PDF support. Everything installed smoothly, and I configured CUPS and webmin to allow access to other computers on the network. I started to notice problems in the instructions - /etc/rc.d/cups was actually /etc/rc.d/cupsd, /etc/printers.conf was actually /etc/cups/printers.conf, and webmin didn't actually add anything to the printers.conf file. I uninstalled webmin at this point because I didn't need it, and I decided I wasn't going to follow that guide with incorrect information.

2. I then tried to set up the printer on my own using the CUPS web interface listening on port 631. I clicked the Add Printer button and it switched me to the HTTPS web interface. I then logged into the root account and was presented with the list of printers. My printer was listed as "HP Deskjet F4400 series (HP Deskjet F4400 series)", so I selected it and continued. I saw a list of printer models (PPD files) ending in CUPS+Gutenprint v5.2.9. There was no entry for my printer, so I tried the "HP DeskJet Series (en)" one. I set the default options and chose Maintenaince->Print test page. I then got a ridiculously simple error: "Unable to print test page: No such file or directory". How do I even know what file or directory it's referencing? I read online that it may be because I'm not in the lp group, but root is indeed in there. I saw in the error log "Avahi client failed: -26". I started dbus and avahi-daemon just in case, but I still got that silly error. I restarted cups and the same error message occured.

3. I researched online that pretty much the only way for my printer to have a driver would be to install hplip. Before installing hplip, I uninstalled CUPS, leaving cupsd.conf but deleting printers.conf. Then I installed CUPS and hplip together, with hplip requiring foomatic-db, foomatic-db-engine, and foomatic-filters. Everything seemed to install correctly. I started CUPS again and then ran hp-setup -i to try to install my printer. I selected USB and it found my printer, hp:/usb/Deskjet_F4400_series?serial=[printer serial number here]. I entered a simple name and then was told that no PPD file was found for the printer but that I could specify one manually. There were none I could find online; everywhere it just said to install hplip. I used the find command to find "f4400" and finally found 2 compressed PPDs located at /usr/share/ppd/HP/hp-deskjet_f4400_series-hpijs.ppd.gz and /usr/share/ppd/HP/hp-deskjet_f4400_series.ppd.gz. I gunzipped both of them and pointed hpsetup to the hpijs one, knowing that I was using the hpijs one when it was working before. It told me "Description for the file: HP Deskjet f4400 Series hpijs, 3.12.6". Hooray! I selected to use it, but then setup failed: "error: Printer queue setup failed. Please restart CUPS and try again." Ugh!

4. I restarted CUPS and went into the hp-setup process again. It gave me the same printer queue setup failed error. I don't know if these entries in the CUPS error log are related or not, but these errors relating to foomatic showed up. I restarted CUPS again and this time used the non-hpijs file with hp-setup. This one was called "Description for the file: HP Deskjet f4400 Series, hpcups 3.12.6". It failed again with the same error and the same entries in the error log. I found lots of posts online about this error, but none seemed to have a solution that would work for me. Now I tried running hp-setup in debug mode with -g. Here is what it said before the error. I then tried to Google "debug: addPrinter() returned (0, Unable to connect to CUPS server)". I saw on an Arch bug report to install dbus-python and python2-gobject, as well as create a symlink for /usr/bin/python2 to /usr/bin/python. It didn't work - same error.

5. I then tried to add the printer to CUPS via its web interface. Now there were two listed,  HP Deskjet F4400 series (HP Deskjet F4400 series) and HP Deskjet F4400 series USB [printer serial number here] HPLIP (HP Deskjet F4400 series). So, hplip added the second one. I tried both of them, but after clicking Continue the page started to hang. I got another stupid, undescriptive error. "Unable to get list of printer drivers: Success". I saw the same foomatic errors in the error log as before. I then started reading the ArchWiki page on CUPS, located here. I tried the blacklisting usblp. I tried changing the permissions on the device node, although this starts to become ridiculous that it is even required to do that. Nothing was working; the printer installation still didn't work with hp-setup or with CUPS. Then, I found what I was looking for: the exact error I had on the wiki page! It said for "Unable to get list of printer drivers" you should "Try to remove Foomatic drivers." WTF? Foomatic is required for hplip, and hplip is required for my printer. I can't do that. Forum posts say to try that or do the permissions or usblp thing. Nothing is working.

6. I tried various other things to get it to work, even though I knew they probably wouldn't make it any different. I copied the PPDs from hplip to another folder and uninstalled hplip and foomatic. I then added them to /usr/share/cups/model and CUPS successfully found them and set up the printer. I reinstalled hplip and foomatic since they're needed for those PPDs to function, and I tried printing a test page. It failed. I tried using the CUPS web interface to modify the printer driver; nope, that wasn't going to happen: "Unable to get list of printer drivers: Success".

That concludes the list of some of the things that I have tried so far. I really want to get this printer working, but right now I am really fed up with CUPS and hplip. It's things like this that make me hesitant to recommend Linux to anyone else. So much manual configuration and tinkering the inner workings of things is required to do tasks that would be quite simple on Windows. For example, I can plug this printer into my Windows 7 machine right now, wait for the driver to automatically be installed and configured, and have a test page in my hands less than a minute after I first plugged in the USB cable. I can share the printer with any other Windows machine on the network by checking a single checkbox.

But back to my problem with getting the printer to work on my DockStar. I just uninstalled all of CUPS, hplip, and foomatic again and removed all of their files. I can walk through things to try that you guys post and then give you full logs of everything - just give me exactly what to do and install and the exact order to do it all in. I just don't know what to do at this point and am so frustrated with this that I'm about to give up.

Does anyone have any suggestions on how to get this printer working? I know this was a very long post, but I just wanted to explain everything that I've tried and how nothing worked. I really hope that we can figure this out so that I'll be able to print, and maybe it'll solve a few other people's problems with their printers, too. Thanks for reading, and thanks in advance for the help.

Offline

#2 2012-07-11 18:24:14

jstoik1
Member
From: Las Vegas
Registered: 2012-02-15
Posts: 13

Re: Trouble printing with my HP Deskjet printer using CUPS and hplip

My HP Laserjet was a pain too, but works perfectly now that I've installed CUPS, hplip, and a package from AUR called hplip-plugin (http://aur.archlinux.org/packages.php?ID=44646).

Offline

#3 2012-07-11 19:38:07

nick761
Member
Registered: 2012-07-11
Posts: 3

Re: Trouble printing with my HP Deskjet printer using CUPS and hplip

jstoik1 wrote:

My HP Laserjet was a pain too, but works perfectly now that I've installed CUPS, hplip, and a package from AUR called hplip-plugin (http://aur.archlinux.org/packages.php?ID=44646).

Thanks for the reply, but my printer isn't on the list of printers that hplip-plugin can be used with. I just tried to install it but it told me: "error: Unable to load pkit...is HPLIP installed?". I also ran hp-setup again just to see if it'd done anything at all before that error, but again it didn't find the PPD and again it failed to add the print queue. CUPS web interface once again said "Unable to get list of printer drivers: Success".

Note that removing foomatic-db does fix the can't get a list of printer drivers problem, but I can't use hplip and the printer without it. sad

Last edited by nick761 (2012-07-11 20:22:41)

Offline

#4 2012-07-11 20:40:46

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: Trouble printing with my HP Deskjet printer using CUPS and hplip

Have you remembered to add yourself to the lp group?


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#5 2012-07-11 22:02:55

nick761
Member
Registered: 2012-07-11
Posts: 3

Re: Trouble printing with my HP Deskjet printer using CUPS and hplip

Roken wrote:

Have you remembered to add yourself to the lp group?

Yep, I'm in it.

Offline

#6 2012-07-19 10:09:28

los_locos
Member
From: [8-D]
Registered: 2012-06-22
Posts: 17

Re: Trouble printing with my HP Deskjet printer using CUPS and hplip

Had similar issue with my HP Deskjet F4500C All in one printer, here's what I did:

make sure these packages are installed or install them

pacman -S cups cups-pdf hplip pyqt3 python2-pyqt
pacman -S system-config-printer-gnome
rc.d cups start

To add device and install hp driver:
1. Run ‘hp-setup’ as root.
2. Click ‘Show Advanced Options’ button and check-enable ‘Manual Discovery’.
3. Enter IP address 192.168.59.63 in the ‘…device ID…’ entry and click ‘Next’ to install driver.

run system-config-printer as root, to add printer

# system-config-printer
click “Add”, Select Device -> Network Printer -> input the IP address of the printer such as “192.168.1.3″, click “Find” -> “Process”

you should be ok from here, if not some further steps:

If you encounter the following error:
File “/usr/share/system-config-printer/newprinter.py”, line 1531, in getNetworkPrinterMakeModel
debugprint (host + “: ” + args)
TypeError: cannot concatenate ‘str’ and ‘list’ objects

You should comment out the error line at 1531 of newprinter.py, and then continue to add the printer.

4). Finally, you can run hp-check to see what problems exists for the printer.


don't be part of the system and throw it on the ground

Offline

#7 2012-08-11 02:08:25

neighborhoodhacker
Member
Registered: 2012-08-06
Posts: 45

Re: Trouble printing with my HP Deskjet printer using CUPS and hplip

I'm having this same issue and I know I am added to both groups. I am pretty sure there is a cups problem right now

Offline

#8 2012-08-11 02:28:05

neighborhoodhacker
Member
Registered: 2012-08-06
Posts: 45

Re: Trouble printing with my HP Deskjet printer using CUPS and hplip

Oh! it turns out that in /etc/group it said I was added but groupadd wasn't working correctly I guess? But anyways. I suggest making sure groups command outputs you are okay

Edit: well the groups display is actually only showing I'm in users and sys now.... idk... wish you luck

Last edited by neighborhoodhacker (2012-08-11 02:28:56)

Offline

#9 2012-08-14 01:33:28

NobodySpecial
Member
Registered: 2007-04-12
Posts: 28

Re: Trouble printing with my HP Deskjet printer using CUPS and hplip

los_locos wrote:

Had similar issue with my HP Deskjet F4500C All in one printer, here's what I did:

To add device and install hp driver:
1. Run ‘hp-setup’ as root.
2. Click ‘Show Advanced Options’ button and check-enable ‘Manual Discovery’.
3. Enter IP address 192.168.59.63 in the ‘…device ID…’ entry and click ‘Next’ to install driver.

Thanks, los_locos!
I have an HP Officejet.  The whole trick for me was to simply run "sudo hp-setup" and then do "Manual Discovery". The automatic discovery found the printer, but never installed it right.  The manual discovery did for some reason.  Go figure.

Offline

Board footer

Powered by FluxBB