-
Notifications
You must be signed in to change notification settings - Fork 227
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
mDNS hostname in device URI is not resolved during permanent IPP Everywhere queue installation #340
Comments
Hi @Zeioth , thank you for the question and here are answers and tips:
I hope it helps and have a nice day :) |
Good morning.
I don't see a good reason to close the issue. If you could re-open it that would be great. |
You're mixing two things together - -p sets the name for your print queue, -P sets a file you pass as an argument as print queue driver, f.e.:
You're right about -P deprecation, but every argument of -m except for Or install the queue as IPP Everywhere, which recommend in the rest of comment.
Once you use the correct model (-m everywhere) or (if you insist) a file with correct option, the permanent queue should work. But you don't need to install the queue at all, because it looks like it is supported by IPP Everywhere -> you can use temp queue.
The temp queue works with your setup as well - just check whether CUPS actually sees it - which means the printer isn't on the list of accepting printers (output of |
@Zeioth The PPD file in /etc/cups/ppd isn't where you'll find it on a fresh system, it is the currently configured PPD for that queue. Ordinarily PPD files are copied either from a driver information file (/usr/share/cups/drv), a PPD file (/usr/share/cups/ppd), a driver interface program (used by Gutenprint in particular - /usr/lib/cups/driver), or from a PPD generated by CUPS for an IPP printer. For non-IPP printers, the The But as @zdohnal mentioned, for any printer sold in the last 10 years or so you probably want to use the "everywhere" model or just use (automatically-created) temporary queues. |
@Zeioth The deprecation warning does not prevent the queue from being added. Not having the PPD file in the location you specify will. (deprecation == warning, obsolete == error) |
@Zeioth And looking at the EPSON ET-1810, I'm astonished that it doesn't support AirPrint but you need to make a copy of the PPD file (or use the |
Ok so, I went to epson's website and I found the PPD for my printer. Unexpectedly, epsom seem to have pretty good linux support. There's also seem to be an arch package with the same name.
This time the command added the printer correctly and prints correctly too. |
Please don't eliminate PPD support or I won't be able to install my printer, and I bet a lot more of people. Printer makers are still using PPDs. Next time I'll look for an IPP everywhere printer, at it seems it's gonna be the new standard, and being driverless is a great adventage that makes configuration easier. |
@Zeioth It is happening, but we've been working with everyone (for about 5 years now) to develop "Printer Applications" which do the same thing as printer drivers in an IPP-compatible way. Most non-AirPrint/Mopria/IPP Everywhere printers are supported by printer applications already, and it will be a couple more years before we ship the first version of CUPS without PPD support. |
@michaelrsweet I just noticed the printer also prints correctly through the protocol dnssd (added from cups web server). What would be the format to add a dnssd printer by using lpadmin? |
@Zeioth The "dnssd" backend just resolves the correct protocol from those the printer reports, so if you do Similarly, you can use |
Oh that's a shame
Adds the printer correctly but still prints garbage when used with -m everywhere. It seems the printer it just not compatible with the IPP everywhere, actually. |
I'm sorry, I've misunderstood you - I thought you didn't use @Zeioth Would you mind providing the information from the following steps: ==========================================================
the command sends a query to the printer to find out what are the features/settings available on the printer - it can give us idea why ===========================================================
Would you mind installing your queue by the following command and tell us whether the queue works:
? ============================================================= @michaelrsweet if it is not a bug in PPD generator in CUPS, it can be a device which supports driverless standard we still don't support in CUPS - f.e. apple/cups#6022 - it seems like some devices support only PCLm, which CUPS doesn't support yet. |
Hello apologies for the delay:
|
From the get-printer-attributes.test output:
The device supports image/pwg-raster format, so @Zeioth I would like to ask to attach several files (if they don't have .txt suffix, please copy them somewhere, add the suffix and attach them here):
Thank you in advance! |
@Zeioth In addition to what @zdohnal requested, please also attach the PPD file in /etc/cups/ppd for the printer so that we can see what is in there. This printer supports Wi-Fi Direct Print Services but not AirPrint or Mopria for some reason (maybe it wasn't able to do the media sensing that AirPrint requires? no media-ready or media-col-ready in there) but has everything needed for IPP Everywhere. |
Ok this should be all. I only want to point out 2 things:
Btw this command is what I understand by 'working' on this tests. |
Feel free to ask me anything, I'll be around. |
@Zeioth The "-m everywhere" should have produced a PPD file, otherwise the command should have produced an error. What version of CUPS are you using? |
@michaelrsweet from the driverless PPD Zeioth attached I see there is CUPS 2.4.x in use, so IIUC we don't generate PPD there...
|
@zdohnal Even temporary queues have PPD files, they just disappear when the temp queues go away. It won't be until CUPS 3.0 that we do away with PPDs... |
Hmm... now I've run CUPS 2.4.1 in my VM and even a permanent IPP Everywhere queue leaves a PPD... I could've swear I tested it upstream before 2.4.0 release and there was no PPD...
Aha - that may be a reason why no PPD was created - the string should be Ideally it would be interesting to try device uri without mDNS hostname - then we can cross out any mDNS/Avahi related issues - uri would be like:
|
@Zeioth Can you check if the referenced commit helps you when you install the permanent IPP Everywhere queue with mDNS hostname-based URIs? I tested the fix in Fedora with temporary queue and permanent queues with IPP Everywhere model and two different uris - one with IP, other with mDNS hostname - all three worked. |
@zdohnal I checked that commit, and it did not change the behaviour at all for issue #343 which I believe was marked as a duplicate of this bug. I rebuilt the cups and libcups packages with the commit applied. I installed these versions, then did Here is the new debug log: debug_log.txt The printer still shows up as a raw printer in the web UI. EDIT: The printer changed type by itself after waiting a few minutes. I guess it was just slow to figure things out? Is that expected behaviour? |
I tested this with this two commands, and neither of them creates the ppd yet: lpadmin -p epson-et1810 -v ipps://EPSON%20ET-1810%20Series._ipps._tcp.local/ -m everywhere -E
lpadmin -d epson-et1810 # set as default printer
echo "Printers installed:"
lpstat -p | awk '{print $2}'
# No ppd at this point
lpadmin -x epson-et1810
lpadmin -p epson-et1810 -v ipp://192.168.1.101/zeioth-pc:631/ipp/print -m everywhere -E
lpadmin -d epson-et1810 # set as default printer
echo "Printers installed:"
lpstat -p | awk '{print $2}'
# No ppd at this point either |
@VorpalBlade cupsd has 'DirtyCleanInterval' directive which sets a time after which cupsd updates printers.conf file - the behavior you've seen can be explained by it - the more important thing for now is whether the print queue works - meaning it prints correctly. Have you verified that? @Zeioth the cups-git you've used is for Apple CUPS, not ours + if you see <IP/hostname>, it was supposed to mean 'substitute by IP or hostname', not by both. |
@zdohnal I did not check that before, I assumed that the web UI would be based on the current state of the daemon, not the config file. I did check now however, and no, I was not able to print immediately after, it took about half a minute to update in this case and allow printing (printer added via lpadmin, test print via lp). This seems problematic and potentially confusing to users. In addition when adding a printer via the web UI and selecting the discovered IPPS-via-mdns printer: The last step of the "wizard" is to set default printer options. As the printer is still a raw printer at this stage, the only options available are banner pages and policy. This is also a confusing user experience, having to wait a bit and then go back into the printer settings to set page size etc. EDIT: This is also a problem when adding via IP in the web UI: The option page is not correct until after the printer has been added, and it is a raw printer to begin with. Is this a separate bug? |
@zdohnal In this case it isn't the DirtyCleanInterval per-se, but the processing that cupsd needs to do in a background thread to generate the PPD. @VorpalBlade Unfortunately, the current implementation of cupsd is essentially single-threaded. The whole "resolve and generate the PPD in the background" trick can't be done in the (main) IPP request processing thread, so there is no way with the current implementation to delay a response to the CUPS-Add-Modify-Printer request. But we might be able to do something in admin.cgi to special-case the IPP Everywhere driver and wait until a PPD is found. If you can file a separate bug on that specifically I'll see what can be done... |
@michaelrsweet Sure, I can do that later today when I have more time. What about the case of the user adding the printer through the Gnome printer settings though? Or the KDE one (I assume it has it's own separate one). |
@VorpalBlade Note it in the bug and we'll figure something out. It is a "short term" problem as future CUPS won't have this issue (no more PPD files... :), but I'd like to do something about it because it is definitely confusing. |
@michaelrsweet thank you, Mike! |
Thank you for pointing that out @zdohnal you right, the cups AUR repos are outdated. I hope I can find time this week to fix that aur repo and make it point here. I'm not gonna try compiling directly from git because I'd rather to avoid garbage in my system. I'll re-test the issue once it reaches arch offiical repos. But I tried this two in the current version and still don't create the PPD: lpadmin -p epson-et1810 -v ipp://192.168.1.101:631/ipp/print -m everywhere -E
lpadmin -p epson-et1810 -v ipp://zeioth-pc:631/ipp/print -m everywhere -E |
I just took the official repo CUPS one, modified the PKGBUILD to include the commit as a patch and rebuilt it. I can upload my PKGBUILD & associated files as a tarball somewhere if you want. |
@VorpalBlade Yes please, I have enough time to test if you could. |
|
Ok I tried the next commands generating the arch package from your PGKbuild and the PPD still doesn't get generated by any of the commands I tried:
Also It's very easy to notice when the command is not creating the PPD in /etc/cups... because the command runs instantly, while when the PPD is created correctly there is an small delay before the command finishes (like with the one it works for me)
|
@Zeioth If you still check the existence of PPD by your constructed command, which checks the PPD right after lpadmin exits, you probably hits the delay in PPD generation as described in #347 . The PPD gets generated after some delay depending on your network setup (f.e. I get my IPP Everywhere generated in matter of seconds - 2-3s, so IMO it is influenced by the network setup?). In the end, the PPD should get generated in some time - please check /etc/cups/ppd folder after several seconds. |
No, it's not created no matter what. (Ryzen 5950 + 1Gb internet connection. /etc/cups/ppd remains empty after 5 minutes). |
@Zeioth can you attach a txt file with CUPS debug logs from the time you add the print queue:
? |
Debian has cups 2.4.1op1-1. I am using it. TEST-1:
printers.conf is written to and TEST-2:
log-1 has
|
@Zeioth What output does that command produce? |
@debiantriage Hi Brian, have you applied the latest patch from git master regarding the issue? |
@debiantriage That's the only command that works for me so far. It creates the PPD correctly under /etc/cups/ppd |
@zdohnal Hello Zdenek, I forgot about about those patches. Reminding me was good. Apologies for the noise and thank you for your work. |
@debiantriage np, please let me know if it helps - there is a known connected issue #347 about a possible delay between the time when lpadmin/CUPS Web UI finishes adding the queue, but the background thread generating the PPD hasn't finished yet - which causes CUPS Web UI/lpoptions showing the queue as a raw for some time. |
@zdohnal @michaelrsweet @Zeioth Debian now has a cups 2.4.2-1 package. The cups changelog has
Repeating TEST 1:
This command completes and immediately produces a PPD.
That's an improvement on the previous outcome. The issue seems to me to be fixed. |
To generate the ppd of my printer, I went to http://localhost:631/admin added my printer, and choose the model. Works. all good.
This has generated '/etc/cups/ppd/EPSON_ET-1810_Series.ppd' so I tought "Cool, I'm gonna create the printer through a command, so I don't have to manually configure it every time I reinstall my system".
So I ran
And it doesn't work. Doesn't add the printer. The output is:
Where is any way to bypass this error?
Thank you.
The text was updated successfully, but these errors were encountered: