No patents on software! No patents on business methods!

Version (current)

Installation instructions

Contact the author:
All questions and suggestions are welcome.

Frequent problems with the driver

Frequent problems with the printer

Legal issues
Last updated Friday September 08, 2005
New subversion:fixed installation: restart cupsd

A Linux Printer Driver


Lexmark X74 All In One

The driver also works with:
Lexmark X75
The driver also should work with

Manufacturer: Model:
Compaq IJ670 Series
Inkjet Printer
Lexmark Inkjet 4104
Inkjet Printer
Lexmark X76
Lexmark Z13
Lexmark Z14
Lexmark Z23-Z33
Lexmark Z24-Z34
Lexmark Z25-Z35
Samsung MJC-940_2200_530
I would like to hear about cases where these printers have been tried, with or without success.
I have received confirmation that Z33 works.
  • The driver only addresses the printer, not the scanner.
  • The driver only runs on Linux computers.
  • There are uncertainties surrounding the question about Intellectual Property Rights and the distributions of the driver (see Legal Issues below).
  • Lexmark now offers a driver for its Z35 printer. This driver also works with X74. You must force the installation past complaints that it does not see the Z35 printer. The quality, especially color images and pictures, is much better. In return it is quite slow. (I thought my driver was slow...)  I will be happy to hear about your experiences with or comments about this driver too.


  • (2005 September 8)
    • AT the end of the installation, make Cupsd reread the configuration, so it discovers the new or changed driver.
  • (2005 August 9)
    • The ppd file was missing! (PPD=Postscript Printer Description)
  • 0.8.4:
    • The driver now handles any number of pages (Thanks, Eugen Minciu!)
    • The gmp library is no longer needed
    • The way the preamble is included has changed, hopefully further reducing the potential legal risks.


Lexmark X74 is an ink jet printer and a scanner combined in one unit.  It connects to the computer through an USB cable.

The printer normally prints 600x600 dots per inch. It has two ink cartridges, one with three compartments with cyan, magenta and yellow ink respectively, and one with black ink. It can superimpose two colors on the same spot, producing red, green or blue dots.

It is capable of printing 2400 dots per inch horizontally and 1200 dots per inch vertically. However, the present driver does not support any resolution higher than 600x600 dpi. I am working with a driver that will support higher resolutions. 

The current driver produces quite low quality images, with fairly visible horizontal bands due to variable ink density from the various nozles. I do not know if I will find the time to include support for higher quality dithering in a future version of the driver. It is thinkable that such support "creeps" into a future version Ghostscript, which is used by my driver, saving me that effort.

The printer is capable of utilizing practically the entire paper surface. However, the last centimeter or so will often appear displaced since the printer no longer has a firm grip on the paper when that part is being printed.

I do not particularly recommend the printer. If you are still deciding on what printer to buy for your Linux computer or network, I recommend that you consult Linuxprintingand select a printer with good Linux support. There is a section  there titled Multifunction, that covers printer/scanner combinations. You may also want to consult the Sane project to learn what scanners are well supported. But if you already have this device, this driver will make reasonably good use of the printer part of it.

If I do not use the printer regularly, both the black and the color cartridge, the nozzles appear to dry out. When I forgot to look after this during a period of other interests, I ended up paying 25 to 50 US dollars per printed page, in addition to the hassle of determining that the printer was not ready for use, buying a new cartridge (or two), replacing it, and trying again, generally several days delayed.  But I have now turned to refilling the cartridges, and the experience so far seems positive. See more about this under Frequent Problems with the Printer.


  • A Pentium-class computer running Gnu/Linux. You can probably recompile the driver for other architectures. It is perhaps possible to recompile the driver under any other operating system that supports Cups, but I have not tried that either.
  • The Cups spooler (Common Unix Printing System, it seems to be the preferred spooler for most newer Gnu/Linux distributions)
  • Ghostscript with a cups raster device enabled. If you have Cups, you almost certainly have this. If you have this, but prefer to use another spooler than Cups, it is likely it can be fixed with a moderate effort. Contact me if you want help with this.

