logoalt Hacker News

ndiddyyesterday at 9:57 PM1 replyview on HN

The mixed DPI support on X11 is just that each monitor provides a DPI attribute that applications can query. It's up to the application or the toolkit it uses to actually look at this attribute and scale itself properly. In practice, this means that only Qt software will have DPI awareness on multi-monitor setups, and it requires having the "QT_AUTO_SCREEN_SCALE_FACTOR=1" environment variable set for applications that don't explicitly opt into it.

What most X11 users actually do is set the global DPI to that of the highest DPI monitor, and use xrandr to scale down the framebuffer of the lower DPI monitor, which "zooms it out". Note that this has performance and image quality implications. There's a guide on how to do this here: https://blog.summercat.com/configuring-mixed-dpi-monitors-wi...


Replies

somattoday at 12:42 AM

The irony is that despite the myth to the contrary wayland does not even try to handle mixed DPI at all and only fakes it via the fractional scale hack and X11 has supported mixed DPI from probably day one.

Admittedly X11 mixed DPI was using separate screens which were awkward to deal with and early versions of the unified screen tech (xinarama and xrandr) did not support mixed DPI. And even modern X11 while it provides the needed DPI information requires the application to care enough to support it. Which really means unless the toolkit provides it for free most applications are not going to do anything,

show 1 reply