Two monitors: the measurements in detail

Here are the measurements behind the section “Two monitors, two different problems” of the article A document at physical size on screen. Both monitors are 24-inch and stand side by side on my desk, but each one shows a different problem.

Lenovo P24QD-40: correct EDID, muddled pixels

Panel 2560 × 1440, 527 × 296 mm, at 125% scale in GNOME. Its EDID declares the size correctly: the card measurement agreed with it exactly. The problem here is how many pixels get drawn, and that depends on whether X11 or Wayland is running:

Lenovo, 125% scaleX11Wayland
What the browser draws4096 × 2304, then shrunk ×1.62560 × 1440, the panel’s pixels
devicePixelRatio21.25
Effective DPI197.4123.4
CSS ppi98.798.7
10 cm in CSS pixels389389
10 cm in device pixels777486

The same physical panel has two different effective DPIs, depending on the session, while the CSS ppi stays the same because devicePixelRatio changes in proportion. X11 has a single scale for the whole surface: to achieve 125%, GNOME draws everything ×2 and then shrinks each monitor with an xrandr transform. The consequence: the monitors are tied to each other. The LG next to it, which is at 100%, is also drawn ×2 solely because the Lenovo is there: 3840 × 2160 pixels are shrunk to 1920 × 1080, four times as many pixels, which are then discarded. On its own, the LG is rendered at ×1. On Wayland each monitor has its own scale and there is no such coupling.

On Wayland, Chrome and Firefox reported a screen of 2048 × 1152 with a devicePixelRatio of 1.25, that is 2560 drawn pixels. The card in Monitor DPI gave 124, within half a percent of the 123.4 computed by effective-dpi, the command-line tool of the main article. Two independent measurements lead to the same number.

This is exactly the Evince trap: whoever takes logical pixels for physical ones, or the reverse, gets the document at double or half size.

LG 24MP57VQ-P: the EDID lies

Panel 1920 × 1080. The sticker on the back says model 24MP57VQ-P, a 23.8-inch screen. Its EDID, however, declares 480 × 270 mm, that is a 21.7-inch screen. The operating system passes that value through unchanged, and anything computed from it comes out about 10% larger. For the page this means that a 10 cm document is drawn at 10.98 cm.

Nothing in the EDID gives it away. 21.7 inches is a perfectly ordinary size. 480 × 270 mm is what a 21.5-inch panel gives when rounded to whole centimetres, so the EDID probably belongs to the smallest member of the product range. And it is not an error in just one unit: in the linuxhw/EDID database, which collects EDIDs from real Linux computers, all 127 monitors with the same model code (GSM5AB8, “LG IPS FULLHD”), manufactured from 2014 to 2024, declare exactly the same size. The serial number itself is 0x01010101, a placeholder.

I measured the LG in every way I had. On X11 with both monitors, that is 3840 × 2160 drawn pixels:

Source of the sizeEffective DPIA 10 cm document comes out
EDID (what the operating system says)203.210.98 cm
The model’s spec sheet185.110.00 cm
Bank card (effective-dpi-calibrate)186.310.06 cm
The diagonal the user declares, “24 inches”183.69.92 cm
Ruler on a one-inch square in Pixel grid19510.54 cm

The card agreed with the specifications to within 0.6%, within the accuracy with which one lines up a card by eye. The last row was my first measurement and differs by about 5% from both values. On a one-inch square, though, 5% is 1.3 mm, a difference the eye can hardly make out on a ruler laid against the glass. I measured it again with a square as long as the card’s long side: at 186 DPI it is 628 pixels and it matched the card exactly, while at 195 it would have been 657 pixels, 4 mm larger. The longer the length you compare, the smaller the relative reading error.

The effective-dpi warning that the size “is in whole centimetres, so possibly rounded, ±1%” correctly identified the kind of error, but underestimated it tenfold.