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.
Common Printer Issues & Basic Solutions
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:
- 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.
- Install/Reinstall Drivers:
- For HP Printers: Install the open-source
hplip
suite and runhp-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.
- For HP Printers: Install the open-source
- Use CUPS Tools:
- Run
lpinfo -v
to verify printer detection. - Install the system-config-printer tool:
sudo apt-get install system-config-printer
- Run
Read: How to set up a printer on Ubuntu
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:
- Save as PDF Before Printing:
- Open documents in Evince:
sudo apt-get install evince
- Open documents in Evince:
- Update or Reinstall Drivers: Ensure you’re using the latest drivers from official sources.
- Adjust Printer Settings: Verify and adjust PostScript handling options within your printer’s properties in the CUPS interface.
Advanced Troubleshooting Solutions
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:
- 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://<printer-IP>/ipp/print
orsocket://<printer-IP>:9100
- USB:
- Confirm the correct driver is selected. If unsure, test with a Generic PDF driver.
- 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.”
- Increase logging:
- Test Raw Printing:
- Bypass CUPS filters:
echo "Test print" > test.txt lp -d <printer_name> -o raw test.txt
- If raw printing works, the issue likely lies with CUPS filters or driver settings.
- Bypass CUPS filters:
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:
- Install Proprietary Drivers:
- For HP Printers:
sudo apt install hplip hplip-gui hp-plugin
Note:
hplip
is HP’s open-source driver suite, whilehp-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
- For HP Printers:
- Resolve Dependency Conflicts:
- Clean and update packages:
sudo apt clean sudo apt update sudo apt install -f
- Clean and update packages:
- Use the OpenPrinting Database:
- Visit OpenPrinting, search for your model, download a suitable PPD file, and add the printer manually via CUPS.
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:
- Diagnose Network Connectivity:
- Ping the printer:
ping <printer-IP>
- Discover network printers:
avahi-browse -rt _ipp._tcp
- Scan for open ports:
nmap -p 631,9100 <printer-IP>
- Ping the printer:
- 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
- Allow necessary ports for your subnet:
- Alternative Network Protocols:
- For HP printers, use:
sudo hp-probe lpadmin -p <printer_name> -v socket://<printer-IP>:9100
- For HP printers, use:
4. USB Printer Connection Problems
Symptoms: The printer appears in lsusb
but /dev/usb/lp0
is missing; errors like “Access denied” occur.
Solutions:
- Check Kernel Modules:
- Load the USB printer module:
sudo modprobe usblp echo "usblp" | sudo tee -a /etc/modules
- Load the USB printer module:
- 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) - 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
- Identify your printer’s vendor/product ID with:
5. Snap Application Printing Failures
Symptoms: Snap apps (e.g., Firefox, Chromium) show no printers or display “No destinations available.”
Solutions:
- 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
- Grant CUPS permissions since Snap apps run in sandboxes:
- 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
- If issues persist, remove the Snap version and install the native
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:
- 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
- Remove old configurations and PPD files:
- 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 forlinux-restricted-modules
for legacy support first.
- For legacy printers, consider booting an older kernel via GRUB using a tool like
Additional Detailed Fixes
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:
- Update Drivers: Download and install the latest drivers from the manufacturer.
- Adjust Printer Settings: In the CUPS interface, set the default color option:
lpadmin -p <printer_name> -o print-color-mode-default=color
- Manage Color Profiles: Ensure that the
colord
service manages ICC profiles correctly in your printing application. - List Printer Options: Verify available options with:
lpoptions -l
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:
- Reinstall Printer Drivers Manually:
sudo apt purge hplip && sudo apt autoremove && sudo apt update && sudo apt install hplip
- Monitor System Logs: Check
/var/log/syslog
and CUPS logs for hidden errors. - Reboot and Test: A reboot might resolve temporary conflicts.
Bluetooth Printer Troubleshooting
Symptoms: Bluetooth-connected printers are not detected or fail to print.
Solutions:
- Check Bluetooth Status:
bluetoothctl rfkill list
- Pair/Re-Pair Device: Remove and re-pair the printer.
- Verify Compatibility: Ensure the printer supports Bluetooth printing on Linux and that required proprietary drivers are installed.
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.
Diagnostic Tools & Resources
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 <printer-IP> avahi-browse -rt _ipp._tcp nmap -p 631,9100 <printer-IP>
- List Printer Options:
lpoptions -l
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.
If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.