Ask Your Question

HP requires firmware setup on every session

asked 2014-08-20 19:25:45 -0500

updated 2015-03-28 10:30:04 -0500

Dear Fedora friends,

I've been facing an interesting scenario on my Fedora 20: I have a Hewlett Packard LaserJet 1020 properly installed via hplip. If I print the CUPS status information, everything is in place (LANG=C is used here so messages are localized to English; my system is in Portuguese):

paulo@alexandria ~$ LANG=C lpstat -p -d
printer Cups-PDF is idle.  enabled since Sat Aug  9 09:26:42 2014
printer HP_LaserJet_1020 is idle.  enabled since Wed Aug 20 19:05:29 2014
    ready to print
system default destination: Cups-PDF

So far so good. But I can only make this printer work if and only if I run hp-firmware on every session:

paulo@alexandria ~$ hp-firmware 

HP Linux Imaging and Printing System (ver. 3.14.6)
Firmware Download Utility ver. 2.4

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

Using device: hp:/usb/HP_LaserJet_1020?serial=J7025TA

HP Linux Imaging and Printing System (ver. 3.14.6)
System Tray Status Service ver. 2.0

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

Then the HP utility is now shown on my message bar:


I decided to investigate what was going on. I found out that hp-firmware, probably amongst other things, was starting hp-systray via

/usr/bin/hp-systray --force-startup

so I decided to start this service on every session. However, doing so was not sufficient to make the printer work. I still need to make it work via hp-firmware, downloading the driver every single time.

Any hints on what is going on here? I'm sure there might be an easy fix to this issue, I'm probably missing something very obvious.

Update: as mentioned in the comment to sideburns, I took a peek at /usr/bin/hp-systray and it is

paulo@alexandria ~$ file /usr/bin/hp-systray 
/usr/bin/hp-systray: symbolic link to `../share/hplip/'

and it's a symbolic link to a Python script; apparently, the code does not do nothing else than query CUPS looking for valid HP entries. I suspect it has nothing to do with my problem, but we all know computers are basically witchcraft. :)

edit retag flag offensive close merge delete


Welcome to ask Fedora! How are you starting he-systray; is it a service you control with systemctl or something else? Please reply as a comment, not an answer because you're only allowed one answer per question.

sideburns gravatar imagesideburns ( 2014-08-20 20:02:14 -0500 )edit

I have an hp printer that I had to install using hplip software (from fedora repos), rather than fedoras install printer dialog, to get it to work properly. Might be worth a try.

paul9876 gravatar imagepaul9876 ( 2014-08-20 20:08:04 -0500 )edit

@sideburns: No, hp-systray is not a service controlled with systemctl. I simply start it manually. Now that you mentioned it, I just took a peek at it and it's a symbolic link to a Python script; apparently, the code does not do nothing else than query CUPS looking for valid HP entries. Now I am almost sure it has nothing to do with my problem. :)

Paulo Cereda gravatar imagePaulo Cereda ( 2014-08-20 20:15:19 -0500 )edit

@paul9876: Thanks for the insight. :) Mine is actually installed via hplip as well, I also had a bad time with system-config-printer. The printer works, but I have to keep hp-firmware'ing every session in order to make it work. Quite odd behaviour, unless I'm missing something really obvious. :)

Paulo Cereda gravatar imagePaulo Cereda ( 2014-08-20 20:17:33 -0500 )edit

Try this: run systemctl status hp-firmware.service (You don't need root for this.) just after boot and see what it says. It's possible that the service (if there is one) isn't properly enabled.

sideburns gravatar imagesideburns ( 2014-08-20 21:15:32 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-08-21 06:57:53 -0500

abadrinath gravatar image

updated 2014-08-21 07:11:38 -0500

Autostart the hp-firmware

Method 1: Use /etc/xdg/autostart (or /usr/share/autostart)

  1. Use your favorite text editor (gedit, kwrite, kate, etc.) and then create a file in /etc/xdg/autostart.
  2. Edit and save (note: this must be done by root privileges). No need to make the file executable because it is a desktop file.
  3. A desktop file should look something like this:
[Desktop Entry]
Comment=Autostart xscreensaver
OnlyShowIn=GNOME; #If you want printing only in GNOME :)

Note the [Desktop Entry] at the top.

  1. The Exec part should contain the path (full) to the script.

Method 2: Use user-specific autostart

  1. To do this for your user only, head over to the autostart section in System Settings.
  2. Click on Add, and specify script.
  3. Create a script with the content:

Log out and back in.


Create a script in your home directory named Dump these contents:

Execute this command:
mv $HOME/ .config/autostart

Log out and back in.

The best way I can think of is Method 1. It is the cleanest and takes the least effort.

Switch to a network printer

Switch the USB cable with a ethernet cable, find a modem, connect them, install network drivers, reboot, done! For me (HP Officejet Pro X451DW), it works fine with the drivers supplied from HP. To check the status of the printer, try:

$ lpq
edit flag offensive delete link more


Thank you again. :) I added an alternative answer with a udev approach and some notes about the new findings about HP printers. Hope it's OK. :)

Paulo Cereda gravatar imagePaulo Cereda ( 2014-08-23 06:29:56 -0500 )edit

answered 2014-08-23 06:29:00 -0500

As seen in hello's answer, we can automatically run hp-firmware on every session start. This is a good plan indeed. The only caveat is that hp-firmware falls flat on its face if the printer is not turned on, so either the printer must be in online mode during startup or we need to run hp-firmware on demand. Here I'll provide another approach and also a couple of findings about this printer.

So, boys and girls, gather around the campfire for I am gonna tell you the tale of the HP were-printer! :)

I found out a very important note about HP printers on the CUPS troubleshooting section:

Some HP printers (e.g HP LaserJet) require their firmware to be downloaded from the computer every time the printer is switched on.

There it is! Every time turn on my printer, I need to download the firmware. It's by design. Boo. Now, an interesting way to tackle this situation is a udev rule that runs hp-firmware every time it detects my printer was turned on. So let's do it!

Note: Some of these entries might vary from hardware to hardware, so I suggest a lookup at the dmesg output beforehand just to be sure.

This is the rule I came up with, available at /etc/udev/rules.d/10-hp1020.rules:

SUBSYSTEM=="usbmisc", ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="2b17", RUN+="/usr/bin/hp-firmware -y3&"

Some notes about this file:

  • You can use virtually any .rule name (I went with 10-hp1020.rules), but it is very important to note that udev deals with rules lexicographically. If order matters, the filename then matters as well.
  • I got the rule info from a device class inspection through udevadm info -a -p /sys/class/usbmisc/lp0P. Here is a good reference on the udev rule syntax.
  • You can test a rule with udevadm test /sys/class/usbmisc/lp0 in order to see what udev does with that specific device.
  • The hp-firmware command is provided with a -y3 flag which ommits the dialog box and performs a silent automatic firmware download.

With the provided 10-hp1020.rules file in the correct place (/etc/udev/rules.d), we just need to turn on our printer. udev will detect the new device, apply the corresponding rule and download the firmware.

Pretty simple and straightforward. :)

edit flag offensive delete link more


Dang! I can't accept this answer. :(

abadrinath gravatar imageabadrinath ( 2014-08-23 20:54:06 -0500 )edit

Question Tools

1 follower


Asked: 2014-08-20 19:25:45 -0500

Seen: 1,165 times

Last updated: Aug 23 '14