Fixing HP Network Scanner Issues on Ubuntu (AirScan vs HPLIP Stability Problem)

Introduction

If you are using an HP network scanner on Ubuntu and experiencing unstable behavior during scanning (especially multi-page scans failing partway through), you are not alone.

A common issue with HP LaserJet MFP devices on Linux is that scanning appears to work initially but then fails after several pages. The scanner physically runs, but no output is produced in the software, and the system often only recovers after a reboot.

This article explains the real cause of the problem and how to permanently fix it by switching from the legacy HP driver stack to AirScan.


Symptoms of the Problem

The issue typically looks like this:

  • Scanner is correctly detected in Ubuntu
  • Single-page scans work normally
  • Multi-page scans fail after a few successful pages (often around 8–10)
  • The scanner physically scans the document, but no image appears in the application
  • Restarting the scanning application does not help
  • Only a full system reboot temporarily restores functionality

At first glance, this looks like a network or hardware issue. In reality, it is caused by the scanning backend configuration.


Understanding the Cause

On Ubuntu, HP scanners can be accessed through multiple backends at the same time:

  • AirScan (modern eSCL-based network scanning)
  • ESCL (raw eSCL interface)
  • HPLIP / hpaio (legacy HP scanning backend)

The key issue is that the system may default to using the legacy HPLIP backend even when a modern AirScan interface is available.

The real problem: HPLIP instability

The HP Linux Imaging and Printing system (HPLIP) includes a scanning backend called hp / hpaio. While historically important, it is increasingly problematic for modern network-connected HP devices.

In this case, the issues observed were caused by the HPLIP backend:

  • It maintains internal session state across scans
  • It can fail after repeated scan jobs
  • It may corrupt or lose the image data stream
  • It can leave the scanner backend in a broken state until system restart

This explains the key symptom: the scan physically completes, but no data is returned to the system.


Why AirScan Works

AirScan uses the modern eSCL protocol (used by most newer HP network printers). Unlike HPLIP, it works in a much simpler and more reliable way:

  • Each scan is stateless
  • Communication is handled over standard HTTP
  • No persistent session state is required
  • No vendor-specific backend logic is involved

Because of this, AirScan avoids the instability seen in the HPLIP stack.


How the Issue Was Diagnosed

The first step was to identify which scanner backends were active:

scanimage -L

This showed multiple available backends, including:

  • airscan (eSCL-based)
  • escl (raw interface)
  • hpaio (HPLIP backend)

To isolate the issue, each backend was tested directly.

AirScan test

scanimage -d airscan:e0:DEVICE_NAME --format=png > test.png

Result: stable and reliable scanning.

HPLIP test

scanimage -d hpaio:... --format=png > test.png

Result: immediate failure or I/O errors.

This confirmed that the issue was not related to the scanner hardware or network, but specifically to the HPLIP backend.


The Fix

The solution was to remove the legacy HP scanning backend and rely exclusively on AirScan.

Step 1: Remove HPLIP scanning components

sudo apt remove hplip libsane-hpaio

Step 2: Verify available scanners

scanimage -L

After removal, only AirScan-based devices should remain.

Step 3: Confirm stable operation

scanimage -d airscan:e0:DEVICE_NAME --format=png > test.png

At this point, scanning becomes stable even for multi-page documents.


Results After Fix

Once the HPLIP backend was removed:

  • Multi-page scanning became stable
  • No more silent scan failures
  • No need to reboot the system
  • Ubuntu scanning applications worked normally again
  • Only AirScan was used as the scanning backend

Key Takeaways

  • Seeing multiple scanner backends in Ubuntu is normal
  • The presence of HPLIP does not mean it is the best option
  • Modern HP network scanners should use AirScan whenever available
  • HPLIP scanning backend can cause instability on repeated or multi-page scans
  • Removing legacy backends can significantly improve reliability

Conclusion

This issue was not caused by Ubuntu, the scanner hardware, or the network connection. The root cause was the interaction between a modern HP network scanner and a legacy scanning backend (HPLIP) that is no longer well suited for this type of device.

Switching fully to AirScan resolved the instability completely and restored reliable scanning behavior.