Remix.run Logo
ndiddy 6 hours ago

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...

somat 3 hours ago | parent [-]

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,

ndiddy 2 hours ago | parent [-]

> 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.

I'm not sure what you're talking about, fractional scaling is just another way to describe DPI. The scale factor is just the DPI divided by 96. If you're referring to windows getting scaled by the compositor for fractional scales, that's only used for older software. Both Qt 6 and GTK 4 support natively rendering window contents at fractional scales on Wayland.

somat an hour ago | parent [-]

In a fractional scaling setup you first create a homogeneous virtual screen at the dpi wanted then get the right size by scaling the monitors out to fit. A dpi aware application will draw itself at the correct size on the appropriate screen. The main difference is the dpi aware application still looks good on all monitors. where as the fractional scaled stuff suffers scaling artifacts.

Wayland only supports fractional scaling. and there is a good argument that this is a better system, not because it looks better, it does not. but because applications don't have to be aware of it where a mixed dpi requires the application to actively deal with it.