-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CUPS does not auto-discover IPP printers for temporary queues #47
Comments
This seems to be a timeout issue. If I do the following change (set timeout for all DNS-SD-advertised printers to be found from 250 msec to 5 sec)
All printers appear in the output of |
I can also print to the Printer Application with CUPS, using a command like
only the command takes several seconds for sending this small job. |
I'm guessing this is probably libcups trying to filter out local queues. I can update it to look at the TXT record and only exclude CUPS queues. |
It seems not to filter out queues at all. The output of
You see that the queue of the PostScript Printer Application show up now (I did not have With the original timeout setting all DNS-SD-discovered entries disappear for me, only having the direct CUPS queue entries remaining. So there are two problems:
Note also that not all local services should be suppressed, only local CUPS queues (safest is to compare UIID with direct CUPS queue entries, this I do in cups-browsed). |
OK, so I did some initial testing on macOS and it works as expected with mDNSResponder. Now testing on Ubuntu 20.04 (what my XPS13 is loaded with at the moment) to see how things work with Avahi 0.8... |
OK, my XPS13 (again, running Ubuntu 20.04) is able to list my local printers. If I run ippeveprinter in another window it appears as expected, and if I terminate it, it disappears from the list as expected. As for the duplicate queues, I checked the code and we are looking for local (permanent/temporary) queues with the same name as the auto-generated queue name from libcups - I'm guessing your permanent queues (created with the driverless utility) aren't following the same naming conventions... I think we have the printer-uuid information accessible to the browse callbacks so that we can eliminate dupes that way as well. We definitely cannot increase the timeout to 5 seconds - that is way too long. The most we can justify is 1 second, and it should return faster than that if we stop getting data updates before then... FWIW, the Bonjour spec calls for a 100ms response time for queries/browsing... |
The CUPS queues are all manually created (cups-browsed is NOT running and "driverless" does not create queues) for each manually created (and so permanent) CUPS queue, for example my queue "Printer",
This means that DNS-SD records from CUPS queues are picked up and temporary queue entries with a queue name composed of the original queue name and the network host name of the server (should this not be "localhost"?) are created. |
I have done a test now: On my Ubuntu 20.10 I have installed the Avahi packages (0.7) of 20.04 and now I do not need to extend the timeout any more, Avahi is answering quick enough to list all the printers and I can print out of CUPS on the PostScript Printer Application, no need of cups-browsed, nor of manually creating a CUPS queue, all works as intended now. |
The "driverless" utility is also much faster after the downgrade ... |
Another hint for the Avahi timing issue. In the release notes of Avah 0.8 it is written:
Could the 10ms delay mentioned here causing the problem and should CUPS perhaps use the new API here then? |
Till, 10ms shouldn't make a difference, and we are using the higher-level client API which should insulate us from these differences. I will clone and upgrade one of my VMs to 20.10 so I can duplicate this issue and come up with a fix. |
@tillkamppeter I can't reproduce on my 20.10 VM. What kind of system are you testing on? Wi-Fi or Ethernet or both? |
It is both Wi-Fi and Ethernet, and it has several internal interfaces of VM platforms.
|
I still can't reproduce, and the DNS-SD support has changed since the original report. Closing for now but let me know if this resurfaces (we have a related issue #176 I've asked you to double-check...) |
To get all IPP print destinations listed by
(1-sec timeout instead of 250 msec) in Once having done so, everything is correct. I see all the IPP print destinations: My HP OfficeJet Pro 8730, both on network and IPP-over-USB, my Printer Applications, and neturally also my permanent CUPS queues:
And the permanent CUPS queues are NOT accompanied by temporary ghost queues any more. So no "Printer_till_x1yoga" and so on any more! Seems something in recent 2.4.x CUPS (I use 2.4.7) seems to have fixed that. The only thing I need is the 1-sec timeout now. |
Sorry, I was too fast. I forgot to turn on printer sharing. With the above setup, after giving the command
I get the ghost queues again:
See |
I am using CUPS from this repository here at OpenPrinting, in an Ubuntu 20.10 environment with Avahi 0.8. cups-browsed is not running, also no CUPS Snap, the
driverless
utility used is of cups-filters 1.28.5.I have several local IPP print services running: ipp-usb (with HP OfficeJet Pro 8730 connected to USB), the PostScript Printer Application (with printers "test", "test2", "test3", "test4", "test5", and "xxx") and ippeveprinter (started with
ippeveprinter -p 8001 evetest
).The HP OfficeJet Pro 8730 is also connected to the network, so its IPP print service appears this way, too.
The running CUPS daemon (not the CUPS Snap) has several local CUPS queues.
Output of
lpstat -e
:The output shows only my permanent CUPS queues, no entries from the three local IPP print services.
Here one also sees that all entries in the output are "permanent", none "temporary".
So no temporary queues are listed for the local IPP services, which is the issue I want to report here.
More info:
ippfind
anddriverless
list all these services correctly, so they are correctly DNS-SD registered and CUPS should list them as destinations for temporary queues.The text was updated successfully, but these errors were encountered: