Back to Knowledege base

Managing Printer States and Operations

Understanding the eight printer states and how to control printer operations

The Eight Printer States

Every Xi-Text printer exists in one of eight states. Understanding these states is essential for effective printer management.

Halted

Initial state when printer is added or explicitly stopped.

Characteristics:

  • No jobs will be sent to this printer
  • Required state for changing form type
  • Required state for most configuration changes

How to enter: Press H in spq or run sphalt [printer]

Purpose: Safe state for maintenance, configuration, or paper changes

Startup

Transitional state during printer initialization.

Characteristics:

  • Printer is sending setup string to device
  • Reading .device and setup files
  • Usually very brief (1-2 seconds)

How to enter: Automatically when starting a halted printer

If stuck here: Check system log - likely setup file error or device communication problem

Idle

Printer is ready and waiting for jobs.

Characteristics:

  • Printer initialized successfully
  • Waiting for job with matching form type
  • Will print next suitable job immediately

How to enter: Automatically after successful startup

Indicators:

  • Form type displayed
  • N/A marker if alignment required

Printing

Actively printing a job.

Characteristics:

  • Job number and owner displayed
  • Job data being sent to printer
  • Can be interrupted or aborted

How to enter: Automatically when job selected

Duration: Depends on job size and printer speed

a/w oper (Awaiting Operator)

Printer paused, waiting for operator approval.

Characteristics:

  • Two scenarios trigger this:
    1. After alignment page printed (N/A marker present)
    2. Single-job mode (operator must approve each job)

Actions available:

  • Press y to approve and continue
  • Press n to reject (alignment only - reprints alignment page)

How to exit: Operator approval or halt printer

Shutdown

Transitional state during printer stop.

Characteristics:

  • Printer sending shutdown string
  • Cleaning up resources
  • Usually very brief

How to enter: Automatically when halting printer

Purpose: Allows graceful printer reset before halting

Offline

Printer detected as not ready.

Characteristics:

  • Variation of Halted state
  • Triggered by hardware offline signal
  • Message may show reason

How to enter: Automatically when hardware reports offline condition

Recovery:

  1. Fix hardware issue (power, cable, paper)
  2. Restart printer

Error

Unrecoverable error detected.

Characteristics:

  • Printer cannot operate
  • Detailed message in system log
  • Requires administrator intervention

Common causes:

  • Syntax error in setup files
  • Inaccessible device files
  • I/O errors
  • Missing configuration files

Recovery:

  1. Check system log: tail -20 /usr/spool/spd/spshed_reps
  2. Fix underlying issue
  3. Restart printer

State Transitions

Halted → [Start] → Startup → Idle → Printing → Idle
                                ↓
                             a/w oper → [Approve] → Idle
                                ↓
                             [Halt] → Shutdown → Halted
                                ↓
                             [Error detected] → Error
                                ↓
                             [Offline detected] → Offline

Starting Printers

From spq

  1. Press o to switch to printer section
  2. Navigate to printer with cursor keys
  3. Press G (Go/start)

From Command Line

bash

# Start specific printer
spstart ptr1

# Start all printers
spstart -a

# Start printer with specific form type
spstart -f a4.ps ptr1

What Happens at Startup

  1. Printer enters Startup state
  2. Xi-Text reads .device file (if present)
  3. Xi-Text reads setup file for current form type
  4. setup string sent to printer
  5. If alignment file specified and jobs waiting:
    • Alignment page printed
    • Printer enters a/w oper state with N/A marker
  6. Otherwise, printer enters Idle state

Alignment Page Handling

If alignment page is configured:

First time starting with jobs queued:

  1. Alignment page prints
  2. Printer enters a/w oper state
  3. N/A (not aligned) marker appears

Operator actions:

  • Press y - Approve alignment, begin printing jobs
  • Press n - Reject alignment, print another alignment page
  • Halt printer - Abandon alignment, return to Halted state

If no jobs waiting: Printer goes directly to Idle (no alignment required yet)

Stopping Printers

Graceful Stop (End of Current Job)

bash

# In spq
Press 'h' on printer

# Command line
sphalt ptr1

Behaviour:

  • If printing: finishes current job, then halts
  • If idle: halts immediately
  • Printer enters Shutdown state briefly
  • shutdown string sent to printer
  • Printer enters Halted state

Immediate Stop

bash

# In spq
Press 'H' on printer

# Command line
sphalt -i ptr1

Behaviour:

  • Stops immediately, even mid-job
  • Current job remains in queue
  • Use when printer needs immediate attention

Managing Running Jobs

Interrupt Current Job

bash

# In spq
Press '!' on printer

What happens:

  • Current job stops
  • Job moved to end of queue
  • Next job selected
  • Useful for jobs that will take too long

Note: Limited effectiveness if printer has large buffer - buffered data may still print

Abort Current Job

bash

# In spq
Press 'A' on printer

# Command line
sqchange -A [job-number]

What happens:

  • Current job stopped
  • Job deleted from queue permanently
  • abort string sent to printer
  • Next job selected

Restart Current Job

bash

# In spq
Press 'r' on printer

What happens:

  • Current job stopped
  • Job restarted from beginning
  • restart string sent to printer (if configured)

Note: Limited effectiveness if printer has large buffer

Changing Printer Configuration

Change Form Type

⚠️ Printer must be halted

bash

# In spq
1. Halt printer (H)
2. Press 'f' on halted printer
3. Enter new form type
4. Press '?' to see available form types

# Command line
sphalt ptr1
spstart -f letter.ps ptr1

Steps:

  1. Halt printer
  2. Physically change paper (if needed)
  3. Update form type in Xi-Text
  4. Start printer

Change Printer Name

⚠️ Printer must be halted

bash

# In spq
Press 'P' on halted printer

Changes which setup file directory is used:

  • Old name: /usr/spool/progs/printers/old-name/
  • New name: /usr/spool/progs/printers/new-name/

Change Device/Port

⚠️ Printer must be halted

bash

# In spq
Press 'V' on halted printer

Changes device file or network address:

  • Local: /dev/lp0, /dev/ttyS0
  • Network: <printer01> (angle brackets)
  • FIFO: /tmp/printfifo

Change Description

bash

# In spq
Press 'c' on printer (can be any state)

Updates human-readable description, does not affect operation.

Adding and Removing Printers

Add Printer

bash

# In spq
Press 'N' in printer section

# Prompts for:
# - Printer name (cycles through available directories)
# - Device/port (cycles through unused /dev entries)
# - Form type (cycles through setup files)
# - Description

# Command line
PTRINSTALL    # Interactive script

Delete Printer

⚠️ Printer must be halted

bash

# In spq
Press 'D' on halted printer

Removes printer from Xi-Text list. Does not delete setup files.

Single-Job Mode

For manual feed or special handling:

bash

# In setup file
singlejob

Behaviour:

  • Print one job
  • Enter a/w oper state
  • Wait for operator approval
  • Print next job
  • Repeat

Use cases:

  • Manual feed envelopes
  • Special forms requiring verification
  • Testing new configurations

Alignment Page Management

When Alignment is Required

Alignment pages are configured in setup files:

bash

# In setup file
align=.setpage    # File containing alignment pattern

Managing Alignment State

Approve alignment (when N/A showing):

bash

# In spq
Press 'y' on printer in a/w oper state

# Asks for confirmation if idle

Reject alignment and reprint:

bash

# In spq
Press 'n' on printer in a/w oper state

Clear alignment requirement:

bash

# When printer is Idle
Press 'y' (confirms, clears N/A marker)

Reinstate alignment requirement:

bash

# When printer is Idle
Press 'n' (confirms, adds N/A marker back)

Load Limits

Control which printers can handle large jobs:

bash

# In spq
Press 'L'    # Set lower limit (minimum job size)
Press 'U'    # Set upper limit (maximum job size)

Use cases:

  • Reserve fast printers for large jobs
  • Route small jobs to slower printers
  • Prevent huge jobs tying up certain printers

Class Codes

Control printer access by user groups:

bash

# In spq
Press 'C' to change class code

Users can only send jobs to printers where:

user_class_code & printer_class_code != 0

Monitoring Printer Activity

View System Log

bash

# In spq
Press 'X'

# Command line
tail -50 /usr/spool/spd/spshed_reps

Shows:

  • Printer start/stop events
  • Errors and warnings
  • File access issues
  • Setup file problems

Printer Status Display

bash

# In spq, printer section shows:
# - Current state
# - Form type
# - Device/port
# - Description
# - Current job (if printing)
# - Status messages

Best Practices

Before Changing Configuration

  1. Halt printer gracefully
  2. Wait for current job to complete
  3. Make changes
  4. Test with small job
  5. Monitor for errors

Regular Maintenance

  1. Check system log periodically
  2. Verify printers in expected states
  3. Restart printers that have been idle long
  4. Test after any system changes

Emergency Procedures

  1. Immediate halt if printer misbehaving
  2. Check system log first
  3. Fix issue
  4. Test before returning to service

Troubleshooting

Printer Won't Start

Check:

  1. Setup file exists for form type
  2. Device file accessible
  3. System log for specific error
  4. Permissions on files and devices

Printer Stuck in Startup

Indicates:

  • Setup file syntax error
  • Device communication timeout
  • Missing required file

Action: Check system log immediately

Jobs Not Printing from Idle Printer

Check:

  1. Form type matches job form type
  2. Alignment required (N/A marker)
  3. Class code compatibility
  4. Job size within limits

Related Articles

  • Understanding Xi-Text Printer Setup Files - Configuration details
  • Configuring Form Types and Paper Types - Form type management
  • Printer Enters Error State - Error recovery
  • Alignment Page Handling - Detailed alignment procedures

Documentation Reference

For complete printer operation details, see:

  • Xi-Text System Reference Manual, Chapter: spq (Queue Display and Management)
  • Xi-Text Administration Guide, Chapter: Other Administration Matters
Xi-Text File Permissions and Ownership
Required permissions and ownership for Xi-Text system files