Font scaling in dual monitor setup

Just installed Ubuntu 20.04 on a ThinkPad W451 where the screen resolution on the laptop is 2880x1620 and attached a second monitor with resolution 1920x1080. Sadly there seems Ubuntu either shows tiny fonts on the laptop monitor, or if the fonts on the laptop monitor are OK, the windows and fonts on the second monitor are huge.

In the Displays settings, there is a scale selection for either monitor, but the scale cannot be independently set: if I set it on one, it affects the other.

Is there a way to use dual monitors so that the font sizes would just adapt to the actual DPI for each monitor? I cannot believe that such a fundamental thing is still not solved in 2020: for each monitor, if we know the DPI, we should be able to draw things with the intended size. I tried this with the default window manager, xfce4 and Mate, and all of them get it wrong.


Solution 1:

Is there a way to use dual monitors so that the font sizes would just adapt to the actual DPI for each monitor?
Yes, with xrandr. I will sketch the solution, and leave the details for you to tinker and find out.

xrandr is an official configuration utility to the RandR (Resize and Rotate) X Window System extension (source).

You need a command line like

$ xrandr --output <output #1> --primary --mode 2880x1620  --pos 0x0 --scale 2x2  --rotate normal --output <output #2> --mode 1920x1080 --pos <other> --scale 1x1 --rotate normal

Whenever you found the right configuration, you can make it permanent by adding the modes and setting the defalts. I leave here relevant links.

  1. xrandr dual-monitor scaling issue
  2. https://blog.summercat.com/configuring-mixed-dpi-monitors-with-xrandr.html
  3. https://wilfredwee.github.io/entry/how-to-xrandr/
  4. https://www.reddit.com/r/gnome/comments/i1b2d1/x11_scaling_issues_with_multiple_monitors/
  5. How do you change the preferred resolution with xrandr?
  6. Best place to automatically add mode in xrandr