Installation instructions

  • Download the current version, see the link at the top left of this page.
  • Unpack it in any directory, e.g. /tmp. The files will appear in a subdirectory lxx74-cups-0.8.4.
  • Change to said directory where the files are, and execute the script lxx74.install
  • If the script reports success, you can probably delete the subdirectory lxx74-cups-0.8.4.
  • Do not use Fedora/RedHat's printconf or system-config-printer (they are the same) to create the spooler queue. If you already did, use the Modify Printer button in Cups' web interface to define it again. I believe you can create the queue using Mandrake's and SuSe's native tools, but I have only tested creating spooler queues with Cups' web interface.  
    (In case you wonder, what is a spooler queue? If you start printing a second document before the first one is finished, the spooler is a program that saves the second job until the printer is ready. For simplicity, all applications always send all jobs to the spooler. When you create a queue, you tell the spooler about the printer, and give it a name applications can use to reference it.)
  • To use Cups' web interface, 
    • Ensure Cups will be listening on the address, also known as localhost:ipp. In the file /etc/cups/cupsd.conf look for a line like this, and remove any '#' at the start of the line if required:
    • Make sure Cups is running: Using a command line, the command 
      service cups status
      should tell. If it is not running, you can start it with the command line
      service cups start
      You need root privileges for this. If you changed the cupsd.conf file while it was running, restart cups like this:
      service cups restart 
    • You will also want to enable the service on future reboots. The manual procedure for this is usually to remove any link K*cups in the directory /etc/rc.d/rc5.d, and to create a link S55cups there pointing to ../init.d/cups . There point-and-click tools for this too, but I don't know what they are on all the various distributions.
  • Now you are set for creating the queue.
    • Physically connect the printer to the computer, using an USB cable. Think of a name you will give to the printer. Then point a web browser to the address http://localhost:ipp/  You will get a dialog that requests a user name and a password. You must probably say root as the user name. Then click on Manage Printers on the resulting page. At any point in the continuation, you can go back to earlier pages using the browser's ordinary Back button. No actual configuration is changed until you click Continue on the model name page described below.
    • You get a page where you must fill in the name you thought of for the printer, and optionally anything you like in the next two fields, Location and Description. In large organizations, some people say "Room B3002" and "Ink jet, color, expensive, medium quality".  Click Continue.
    • The next page wants to know how the printer is hooked up.  With modern Linux kernels, you will probably see an item "Lexmark All In One (Lexmark All In One)". It should work. Otherwise, scroll down to "USB printer #1" You may find the make of the printer on this line too. This is one of the nice things about USB, there is a standardized way a computer can ask any connected device about its manufacturer and model names and the kind of device. You may even be surprised to find this information even you forgot to power on the printer. The computer provides enough power through the USB cable to run the circuitry that answers these questions. Click Continue.
    • Even if the manufacturer and model name appeared in the device connection information, this is forgotten on this page, so you have to select Lexmark again. Then the available model names appear, and you should select All In One.  Do not forget to actually point and click to select it, even if it is the only model name in the list. Then click Continue
    • You should get a page telling if the queue was successfully created or not. If the device is shown as a long unintelligible string beginning with "hal:" it is probably OK.
  • Now print a test page. Click on Printers along the top of the page, and find your queue's entry in the list (if you have terribly many queues), and click "Print Test Page" to the left below the description.
  • Inspect the printout carefully to see if the driver needs some adjustment parameters. If the colored fields leave gaps of white between the color and the black lines (not including the field labeled W), You need to add parameters BlackAdjustX and/or BlackAdjustY. If the vertical lines have sections offset left and right alternatively, you need to add the parameter RTLAdjust
    To do so, edit the file /etc/cups/lpoptions . This file should have one line per printer queue, starting with the name of the queue. One of them can have the word "default" as the second word. The remaining words will be given as options to the driver. Add the parameters, like this:
    mylexmark default RTLAdjust=4 BlackAdjustX=-20 BlackAdjustY=-8 
    These values are in 1/600 inch, 1/2400 inch, and 1/1200 inch respectively.

Frequent problems with the driver

The single most frequent reason people wrote me about problems with the driver, used to be that they did not have gmp installed.  This library is not needed anymore with version 0.8.4.  There could conceivably be other libraries missing too.  In version 0.8.4 I have included a test for this in the installation script.

If for any reason you need to  check this at any other time, use this command:
ldd $(cups-config --serverbin)/filter/rastertolxx74 | grep 'not found'
There are reports about special problems when printing with Adobe Reader. I saw something similar long time ago, after a major upgrade of my Linux platform, but now I am unable to reproduce it, and I don't know much about it.

If you experience strange behaviors from the driver, try turning on "debug", and send me the log file. To turn on debug, edit the file /etc/cups/cupsd.conf, find the line with "LogLevel", and make the next word "debug". When you want to turn off debug mode, change that word to "info". Notice that if there is a # sign at the start of the line, you must remove that sign, else the line will have no effect.  You should also set a cap on the size of the log file, about 20000000 (20 million) bytes is appropriate. Find the line that says MaxLogSize.

The log file is in /var/log/cups/error_log. When this file gets too big, cups closes it, renames it error_log.O, and opens a new file. If this happens in the middle of a print job that you want to send me, you may have to send both files.  You may want to trim down the size of the files you send, by extracting those lines that have a time stamp from around the time of the printout. For instance, you could do
grep "04/Aug/2005:15" /var/log/cups/error_log > /tmp/cups.log
grep "04/Aug/2005:16" /var/log/cups/error_log >> /tmp/cups.log
in order to extract the log lines produced before and after 4 PM on August 4. You would then (compress and) send me /tmp/cups.log.

Frequent problems with the printer

Paper feed
Some experience that the printer no longer feeds the paper properly. This could indicate that the rubber wheels that first sets the paper in motion, need cleaning.  Since I have not yet done this, I am not sure about the procedure. You may find something on this on Lexmark's web site.

Cartridge dries out
This condition is difficult to distinguish from out-of-ink conditions.

You may find that if you have not used the printer in a while, the cartridge behaves as it were running low on ink when you have not used it as much as that.

If it is not too late, you may salvage a cartridge by wiping the nozzle area clean with a soft wet tissue.  Be careful not to apply to much force, and try wiping in a single direction only.  After wiping, knock the cartridge. nozzles down, gently on a dry soft tissue. Some ink should come out of the nozzles, leaving two fine parallel lines on the tissue, about 0.7mm apart, and some 8.8mm long.

After, or instead of this procedure, you may want to print some nozzle-cleaning patterns. On your Lexmark CD, you will find a file called lxbbcln.out .  You need to send it to the printer, but do so bypassing the driver.  The easiest way is to use this command:

cat lxbbcln.out > /dev/usb/lp0

Sometimes I have been able to get a cartridge work for a few more pages by holding it, nozzles up, under a ray of water for a few seconds. But the result is often rather erratic.

Cartridges are expensive and last for few prints.
Sometimes when the cartridges are low on ink, every page you print may have some portions that print just fine, while other areas of the page have voids.  This makes me think that the cartridge perhaps still contains quite a bit of ink, but I am unable to make use of it.

I have now turned to refilling the cartridges. I ordered a refill set on the Internet, because I could not find any in the shops where I live. I have so far only done this once with the color cartridge, so I do not have much experience.  I would like to hear about the experiences of others.  So far, it has just worked wonderfully.  

It seems like the Lexmark cartridges come with, say, 5 ml of ink per color, of which perhaps 30% still remains in the internal sponge when it begins to misbehave. That would be 1.5 ml that you have to throw away. A refill set costs less than a cartridge (closer to half one) and contains 10 ml per color, enough ink for 2-3 refills.  It is said that the nozzles wear out eventually, and a cartridge should not be refilled indefinitely. So, suppose you refill it with the contents of just one such set. When you finally throw away the cartridge, it probably still has 1.5 ml ink, but that is now only 10% of the total ink. You get to use 13.5 ml for the price of less than two cartridges, instead of 3.5 for the price of one.  Some of these numbers are guesses, but it seems easy to come down below 43% of the full price. I guess you can get much below this, if you keep refilling the same cartridge until you actually experience bad pages.

The instructions that came with my refill kit were somewhat minimal. The cartridge has a black body and a light green lid. This lid has to be forced up with a knife. The lid is not actually removable; it is glued or soldered on, and has to be secured with tape afterward. Below the lid, there are six holes, two for each color compartment. NB, do not jump to conclusions as to what holes are for what color!  The two holes closest to the nozzles belong to the compartment for yellow ink. The other to compartments are separated longitudinally, so the two next holes are for different colors. Use a good light source and let it shine directly into the holes, and you will see what color they contain.

Since the cartridge contains sponges inside, there is little danger that it will spill ink even if you hold it upside down, unless it is overfull. You can hold the cartridge on a side when inserting the needle in a hole, thereby avoiding holding the needle tilting downward. It will easily leak a drop if you do.  I had some trouble convincing the ink to flow out of the refill kit, especially the yellow container. Once I began squeezing the container hard enough, the ink soon welled up through the other hole.  Do not despair though, one ml is a cubic cm, a lost drop or two is much less than that.

Legal issues

I have created this driver by watching what data Lexmark's driver for Windows sends to the printer, and guessing what all the bits mean.  In case you had to accept a license forbidding such actions when you bought your printer, or installed its driver, I can tell you I did not. I cannot remember if there was any shrink-wrap or click-through license inside the box, but according to Norwegian legal praxis, nobody has the right to encumber me with anything such after the deal is closed, and I have brought the printer home. Nobody said anything about a license when I was in the shop where I bought it. And nothing was written about any license on the outside of the box.  

