Epson Stylus Color 680 USB Printing on Linux

by Daniel Drake (dsd)

About this guide

I decided to write this guide, because it is one of the things that gave me grief with my desktop Linux setup.
There is already quite a bit of documentation available for doing this, but very little specific to this printer. There are also multiple ways to get the printing working.
So I decided to do some research, get my printer working the most compatible way I could find, and write down how I did it.

Apparently, this printer is known as the "Epson Stylus Color 777" in the US (the 680 is the European version). So this guide may be handy if you are setting up that printer, or even any similar Epson Stylus printer.
Update 05/12/03: I have recieved feedback from some readers that this guide has been helpful when configuring other Epson printers.

History

December 5th 2003: Some minor updates, and added a section on ink level monitoring and printer maintenance.
November 4th 2003: Updated some gentoo specifics and information about the 2.6 kernel. Changed printer driver being used to gimp-print-ijs
July 1st 2003: Guide published.

Main resources used

LinuxPrinting.org CUPS Quick Start
Gentoo Linux Documentation: Gentoo Printing Guide
Gentoo Forums: A n00b's guide to set up printing with CUPS

Software versions used at time of writing

Linux Kernel 2.4.20-gentoo-r5
CUPS 1.1.18
Gimp-Print 4.2.5
Gimp-Print-Cups 4.3.5
Foomatic Stylus Color 680 Driver 1.1
Ghostscript 7.05.6
Epson Utilities (mtink) 0.9.57

Update 04/11/03: I'm now using the 2.6-test series kernels. I had troubles with USB originally, but I think that is a problem relating specifically to my hardware. As of -test4-mm6, it works fine. My printer works with this new software configuration:

Linux Kernel 2.6.0-test4-mm6.
CUPS 1.1.19
Foomatic 3.0.0
Gimp-Print 4.3.18
Foomatic Stylus Color 680 Driver 1.1
Ghostscript 7.05.6


What you need

An Epson Stylus 680 Printer (this guide may be useful for similar printers, but it is specifically written for the 680).
A working Linux installation, with USB and USB Printer support.
Superuser (root) access.
Paper.

1. Kernel Configuration

If you did not have to compile your kernel during your linux installation, chances are that you have USB Printing support already compiled in to your kernel, and you can (probably) safely skip this stage (go to stage 2).

Under menuconfig, the following options must be selected:
USB Support -> Support for USB
USB Support -> USB Printer support

These options can be compiled directly into the kernel or as modules. If you choose to compile them as modules, then remember that you may need to modprobe them later in the installation. The modules created are named usbcore and printer respectively.

04/11/03: Note that in the 2.5 kernels and newer, the 'printer' module has been renamed to the more appropriate 'usblp' module.

After selecting these options, you need to recompile your kernel. If you are unsure about how to do this, then I suggest you read The Linux Kernel HOWTO.

2. Power on

Attach the printer through USB, and turn it on with the grey button. Go into a terminal/console, and, as root, enter dmesg.
At the end of the output, you should see something similar to what is shown below:
hub.c: new USB device 00:11.2-2, assigned address 2
usb.c: USB device 2 (vend/prod 0x4b8/0x5) is not claimed by any active driver.
usb.c: registered new driver usblp
printer.c: usblp0: USB Bidirectional printer dev 2 if 0 alt 0 proto 2 vid 0x04B8 pid 0x0005
printer.c: v0.11: USB Printer Device Class driver

The important part is that the printer has been recognised as a USB (bidirectional) Printer. If it isn't, then you probably don't have your kernel configured correctly. If you have USB printing support compiled as modules, then modprobe the modules and try again.

If you are also following the Gentoo Printing Guide while reading this page, then do not worry if the low level tests (code listing 1.6) do not work. I tried this and the printer didn't appear to do anything.

3. Software installation

Now comes the fun part. There are a few packages needed for this tutorial. And the order of installation DOES matter (this threw me for a while).

Firstly, remove all traces of cups, gimp-print, and ghostscript from your system. In Gentoo, this is done by:
emerge unmerge cups foomatic gimp-print ghostscript

Next, install the packages, in this order:
cups, foomatic, gimp-print (with cups and foomatic support), ghostscript

e.g. Under Gentoo Linux:
USE="cups foomaticdb" emerge cups foomatic gimp-print ghostscript
04/11/03: Note that the old way of doing it under Gentoo was to install the gimp-print-cups package. This was recently changed, gimp-print-cups was replaced by gimp-print with the cups USE flag set.

4. Obtaining a printer driver

According to LinuxPrinting.org, the best driver for the Epson Stylus Color 680 is the gimp-print-ijs driver, but there are others too (look up the printer on LinuxPrinting.org).
This page lists all printers currently supported by the gimp-print-ijs driver. There is a PPD generator on that page which allows you to download the relevant PPD file. Select the Epson Stylus Color 680 from the list and click download. I have also mirrored the PPD file that I used here. Save this file in /usr/share/cups/model, calling it Epson-Stylus_Color_680-gimp-print-ijs.ppd. Make sure the file is world readable.

5. Configuring Foomatic

04/11/03: Note, this bug appears to have been fixed now. Check for existance of the /usr/lib/cups/filter/foomatic-rip and move on if it exists already.

I'm not sure why, but Gentoo appeared to miss out a symlink from my Foomatic installation. Later, when I tried printing a test page, I got an error saying that a file could not be found. So let's get this over with now and create this symlink! As root:
ln -s /usr/bin/foomatic-rip /usr/lib/cups/filter/foomatic-rip

6. Configuring CUPS

Start the CUPS Daemon service. It is also a good idea to set it to start up at boot-time. Under Gentoo, this is done with:
rc-update add cupsd default
/etc/init.d/cupsd start
Give the service a few seconds to start up, then point your browser at http://127.0.0.1:631. You will hopefully see the menu screen of the CUPS Web-admin interface. Choose Printers from the bar at the top. If you are asked for a username/password, enter root as the username and your root password as the password. On the next page, click the Add Printer button.

On the next screen, the Name, Location and Description do not matter, but it is fussy about input lengths and spaces. I entered Epson_680 in all 3 boxes and clicked Continue.

On the next page (Device for Epson_680) choose USB Printer #1 (EPSON) from the list. On most setups this will be the right option, but if you have a reason to select a different USB printer number then go ahead.
It should be clear which printer to select, as you will see it 3 times, listed as "USB Printer #1 (CANON)"(?), "USB Printer #1 (EPSON)" and "USB Printer #1 (EPSON Stylus COLOR 680)". Remember to choose the '(EPSON Stylus COLOR 680)' option. Click Continue.

You are now asked to select the make of your printer. It's quite obviously EPSON, so select that option and click Continue.

The next stage is selecting your printer Model, which is effectively selecting the driver you will use. If you have installed gimp-print-cups correctly, you will see a very big list of printers, most of which include CUPS+Gimp-Print. The Stylus printers are listed in numerical order (...600,640,670,680,740...), so scroll down to where the 680's are listed. You should see a driver with the name Epson Stylus Color 680 Foomatic/gimp-print-ijs (recommended) (en). Select it and click continue. You should be told that printer Epson_680 has been added succesfully.

7. Configuring the printer driver

You can configure this printer to a great degree from the command line. The default settings are mostly sufficient, except that the PageSize is default to Letter. I use A4 paper, and in order to make A4 the default PageSize, run this command:
lpoptions -d Epson_680 -o PageSize=A4 -o Margins=Default
If you are interested in the other configurable options, I suggest you read the man page of lpoptions for syntax. To view available and selected settings (marked with a *), you can run this command:
lpoptions -d Epson_680 -l
You can get a more detailed printout of the options available, with the following command (takes about 3 pages):
lp -d Epson_680 -o docs /etc/hosts
It is also possible to configure the printer defaults with the Configure button of the CUPS Web-admin 'Printers' page.

8. Test page

Go back to the CUPS Web-admin page, choose the printers tab, and click the Print Test Page button. A CUPS test page should come out of the printer right away. You should find that the page has a black border which gets close to the edge of the paper, and you should see that it is almost perfectly centrally aligned, unlike some other drivers I tried.

9. Software configuration

KMail: Selected "Epson_680" as the printer. With default options, there was quite a big margin. On the Print dialog, I had to select CUPS (Common UNIX Printing System) where it says "Print system currently used" in order to get the email to fill the page better. I guess this applies for all KDE-based applications.

Mozilla: Chose the "PostScript/default" and printing worked great with default options.

OpenOffice: <Epson_680> appeared on the Printers list but was not default. Worked fine. Ran /opt/OpenOffice.org1.0.2/spadmin, and the <Epson_680> printer didnt appear there..? Couldn't find out how to add CUPS driver. Modified Generic Printer's Command to lpr -P Epson_680 (under Properties), renamed it, and set as default. Works well.

A reader informed me that you are able to import the PPD file under the OpenOffice printer setup utility, and then it appears on the list. Thanks, Promit.

10. Ink Levels and Maintenance

I recently discovered an application named mtink that is able to monitor ink levels on many Epson printers. It is developed by xwtools, and the supported printers list can be found here.

You can download mtink from their download page ("Status Monitor for EPSON Inkjet printers"). Or, if you are a Gentoo Linux user, you can merge it as follows:
ACCEPT_KEYWORDS="~x86" emerge mtink.

Once it is installed, make sure the printer is plugged in and turned on, and then execute the application:
mtink

In my setup, the port is /dev/usb/lp0 and printer Stylus Color 680. These configuration settings only need to be specified the first time you run the application.

After a short delay, the ink levels show up, and you are presented with various maintenance options. I don't think the software needs any extra explanation!

11. Conclusion

Printer works great under Linux. Hope this guide was helpful, please provide feedback :)