# Kernel 3.1 usb printer firmware load (Working)

## armstrong360

printing is such a pain sometimes!!!   I have an HP1018 LaserJet printer.  It is a usb printer.  I have had it working on earlier kernels and cups!  However after the upgrade to kernel 3.1 it has stopped functioning.  

Linux version 3.1.6-gentoo (root@jimmy) (gcc version 4.5.3 (Gentoo 4.5.3-r1 p1.0, pie-0.4.5) ) #4 SMP PREEMPT Wed Jan 4 18:01:59 CST 2012

Earlier versions of the kernel used a module usblp for printing, with linux running, turning on / plugging in the printer triggered a udev rule that loads the printers firmware through /dev/usb/lp0. 

Newer versions of cups have moved away from the usblp module (1.4.8> ??) and have a printer discovery via the sys file system.  Anyone have any idea how firmware is suppose to get loaded into the printer?Last edited by armstrong360 on Mon Jan 23, 2012 3:01 am; edited 1 time in total

----------

## armstrong360

So my printer is back working again!  Used cups 1.4.8-r1 with the driver from http://foo2zjs.rkkda.com/ The one in portage does not emerge correctly.  I also used the usblp module from the kernel.  The rule  70-printers.rules in /usr/lib/rules.d had to be move out of the way to install foo2zjs

----------

## armstrong360

Well another update and the printer quits again!  I see that a few people have viewed this thread so it may be worth adding too it.  >The source of the breakage this time was

app-admin/system-config-printer-common  which installed a new 70-printer.rules in /lib/udev/rules  this takes over from the foo2zjs rules in /etc/udev/rules.d.  In the process of fixing it I ended up using cups 1.5 and no lpusb module.  But I end up having to use a script to load the firmware. 

#!/bin/sh

export DEVICE_URI='usb://HP/LaserJet%201018?serial=KP0EB82'

/usr/libexec/cups/backend/usb  1 1 1 1 '' /lib64/firmware/sihp1018.dl

----------

## bartos

 *armstrong360 wrote:*   

> So my printer is back working again!  Used cups 1.4.8-r1 with the driver from http://foo2zjs.rkkda.com/ The one in portage does not emerge correctly.  I also used the usblp module from the kernel.  The rule  70-printers.rules in /usr/lib/rules.d had to be move out of the way to install foo2zjs

 

What does he mean " The rule  70-printers.rules in /usr/lib/rules.d had to be move out of the way"

I may need to do this

----------

## armstrong360

70-printers.rules belongs to the package:

 app-admin/system-config-printer-common

The current version of that package (and 70-printers.rules) will load the usblp kernel module BUT it will not load the firmware required onto the printer.  The foo2zjs package, if installed properly, will put a rules file in /etc/udev/rules.d  and a hotplug script in /etc/hotplug/usb.  These two files will load the usblp kernel module and then load the firmware onto the printer.  This works if cups is an earlier version 1.4.6 (I am unsure of the exact version).  So if you are in this situation you  will need to find the 70-printers.rules file and delete it (or move it so you can put it back if necessary) as it will have priority over the /etc/udev/rules.d.

Newer versions of cups ( I am using 1.5 ) do not want to use the usblp kernel module but use the sysfs to find the printer.  Here the 70-printers.rules makes the printer visible, and sets up cups to use it BUT it does not load the firmware and neither can the hotplug script since the printer is no longer visible in the dev file system.

So I load the printer firmware manual using that script in one of my earlier posts.

----------

## DirtyHairy

Reading this I wonder: couldn't you write a udev rule which automatically runs the script for loading the firmware?

----------

## armstrong360

Yes writing a rule is what should be done.   I guess I just haven't had the drive to do it.  The configuration I have now works in a fashion that satisfies my needs, its not pretty, but it works.

----------

## armstrong360

So again I have broken my printer!!  This time it was the sytemd / gnome 3.8 upgrade that did it.    People still read this so here is what I did.   

Download the printer driver from :

foo2zjs.com

compile and install...

Then modified the udev rules for this printer in /etc/udev/rules.d

[code]

#

#       hplj1018.rules: udev 200 

#       udev rule for HP Laserjet 1018

#       David Armstrong April 6, 2013

#       Modified to run on a systemd 208 system Jan 1, 2014

SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", \

        ATTRS{product}=="HP LaserJet 1018", \

        RUN+="/etc/udev/rules.d/hp1018_printer" 

[/code]

and added a script to load the firmware in the /etc/udev/rules.d   directory ( the hotplug directory has disappeared in the upgrade...)

[code]

#!/bin/sh

export DEVICE_URI='usb://HP/LaserJet%201018?serial=KP0EB82'

/usr/libexec/cups/backend/usb  1 1 1 1 '' /lib64/firmware/sihp1018.dl 

/etc/init.d/cupsd restart

[/code]

>This is very probably the wrong location for this script but the two are together!!

If you use this approach you will need to get you own serial number from your printer...

----------

