Troubleshooting the "Failed to Detach usblp" Error in Linux Printers


Encountering the dreaded:
DEBUG: Failed to detach "usblp" module from <vendor>:<product>
When running CUPS’s USB backend, it can block all USB printing on modern Linux distributions. In this post, we’ll explore why the usblp
kernel module causes conflicts, and then walk through a bullet-proof, step-by-step solution—including blacklisting, initramfs updates, and daemon removals—that permanently resolves the error and restores seamless USB printing via CUPS.
🔍 Understanding the Error
When you invoke the USB backend (/usr/lib/cups/backend/usb
), CUPS attempts to detach the legacy usblp
driver to claim the device via libusb instead. If usblp
it remains bound—either because it reloaded from initramfs or was re-bound by another service—CUPS will log that detach failure and skip the device.
Blacklisting alone (blacklist usblp
) is often insufficient, because modprobe may ignore blacklists without the “-b” flag, and an old copy in initramfs can reload a module on boot. Additionally, userspace daemons like ipp-usb
their snap equivalent can re-bind USB printers ahead of CUPS and masquerade as, perpetuating the conflict.
✅ Step-by-Step Resolution
1. Repair Your Package Manager
First, ensure APT/Dpkg is in a clean state so you can remove conflicting packages:
sudo dpkg --configure -a
sudo apt update
This completes any interrupted installations and refreshes package metadata.
2. Block the usblp
Kernel Module
Simply blacklisting may still allow indirect loads. Use both blacklist and install … /bin/false directives:
sudo tee /etc/modprobe.d/blacklist-usblp.conf <<EOF
blacklist usblp
install usblp /bin/false
EOF
This forces modprobe to refuse loading usblp
under any circumstances.
3. Rebuild Initramfs and Reboot
A stale initramfs often contains an older modprobe configuration. Update it so your new blacklist is honored:
sudo update-initramfs -u
sudo reboot
After reboot, confirm the module is not loaded:
lsmod | grep usblp
No output indicates success.
4. Remove or Disable Conflicting USB/IPP Services
Daemonized IPP-over-USB services can rebind printers before CUPS’s backend runs. Purge or disable them:
sudo apt purge ipp-usb
sudo snap remove cups # if you had a snap-based CUPS
sudo systemctl mask ipp-usb.service
This prevents any userspace reattachment of the device.
5. Validate the Fix in CUPS
Unload any stray module, then run the USB backend in debug mode:
sudo modprobe -r usblp
sudo /usr/lib/cups/backend/usb
Your printer(s) should list without any “Failed to detach” messages. Finally, check CUPS logs for errors:
sudo journalctl -u cups -e
🎯 Conclusion
By thoroughly blacklisting and blocking the usblp
module, rebuilding initramfs, and removing IPP-over-USB daemons, you ensure that CUPS’s USB backend can reliably claim your printer via libusb—eliminating the “Failed to detach usblp
” error once and for all. Enjoy hassle-free USB printing under CUPS!
Subscribe to my newsletter
Read articles from Esubalew Chekol directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Esubalew Chekol
Esubalew Chekol
Experienced Developer in Python, Javascript, Django, Node.js React, React Natvie Jetpack Compose and Telegram bot development.