Can't remove printer

I recently installed an HP LaserJet 500 Color M551 network printer via the Printers utility. The driver was downloaded automatically. I am unable to print, however, so I tried to remove the printer, but clicking the Remove Printer link does nothing. And before you ask, YES, I did authenticate and unlock the settings. I removed it in CUPS, but the printer is still listed.

eos-diagnostic-180124_130202_UTC-0500.txt (306.4 KB)

Anyone…? Bueller?

Having the same issue with Brother network printers. I can’t print, and I can’t remove the printers either.

Not sure what that was supposed to do, but it did not fix my issue. I can’t remove any of the printers I have installed.

Is there a terminal command I can use to just remove ALL of the printers?

@LeandroStanger I appreciate you’re trying to help Endless users, but precisely with that spirit in mind I have to ask you to please stop copying & pasting random advice to people in the forum. The eos-fix-ostree-repo script has nothing to do with how printers are configured or installed, but with the way the OSTree-based is setup and configured, and should be only run when there are reasons to believe that setup is broken, as a last resort, and not as a hammer for all kind of nails.

@Rocky_Carr There seems to be a few issues in your initial report, I’ll try my best to give you some answers:

First of all, a clarification is due: being Endless a Linux-based OS, we rely heavily on CUPS (as you know) to support printers, and therefore on those printers having CUPS-compatible drivers available so they can work. That said, Endless is not a regular Linux distribution, and the fact that it’s based in OSTree, while it’s great for many reasons, poses a few extra challenges when it comes to printers, whose drivers can’t be installed as in other Linux distros since the root filesystem is read-only. For that reason, we ship lots of Open Source drivers (such as HP’s hplip driver, Epson ESC/P-R and all the Gutenprint & Foomatic drivers) on the OS itself, which provide support for a wide range of printers, and then we have a small component in place (EosConfigPrinter) that’s able to automatically search, download and install drivers for a bunch of additional printers which we can’t ship drivers for, but that they have them available in www.openprinting.org.

This (long) introduction is just to let you know that, while we strive to support as many printers as possible, there are models that unfortuntely don’t work yet in Endless, as it seems to be the case for your printers.

In particular, I’ve checked your HP LaserJet 500 Color M551 in the list of All Supported printers from the HPLip website and I could not find it there (neither in the OpenPrinting.org list of HP printers), so I have to conclude that your printer is not supported, which is sad and unfortunate (since most HP printers are supported by HPLip).

About your Brother printers, you haven’t mentioned the specific models so it’s hard to say. That mentioned, what I recall from when I was working on these matters long time ago, most Brother printers are not particularly Linux-friendly so there’s a chance they are not supported either. You can take a look in http://www.openprinting.org/printers/manufacturer/Brother and see if you can find it there, though. In theoty, EosConfigPrinter would have likely already installed a driver if there was one available, but it’s still worth checking there and in Brother’s website in case there’s another driver that could work, and that you could perhaps get manually installed (not always possible or easy, but sometimes it’s an option).

Last, about not being able to remove the printers from the system, that’s actually quite weird indeed, there might be a bug in the control center, so thanks for reporting! In the meantime, I saw in the log you sent us that you still have 4 PPD files installed in your system at the time you created the diagnostics file:

/etc/cups/ppd/HP-LaserJet-P2055dn.ppd.O:
/etc/cups/ppd/HP-LaserJet-P2055dn.ppd:
/etc/cups/ppd/LaserJet-P2055dn.ppd:
/etc/cups/ppd/HP-LaserJet-500-color-M551.ppd:

If any of those files match the printer you want to remove, you can try removing them manually (as root) and then restarting CUPS (sudo systemctl restart cups) or rebooting, and they should be gone. I believe you have created that diagnostics file before testing the Brother printers, so you might want to manually remove some more PPD files from there matching those Brother files that you want to remove, in case they refuse to leave the Printers panel in control center.

Now, I realize this is a very late answer and not the one you were hoping for, so I apologize for that. Still, I hope this at least gives you some extra information and answers, at least partially, your doubts.

Thanks for reporting, hope it helps,
Mario

@Mario Thank you for the detailed reply. I am familiar with HPLip as we use it on our other Linux-based computers in-house. My organization is testing Endless for use in our non-profit computer award programs, so I am throwing as much stuff as I can at it to see what works and what doesn’t, including every printer that I can find. We have had good luck with HPLip and Epson, but poor results with Gutenprint. Thanks for the links - I’ll search there first from now on before trying to install a new printer.

As to my original problem, I don’t understand what you mean by removing the printers “manually” as root. I’ve tried removing the printers via CUPS (in the web browser) but that hasn’t worked either. Can you please give me a quick tutorial?

No problem. What I meant was to manually remove, as root and with the rm command, the files I mentioned before. From the terminal, the following commands should do it:

sudo rm -f /etc/cups/ppd/HP-LaserJet-P2055dn.ppd.O
sudo rm -f /etc/cups/ppd/HP-LaserJet-P2055dn.ppd
sudo rm -f /etc/cups/ppd/LaserJet-P2055dn.ppd
sudo rm -f /etc/cups/ppd/HP-LaserJet-500-color-M551.ppd

WARNING: Make sure to pass the right argument to rm so that you don’t end up removing anything else in your system. Sorry for the disclaimer if it’s obvious, but I already know of a case where an user mistyped the rm command and ended up deleting other things, so I’d better be safe than sorry now :slight_smile:

That said, I’m not 100% if that will be enough to make the printers go away from the control center. If it’s not enough, you can run the following commands that I think should uninstall EVERY printer installed in your machine:

# Restart CUPS to ensure a clean state
systemctl restart cups

 # Cancel all pending printing jobs
sudo cancel -a -x

# Now uninstall ALL the printers
for printer in $(lpstat -p | grep ^printer | cut -d ' ' -f 2); do sudo lpadmin -x "$printer"; done

(You should be able to copy and paste all those lines into the terminal, one after another)

My printers-related knowledge is a bit outdated/rusty now, but I’m hoping this will help you.

Let me know how it goes,
Mario

@Mario I used the commands that you listed and the printers are GONE from the Endless Diagnostics report, and from CUPS (localhost:631), but they STILL appear in the list of Printers under System Settings.

Now for a twist: If I switch to a different wireless network and reboot, the printers are GONE! When I switch back to the original wi-fi network and reboot, the printers magically reappear. I tried to “forget” the wireless network and manually connect again, but the printers still appeared again.

Ahhh… so what you’re seeing then is automatically discovered printers, that are added automatically by cups-browsed when you’re connected to a network providing them. That’s why you can’t uninstall them: because they are not really “installed”, just “accessible” (while you’re connected to that network).

I understand it’s very confusing that they are there if they don’t work, but unfortunately I don’t think there’s a way for Endless (or other Linux systems, for what it’s worth) to tell whether an automatically discovered printer will work or not, but it should be harmless for you to have them around.

This said, it’s a bit surprising that this is happening since I’d swear the version of EOS you have (3.3.9 according to logs) would not have enabled the automatic setup of network printers, since that’s currently discourage by the upstream maintainers, and a change we did a few months ago…

Still, if you want to give it a try you could play around with the options in /etc/cups/cups-browsed.conf, to force disabling this auto-discovery mechanism. IIRC, you should uncomment the line containing # CreateIPPPrinterQueues LocalOnly, so that you effectively instruct cups-browsed not to auto-setup this type of network printers. And maybe uncomment # CreateRemoteCUPSPrinterQueues No as well, but I’m not that sure about that one.

After doing those changes, reboot + reconnect to the same network, and check whether that “fixed the problem”. If it did, I’d appreciate if you could comment here, since this cups-browsed is kind of a bit obscure thing to me too :slight_smile:

Hope it helps!
Mario

Yes, after more digging with a local Ubuntu expert, we have deduced that Endless is auto-discovering all of the available network printers and displaying them in the Printers dialog in System Settings. I still have to manually ADD the printer that I want to print to, but ALL of the discovered printers still appear in the print dialog, regardless of whether or not I have added them. This is REALLY confusing, and I do I.T. for a living. For an end-user, I imagine it being a nightmare.

We commented out the lines you suggested in cups-browsed.conf, but the printers still auto-populate.

As an aside, uncommenting the “Driverless” option auto-installed every printer rather nicely, even though driver issues prevented me from printing to all of them.

And I’m actually up to 3.3.14 (it just updated itself about 30 minutes ago.)

Yes, after more digging with a local Ubuntu expert, we have deduced that Endless is auto-discovering all of the available network printers and displaying them in the Printers dialog in System Settings. I still have to manually ADD the printer that I want to print to, but ALL of the discovered printers still appear in the print dialog, regardless of whether or not I have added them. This is REALLY confusing, and I do I.T. for a living. For an end-user, I imagine it being a nightmare.

I agree it’s confusing, maybe we should consider to stop shipping cups-browsed altogether if it’s causing this much trouble, even though I’m surprised to see this is actually happening since we build that component with the auto-discovery feature disabled (but again, I’m not an expert in printing, so I could be missing something).

We commented out the lines you suggested in cups-browsed.conf, but the printers still auto-populate.

Interesting. Maybe you could try playing with other options, and see whether you manage to disable this completely?

The reason I mention this is because, as I said before, we build cups-browsed with the auto-discovery feature disabled, so if this is still happening it might mean that either you have a particular type of printers somehow not covered by that option (this meaning that there’s something else we need to disable) or that there’s a bug somewhere that needs to be fixed. The problem I have is that I can’t reproduce the problem with the environment I have at hand, so it’s kind of difficult for me to investigate and any extra feedback you can provide will be very valuable .

As an aside, uncommenting the “Driverless” option auto-installed every printer rather nicely, even though driver issues prevented me from printing to all of them.

Yes, but that seems unrelated to the issue at hand to me, isn’t it?

And I’m actually up to 3.3.14 (it just updated itself about 30 minutes ago.)

We haven’t changed cups-browsed in the latest releases, but still good to know you’re up-to-date. Thanks

Okay, so here’s what I’ll do: I will download the latest release and perform a clean installation and see what happens and let you know.

Thank you for your assistance. We are excited about deploying Endless OS to our recipients.

Thanks to you for all your help and patience. Please let me know how your experiments go and if there’s anything we can do to support you with your deployment!

Okay, I’m on a fresh install of EOS 3.3.14. I open Settings–>Printers, and here is what I see:

The auto-discovered printers are:
Brother MFC-L8850CDW
Brother MFC-L9550CDW
HP LaserJet Color M551
HP OfficeJet Pro 8620

The computer is a Dell Latitude E7240.

Clearly, the auto-discovery feature is NOT disabled. I have attached the diagnostics file.

eos-diagnostic-180326_191710_UTC-0400.txt (409.8 KB)

Hmm… Yes, it seems that something is going on indeed. I’ve double checked now and we’re building CUPS with --disable-auto-setup-driverless, so that it does not automatically setup remote IPP printers, see http://bzr.linuxfoundation.org/loggerhead/openprinting/cups-filters/revision/7618. The reason we did that was because it was causing trouble with notifications and because that was the recommended default by upstream, so it made sense.

To be fair, my understanding at that time was that by building cups-browsed that way we would disable auto-discovery, but perhaps I was wrong on that assumption, or it disabled a certain type of printers (matching the ones I had in my environment at that moment), or simply there’s something else at play now other than cups-browsed (e.g. CUPS itself).

Problem is that at this point is where I basically hit the limits of my knowledge about this stuff, but just to be sure I’d like you to double check, if possible, that you set both CreateIPPPrinterQueues and CreateRemoteCUPSPrinterQueues to No, and see if that makes any difference.

If that (or changing any other configuration option in cups-browsed.conf) fixes the problem for you, I’d appreciate you comment back and let us know (thanks again!), so that we can study a proper fix, if one is needed after all.

A more drastic approach on our side would be to remove the cups-browsed package altogether, which might not be a bad idea since I believe it’s recommended by CUPS these days anyway (and you could still add network printers), but since there’s still some value on the auto-discovery feature, I’d rather explore first whether adapting the local configuration of cups / cups-browsed solves the problem for you, since I’m a bit concerned about maybe fixing an use case and breaking others :slight_smile:

Many thanks again, can’t be grateful enough for your patience and cooperation.
Mario

What version of Endless OS are you using?

Settings :arrow_right: Details

https://giphy.com/gifs/3o7btXWwqB7xSS41Ik/fullscreen

https://support.endlessm.com/hc/en-us/articles/215157086-Upgrade-from-Endless-OS-2-x-to-Endless-OS-3