printing PDF appears always grey, no color

Bug #1971242 reported by dm
110
This bug affects 19 people
Affects Status Importance Assigned to Milestone
CUPS
Fix Released
Unknown
atril (Ubuntu)
Invalid
Undecided
Unassigned
cups (Ubuntu)
Fix Released
High
Till Kamppeter
Jammy
Fix Released
High
Till Kamppeter
Lunar
Fix Released
High
Unassigned
okular (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

After upgrading from 20.04 LTS to 22.04 LTS I can't print colored PDF document. The print appears always b/w regardless color printing was enabled or not. Printing from LibreOffice produces a color print. This behavior (bug) is reproducible on three upgraded machines. It would be nice to have color print back again.

[ Impact ]

If the PPD file for a printer has a ColorModel option and the only choice in it for printing in color is not named RGB but CMYK instead, the printer cannot be made printing in color with intuitive methods, usually selcting the color choice in the print dialog (which makes ColorModel=CMYK be sent along with the job).

Only an ugly command-line-based workaround, running the command

    lpadmin -p PRINTER -o print-color-mode-default=color

makes the printer print in color.

An example for printers with such PPDs are printers from RICOH and OEM (Lanier, InfoTec, Savin, ..), so many high-end color laser printers are affected.

[ Test Plan ]

Remove the workaround if you had applied it:

    lpadmin -p PRINTER -R print-color-mode-default

If you have an affected printer, print a PDF file (or use the print functionality in an application) with colored content and choose the setting for color printing in the print dialog. When printing via command line do

    lp -d PRINTER -o ColorModel=CMYK FILE.pdf

Without the SRU applied you will get a grayscale/monochrome printout, with it applied, you will get a colored printout.

To test without a printer:

Stop CUPS:

    sudo systemctl stop cups

Edit /etc/cups/cups-files.conf to have a line

    FileDevice Yes

and start CUPS again:

    sudo systemctl start cups

Then create a queue using the attached sample PPD file:

    lpadmin -p color-test -E -v file:/tmp/printout -P Ricoh-PDF_Printer-PDF.ppd

Print a file to this queue as described above. When the job is done ("lpstat" does not show it any more), open /tmp/printout with a text editor. Check whether it contains a line

    @PJL SET RENDERMODE=COLOR

near its beginning, and NOT a line

    @PJL SET RENDERMODE=GRAYSCALE

[ Where problems could occur ]

The patches are simple and they are also for some time in newer CUPS versions (2.4.2 and newer) which are included in several distributions (Ubuntu 22.10, 23.04, and others) and did not cause any complaints about color printing. So the regression potential is very low.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Libera.chat.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1971242/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Paul White (paulw2u)
affects: ubuntu → cups (Ubuntu)
tags: added: jammy
Revision history for this message
Graeme Hewson (ghewson) wrote (last edit ):

Several other people report the same problem: https://askubuntu.com/questions/1410583/upgrading-to-22-04-printer-doesnt-works-in-color

As I commented there, I think this is related to this issue in CUPS: https://github.com/OpenPrinting/cups/issues/421

A workaround suggested by a CUPS developer is to issue the command:

lpadmin -p PRINTER -o print-color-mode-default=color

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in atril (Ubuntu):
status: New → Confirmed
Changed in cups (Ubuntu):
status: New → Confirmed
Changed in okular (Ubuntu):
status: New → Confirmed
Changed in cups:
status: Unknown → New
Revision history for this message
Coeur Noir (coeur-noir) wrote (last edit ):

Hi.

It's not « limited » to pdf.

It's a regression as it used to work out of the box before 22.04.

See also https://bugs.launchpad.net/ubuntu/+source/cups-filters/+bug/1987528 ( I did not dare to mark as duplicate one or the other )

Revision history for this message
Coeur Noir (coeur-noir) wrote (last edit ):

Is this fixed in 22.10 ? Will it be fixed in 22.04 LTS ?

Having to issue commands for printing in color - a thing that used to work out of the box for years - is not a sane situation.

Revision history for this message
dm (jan-rauberg) wrote :

I thing it is terrible situation and an absolute no go. Since release of 22.04 I have to use Microsoft Windows or MacOS for printing colored documents. And it seems nobody cares about it. Really? Not only the snapd bullshit which makes Firefox completely unusable for NFS/LDAP users. Maybe I should switch to Debian or another STABLE distribution. Ubuntu has forgotten its basics.

Revision history for this message
Coeur Noir (coeur-noir) wrote :

A workaround suggested by a CUPS developer is to issue the command:

lpadmin -p PRINTER -o print-color-mode-default=color

Is this a permanent workaround or shall I have to issue that command each time printing needed ?

( the latter is not practicable in my context - many users, many machines… )

Revision history for this message
Coeur Noir (coeur-noir) wrote :

Has this been fixed in 22.04 LTS ?

I'd like to use that version of Ubuntu at my work place where color printing is needed…

Revision history for this message
Robert (rom2) wrote :

It is not fixed with cups 2.4.1 (https://github.com/OpenPrinting/cups/issues/421).
But should be fixed with cups 2.4.3 (https://github.com/OpenPrinting/cups/pull/500).

Ubuntu 22.04 LTS has cups 2.4.1 (cups-config --version)

Revision history for this message
Ian Gordon (ian-gordon) wrote (last edit ):

I suspect this problem is caused by this issue (https://github.com/OpenPrinting/cups/pull/500) that is fixed in cups where the option print-color-mode is set to monochrome when the printer PPD file has ColorModel: CMYK and not ColorModel: RGB (Our Ricoh C4500 uses CMYK as its ColorModel: CMYK)

We were trying to use

lpadmin -p <printername> -o print-color-mode-default=colour
lpadmin -p <printername> -o print-color-mode=colour

and this worked the first time we printed to the printer and then it would reset to "monochrome" which I suspect is caused by this reported typo: https://github.com/OpenPrinting/cups/pull/687

Cheers,

Ian.

Changed in cups:
status: New → Fix Released
Revision history for this message
Graeme Hewson (ghewson) wrote :

CUPS 2.4.3 has been released, which should fix this problem.

https://github.com/OpenPrinting/cups/releases/tag/v2.4.3

Revision history for this message
Robert (rom2) wrote :

Should be this change: Fixed default color settings for CMYK printers as well (Issue #500)

Revision history for this message
Sebastien Bacher (seb128) wrote (last edit ):

Till, sounds like we should at least SRU https://github.com/OpenPrinting/cups/commit/9b31bae and https://github.com/OpenPrinting/cups/commit/b0f1a00a to 22.04 to fix that issue, could you work on that and maybe check if that are more fixes worth SRUing as we do an upload?

Changed in cups (Ubuntu):
assignee: nobody → Till Kamppeter (till-kamppeter)
importance: Undecided → High
Revision history for this message
Graeme Hewson (ghewson) wrote :

There's now CUPS 2.4.4 with a hotfix for a segfault.

https://github.com/OpenPrinting/cups/releases/tag/v2.4.4

Revision history for this message
Coeur Noir (coeur-noir) wrote :

…yes please, sru emergency, ubuntu 20.04 LTS variants reach EOL.

It's been more than a year now color printing is out of order in some context.

Changed in cups (Ubuntu Lunar):
importance: Undecided → High
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Sample PPD file for the SRU test plan.

description: updated
Changed in cups (Ubuntu Lunar):
status: New → In Progress
Changed in cups (Ubuntu):
status: Confirmed → Fix Committed
no longer affects: cups (Ubuntu Lunar)
Changed in cups (Ubuntu Jammy):
importance: Undecided → High
status: New → In Progress
no longer affects: okular (Ubuntu Lunar)
no longer affects: okular (Ubuntu Jammy)
no longer affects: atril (Ubuntu Lunar)
no longer affects: atril (Ubuntu Jammy)
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Uploaded CUPS 2.4.5 to Mantic. This version has the mentioned fixes included.

Revision history for this message
Steve Langasek (vorlon) wrote :

    FiileDevice Yes

This is a typo for "FileDevice", correct?

description: updated
Changed in cups (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello dm, or anyone else affected,

Accepted cups into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cups/2.4.1op1-1ubuntu4.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (cups/2.4.1op1-1ubuntu4.3)

All autopkgtests for the newly accepted cups (2.4.1op1-1ubuntu4.3) for jammy have finished running.
The following regressions have been reported in tests triggered by the package:

pappl/1.0.3-2 (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/jammy/update_excuses.html#cups

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Fixed in Mantic via cups 2.4.5-0ubuntu1:

cups (2.4.5-0ubuntu1) mantic; urgency=medium

  * Update to new upstream version 2.4.5.
    - Fixes color printing on printers with "CMYK" choice instead of "RGB"
      in "ColorModel" option of their PPD (Upstream issues #451 and #500,
      LP: 1971242).
  * Merge from Debian unstable. Remaining changes:
    - Added "--enable-snapped-clients" to the "./configure" options to use
      the correct Snap mediation mode for an unsnapped cupsd, like provided
      by this package.
    - In the AppArmor profile allow CUPS to access (/var)/run/snapd.socket
      to allow cupsd to determine which interfaces a snapped client
      is plugging.
    - Build-depend on libapparmor-dev, libsnapd-glib-dev, needed for
      Snap mediation.
    - Added fully automatic generation of PPD option setting presets to
      be applied depending on the settings of the job IPP attributes
      "print-color-mode", "print-quality", and "print-content-optimize".
      This allows easy control of any printer with only standard IPP
      attributes, as for example from a phone (functionality overtaken
      from cups-filters, mot (yet) upstream in CUPS).
    - In debian/rules updated ./configure arguments from --enable-gnutls to
      --with-tls=gnutls. Now libcups has support for all hash types again,
      especially can provide sha2-256 to PAPPL.
    - When polling capabilities of a driverless printer via
      get-printer-attributes IPP request, do a separate poll of the
      media-col-database attribute in case it did not get obtained by the
      first polls.
    - In libcupsimage2 recommend libcupsfilters2 instead of libcupsfilters1.
  * Manually refreshed patch 9100-ppd-cache-add-auto-presets.patch.
  * Removed patches included upstream:
    - 9110-create-local-printer-localhost-fix.patch
    - CVE-2022-26691-2.patch
    - snapd-glib-2.patch
    - poll-media-col-database-separately.patch
    - CVE-2023-32324.patch

cups (2.4.2-4) unstable; urgency=medium

  * CVE-2023-32324
    A heap buffer overflow vulnerability would allow a remote attacker to
    lauch a dos attack.

Changed in cups (Ubuntu):
status: Fix Committed → Fix Released
description: updated
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Unfortunately the package in -proposed was superseded by a security update, and will need to be updated again.

Changed in cups (Ubuntu Jammy):
status: Fix Committed → Triaged
assignee: nobody → Till Kamppeter (till-kamppeter)
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello dm, or anyone else affected,

Accepted cups into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cups/2.4.1op1-1ubuntu4.5 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in cups (Ubuntu Jammy):
status: Triaged → Fix Committed
Revision history for this message
Nicola Soranzo (nsoranzo) wrote :

@vorlon I've installed the 2.4.1op1-1ubuntu4.5 packages from -proposed and, after correcting the printer configuration with `sudo lpadmin -p PRINTER -o print-color-mode-default=color` it seems to work well, i.e. it doesn't revert to monochrome after printing any more. Thanks!

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Thank you very much. Marking the SRU for Jammy as verified ...

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Andreas Hasenack (ahasenack) wrote (last edit ):

Till, could you please clarify if kinetic and lunar are fixed?

It seems only cups 2.4.3[1] fixed the issue, and kinetic and lunar have 2.4.2. I checked the code in the packages with patches applied and I don't see the fix there (in kinetic and lunar).

1. https://github.com/OpenPrinting/cups/releases/tag/v2.4.3

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

@ahasenak, I have uploaded an SRU for this bug for Lunar right now. As soon as it gets approved, please test it as described in the initial description (there is an option to do it without an affected printer) and report back here.

I will not upload an SRU for Kinetic, as this version is already EOL.

no longer affects: atril (Ubuntu Lunar)
no longer affects: okular (Ubuntu Lunar)
Changed in cups (Ubuntu Lunar):
importance: Undecided → High
status: New → In Progress
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello dm, or anyone else affected,

Accepted cups into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cups/2.4.2-3ubuntu2.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in cups (Ubuntu Lunar):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-lunar
removed: verification-done
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (cups/2.4.2-3ubuntu2.3)

All autopkgtests for the newly accepted cups (2.4.2-3ubuntu2.3) for lunar have finished running.
The following regressions have been reported in tests triggered by the package:

cmake/3.25.1-1ubuntu1 (armhf)
foo2zjs/20200505dfsg0-2ubuntu3 (arm64)
libreoffice/4:7.5.4-0ubuntu0.23.04.1 (armhf)
samba/2:4.17.7+dfsg-1ubuntu1.1 (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/lunar/update_excuses.html#cups

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (cups/2.4.1op1-1ubuntu4.5)

All autopkgtests for the newly accepted cups (2.4.1op1-1ubuntu4.5) for jammy have finished running.
The following regressions have been reported in tests triggered by the package:

libreoffice/blacklisted (s390x)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/jammy/update_excuses.html#cups

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This is pending a lunar verification in order to release the jammy update.

description: updated
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

I have tested the lunar-proposed package (2.4.2-3ubuntu2.3), and after updating the package, and recreating the printer, it now defaults to printing in colour when using Okular.

tags: added: verification-done verification-done-lunar
removed: verification-needed verification-needed-lunar
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 2.4.2-3ubuntu2.4

---------------
cups (2.4.2-3ubuntu2.4) lunar-security; urgency=medium

  * SECURITY UPDATE: recently printed documents authentication issue
    - debian/patches/CVE-2023-32360.patch: require authentication for
      CUPS-Get-Document in conf/cupsd.conf.in.
    - CVE-2023-32360

 -- Marc Deslauriers <email address hidden> Mon, 11 Sep 2023 12:27:52 -0400

Changed in cups (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 2.4.1op1-1ubuntu4.6

---------------
cups (2.4.1op1-1ubuntu4.6) jammy-security; urgency=medium

  * SECURITY UPDATE: recently printed documents authentication issue
    - debian/patches/CVE-2023-32360.patch: require authentication for
      CUPS-Get-Document in conf/cupsd.conf.in.
    - CVE-2023-32360

 -- Marc Deslauriers <email address hidden> Mon, 11 Sep 2023 12:29:43 -0400

Changed in cups (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Marc, thanks a lot for completing this one, as it has badly coincided with my trip to India. And sorry for having let anyone to wait so long ...

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

The bug was in cups.

Changed in okular (Ubuntu):
status: Confirmed → Invalid
Changed in atril (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Coeur Noir (coeur-noir) wrote :

THANK YOU !

…Ricoh Aficio now prints in colour by default, from Ubuntu 22.04, what a relief !

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.