Categories: TutorialsUbuntu

Ubuntu 24.04 Printer Troubleshooting Guide: Fix USB, Network, and Driver Issues

Printer configuration on Ubuntu 24.04 involves multiple layers—from drivers and CUPS (the Common Unix Printing System) to kernel modules, network settings, and permissions.

This comprehensive guide explains common printer issues and provides step-by-step solutions to fix printer issues on Ubuntu 24.04.

Ubuntu 24.04 brings many improvements, but configuring printers can remain challenging. Whether your printer is connected via USB, network, or accessed through Snap applications, this guide provides basic and advanced solutions. Follow these clear steps—with command examples, checklists, and expected outputs—to resolve issues and create a reliable printing environment on Ubuntu 24.04.

Sponsored
Common Printer Issues & Basic Solutions

#000000;">Printer Not Detected or Recognized

Symptoms: The printer is missing from Settings > Printers or fails to appear when adding a new device.

Causes:

  • Incorrect driver installation.
  • Loose or faulty USB cables.
  • Misconfigured CUPS settings.

Basic Solutions:

  1. Test Hardware Connections:
    • Ensure the USB cable is securely connected.
    • Try a different USB port or test the cable on another device to rule out hardware faults.

    Expected Output: Running lsusb should list your printer. Example output:

    $ lsusb
    Bus 003 Device 004: ID 03f0:XXXX HP Inc.
            
  2. Install/Reinstall Drivers:
    • For HP Printers: Install the open-source hplip suite and run hp-plugin to install proprietary firmware.
      sudo apt install hplip hplip-gui
      hp-plugin
                  
    • For Other Brands: Visit the manufacturer’s website (e.g., Epson or Brother) to download the latest drivers. Be cautious when mixing installations from .deb packages with repository packages.
  3. Use CUPS Tools:
    • Run lpinfo -v to verify printer detection.
    • Install the system-config-printer tool:
      sudo apt-get install system-config-printer
                  

Read: How to set up a printer on Ubuntu

#000000;">Printing Raw PostScript or Unreliable Output

Symptoms: Documents print as raw PostScript code or output is incomplete (e.g., only text prints, images missing).

Causes:

  • Issues with document rendering.
  • Driver compatibility problems affecting PostScript processing.

Basic Solutions:

  1. Save as PDF Before Printing:
    • Open documents in Evince:
      sudo apt-get install evince
                  
  2. Update or Reinstall Drivers: Ensure you’re using the latest drivers from official sources.
  3. Adjust Printer Settings: Verify and adjust PostScript handling options within your printer’s properties in the CUPS interface.

Read: How to resolve WiFi Issues on Ubuntu 24.04 

#000000;">Advanced Troubleshooting Solutions

#000000;">1. Printer Detected but Not Printing

