The attached patch fixes the bug. If the GTK print dialog finds a choice for a print option (Page Size, Media Type, Resolution, Print Quality, ...) which is not under the currently available choices (according to the PPD file in /etc/cups/ppd/) it checks whether the option supports custom values and if so, it considers the value a custom value and prefixes it with "Custom." regardless of whether this is a valid custom value. This usually works, if the user types in a custom value in the print dialog, as the dialog provides the correct interface for a custom value for this option.
Now there is a case where this easily breaks: The dialog saves the last settings (printer selection and option settings) which the user has used for printing so that the next time the app is opened and the document printed, the saved settings are used by default. Now let us choose a certain not that common paper size and print. Then we close the app and do a system update. The update contains a new version of our printer driver and one of the changes is that some paper sizes in the PPD get renamed. So the paper size name we have used for our last print job is not contained in the new PPD any more. Now we open the app again and print the document right away, without going through the options tabs of the print dialog and also not changing to another printer. The print dialog recovers the saved options including the (old) page size name. As the name does not match any page size name of the new PPD, the dialog prefixes it with "Custom." and sends off the job. The CUPS filters are not able to identify the paper size name and the job errors. Reproducer: - Create a print queue with a PPD. - evince an arbitrary PDF file - Click the print icon - In the print dialog choose the newly created queue and choose some uncommon paper size (not custom). Click "Print". - Check /var/log/cups/error_log, the page size gets correctly received. - Close evince. - Stop CUPS, edit the PPD file removing the paper size you have selected for your job in the PageSize, PageRegion, PaperDimension, and ImageableArea lines. - Start CUPS. - Open the same PDF file again with evince, click Print and then select "Print" in the print dialog without changing anything. - The job fails, in /var/log/cups/error_log you see that the page size is prefixed with "Custom.". With the attached patch the print dialog checks the syntax of the unknown option value and only if the syntax is correct for the particular option, "Custom." is added. In the case of a page size name this does not happen as a custom page size has to be specified as "Custom.XXXxYYY[unit]", like "Custom.21x29.7cm". ** Patch added: "check-cups-custom-options.patch" https://bugs.launchpad.net/ubuntu/+source/cups-filters/+bug/1763520/+attachment/5184169/+files/check-cups-custom-options.patch -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to gtk+3.0 in Ubuntu. https://bugs.launchpad.net/bugs/1763520 Title: after upgrade to bionic, printing fails without explanation / logs / debuggability Status in cups-filters package in Ubuntu: Invalid Status in gtk+3.0 package in Ubuntu: Triaged Bug description: I am unable to print to my network-attached printer after upgrade to bionic. ps shows: lp 26047 0.0 0.0 91668 5756 ? S 15:06 0:00 \_ HP-ENVY-4500-new 473 vorlon USCIS Form I-9 1 print-content-optimize=auto print-rendering-intent=auto cupsPrintQuality=4 number-up=1 MediaType=Stationery noCollate print-scaling=auto PageSize=Custom.Letter.SM ColorModel=RGB Duplex=DuplexNoTumble job-uuid=urn:uuid:08c937ec-ccb6-3ff1-6ed4-212128e4257b job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1523570792 time-at-processing=1523570792 print-quality=4 lp 26050 0.1 0.0 0 0 ? Z 15:06 0:00 | \_ [gs] <defunct> lp 26048 0.0 0.0 79908 3836 ? S 15:06 0:00 \_ HP-ENVY-4500-new 473 vorlon USCIS Form I-9 1 print-content-optimize=auto print-rendering-intent=auto cupsPrintQuality=4 number-up=1 MediaType=Stationery noCollate print-scaling=auto PageSize=Custom.Letter.SM ColorModel=RGB Duplex=DuplexNoTumble job-uuid=urn:uuid:08c937ec-ccb6-3ff1-6ed4-212128e4257b job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1523570792 time-at-processing=1523570792 print-quality=4 root 26049 0.0 0.0 84388 6192 ? S 15:06 0:00 \_ ipp://HP645106EA160E.local:631/ipp/print 473 vorlon USCIS Form I-9 1 print-content-optimize=auto print-rendering-intent=auto cupsPrintQuality=4 number-up=1 MediaType=Stationery noCollate print-scaling=auto PageSize=Custom.Letter.SM ColorModel=RGB Duplex=DuplexNoTumble job-uuid=urn:uuid:08c937ec-ccb6-3ff1-6ed4-212128e4257b job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1523570792 time-at-processing=1523570792 print-quality=4 Note the un-reaped gs process. ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: cups 2.2.7-1ubuntu2 ProcVersionSignature: Ubuntu 4.15.0-13.14-generic 4.15.10 Uname: Linux 4.15.0-13-generic x86_64 NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair ApportVersion: 2.20.9-0ubuntu4 Architecture: amd64 CurrentDesktop: ubuntu:GNOME Date: Thu Apr 12 15:07:49 2018 InstallationDate: Installed on 2010-09-24 (2757 days ago) InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1) MachineType: LENOVO 2306CTO Papersize: letter ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.15.0-13-generic.efi.signed root=/dev/mapper/hostname-root ro quiet splash vt.handoff=1 SourcePackage: cups UpgradeStatus: Upgraded to bionic on 2018-03-21 (21 days ago) dmi.bios.date: 10/25/2013 dmi.bios.vendor: LENOVO dmi.bios.version: G2ET97WW (2.57 ) dmi.board.asset.tag: Not Available dmi.board.name: 2306CTO dmi.board.vendor: LENOVO dmi.board.version: Not Defined dmi.chassis.asset.tag: No Asset Information dmi.chassis.type: 10 dmi.chassis.vendor: LENOVO dmi.chassis.version: Not Available dmi.modalias: dmi:bvnLENOVO:bvrG2ET97WW(2.57):bd10/25/2013:svnLENOVO:pn2306CTO:pvrThinkPadX230:rvnLENOVO:rn2306CTO:rvrNotDefined:cvnLENOVO:ct10:cvrNotAvailable: dmi.product.family: ThinkPad X230 dmi.product.name: 2306CTO dmi.product.version: ThinkPad X230 dmi.sys.vendor: LENOVO modified.conffile..etc.cups.cupsd.conf: [inaccessible: [Errno 13] Permission denied: '/etc/cups/cupsd.conf'] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cups-filters/+bug/1763520/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp