Variable DPI according resolution AND screen size

Carsten Haitzler (The Rasterman) raster at
Mon Feb 17 10:04:37 UTC 2020

On Sat, 15 Feb 2020 00:10:22 +0100 Luis Felipe Sánchez-Escobar Retamar
<felipe.retamar at> said:

> Hello all,
> Today we have a lot of differents screens, in both aspects size and
> resolution.
> And a fixed DPI of 96 has no sense.

This is absolutely not true and has not been for a very long time (a fixed
DPI). Sure - for the old x multi-screen (not xrandr) setup and api each SCREEN
had its own DPI. You used to have multiple root windows and screen with each
their own DPI. If you still used X in this way you'd have different DPIs per
screen. Xrandr/xinerama merged all screen into a single screen/root window
negating that design in return for convenience, and xrandr then exposed the DPI
for different regions of the same root window to account for that.

> I think that could be a good thing to do an automatic adjustment of DPI
> with the algorithm like in
> Implemented directly in X
> And not depends on how each desktop environment manage DPI

X already exposes the DPI of each and every screen via xrandr. It has done its
job. X is about mechanism, not policy (primarily - debates in corners rage). The
policy is then is implemented by desktops/WMs and whatever other tooling a user

As an aside, I'll actually disagree with your link. It's not DPI or PPI. It's
PPD. Pixels Per Degree of visual field. A 20m high monitor/projection at the
other end of a large room has very very very low DPI, but this is irrelevant to
the person sitting at the back of the room far away, whereas a phone held up
very close to your eyes is different to a tablet, laptop, desktop etc. due to
distance between eyes and screen. What matters is how many pixels per degree.
So in then end this is all just a continuation of the "we're emulating paper
and a computer is a device to drive a printer as final output" model when we've
already moved beyond it in various ways. In the end the only thing that makes
sense is a "this is too big/small - make it smaller/bigger" slider and users
set it up because that also then accounts for people with 20/20 or better
vision or those who need a lot of visual helpers (glasses etc.) and have poor
eyesight. For large rooms with large audiences spread through them then you have
to make a call for "worst case" (people in the back) and go for that.

You also can use xrandr's scale/transform options to have X force scaling at
the output level (comes with upsides and downsides - definitely downsides in
performance, but upsides in simplicity for apps and consistent physical
surface sizing if used right).

So in the end you leave it to higher level software to figure it out because
that's the only way to solve this with consistence AND performance AND TV on
the other side of living room vs projector at other end of presentation hall vs
monitor vs. phone etc. use cases.

------------- Codito, ergo sum - "I code, therefore I am" --------------
Carsten Haitzler - raster at

More information about the xorg mailing list