CUPS: Unable to get Serial Printer (/dev/ttyS0) to work

This document (7001022) is provided subject to the disclaimer at the end of this document.


Common Unix Printing System (CUPS)


Unable to get serial printer (/dev/ttyS0) device to work (in this case, an Epson DFX printer)
Printer State: stopped, accepting jobs. (as reported in http:<ipaddress>:631/printers)


The permissions for the /dev/ttyS0 device are reset each time the machine is booted.  This makes it impossible to communicate with the printer. Newer versions of CUPS deal with the inability to communicate with the printer by moving it to the "Stopped" state. Typically, this happens when the printer is connected to another PC on the network, and the network connection isn't working, etc. Alternatively, a local communications problem with the serial port/printer will cause this same result.

Two solutions exists:

1) Modify the system configuration

1. Create a file in /etc/udev/rules.d named 99-udev-selfmade-last.rules
2. Add the following line to 99-udev-selfmade-last.rules:
     KERNEL=="ttyS0", GROUP="lp", MODE="660"

This will apply a special rule to the device ttyS0, assigning it to the"lp" group and giving it the permissions of 660. This rule is applied after the other rules pertaining to devices defined by udev, and ensures that if the default rules are changed (by an updated RPM, for example), the ttyS0 device will still have the correct attributes to resolve this problem.


2) Create a script that runs each time the machine starts:

1. Create the file /etc/init.d/after.local (this assumes the file doesn't already exist - if it does, simply append to it)
    The content must be:                                        
             chown root:lp ttyS0
             chmod 660 /dev/ttyS0
2. (optional, if needed) Set the printer to Started by adding the lines
              sleep 3
              /usr/bin/enable <name of printer>
3. Modify the after.local to have execute permissions                                    
             chmod +x after.local

For the line "sleep 3" in the after.local script, the "3" represents three seconds. This may be needed to pause the scipt before proceeding, giving time for CUPS to be up and running before enabling the printer. Adjust the number of seconds as needed.

Additional Information

The default ownership of /dev/ttyS0 is root:uucp because the uucp group is/was used for modem access but when there is a printer instead of a modem connected to /dev/ttyS0 the correct owner, group, and permissions for /dev/ttyS0 should be the same as for /dev/lp0 (i.e. rw-rw---- root lp).


This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7001022
  • Creation Date: 24-Jul-2008
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Desktop

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center