09/11/2007

CUPS in openSUSE 10.3 doesn't like Brothers - the solution: CUPS 1.3.4

Trying to use CUPS for my beloved Brother Laserprinter HL-1440 (yes I know, old model, but still very useable and at least some drivers for Linux available) on Thukydides (Samsung P35 XVM 1600 II) is obviously tricky.

First, the installed CUPS wasn't running properly, since the url http://localhost:631 typed into Konqueror and Firefox only showed an "Error 404". So I decided to reinstall it (i.e. choose right-click and then "force reinstall" for all CUPS packages) which after a reboot worked pretty well and instantly found my Brother HL-1440 and made it available.

But there are still problems: one (and the most severe one) the first job is printed fine, but after the first job, CUPS doesn't print any following job and says "Printer not connected; will retry in 30 seconds...". Interestingly, giving an lsusb on a console still shows the printer connected. If I switch off the printer and switch it on again, CUPS is willing to send the following job from the queue to the printer and then again claims the printer not to be connected.

No solution found for the behaviour mentioned above yet - but in the log files of cups which you can find in /var/log/cups/ you'll find quite some errors, and the configuration file of cups /etc/cups/cupsd.conf is a mere mess in documentation - especially capital and non-capital letters seem to be messed up. Maybe this could be fixed sometimes, SUSE?

I found the solution in the bug database of www.cups.org: this problem is fixed since some version 1.3 so I decided to install the actual stable version 1.3.4. I mainly followed these steps I'll just document here

1. Download the tarball 1.3.4 from www.cups.org

2. build the rpm according to the hints given in the documentation - I used the command: sudo rpmbuild -ta cups-1.3.4-source.tar.gz --without php on a console. The rpms are created in /usr/src/packages/RPMS/i586/

3. Go into YaST and add the directory /usr/src/packages/RPMS/i586/ as "pure RPM directory" as installation source

4. Update the CUPS and ignore the dependencies for "CUPS client".

5. Restart the machine.

One thing I changed in the configuration file /etc/cups/cupsd.conf was to allow to stop and restart the printer without Authentication, otherwise the hotplug-system bitches in the cups-error log (which you can btw easily read out with the nice gui frontend called ksystemlogs):
sudo vi /etc/cups/cupsd.conf and add a section after the section
# All administration operations require an administrator to authenticate...
<Limit ... >
</Limit>

as follows

# The following stuff is switched, because the hotplug-system otherwise complains all the time about...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer>
AuthType None
Order deny,allow
</Limit>

and remove the Pause-Printer Resume-Printer Enable-Printer Disable-Printer from the section administration operations.


A comment: obviously this "Brother printer not seen"-problem seems to be known, see the bug report here and here

1 comment:

go4download said...

The solution just rocks! Very informative!
Brother HL 1440