Symptoms: Print jobs appear in the CUPS queue (accessible via http://localhost:631) but remain “Pending” or “Stopped.” Error messages such as “Filter failed” or “Unsupported format” may be present, and sometimes only partial prints occur.

Solutions:

  1. Verify CUPS Configuration:
    • Open Firefox and navigate to http://localhost:631.
    • Under Administration > Manage Printers, ensure the Device URI is correct:
      • USB: usb://Make/Model?serial=XXX
      • Network: ipp:///ipp/print or socket://:9100
    • Confirm the correct driver is selected. If unsure, test with a Generic PDF driver.
  2. Debug CUPS Logs:
    • Increase logging:
      cupsctl LogLevel=debug
      sudo systemctl restart cups
      tail -f /var/log/cups/error_log
                  
    • Expected Output: Look for error lines like “Permission denied” or “Filter failed.”
  3. Test Raw Printing:
    • Bypass CUPS filters:
      echo "Test print" > test.txt
      lp -d  -o raw test.txt
                  
    • If raw printing works, the issue likely lies with CUPS filters or driver settings.

#000000;">2. Driver Installation Failures

Symptoms: Errors such as “Unable to locate package hplip” or broken dependency messages. The printer works on Windows/macOS but not on Ubuntu.

Solutions:

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

      Note: hplip is HP’s open-source driver suite, while hp-plugin installs proprietary firmware.

    • For Epson Printers: Download the latest driver from Epson Linux and install:
      sudo dpkg -i epson-*.deb
      sudo apt --fix-broken install
                  
  2. Resolve Dependency Conflicts:
    • Clean and update packages:
      sudo apt clean
      sudo apt update
      sudo apt install -f
                  
  3. Use the OpenPrinting Database:
    • Visit OpenPrinting, search for your model, download a suitable PPD file, and add the printer manually via CUPS.

#000000;">3. Network/Wi-Fi Printer Issues

Symptoms: Network printers are not discovered or fail to connect properly; errors like “Client error not found” or “Connection refused” appear; printing may be slow over Wi-Fi.

Solutions:

  1. Diagnose Network Connectivity:
    • Ping the printer:
      ping 
                  
    • Discover network printers:
      avahi-browse -rt _ipp._tcp
                  
    • Scan for open ports:
      nmap -p 631,9100 
                  
  2. Configure Firewall Rules:
    • Allow necessary ports for your subnet:
      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
                  
  3. Alternative Network Protocols:
    • For HP printers, use:
      sudo hp-probe
      lpadmin -p  -v socket://:9100
                  

#000000;">4. USB Printer Connection Problems

Symptoms: The printer appears in lsusb but /dev/usb/lp0 is missing; errors like “Access denied” occur.

Solutions:

  1. Check Kernel Modules:
    • Load the USB printer module:
      sudo modprobe usblp
      echo "usblp" | sudo tee -a /etc/modules
                  
  2. Fix udev Rules:
    • Identify your printer’s vendor/product ID with:
      lsusb
                  

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

      Sponsored
    • Create a rule file:
      sudo nano /etc/udev/rules.d/99-printer.rules
                  

      Add the following (adjusting IDs as needed):

      ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="03f0", ATTR{idProduct}=="XXXX", MODE="0660", GROUP="lp"
                  
    • Reload udev rules:
      sudo udevadm control --reload
                  

#000000;">5. Snap Application Printing Failures

Symptoms: Snap apps (e.g., Firefox, Chromium) show no printers or display “No destinations available.”

Solutions:

  1. Grant CUPS Access to Snap Apps:
    • Grant CUPS permissions since Snap apps run in sandboxes:
      sudo snap connect firefox:cups-control
      sudo snap connect chromium:cups-control
                  
    • Check current Snap interfaces with:
      snap interfaces
                  
  2. Switch to Deb Versions:
    • If issues persist, remove the Snap version and install the native .deb package:
      sudo snap remove firefox
      sudo apt install firefox
                  

#000000;">6. Post-Upgrade Printing Errors

Symptoms: Printers that worked in Ubuntu 20.04 fail after upgrading to 24.04; broken dependencies or misconfigured settings occur.

Solutions:

  1. Reset CUPS Configuration:
    • Remove old configurations and PPD files:
      sudo systemctl stop cups
      sudo rm -rf /etc/cups/ppd/ /etc/cups/printers.conf
      sudo systemctl start cups
                  
  2. Kernel Considerations:
    • For legacy printers, consider booting an older kernel via GRUB using a tool like grub-customizer. Note: Downgrading kernels may impact other hardware; check for linux-restricted-modules for legacy support first.

Read: How to fix Bluetooth connection issues on Ubuntu

#000000;">Additional Detailed Fixes

#000000;">Color Printing Issues (Always Prints in Black & White)

Symptoms: Documents always print in black & white even when color is selected.

Causes: Outdated or misconfigured drivers; incorrect color management profiles.

Solutions:

  1. Update Drivers: Download and install the latest drivers from the manufacturer.
  2. Adjust Printer Settings: In the CUPS interface, set the default color option:
    lpadmin -p  -o print-color-mode-default=color
            
  3. Manage Color Profiles: Ensure that the colord service manages ICC profiles correctly in your printing application.
  4. List Printer Options: Verify available options with:
    lpoptions -l
            

#000000;">Printing Stopped Working Suddenly

Symptoms: Printing stops unexpectedly with no hardware changes.

Causes: System updates affecting driver functionality, misconfigured firewall rules, or driver corruption.

Solutions:

  1. Reinstall Printer Drivers Manually:
    sudo apt purge hplip && sudo apt autoremove && sudo apt update && sudo apt install hplip
            
  2. Monitor System Logs: Check /var/log/syslog and CUPS logs for hidden errors.
  3. Reboot and Test: A reboot might resolve temporary conflicts.

#000000;">Bluetooth Printer Troubleshooting

Symptoms: Bluetooth-connected printers are not detected or fail to print.

Solutions:

  1. Check Bluetooth Status:
    bluetoothctl
    rfkill list
            
  2. Pair/Re-Pair Device: Remove and re-pair the printer.
  3. Verify Compatibility: Ensure the printer supports Bluetooth printing on Linux and that required proprietary drivers are installed.

#000000;">Firmware Updates & Virtualization Workarounds

Firmware Updates: Regularly check the manufacturer’s website for firmware updates to resolve compatibility issues, especially for network printers.

Virtualization Workarounds: If your printer lacks Linux support, consider using a Windows virtual machine with USB passthrough temporarily.

#000000;">Diagnostic Tools & Resources

#000000;">Useful Commands & Expected Outputs

  • CUPS Status & Logs:
    lpstat -t         # Shows overall printer status and queued jobs
    tail -f /var/log/cups/error_log  # Monitors CUPS logs in real time
            
  • USB & Device Information:
    lsusb    # Lists connected USB devices
    usb-devices    # Provides a detailed USB device tree
            
  • Network Printer Discovery:
    ping 
    avahi-browse -rt _ipp._tcp
    nmap -p 631,9100 
            
  • List Printer Options:
    lpoptions -l

#000000;">Conclusion & Best Practices

By methodically addressing printer issues—from verifying hardware connections and configuring CUPS correctly to updating drivers and troubleshooting network and USB connectivity—you can resolve most printer issues on Ubuntu 24.04. Begin with basic steps (ensuring correct device URIs, checking logs, and testing raw printing) and progress to advanced solutions for persistent problems like driver conflicts, Snap application limitations, or Bluetooth issues.

Best Practices:

  • Regularly update printer drivers and review CUPS configurations.
  • Monitor system logs using diagnostic commands to catch issues early.
  • Restrict firewall access to trusted subnets (e.g., using ufw rules).
  • Use secure udev rules—restrict permissions to the lp group instead of global settings.
  • Document expected outputs for diagnostic commands and compare them with your system’s behavior.
  • For non-standard issues (e.g., Bluetooth printing or sudden failures), consult manufacturer support and consider virtualization workarounds.

This comprehensive Ubuntu printer troubleshooting guide combines both basic and advanced solutions, detailed checklists, command explanations, and security tips to help you build a reliable and secure printing environment on Ubuntu 24.04.

 

The post Ubuntu 24.04 Printer Troubleshooting Guide: Fix USB, Network, and Driver Issues appeared first on net2.

Ubuntu Server Admin

Recent Posts

Ubuntu Weekly Newsletter Issue 881

Welcome to the Ubuntu Weekly Newsletter, Issue 881 for the week of February 23 –…

15 hours ago

Experiment Tracking with MLFlow in Canonical’s Data Science Stack

Welcome back, data scientists! In my previous post, we explored how easy it is to…

23 hours ago

How to Install vLLM on Linux Using 4 Easy Steps

In this article, we will see how to install vLLM on Linux using 4 easy…

1 day ago

Ubuntu Weekly Newsletter Issue 880

Welcome to the Ubuntu Weekly Newsletter, Issue 880 for the week of February 16 –…

3 days ago

Ubuntu Weekly Newsletter Issue 880

Welcome to the Ubuntu Weekly Newsletter, Issue 880 for the week of February 16 –…

3 days ago

Ubuntu 24.04.2 LTS released

The Ubuntu team is pleased to announce the release of Ubuntu 24.04.2 LTS (Long-Term Support)…

3 days ago