-
Notifications
You must be signed in to change notification settings - Fork 236
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 2.4.2 creates new printers with "Option print-color-mode monochrome" as default #421
Comments
Hi @akorobkin , this is an issue connected to our recent changes regarding sharing the default color model from server to clients (because some users don't check their settings before printing, so admins would like to set the default to monochrome - issue #277 ). I think I see the reason - when we load PPD in scheduler/printers.c we don't take PPD default into account, only I will try to create a fix today or at the start of the next week. |
How do admins do it centrally? By setting print-color-mode-default per printer, or is there a new cupsd.conf keyword for it? |
@akorobkin The defaults are per-printer. We could look at adding something in CUPS 2.5.x for a cupsd.conf override/default, but whatever we add I'd want to make sure it would carry over to CUPS 3.0's servers... |
Is there a workaround? Several people report that after upgrading to Ubuntu 22.04, they can't print in colour, and it seems to me that's related to this issue. I'm using the Kubuntu variant, also version 22.04, with Gutenprint v5.3.3 on a Canon Pixma iP4850. The CUPS version is 2.4.1op1-1ubuntu4.1; I see that the change for Issue #277 was introduced in v2.4.1. I tried: lpadmin -p Canon_iP4800_series -o ColorModel=CMYK but this had no effect; a test page is printed in greyscale. In fact, whatever option I put into the above command, only /etc/cups/ppd/Canon_iP4800_series.ppd is changed, and not /etc/cups/printers.conf. As with the OP, this file contains at the bottom: Option print-color-mode monochrome Using Kubuntu System Settings to change the configuration has the same effect (or non-effect) as lpadmin. Any suggestions for a quick fix? |
@ghewson Try:
|
@michaelrsweet Thanks, that works. |
I'm the guy that requested the ability to set the print-color-mode-default attribute, and unfortunately I don't think the updates are quite doing what I was hoping for... it seems what should be 2 independent options: print-color-mode and print-color-mode-default are somewhat linked together... The way I understand it, setting the print-color-mode to monochrome on CUPS applies a setting that forces every job to monochrome, and in my testing with Mac and iPad clients actually makes it completely impossible to print color. The print-color-mode-default attribute on the other hand, should just tell clients that they should choose monochrome as the starting option. That's how it seems to work with a real IPP Everywhere printer anyway. Unfortunately with the recent CUPS changes it seems setting the print-color-mode-default also kicks in the print-color-mode, so it both tells clients to default to monochrome, but then also makes it impossible to print in color. The two settings should not be linked like that. I'm guessing this is similar to what others are seeing where clients are unable to print to color. I've started doing a bit more testing and definitely seeing some oddities around color printing with CUPS 2.4.2 - like initial testing seems to be suggesting that I can print color from MacOS but not from iPadOS, but I haven't dug into that very far. |
Hi all, I have prepared a fix for this problem at https://github.com/zdohnal/cups/tree/change_defaults . The testing verified the following design during printing:
Then I've tested the fix in my environment and it worked (the correct color printout) in following scenarios: Printing as directly to the actual printer:
Printing in client+server setup - server shares the printer, client picks up a queue and print - either via permanent or temporary queue:
@akorobkin so in the end the option print-color-mode won't disappear from printers.conf, because it is needed there for cupsd to remember the default color option for possible sharing over network. However, the option will be now in synch with PPD default option and options from applications are prioritized. Currently I have sent the fix for testing to Fedora users which had the problems with setting different defaults and printing color/monochrome and if it works for them, I'll create a PR here for review. After it is merged, I will release 2.4.3 with fix. |
AFAIU it is expected by design of IPP - if there is an attribute which supports multiple values and user can choose only one value, two attributes are passed during get-printer-attributes response -
The similar response I got in Fedora - I've probably forgot to test the previous fix with applications and PPD options (because applications still pass PPD options into IPP requests instead of attributes). The fix now lives on the private branch of my CUPS fork - in case you could compile CUPS it would be great if you tested it as well.
That's how it is designed to work - however CUPS API cannot influence how it is implemented in applications - in case the application ignore the default settings and f.e. offers an option from previous session.
The problem was about CUPS ignored color PPD option (which is deprecated) which is usually sent by applications - if the application had sent print-color-mode attribute, color printing would have worked. |
@zdonal I think you want to put these changes into @csfjeff The "xxx-default" attributes provide late binding of default values. So for your IPP Everywhere printer, if the Client doesn't specify the "print-color-mode" attribute then the current "print-color-mode-default" value is used at time of processing. Where things get tricky is that "print-color-mode" values are mapped to "ColorModel" values for PPD-based printers, so we need to only use "print-color-mode-default" if "ColorModel" is not specified. |
@michaelrsweet AFAIU the commit b0f1a00 should do the trick in _cupsConvertOptions() for color printing. However configuration tools sends the ColorModel as well when they set a different default via CUPS-Add-Modify printer, so we need this conversion hack in add_printer() as well... |
I've got feedback from one user, so I've created a new PR with fix - #451 . |
Fixed by #451 - the option in printers.conf now properly reflex any changes regarding ColorModel or print-color-mode. |
I compiled CUPS 2.4.2-1 (package from Debian Sid) with patches b0f1a00 and #451, restarted CUPS and added a new printer in exactly the same way as it's explained in the issue description. The printer again received an option |
@akorobkin ahh... I have been using IPP generated PPDs in my testing, so I've totally missed the case when a person passes a classic PPD file or PPD generator... reopening, the printer creation supposes to reflect the default PPD option as well. Thank you for checking this! |
Hello, I'm hoping participate in testing this as well, as it has definitely impacted my environment. However while I'm somewhat competent with Linux, I'm shaky when it gets to compiling things and I'm having a hard time figuring out how to get this compiled and working. Any pointers to some instructions or guidelines on how to get a test setup going ? I generally use Ubuntu Server and have so far already tried the following:
|
@csfjeff IMO the most difficult part is the installation of dependencies which CUPS uses - I (since I'm on RPM based distro - Ubuntu will have something similar) use:
It is not a bulletproof solution (the dependencies differ in case you will use different configure options than the package from OS), but still gives you an automatic dependency installation to some extent. Then I try to remove CUPS provided by OS - this step I really do in a VM, because some components from desktop environments can depend on cups-libs, and cups-libs removal might remove your GUI in such cases :) - this step I do just to be sure my local compiled CUPS will be used. In the end I call
, Regarding SNAP I cannot help you - I haven't compiled any SNAP package yet. |
@akorobkin I came up with the fix for this - PPD default should be respected now with #500 . |
Thank you. Looks like it is working for my PPDs. |
Unfortunately
is not permanent. Same for editing 'printers.conf'. After printing it switches back to monochrome. This is rather annoying and I hope that it will be fixed soon. For meantime is there a simple way to make it permanent? |
scheduler/printers.c: Check for CMYK as well (fixes #421)
Will this help in these situations : …and when ? For the moment I can't « upgrade x my machines to ×buntu 22.04 because of that issue with printing. I don't « urge » in any way, could you give me an idea of the « process » ? |
@Coeur-Noir This issue has already several use cases fixed in the current master branch, which your distro maintainers can backport and fix those use cases in *buntu. The links to the commits you can find in this issue. The only corner case which is missing is the case when applications don't check the default options of the printer (if they still work with PPD options, they have to check for its IPP attribute counterpart), blindly puts another color related option into the list of options for the job and the destination is a remote CUPS server, which uses IPP protocol in communication with printer, but not If you want a new CUPS version with all fixes, there are three things I would like to tackle before new version:
Once those are fixed, I will proceed with a new version. Unfortunately I'm currently stuck with packaging new cups-filters architecture into Fedora, so I don't have much time for it - if a new version or the corner case fix is urgent for you, it would be great if you looked into those issues and created PR, which I can review. |
unfortunately ubuntu doesn't seem to have adopted this into jammy/22.04 yet (https://packages.ubuntu.com/source/jammy/cups). I hope they eventually will. |
- Upstream fix for OpenPrinting/cups#421
Please let me know if I should open a separate issue for this, but I think I am still having a similar problem with CUPS 2.4.7 in Void Linux. I am not 100% certain what version I had back in early December when I was successfully printing in color on a Canon ImageRunner office copier. I had to scrounge a PPD file to install the printer, and I print via Samba to a Windows queue maintained by our IT dept. Today I noticed that I couldn't print in color no matter the ColorModel= setting. I compared the new/old printers.conf from a system update on December 27th and the only difference was the new (updated) printers.conf had the dreaded
which was not there before. To regain color printing ability I needed to delete that line and restart cupsd. |
I have the same issue occurring randomly. Out of hundreds of printers on
CUPS 2.4.7, a few would randomly get the print-color-mode option added in
the printers.conf file. So far I can't figure out what is causing it and
how to reproduce it reliably.
-Alex
|
The suggested workaround (
Also, I cannot regain access to printer' setting by restarting CUPS. I need to manually remove the added line ( |
@luisvalenzuelar Ubuntu 22.04 has version 2.4.1, which, unless the fixes were backported, does not contain any fixes regarding the issue. Contact your distro about the fixes. |
@zdohnal So cups 2.4.6 (in upcoming ubuntu release) has solved the issue? |
It should have - however, some applications can override the settings by passing printing option of different value. I have tested it with Fedora with CUPS 2.4.7 via lp today and it worked. |
I am using CUPS 2.4.7 with in the ppd the following ColorModel-related part:
This causes(?) the printer to be created with |
On Ubuntu 24.04 LTS with CUPS 2.4.7, I also found |
Just for reference, @daniel's setting does not work in CUPS 2.4.1 with Ubuntu 22.04.
…________________________________
From: Daniel J Blueman ***@***.***>
Sent: 08 August 2024 01:50
To: OpenPrinting/cups ***@***.***>
Cc: Luis Valenzuela ***@***.***>; Mention ***@***.***>
Subject: Re: [OpenPrinting/cups] CUPS 2.4.2 creates new printers with "Option print-color-mode monochrome" as default (Issue #421)
On Ubuntu 24.04 LTS with CUPS 2.4.7, I also found lpadmin -p printer -o print-color-mode-default=color was needed for colour printing.
—
Reply to this email directly, view it on GitHub<#421 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADMLWAAYNYVPEWUR4HYXYRDZQMBLVAVCNFSM5ZVMOBTKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMRXGUYDANBSHEZQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Debian testing/bookworm, CUPS 2.4.2-1, cups-filters 1.28.15-1+build1. cupsd.conf, cups-files.conf are the debian default ones.
How to reproduce:
DefaultColorModel: CMYK
:I see option
Option print-color-mode monochrome
is at the bottom for no apparent reason. How does it get there, and why monochrome, if the PPD is CMYK by default?The printer thinks it is BW by default, too:
The text was updated successfully, but these errors were encountered: