Everything prints approximately 2% too small after upgrading to Ubuntu 22.04

Bug #1998917 reported by Alistair Buxton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
New
Undecided
Unassigned

Bug Description

To reproduce:

1. Open Inkscape.
2. Draw a rectangle 170mm x 230mm.
3. Print it.

Expected result:

The printed rectangle on paper should measure 170mm x 230mm.

Actual result:

The rectangle measures 168mm x 226mm, a difference of approximately 2%.

I print a lot of labels. I make them in both LibreOffice (for mail merge) and Inkscape (when I want them all the same).

I use standard downloaded templates in LibreOffice and in Inkscape I have made my own manually.

I recently upgraded to 22.04 and now whenever I print any of my existing documents they no longer line up with the labels. They line up in the top left of the page but at the bottom right they are misaligned, shifted up and left. This happens because the entire page is now printed 2% smaller.

Nothing else has changed about my setup: it is the same printer and the same documents printing differently. The printer is a network printer.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: cups 2.4.1op1-1ubuntu4.1
ProcVersionSignature: Ubuntu 5.15.0-48.54-generic 5.15.53
Uname: Linux 5.15.0-48-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: unknown
CupsErrorLog:
 W [06/Dec/2022:00:00:06 +0000] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'HP_LaserJet_100_colorMFP_M175nw_61F41D-Gray..\' already exists
 W [06/Dec/2022:00:00:06 +0000] CreateProfile failed: org.freedesktop.ColorManager.AlreadyExists:profile id \'HP_LaserJet_100_colorMFP_M175nw_61F41D-DeviceN..\' already exists
CurrentDesktop: XFCE
Date: Tue Dec 6 11:42:58 2022
InstallationDate: Installed on 2018-05-07 (1673 days ago)
InstallationMedia: Xubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
Lpstat: device for HP_LaserJet_100_colorMFP_M175nw_61F41D: implicitclass://HP_LaserJet_100_colorMFP_M175nw_61F41D/
MachineType: System manufacturer System Product Name
Papersize: a4
PpdFiles: Error: command ['fgrep', '-H', '*NickName', '/etc/cups/ppd/HP_LaserJet_100_colorMFP_M175nw_61F41D.ppd'] failed with exit code 2: grep: /etc/cups/ppd/HP_LaserJet_100_colorMFP_M175nw_61F41D.ppd: Permission denied
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.15.0-48-generic root=UUID=96ca3669-e2ac-4371-b36d-55bc9f3bd03a ro quiet splash vt.handoff=7
RebootRequiredPkgs: Error: path contained symlinks.
Snap.Changes: no changes found
SourcePackage: cups
UpgradeStatus: Upgraded to jammy on 2022-08-12 (115 days ago)
dmi.bios.date: 03/15/2018
dmi.bios.release: 5.12
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 3802
dmi.board.asset.tag: Default string
dmi.board.name: Z170-A
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.version: Default string
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr3802:bd03/15/2018:br5.12:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnZ170-A:rvrRev1.xx:cvnDefaultstring:ct3:cvrDefaultstring:skuSKU:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: System Product Name
dmi.product.sku: SKU
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

In order to work around this I first printed my labels to a PDF file in LibreOffice, then printed that file with 101.5% scaling.

I had to do it this way because LibreOffice does not use the standard printer dialog - the scaling option is not shown.

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

Does Inkscape's print dialog not have something like a "Print Scaling" option with choices like "Auto", "Auto Fill", "Fit", "Fill", and "None"? If there is such an option you have to set it to "None", this leaves the input document in its original size.

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

For printing PDFs via command line, it is "lp -o print-scaling=none ...".

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Inkscape and Atril both have the same print dialog. It looks like the attached screenshot. Notice "Scale" is set to 101.5%. This is the only way I can get either of them to print at the correct size.

LibreOffice has a different print dialog with no scaling options at all, hence why I had to print it to a PDF first, and then print the PDF using Atril.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

I tested printing a PDF with `lp -o print-scaling=none 170x230.pdf`. The PDF and source SVG are attached. The resulting rectangle is still 168mm x 226mm.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I am trying to find out what exactly is happening and therefore I need to know somewhat more.

Could you switch to debug logging via

    cupsctl --debug-logging

and then print a job where the problem occurs. After that attach the file /var/log/cups/error_log to this bug report.

Also attach your print queue's PPD file from /etc/cups/ppd/ to this bug report. It is the one named as your print queue.

Please do not compress the files and do not package them together. Attach them one by one.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

error log

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Launchpad throws an error whenever I try to attach the ppd.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

test

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Okay well it seems to be specific to the PPD file. I wonder why it won't accept it. I tried adding ".txt" to the filename too but it still wouldn't accept it. Must be due to the contents.

Anyway that's the PDF I used to test (same as previous one) and I used the lp command line invocation.

I'll see about getting you the PPD some other way.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

ppd

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

So attaching the PPD to my bug report about not being able to attach it seems to have fixed the problem, and now I was able to attach it here. :)

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

Could you stop CUPS via

sudo systenctl stop cups

then edit your PPD file /etc/cups/ppd/HP_LaserJet_100_colorMFP_M175nw_61F41D.ppd changing the line (line 21)

*cupsFilter2: "application/vnd.cups-pdf application/pdf 200 -"

to

*%cupsFilter2: "application/vnd.cups-pdf application/pdf 200 -"

The added % after the * in the beginning makes a comment line out of the line, making it inactive. This makes CUPS not trying to send PDF to your printer any more but the alternative URF Apple Raster) format (via line 22).

Save the modified PPD file and start CUPS again:

sudo systenctl start cups

Try to print. Is the output the correct size now?

It seems that if your printer receives PDF, it tries to scale the PDF pages down into the frame defined by the printer's unprintable margins, making them slightly smaller.

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

Sorry, what I have asked you for in the previous comment is not correct in this case, you do not need to do it. Instead, do the following:

Run the command

    lpadmin -p testipp -E -v ipp://NPI61F41D.local:631/ipp/printer -m driverless:ipp://NPI61F41D.local:631/ipp/printer -o PageSize=A4

Test this queue by the following 2 commands:

    lp -d testipp 170x230.pdf

    lp -d testipp -o print-scaling=none 170x230.pdf

Independent whether you get a correct or wrong printout, please attach the error_log and /etc/cups/ppd/testipp.ppd

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

ppd file

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

error log

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Note that both of the print commands failed to print anything at all, but the testipp printer does know that my printer is low on toner. Also I tried deleting the testipp printer and recreating it but still nothing.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Also I just tried printing the test document on another computer which still has Ubuntu 18.04 installed. The output rectangle was undersized by less than 1mm, which seems okay. I can attach the ppd file and error log from there if it would help.

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

Thanks. Please attach the PPD and error_log from that 18.04 computer.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Error log from 18.04.

The command I ran was:

lp -d HP_LaserJet_100_colorMFP_M175nw_61F41D_ -o print-scaling=none 170x230.pdf

I also previously tried it without the print-scaling option (not logged), and result was the same. Very close to the correct size both times.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

PPD file from 18.04. The MD5 does not match the other one so it is definitely different somehow. Note that the name is nearly identical but has an extra underscore at the end for some reason.

Also there are two print queues for this printer on the old machine. I didn't try the other one. It's PPD file is 10x the size of this one.

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

Looking at all what you told and posted here, your printer actually does not keep the input image size when getting jobs in PDF.

The most reliable format for printing on driverless printers is Apple Raster. But your printer seems to simply do not print anything when receiving Apple Raster and telling to the client that everything is correctly printed. This can be due to the low toner, but then the printer has to report back to the client when not being able to print.

Have you already tried to update the firmware of the printer (via appropriate functionality in the printer's web admin interface)?

Have you already tried to print in monochrome (black-and-white) mode? (At least if the culprit for the "toner low" is not the black toner, see printer's web interface).

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

The printer has firmware 20111021. The newest available firmware is 20140618 but can only be installed through Windows.

This printer always reports low toner and I ignore it because it will continue printing with no loss of quality for hundreds of pages, usually several times what I already printed. It has also been telling me to replace the imaging drum for about 4 years.

If you want me to try sending a mono Apple Raster you'll need to tell me how.

How does any of this explain why 18.04 still prints at the correct size?

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Since installing 23.04 I can no longer print at all. Attempting to print anything from any application makes the printer display "Error 49 - Turn off and turn on again" on the display, and then reboot itself. This was a clean install.

Older versions of Ubuntu continue to print at the correct size as they always have.

To post a comment you must log in.