It should also be noted that Norwegian law explicitly allows anyone who can legally use a device, and also anyone who acts on his behalf, to study and understand the way the device works, for the purpose of creating any device or arrangement that needs to interoperate with the given device.

However, I found that Lexmark's Windows driver sends a fixed sequence of approximately 63500 bytes at the start of each print job. Nothing in this preamble seemed to depend on anything in the print job, its size, its use of colors, etc. I have therefore included this sequence in my driver. Or perhaps I have not, that depends on how you see it.  Read on.

Under normal circumstances, including an initialization sequence verbatim in a printer driver is not a problem with respect to copyright laws in Europe or the USA.  Why not?  Because, as it is stated in US code, in no case does copyright protection for an original work of authorship extend to any idea, procedure, process, system, method of operation, concept, principle, or discovery.  This has a consequence.  If an idea is so simple that it has only a single, or only a few expressions in the given language, under the given real-life constraints, then the idea and the expression are said to merge.  Then that expression or those expressions are not copyrightable. The same applies to procedures, processes, etc. I believe European tradition has similar limitations to copyrightability.  

Under normal circumstances the bytes of an initialization sequence, besides possibly expressing some ideas, are the electronic bits that charge capacitors in the printer's circuitry readying the printer for use. There are very few sequences that can have that effect. Thus, the sequence merges with a "procedure, process, system, method of operation".

The law ensures that the possibilities of expressing the merged ideas, or using the "procedure, system, method of operation", remain open to the public at large.

This is not so easy to extend to a preamble this long.  What ideas do this preamble express?  From my point of view, that is wholly unknown.

For the sake of the discussion, let us assume that the primary contents of the preamble is a replacement of the firmware of the printer.  The preamble does indeed contain some text strings that could be part of a library of code for an Arm processor in Thumb mode.

Are there not  myriads other way of expressing those ideas?  What is the impact on this question of that it is not known what ideas those bytes express? It is possible to defend the position that precisely because the meaning of these bytes are secret, there is only one practical way of achieving the desired effect. Since the copyright law does not protect the effect, only the expression, there is a merge. However, I can imagine others arriving at other conclusions, although I do not know exactly how. I only know I am not a lawyer and I could be wrong.  For instance, you might now ask, how is this possible, given that copyright does protect computer programs, also in their non-source form? Probably this is because the effects of other software are better known and could be expressed in other ways.

Fortunately I find another defense for distributing the initialization sequence.

Remember that the essence of copyright law is that is is not allowed to make copies of the protected works, except with the permission of the rights holder.

By selling the printer with Lexmark's Windows driver, Lexmark irrevocably gives the buyers the permission to create print files and send them to the printer.  But there is also another way of using the printer driver. In most Windows programs that can print, there is also an option to print to a file.  That file will then contain primarily whatever material the user is thinking of printing, a web page, an artwork just created, an email received, etc.  It is possible to use such print files as vehicles of exchange of arbitrary contents, like one's own authored text or artwork.  It would certainly be a format with some limitations, because it would be very hard to actually use such a file in any other way than sending it to a printer of similar type.  However, during discussions about this printer, I have on several occasions received works from their authors, in this format.  Nowhere has Lexmark said to its customers that they have to split out and delete the preamble from the print files before they distribute the rest anywhere.  It must be assumed that we all have Lexmark's permission to deal with this preamble and distribute it.

In US law there is another defense for distributing the preamble: Fair use. In US law, there are four factors that must be considered when judging what constitutes fair use. The fourth of these is the effect of the use upon the potential market for or value of the copyrighted work.  This is not about the potential market for printers or for ink cartridges.  It is about the potential market for the preamble as a work of authorship.

One could conceivably imagine Lexmark selling the source code for this preamble to somebody who wants to adapt it for use with his own printers.  But what I am  distributing is not a source code, but the compiled results.  Then, what is the effect on the potential market of this code being distributed by me or others, beyond the effect of the distribution with Lexmark printers around the globe?  I think we can safely assume it is nil.

I therefore believe that distributing this preamble in the USA constitutes fair use.

In order to secure the desired interpretation of the situation outside the USA, I have created a piece of art, and rendered it in a print file called "self-portrait.out", and then included a compressed copy of this file with the driver.  This driver is, as said, capable of outputting the same preamble when printing other material when printing to a Lexmark printer. Anyone who has the permission by the owner of a Lexmark printer to use it, must be presumed to also have the permission from Lexmark to print anything on a Lexmark printer, an act that includes using whatever the preamble contains of firmware or what's not.

I hereby grant you all the permission to distribute my artwork everywhere you want, together with the driver, subject to the GPL.