- The Beginning
- The Linux Struggle
- The Breakthrough: IPP Everywhere
- Scanning: Another Hurdle
- The Wi-Fi Saga
- What Works Now
- Key Lessons Learned
- Final Commands You’ll Actually Use
- The Takeaway
- 📌 Want the Raw Commands?
- What I Have
- What Works
- My Printer’s Addresses
- Commands I Use Most
- What I Learned
- My Printers (All Installed)
- If Something Goes Wrong
- Quick Troubleshooting
- The Golden Rule
Let me start by saying this: installing a printer on Linux shouldn’t be this hard. But here we are, in 2026, and I just spent a solid chunk of my day wrestling with a brand new HP LaserJet MFP M140w on my Debian system.
I’m writing this down so you don’t have to go through what I did.
The Beginning
I brought home the HP LaserJet MFP M139-M142 series printer, excited to finally have a reliable monochrome laser printer for my home office. My Debian machine was ready. Or so I thought.
First problem: The USB cable wasn’t in the box. Turns out, the “w” in M140w means “wireless.” HP expects you to set this thing up over Wi-Fi using their app.
I dug through my closet of computer junk, found an old USB cable, and plugged it in.
The Linux Struggle
lsusb showed the printer. Good sign. But then came the nightmare:
bash
hp-setup
Error after error. The HPLIP plugin installer kept asking for a password and failing. The hp-setup GUI launched but then exited with “Device is busy, powered down, or unplugged.”
I was stuck.
The real issue: HP’s HPLIP doesn’t fully support this printer model. The official driver just isn’t there yet.
The Breakthrough: IPP Everywhere
After hours of searching forums and trying different commands, I discovered that modern printers support IPP Everywhere — a driverless printing standard.
Here’s what finally worked:
bash
avahi-browse -rt _ipp._tcp
This found my printer broadcasting on localhost:60000.
bash
sudo lpadmin -p HP_M140w -v "ipp://localhost:60000/ipp/print" -E -m everywhere
Boom. The printer was installed. No proprietary driver needed.
Scanning: Another Hurdle
Printing was working, but scanning? That’s a whole different story.
scanimage -L showed the scanner, but the HPLIP plugin kept failing.
The solution: eSCL (the scanning equivalent of IPP Everywhere).
bash
scanimage --device "escl:http://localhost:60000" > test.pnm
A 12MB file appeared in my directory. Scan successful!
The Wi-Fi Saga
I wanted Wi-Fi printing for my iPhone too.
The problem: You can’t set up Wi-Fi from Linux on this printer. You must use the HP Smart app on a phone or Windows/Mac machine.
I installed the “HP” app on my iPhone (formerly HP Smart), went through the setup, and connected the printer to my Wi-Fi. The blue light went from blinking to solid.
Now the printer had an IP: 192.168.12.199.
From Debian, I could now discover it:
bash
avahi-browse -rt _ipp._tcp
And add it as a network printer:
bash
sudo lpadmin -p HP_M140w_WiFi -v "ipp://192.168.12.199/ipp/print" -E -m everywhere
Now I had both USB and Wi-Fi printing.
What Works Now
| Feature | Status |
|---|---|
| USB Printing | ✅ Works |
| Wi-Fi Printing | ✅ Works |
| USB Scanning | ✅ Works |
| Wi-Fi Scanning | ✅ Works |
| iPhone Printing | ✅ Works (AirPrint) |
Key Lessons Learned
- Don’t rely on HPLIP for newer HP printers. Use IPP Everywhere instead.
- Use the HP Smart app (now just called “HP”) on your phone for Wi-Fi setup — you can’t do it from Linux.
- eSCL is your friend for scanning. It’s the scanner equivalent of IPP Everywhere.
- A USB cable is still the easiest way to get started on Linux. Wi-Fi is nice, but USB just works.
- Read the model number carefully. The “w” means wireless-only setup. No USB cable in the box.
Final Commands You’ll Actually Use
Here’s what I use day-to-day:
bash
# Print lp -d HP_M140w document.pdf # Scan (USB) scanimage --device "escl:http://localhost:60000" > scan.pnm # Scan (Wi-Fi) scanimage --device "escl:https://192.168.12.199:443" > scan.pnm # Check printer status lpstat -p # View scanned image eog scan.pnm
The Takeaway
Was it worth the headache? Yes. The printer works beautifully now — fast, quiet, and reliable.
But HP, if you’re reading this: Please support Linux properly. We’re not going anywhere.
Have you struggled with an HP printer on Linux? Let me know in the comments below!
Tags: #Debian #Linux #HPPrinter #TechTroubleshooting #Printers #OpenSource
📌 Want the Raw Commands?
Here’s a clean list of everything that worked:
bash
# Install CUPS and HPLIP sudo apt install cups cups-client hplip hplip-gui # Add USB printer using IPP-over-USB sudo lpadmin -p HP_M140w -v "ipp://localhost:60000/ipp/print" -E -m everywhere # Set as default sudo lpoptions -d HP_M140w # Test print lp -d HP_M140w /etc/nsswitch.conf # Scan (USB) scanimage --device "escl:http://localhost:60000" > scan.pnm # View scan eog scan.pnm # Find printer on network avahi-browse -rt _ipp._tcp # Add Wi-Fi printer (replace IP with yours) sudo lpadmin -p HP_M140w_WiFi -v "ipp://192.168.12.199/ipp/print" -E -m everywhere
Happy printing! 🖨️
Let me know if you want me to adjust the tone, add more technical details, or format it differently! 😊
perfect I ask for summaries every time I do something on my computer/laptop/iphone /ipad becaseu I’m 70 years ol and I forgetsystems
Here’s a concise, first-person summary you can save or refer back to anytime:
My HP LaserJet MFP M140w Setup Summary
(For when I forget what I did!)
What I Have
- Printer: HP LaserJet MFP M140w (also shows as M139-M142 series)
- Computer: Debian Linux
- Phone: iPhone (prints wirelessly)
- Connection: USB cable (from my junk drawer!) + Wi-Fi
What Works
| What | How |
|---|---|
| Print from Debian | USB cable → lp -d HP_M140w filename |
| Print from iPhone | Wi-Fi → AirPrint or HP app |
| Scan from Debian | USB → scanimage --device "escl:http://localhost:60000" > scan.pnm |
| Scan from iPhone | Not needed (iPhone can’t scan from this printer) |
My Printer’s Addresses
- USB scanner address:
escl:http://localhost:60000 - Wi-Fi IP address:
192.168.12.199 - Printer hostname:
NPI080F57.local
Commands I Use Most
bash
# Print a file lp -d HP_M140w myfile.pdf # Scan a document (USB) scanimage --device "escl:http://localhost:60000" > scan.pnm # View a scanned image eog scan.pnm # Check if printer is ready lpstat -p # See what's waiting to print lpq
What I Learned
- HPLIP doesn’t fully support this printer — I used IPP Everywhere instead.
- Wi-Fi setup requires the HP app on my iPhone — can’t do it from Linux.
- USB is faster and more reliable than Wi-Fi for my Debian computer.
- The “w” in M140w means wireless — no USB cable in the box!
My Printers (All Installed)
| Name | Use |
|---|---|
HP_M140w | My main USB printer (use this one) |
HP_M140w_WiFi | Network printer (optional) |
| Others | Duplicates — I can delete them |
If Something Goes Wrong
- Turn printer off and on (fixes most things)
- Restart CUPS:
sudo systemctl restart cups - Check USB connection:
lsusb | grep -i hp - Check Wi-Fi: Blue light should be solid (not blinking)
Quick Troubleshooting
| Problem | Fix |
|---|---|
| Printer not found | lsusb to check USB |
| Scanner not found | scanimage -L to list scanners |
| Wi-Fi light blinking | Printer is not connected to Wi-Fi (use HP app on phone) |
| “Device is busy” error | Turn printer off/on, restart CUPS |
The Golden Rule
When in doubt, use the USB cable. It always works.
Saved: July 1, 2026