How to Troubleshoot Printer Issues on Arch Linux

How to troubleshoot printer issues on Arch Linux

Printing on Linux has come a long way in recent years, with most modern distributions including solid support for a wide range of printers. However, Arch Linux—being a rolling release and minimalist distribution—often requires a more hands-on approach. While powerful and customizable, Arch doesn’t come with printer support pre-configured out of the box, which can lead to frustration when things don’t “just work.”

This guide provides a comprehensive overview of how to troubleshoot printer issues on Arch Linux, whether you’re dealing with a printer not being detected, print jobs stuck in the queue, driver problems, or networking issues. Whether you’re using a USB-connected printer or a network printer, this article will walk you through the most common issues and how to resolve them.


1. Understanding the Printing Architecture on Arch Linux

Before diving into troubleshooting, it’s helpful to understand the core components that facilitate printing on Arch Linux:

  • CUPS (Common Unix Printing System): The primary printing system for Unix-like OSes.
  • Gutenprint and foomatic-db: Provide drivers for a wide variety of printers.
  • system-config-printer: A GUI tool for printer configuration (optional but useful).
  • Avahi: Used for network printer discovery via mDNS.

Installing the Required Packages

Ensure that you have the necessary packages installed:

sudo pacman -S cups cups-pdf ghostscript gsfonts gutenprint foomatic-db foomatic-db-engine

For network printers:

sudo pacman -S avahi nss-mdns

And for a GUI:

sudo pacman -S system-config-printer

After installation, start and enable the CUPS service:

sudo systemctl enable --now cups.service

For Avahi (network discovery):

sudo systemctl enable --now avahi-daemon.service

Add your user to the lp and sys groups:

sudo usermod -aG lp,sys your_username

Then reboot your system.


2. Diagnosing Common Printer Issues

Issue 1: Printer Not Detected

USB Printer

  1. Check Physical Connection: Make sure the USB cable is securely connected.
  2. Check Kernel Recognition:
dmesg | grep -i usb

You should see lines referencing your printer. If not, your system isn’t detecting it at the kernel level.

  1. List Detected Printers:
lpinfo -v

Your USB printer should be listed as something like usb://....

  1. Try replugging the device or restarting the CUPS service:
sudo systemctl restart cups.service

Network Printer

  1. Check Network Reachability:
ping printer_ip_address
  1. Use Avahi for Discovery:
lpinfo -v

Look for entries starting with dnssd://.

  1. Firewall: Ensure that your firewall is not blocking mDNS (UDP port 5353) or IPP (TCP 631). If using ufw:
sudo ufw allow 631/tcp
sudo ufw allow 5353/udp

Issue 2: Printer Is Detected but Cannot Print

  1. Check Printer Status:
lpstat -p

Make sure it shows as enabled and idle.

  1. Check CUPS Web Interface: Navigate to http://localhost:631

    • Go to Printers → Select your printer
    • Check for any error messages such as “Idle - Waiting for printer to become available”
  2. Try Sending a Test Page:

lp -d printer_name /usr/share/cups/data/testprint

If it doesn’t print, check /var/log/cups/error_log for detailed errors:

sudo tail -f /var/log/cups/error_log

Look for messages like:

  • Unable to open USB device
  • Filter failed
  • Backend returned status 1
  1. Missing Driver or PPD:
    • Reinstall your printer driver or manually select a correct PPD from the CUPS web interface.
    • Some manufacturers (especially Brother, Canon, and Epson) require proprietary drivers, often available from the AUR.

Issue 3: Print Jobs Stuck in the Queue

  1. Check Print Jobs:
lpq
  1. Cancel Jobs:
cancel -a
  1. Restart the CUPS Daemon:
sudo systemctl restart cups
  1. Permission Issues:
    • Check that /etc/cups/cupsd.conf allows user access.
    • Look for <Location /> and <Location /admin> blocks and verify that Allow all or appropriate ACLs are set.

Issue 4: Driver Issues or Incompatible Models

Some printers (especially older or very new models) may not have drivers available in the official repos.

Steps

  1. Identify Exact Model:
lpinfo -m

Look for your model or something similar.

  1. Search AUR for Drivers:

You can search with:

yay -Ss brother

or

yay -Ss canon

Then install the appropriate AUR package, e.g., brother-hl-l2350dw.

  1. Manual PPD Installation:
    • Download the PPD from the manufacturer.
    • Add it via the CUPS web interface or:
lpadmin -p printer_name -P /path/to/driver.ppd -E

Issue 5: GUI Tools Not Detecting Printer

Sometimes system-config-printer may not show the printer, even if lpinfo -v or CUPS does.

  • Restart the tool:
killall system-config-printer
system-config-printer
  • Make sure it’s not a permissions issue: run it with pkexec.
pkexec system-config-printer

3. CUPS Web Interface: Your Best Friend

One of the most powerful troubleshooting tools is the CUPS web interface at http://localhost:631.

You can:

  • View logs
  • Configure drivers
  • Manage jobs
  • Add/remove printers

Make sure the following lines exist in /etc/cups/cupsd.conf:

WebInterface Yes
Listen localhost:631

Restart CUPS after any configuration change.


4. Diagnosing Logs

CUPS logs are located in:

  • /var/log/cups/error_log
  • /var/log/cups/page_log

Set the log level to debug in /etc/cups/cupsd.conf for more verbose output:

LogLevel debug

Then restart:

sudo systemctl restart cups

Monitor the log while reproducing the issue:

tail -f /var/log/cups/error_log

5. Testing with a Virtual Printer (PDF)

To verify if CUPS is working at all, install the virtual PDF printer:

sudo pacman -S cups-pdf

Then add it:

lpadmin -p PDF -E -v cups-pdf:/ -m cups-pdf

Send a print job:

echo "Hello from Arch!" | lp -d PDF

Check ~/PDF for output. If this works, your problem is likely printer-specific.


6. Final Tips and Recovery

Reset CUPS Configuration

sudo mv /etc/cups /etc/cups.bak
sudo pacman -S cups --overwrite '*'
sudo systemctl restart cups

This can help resolve complex misconfigurations.

Use Diagnostic Tools

  • lpstat, lpinfo, cancel, and lpadmin are powerful CLI tools.
  • system-config-printer offers GUI simplicity.

Community Forums

If you’re stuck, try:

Include relevant logs and outputs in your post for faster help.


Conclusion

Troubleshooting printer issues on Arch Linux can seem daunting at first, but with a clear understanding of the printing architecture and a methodical approach, most problems are solvable. From checking basic connectivity to diving into logs and permissions, the steps above will help you resolve the majority of common printer issues.

Arch Linux puts the power in your hands—sometimes that means doing a bit more legwork, but the reward is a highly customized and efficient system. Once your printer is working smoothly, you’ll have a reliable setup that won’t need much attention in the future.