Fix Common Ubuntu 22.04 Printer Errors: USB, Network & Driver Troubleshooting

Setting up a printer on Ubuntu 22.04 can sometimes feel like navigating a maze. Drivers, CUPS (the Common Unix Printing System), kernel interactions, network configurations, and permissions all play a part.

This guide is designed to be your friendly companion, walking you through common printer headaches and offering clear, step-by-step solutions to get your printer working smoothly on Ubuntu 22.04. Whether you’re grappling with Ubuntu 22.04 printer detection failure or other tricky issues, we’re here to help.

Ubuntu 22.04, codenamed Noble Numbat, is packed with enhancements, but printer setup can still throw a curveball. It doesn’t matter if your printer is connected via USB, lives on your network, or if you’re trying to print from Snap applications – this guide covers both straightforward fixes and more advanced troubleshooting techniques.

I’ll share command examples, handy checklists, and what you should expect to see, all aimed at helping you establish a dependable printing setup on your Ubuntu 22.04 system.

This article was produced in collaboration with net2.com.

Common Printer Hiccups & Initial Fixes

Printer Not Showing Up or Unrecognized

What you might see: Your printer is not found in Settings > Printers or simply doesn’t appear when you try to add a new printing device.

Potential culprits:

  • The wrong drivers are installed, or they’re missing entirely.
  • Your USB cable might be loose, damaged, or just not up to the task.
  • CUPS settings could be misconfigured, causing your Ubuntu 22.04 printer to be offline.

printer troubleshooting 1

First-aid solutions:

  1. Check Your Hardware Connections:
    • Make sure that USB cable is plugged in snugly at both ends.
    • Give another USB port a try, or test the cable with a different device. This helps figure out if the cable or port is the problem.

    Expected Output: Running lsusb should list your printer. Here’s an example of what you might see:

    $ lsusb
    Bus 003 Device 004: ID 03f0:XXXX HP Inc.
  2. Install or Reinstall Printer Drivers:
    • For HP Printers: Your best bet is usually the open-source hplip suite. You might also need hp-plugin for proprietary firmware.
      sudo apt install hplip hplip-gui
      hp-plugin
    • For Other Brands (e.g., Epson, Brother): Head over to the manufacturer’s official website. They often provide the most up-to-date drivers. Just be a bit careful if you’re mixing drivers from .deb packages with those from Ubuntu’s repositories, as this can sometimes cause conflicts.
  3. Use CUPS Tools for Detection:
    • Run lpinfo -v in the terminal. This command helps verify if CUPS can see your printer.
    • Install the system-config-printer tool if you haven’t already. It’s a handy graphical interface.
      sudo apt-get install system-config-printer

Read: How to fix Bluetooth connection problems on Ubuntu 22.04

Garbled Prints (Raw PostScript) or Incomplete Output

What you might see: Instead of a nicely formatted document, your printer churns out pages of code (raw PostScript), or parts of your document are missing (like images not printing, only text).

Potential culprits:

  • Problems with how your document is being rendered before it’s sent to the printer.
  • Driver compatibility issues that mess with PostScript processing. This is a common reason for Ubuntu 22.04 printing gibberish.

First-aid solutions:

  1. Try Saving as PDF First:
    • Open your document, save it as a PDF, and then try printing the PDF. Often, PDF viewers like Evince handle printing more reliably.
      sudo apt-get install evince
  2. Update or Reinstall Drivers: Make sure you’re using the latest drivers, preferably from official sources for your printer model.
  3. Adjust Printer Settings in CUPS: Dive into your printer’s properties via the CUPS web interface (usually at http://localhost:631) and check the PostScript handling options.

Advanced Troubleshooting Techniques

1. Printer is Detected, But It Won’t Print

What you might see: Print jobs show up in the CUPS queue (you can check this at http://localhost:631) but they just sit there, often marked as “Pending” or “Stopped.” You might also see error messages like “Filter failed” or “Unsupported format,” and sometimes you only get a partially printed page. This is a classic ‘CUPS filter failed error in Ubuntu 22.04 scenario.

Solutions to try:

  • Double-Check Your CUPS Configuration:
    • Open your web browser (like Firefox) and go to http://localhost:631.
    • Navigate to Administration > Manage Printers. Ensure the Device URI is correct for your connection type:
      • USB: Something like usb://Make/Model?serial=XXX
      • Network: Typically ipp:///ipp/print or socket://:9100
    • Confirm that the correct driver is selected. If you’re not sure, try testing with a “Generic PDF” driver as a fallback.
  • Examine CUPS Logs for Clues:
    • First, increase the logging detail:
      cupsctl LogLevel=debug
    • Then, restart CUPS for the change to take effect:
      sudo systemctl restart cups
    • Now, watch the error log in real-time as you try to print:
      tail -f /var/log/cups/error_log
    • Expected Output: Be on the lookout for revealing error lines such as “Permission denied” or “Filter failed.” These are valuable hints.
  • Test with Raw Printing:
    • This test bypasses CUPS filters to see if the basic communication with the printer works.
      echo "Test print" > test.txt
      lp -d  -o raw test.txt
    • If raw printing is successful, the problem most likely lies within CUPS filters or specific driver settings for your Ubuntu 22.04 printer job stuck in the queue.

2. Headaches During Driver Installation

What you might see: Errors like “Unable to locate package hplip” pop up, or you run into frustrating broken dependency messages. A common scenario is the printer works fine on Windows or macOS but refuses to cooperate with Ubuntu.

Solutions to try:

Headaches During Driver Installation

  • Install Proprietary or Recommended Drivers:
    • For HP Printers :
      sudo apt install hplip hplip-gui
      hp-plugin

      Note: hplip is HP’s open-source driver suite, while hp-plugin is often needed to install proprietary firmware blobs that some HP printers require to function fully.

    • For Epson Printers: Your best source is usually the Epson Linux driver download page. Download the appropriate .deb file and install it:
      sudo dpkg -i epson-*.deb
      sudo apt --fix-broken install

      The second command helps resolve any dependencies.

  • Sort Out Dependency Conflicts:
    • Sometimes, your package system gets a bit tangled. Try cleaning up and updating:
      sudo apt clean
      sudo apt update
      sudo apt install -f

      The -f flag attempts to fix broken dependencies.

  • Consult the OpenPrinting Database:
    • Visit the OpenPrinting website. Search for your printer model. You might find a suitable PPD (PostScript Printer Description) file. You can then download this file and add the printer manually through the CUPS web interface.

Read: How to display your sound card details on the terminal on Ubuntu 22.04

3. Network/Wi-Fi Printer Glitches

What you might see: Network printers aren’t discovered automatically, or they fail to connect when you try to add them. You might encounter errors like “Client error not found” or “Connection refused.” Sometimes, printing over Wi-Fi is painfully slow. These are typical network printer issues for Ubuntu Noble Numbat.

Solutions to try:

 

Network/Wi-Fi Printer Glitches

  • Diagnose Network Connectivity:
    • Can your computer “see” the printer on the network? Try pinging it:
      ping 
    • Discover network printers using Avahi (which implements mDNS/DNS-SD, also known as Bonjour):
      avahi-browse -rt _ipp._tcp
    • Check for open ports on the printer (common ports are 631 for IPP and 9100 for JetDirect/Raw):
      nmap -p 631,9100 
  • Configure Firewall Rules (if ufw is active):
    • Your firewall might be blocking communication. Allow the necessary ports for your local subnet (replace 192.168.1.0/24 with your actual network range):
      sudo ufw allow from 192.168.1.0/24 to any port 631/tcp
      sudo ufw allow from 192.168.1.0/24 to any port 9100/tcp
  • Try Alternative Network Protocols:
    • For HP printers, you can sometimes use hp-probe to find them and then add them using a socket URI:
      sudo hp-probe
      lpadmin -p  -v socket://:9100

Read: How to Fix Unmet Dependencies Errors on Ubuntu

4. USB Printer Connection Woes – USB Printer Detection in Ubuntu 22.04

What you might see: The printer shows up when you run lsusb, but the device file /dev/usb/lp0 (or similar) is missing. You might also get “Access denied” errors when trying to print.

Solutions to try:

Troubleshooting USB Printer Issues

  • Check Kernel Modules:
    • Ensure the USB printer kernel module (usblp) is loaded.
      sudo modprobe usblp
    • To make it load automatically on boot:
      echo "usblp" | sudo tee -a /etc/modules
  • Correct udev Rules:
    • First, identify your printer’s vendor and product ID using lsusb:
      lsusb

      Example Output: Bus 003 Device 004: ID 03f0:XXXX HP Inc. (Here, Vendor ID is 03f0, Product ID is XXXX)

    • Create a new udev rule file. For instance:
      sudo nano /etc/udev/rules.d/99-printer.rules
    • Add the following line to the file, making sure to replace 03f0 and XXXX with your printer’s actual IDs:
      ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="03f0", ATTR{idProduct}=="XXXX", MODE="0660", GROUP="lp"

      This rule ensures that when the printer is added, it gets the correct permissions and belongs to the lp (line printer) group.

    • Reload the udev rules for the changes to take effect without a reboot:
      sudo udevadm control --reload

      You might need to unplug and replug your printer.

5. Printing Failures from Snap Applications

What you might see: Snap applications (like Firefox or Chromium, if installed as Snaps) either show no printers at all or display a disheartening “No destinations available” message. This is a common ‘Snap application cannot find printer in Ubuntu’ problem.

Solutions to try:

  • Grant CUPS Access to Snap Apps:
    • Snap applications run in isolated sandboxes for security, so they need explicit permission to access CUPS (the printing system).
      sudo snap connect firefox:cups-control
      sudo snap connect chromium:cups-control

      (Adjust the application name, e.g., firefox, as needed.)

    • You can check the current Snap interface connections with:
      snap interfaces
  • Switch to Debian (.deb) Versions:
    • If you continue to have trouble with Snap versions and printing is critical, you might consider removing the Snap version of the application and installing the native .deb package from Ubuntu’s repositories.
      sudo snap remove firefox
      sudo apt install firefox

6. Printing Errors After an Ubuntu Upgrade

What you might see: Printers that were working perfectly on an older Ubuntu version (like 20.04 LTS) suddenly stop working after upgrading to 22.04. This can be due to broken dependencies or settings that didn’t transition well. This is a typical Ubuntu 22.04 upgrade printer not working issue.

Solutions to try:

  • Reset Your CUPS Configuration:
    • Sometimes, old configurations and PPD files can cause trouble. Resetting CUPS to a cleaner state can help. Be cautious with this step, as it removes existing printer setups.
      sudo systemctl stop cups
      sudo rm -rf /etc/cups/ppd/* /etc/cups/printers.conf
      sudo systemctl start cups

      You’ll need to re-add your printers after this.

  • Kernel Considerations for Older Printers:
    • For very old, legacy printers, sometimes a newer kernel might lack specific support that was present in older versions. As a last resort, you could consider booting into an older kernel via the GRUB menu (tools like grub-customizer can help manage this). However, downgrading kernels can affect other hardware compatibility and security, so this is an advanced step. Before doing this, check if there are linux-restricted-modules packages available for your kernel that might provide legacy support.

More In-Depth Fixes for Specific Problems

Color Printing Issues (Printer Only Prints in Black & White)

What you might see: You’ve selected color printing, but your documents stubbornly come out in black and white.

Potential culprits: Outdated or incorrectly configured drivers, or issues with color management profiles.

Solutions to try:

  • Update Your Drivers: Always a good first step. Grab the latest drivers from your printer manufacturer’s website.
  • Adjust Printer Settings via CUPS: You can often set the default color mode through the CUPS interface or command line:
    lpadmin -p  -o print-color-mode-default=color
  • Manage Color Profiles: Ensure the colord service is correctly managing ICC (International Color Consortium) profiles for your printing application and printer.
  • List Available Printer Options: See what options your printer reports to CUPS. This can give clues if color mode is even available or misnamed.
    lpoptions -l

    Look for options related to color, like ColorModel or PrintoutMode.

Printer Suddenly Stopped Working

What you might see: Your printer was working fine, and then, without any apparent hardware changes, it just stops printing. This is a frustrating ‘Ubuntu printer stopped working after update’ type of problem.

Potential culprits: System updates that inadvertently affected driver functionality, newly misconfigured firewall rules, or even driver corruption.

Solutions to try:

  • Reinstall Printer Drivers Manually: For example, if you use HPLIP for an HP printer:
    sudo apt purge hplip && sudo apt autoremove && sudo apt update && sudo apt install hplip
  • Monitor System Logs: Check /var/log/syslog and the CUPS error logs (/var/log/cups/error_log) for any subtle error messages that might have appeared around the time it stopped working.
  • Reboot and Test: The age-old “turn it off and on again” can sometimes resolve temporary software glitches or conflicts. This applies to both your computer and the printer itself.

Troubleshooting Bluetooth Printers

What you might see: Bluetooth-connected printers aren’t detected, or they pair but then fail to print.

Solutions to try:

  • Check Bluetooth Status on Your Ubuntu System:
    bluetoothctl
    rfkill list

    Ensure Bluetooth is powered on and not blocked.

  • Pair/Re-Pair the Device: Try removing the printer from your Bluetooth devices list and then re-pairing it.
  • Verify Compatibility and Drivers: Make sure your printer explicitly supports Bluetooth printing with Linux. Some Bluetooth printers might require specific proprietary drivers or firmware that aren’t readily available or easy to install on Linux.

Firmware Updates & Virtualization as a Workaround

Firmware Updates: It’s a good habit to regularly check your printer manufacturer’s website for firmware updates. These can resolve compatibility issues, especially for network printers, and sometimes even fix bugs that affect printing from specific operating systems like Linux.

Virtualization Workarounds: If your printer absolutely refuses to work with Linux due to a lack of driver support, one temporary (though not ideal) solution is to use a Windows virtual machine (e.g., using VirtualBox or VMware). You can then pass the USB connection for the printer through to the Windows VM and print from there.

Helpful Diagnostic Tools & Resources

Here’s a quick reference table of useful commands and what they help you do. Knowing these can significantly speed up your Ubuntu 22.04 printer troubleshooting process.

Ubuntu printer troubleshooting commandsConclusion & My Best Practices for Smooth Printing

By systematically working through these troubleshooting steps—from checking the basics like hardware connections and CUPS settings to diving into driver installations and network configurations—you should be able to tackle most printer problems you encounter on Ubuntu 22.04.

My advice is to start with the simpler solutions (like making sure the Device URI is correct, checking logs, and maybe trying a raw print test) before moving on to more advanced fixes for stubborn issues like driver conflicts, Snap app limitations, or those tricky Bluetooth printer blues.

From my experience, here are some best practices to keep your Ubuntu printing environment happy:

  • Keep Drivers Updated & Review CUPS: Regularly check for new printer drivers from the manufacturer and occasionally glance at your CUPS configuration (http://localhost:631) to ensure everything looks right.
  • Monitor System Logs: Get comfortable using diagnostic commands like tail -f /var/log/cups/error_log. They can help you spot issues before they become major headaches.
  • Secure Firewall Access: If you’re using ufw (Uncomplicated Firewall), restrict printer port access to trusted subnets (e.g., sudo ufw allow from 192.168.1.0/24 to any port 631) rather than opening them to the entire internet.
  • Use Secure udev Rules: When creating udev rules for USB printers, always try to restrict permissions to the lp group (GROUP="lp") instead of overly broad permissions like MODE="0666".
  • Document Expected Outputs: When you run diagnostic commands, take note of what normal output looks like. This makes it easier to spot anomalies later.
  • Consult Manufacturer Support: For really unusual problems (especially with newer or less common printers), don’t hesitate to check the manufacturer’s support pages or forums. Sometimes they have Linux-specific advice.

I hope this comprehensive guide helps you achieve a reliable and secure printing setup on Ubuntu 22.04.

 

Alex Chen

Alex is a seasoned Linux Systems Administrator and DevOps Engineer with over 12 years of experience architecting and maintaining high-availability infrastructure. He has a deep expertise in kernel tuning, shell scripting, containerization (Docker, Kubernetes), and implementing robust CI/CD pipelines. Alex is passionate about open-source software and finding elegant, automated solutions to complex IT challenges across various distributions.