How to... Fix HP printer “filter failed” error in (Ubuntu) Linux

Printer: HP LaserJet M1132 MFP; operating systems tested: Xubuntu 13.10, 14.04, 14.10; theme: Numix. Download as pdf here or here.

Update, 2015-02-06: As of a recent upgrade to Xubuntu 14.10, jumping straight to the third solution still fixes the issue.


My printer suffered a paper jam. After releasing the paper, I found that the printer was unwilling to print anything. The specific error was “filter failed”.

Diagnosing


The first step is to open CUPS. In your browser's urlbar, type “localhost:631”. If at any point, CUPS asks for your password, enter it as you would in the terminal. To confirm this error, click on the Jobs tab.


As you can see under State, I'm getting the “filter failed” error.


Solution 1: re-install printer


Now click on the Printers tab, and then click on your printer.


Under the Administration menu, you will see an option to delete the printer:


When asked to confirm, click Delete Printer. In the Administration tab, add the printer.


Once that is complete, try printing your document. (You can also print a test page in the Maintenance menu of your printer's page.)


Alternate solution if this fails: rename your printer with a slightly different name.

Solution 2: re-install CUPS


Some found that this error was caused by a problem with CUPS, either after an update or failed installation.

Although you can do this in the terminal, we're going to use a GUI method. Open Synaptic, and in the Quick filter text field, type “cups”.


Click on the Installed tab, so it will be easier to select all. Although you don't have to re-install everything, this is what I (or we) will be doing.


Select all the packages (CTRL + A). Now mark the packages for re-installation. You can do this either by right-clicking and clicking Mark for Reinstallation or opening the Package menu and clicking Mark for Reinstallation there.


Now click Apply and let Synaptic re-install CUPS. After re-installation, print your document.

Solution 3: Fix HPLIP


Update, 2015-03-02: According to an anonymous commenter, this solution can also fix "cups filter failed", "print service unavailable", and "bad file descriptor" errors.

If you perused the list of packages you marked for re-installation, you may have noticed one called hplip. Formally known as HP Linux Imaging and Printing, HPLIP integrates HP printers with Linux. It is provided by HP; you can learn more here.

Generally, HPLIP will come pre-installed with your distribution; you can confirm that by typing “hplip” in Quick filter again. If it's installed, Synaptic will show it as such.

Let's close Synaptic now and open the terminal. In the terminal, type “hp-check -t”. This will check whether HPLIP is working correctly. In my case, this is what I found:


I was missing two required packages. If you have the same problem, type “hp-doctor” as suggested. You will get a number of prompts throughout, the first of which may be a distribution error:

error: This distro (i.e ubuntu 13.10) is either deprecated or not yet supported.
The diagnosis is limited on unsupported platforms. Do you want to continue?(y=yes, n=no*):

Type “y” and continue.

If you get after it checks for updates:

Newer version of HPLIP-3.13.11 is available.
Press 'y' to continue to upgrade HPLIP-3.13.11 (y=yes*, n=no):

Type “y” and continue. You may be told to install HPLIP manually, but it will continue anyway, and check for dependencies.

Under General Dependencies, hp-doctor found this:


The next prompt will be:

Do you want to update repository and Install missing/incompatible packages. (a=install all*, c=custom_install, s=skip):

Type “a” and continue.

Because my problem was a plug-in version mismatch, I next got this:

Found Plugin version mismatch. Press 'y' to re-install the plugin(y=yes*, n=no):

Type “y” and continue.

When you're asked whether to download, specify a path, or quit, choose the download option by typing “d”.

HP will then ask you to accept the license terms:

Do you accept the license terms for the plug-in (y=yes*, n=no, q=quit) ?

Type "y" if you accept.

hp-doctor will then complete without further prompts. Now try to print your document.

Other solutions


In my case, running hp-check -t was the solution to fix the "filter failed" error. However, that may not be the case with you.

One solution that was a temporary fix was to change my PDF viewer. So, switching from the default Evince to KDE's Okular appeared to solve the problem. (By my own admission, I'm no Linux expert, so don't ask me how.)

There are some useful resources that may help:


End.

17 comments:

  1. Thank you very much, luckily enough for me the 1st solution worked :D

    ReplyDelete
    Replies
    1. Great to hear that it worked for you. Thanks for reading! :D

      Delete
  2. Thanks, I selected the first option, function correctly.

    Pedro

    ReplyDelete
    Replies
    1. Thank you for commenting. I'm happy the first one worked for you.

      Delete
  3. Solution 3 fixes broken cups printer server after ubuntu / kubuntu update or upgrade in February 2015.
    Error messages: "cups filter failed" "print service unavailable" "bad file descriptor"
    Many thanks for the solution!

    ReplyDelete
    Replies
    1. Thanks for the comment. I've added those errors to the article.

      Delete
  4. Excellent article. Fixed my problem installing HP Laserjet 1020 under ubuntu 14.04,

    hp-doctor was the step that made a difference for me. Print queue was emptying, but printer was not actually printing anything.

    Many thanks,
    Mike

    ReplyDelete
    Replies
    1. Thanks. The third solution certainly seems to do the trick for most people.

      Delete
  5. Really a great tutorial. The hp-doctor solved the problem that jobs have been sent to the queue, but nothing happend after it. I also got the "filter failed" info in the queue details. Now, it's gone and the printer HP M127 works fine under Lubuntu 14.04

    ReplyDelete
  6. I had the same issue, but none of these solutions worked. hp-doctor fixed many dependencies, but that didn't solve the problem. When rerun, it said everything was OK was I still got the same error "Filter failed" and error code 48 in the logs.

    Here is what I did, on Linux Mint 17.2 and a Laserjet Pro MFP m125nw:

    1. Removed the installed printer that failed in CUPS Web UI
    2. Uninstalled hplip (apt-get remove hplib)
    3. Download the latest version from http://hplipopensource.com/hplip-web/install/install/index.html (I think the version shipped with my distro was older)
    4. Run the downloaded file (first you need to make it executable with chmod +x filename)
    5. Follow instructions (when prompted, I preferred interactive mode over GUI)

    I think I had to run hp-setup at the end because I decided to use USB instead of Ethernet.

    Hope that helps!

    Colin

    ReplyDelete
  7. Yes it worked !! Thanks

    ReplyDelete
  8. Thank you, worked for me.
    I did have to change my printer name from hp 1020 to hp 1022, but then everything worked perfectly

    ReplyDelete
  9. Nice blog, thanks a lot. I tried all three things you recommend, and none of them fixed my "Filter failed" error. What did is the following:
    I ran hp-plugin then I deleted the printer (using the CUPS web interface), then I ran hp-setup . Now, it works.
    I have no idea if the order in which I did things matters.

    ReplyDelete
  10. You just saved my life! I was trying to fix my print server for hours. Thank you so much!

    ReplyDelete
  11. Wow,it's really a great post and very easy to understand. I think it's helpful for everyone. Thanks for sharing.

    ReplyDelete
  12. This worked wonderfully! Beginners luck, no just the best solution I've found. I installed Linux Mint 18.3 Sylvia "Mate 64 Bit " and really love it. My ERRORS were: missing filters, no imagining file installed and ppd cups errors. My printer: Hp Envy 4510 series all in one. Although I didn't reinstall (all) just the ones needed and no other printer makes and models, HP Linux and imaging packages working Wonderful. Thanks many times over.

    ReplyDelete