Article View: linux.debian.bugs.dist
Article #4322Bug#1153874: cups: print-color-mode=monochrome ignored for Foomatic PPDs (ColorModel "Grayscale"), toggle prints in color
From: rogerio
Date: Fri, 13 Nov 2026 01:50
Date: Fri, 13 Nov 2026 01:50
84 lines
6930 bytes
6930 bytes
Package: cups
Version: 2.4.10-3+deb13u2
Severity: normal
Tags: patch upstream
Dear Maintainer,
With a Foomatic PPD whose ColorModel option names the gray choice
"Grayscale" (for example foomatic:Brother-HL-4050CDN-pxlcolor.ppd, or the
color Ricoh/Lanier/Savin/Gestetner/NRG/Infotec PPDs in foomatic-db), CUPS
advertises print-color-mode-supported = monochrome,color but never applies
monochrome. The black and white toggle on iOS and macOS appears and has no
effect: every job prints in color.
Steps to reproduce:
lpadmin -p test -E -v socket://PRINTER:9100 \
-m foomatic:Brother-HL-4050CDN-pxlcolor.ppd
cupsctl LogLevel=debug2
lp -d test -o print-color-mode=monochrome file.pdf
The error_log has no "Adding preset option" line and foomatic-rip runs
Ghostscript with -sDEVICE=pxlcolor. "lp -o ColorModel=Grayscale" on the same
queue prints in grayscale, so the driver itself works.
Cause: when a PPD has no *APPrinterPreset, _ppdCacheCreateWithPPD() in
cups/ppd-cache.c creates grayscale presets only for a fixed list of
option/choice pairs, and ColorModel=Grayscale is not in it. Ubuntu does not
show the problem because it carries 9100-ppd-cache-add-auto-presets.patch;
that larger change was not merged upstream (OpenPrinting/cups PR #236).
A minimal fix adding ColorModel=Grayscale to the list has been submitted
upstream. The same patch applies cleanly to the 2.4.x branch:
Issue: https://github.com/OpenPrinting/cups/issues/1815
Pull request: https://github.com/OpenPrinting/cups/pull/1816
--- a/cups/ppd-cache.c
+++ b/cups/ppd-cache.c
@@ -1634,6 +1634,12 @@ _ppdCacheCreateWithPPD(
color_option = "ColorModel";
gray_choice = "Gray";
}
+ else if ((color_model = ppdFindOption(ppd, "ColorModel")) != NULL &&
+ ppdFindChoice(color_model, "Grayscale"))
+ {
+ color_option = "ColorModel";
+ gray_choice = "Grayscale";
+ }
else if ((color_model = ppdFindOption(ppd, "HPColorMode")) != NULL &&
ppdFindChoice(color_model, "grayscale"))
{
For a Debian backport the cache version (_PPD_CACHE_VERSION in
cups/ppd-private.h) would need a bump, so existing queues pick up the new
preset without the PPD being reinstalled.
Workaround until then: add *APPrinterPreset entries to the queue's PPD and
reinstall it with lpadmin -P.
AI disclosure: this report and the patch were prepared with the help of AI
(Claude, by Anthropic). The bug was reproduced on my own setup, and the
patch was compiled and tested against upstream master.
-- System Information:
Debian Release: 13 (trixie), in a Docker container (debian:trixie-slim)
Architecture: arm64
Versions: cups 2.4.10-3+deb13u2, cups-filters 1.28.17-6+deb13u1,
ghostscript 10.05.1~dfsg-1+deb13u3
Rogรฉrio de Camargo Rocha
Technical Details
Message-ID:
<NYOAp-bxeB-5@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: rogerio@eu.sampa.br Newsgroups: linux.debian.bugs.dist Subject: Bug#1153874: cups: print-color-mode=monochrome ignored for Foomatic PPDs (ColorModel "Grayscale"), toggle prints in color Date: Fri, 13 Nov 2026 02:50:01 +0100 Message-ID: <NYOAp-bxeB-5@gated-at.bofh.it> X-Original-To: submit@bugs.debian.org X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Fri Nov 13 01:41:08 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.45 Reply-To: rogerio@eu.sampa.br, 1153874@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: debian-printing@lists.debian.org X-Debian-Pr-Message: report 1153874 X-Debian-Pr-Package: cups X-Debian-Pr-Keywords: patch upstream X-Debian-Pr-Source: cups X-Icl-Repid: 01a1d286-001d-763b-90b4-84073b82ad79 Mail-Alias-Created-Date: 1783786190929 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 (Mac OS X Mail 16.0 \(3901.200.71.1.16\)) X-Mailer: Apple Mail (2.3901.200.71.1.16) X-Proofpoint-Orig-Guid: un88Nl2unFnrhIJXeyX7n_EYmVxO0Q4H X-Authority-Info-Out: v=2.4 cv=etnSD4pX c=1 sm=1 tr=0 ts=6af667f0 cx=c_apl:c_pps:t_out a=bsP7O+dXZ5uKcj+dsLqiMw==:117 a=bsP7O+dXZ5uKcj+dsLqiMw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=VkNPw1HP01LnGYTKEx00:22 a=NEAV23lmAAAA:8 a=2QOhIc-t3CDu0YBuiY4A:9 a=QEXdDO2ut3YA:10 X-Proofpoint-Guid: un88Nl2unFnrhIJXeyX7n_EYmVxO0Q4H X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTEzMDAwNSBTYWx0ZWRfX7dQyIFfh2TGx a2Q5N4PVd7Co1RXoDh+co2pBfFElFvgd3+aWchacm5vECxjWP8RT5xJW9ZKPatIGG9Tf6RJ6IGf dfbWSSZK9u2o0MZJ31zMYMSRlhWZDaxpbUdp61nbXS3LeelZRZZXzyKpCIwl+155Lw8Xyce17v2 d5A0zp62CBx3HRjAlYRpWT+7dvtXbTa9w82+EYN/mc7ENkWJVdZQYl6hZQXAcXsYAQI4+PmoMXu npMuNgaKYIAL6bmONXE4I36Iljpf7h20dxkLrRZSZpwZ5B2ELsy/Tqqp4ekddE+Xt5UEz0eRPtM GtE3K8LNqjq2WEXPE/BZYxsND4AMu/nQ33j8QiTMpeT8cT+2A/0TndWYVyxBXk= X-Jnj: AAAAAAABtcYjHbTJU11UyhtKI0y1S1nWWFobUyncNrKWIW/tE8MFLwd5tiXWIzn54RQWQ0 /9UJfvol7Z0uY4owXIzumTyTvb/N0WpRidwo04iIB6bdj+yuKVRa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3 LqwZ1Bvf19gF/fKQX/DBAw/R70ob4uj8JdG777d8FQz37rfqU4R0AUAG14c2uGS5xW9256 zLG1DRUOHgF+IKdOkf8Pmgdr0+kaNsw+os3bnvylkWhpAvMcCL2+B9ojzqDvXX9W+g== X-Greylist: delayed 586 seconds by postgrey-1.37 at buxtehude; Fri, 13 Nov 2026 01:39:15 UTC X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2002320 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 84 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Thu, 12 Nov 2026 22:29:05 -0300 X-Original-Message-ID: <1C54CCED-682D-48BE-8F16-A801D4C45F2B@eu.sampa.br>