I run two monitors in a fixed configuration with quite different DPIs. I have a main 4K monitor and a second 1920x1200. The second monitor is used mainly for konsoles.
I’ve done some very hacky (unsupported) things to get them to look similar. From my notes:
- I use xrandr to scale the normal monitor to match the window sizes on the 4K
- For 156 or 144 DPI on the 4K 27 inch monitor on left, 24 inch 1920x1200 monitor on right:
- Create /etc/X11/xinit/xinitrc.d/50-xrandr.sh
xrandr --output DP-4 --auto --output DP-0 --auto --scale 1.75x1.75 --right-of DP-4 - Disable Kscreen 2 in the KDE settings → Startup and Shutdown → Background Services to stop kscreen from messing with what was set by X11 startup. (Also stops Display-Port monitor hotplug rearrangement of windows - which I also don’t want).
- Also disable GNOME/GTK Settings Synchronisation Service which seems to adjust font sizes.
The above is somewhat based on whats described at https://wiki.archlinux.org/title/HiDPI
Under KDE6 Wayland it’s difficult to force the desktop to obey the native DPI of the displays, so I’ve done another hack.
The environment variable QT_USE_PHYSICAL_DPI
may be used to force the use of the physical DPI:
echo 'export QT_USE_PHYSICAL_DPI=1' >> /home/testuser/.config/plasma-workspace/env/hidpi.sh
Full details relating to the DPI hack can be found in these two old threads:
And also this bug-report 486599 – Request for a use-native-DPI setting
If you read through the references, you will see that my approach is swimming against the tide, but until I get monitors all of the same DPI, and until all applications are altered to behave properly in X11 and Wayland, they keeps me sane (at least arguably so).