From 6265df53b224e82a6843e3284be371230cec51fe Mon Sep 17 00:00:00 2001 From: oubayashi <214973957@qq.com> Date: Thu, 24 Sep 2026 14:48:15 +0800 Subject: [PATCH] Prefer IPP color mode default over ColorModel Some clients continue to send the legacy ColorModel=Gray option when switching the printer default back to color. This stale value caused CUPS to select monochrome before processing print-color-mode-default. Only translate ColorModel when print-color-mode-default is absent so the standard IPP default takes precedence while preserving compatibility with clients that only provide the legacy PPD option. --- scheduler/ipp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scheduler/ipp.c b/scheduler/ipp.c index 398c76fbb..a8af0699b 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -2417,7 +2417,8 @@ add_printer(cupsd_client_t *con, /* I - Client connection */ set_device_uri = 0; - if ((attr = ippFindAttribute(con->request, "ColorModel", IPP_TAG_NAME)) != NULL) + if (!ippFindAttribute(con->request, "print-color-mode-default", IPP_TAG_ZERO) && + (attr = ippFindAttribute(con->request, "ColorModel", IPP_TAG_NAME)) != NULL) { const char * keyword = NULL;