I have ubuntu 20.04 (with Gnome) installed on a laptop. The laptop is connected to an external monitor. I'd like to be able to have things be the same physical size (in inches, not pixels) on both displays. That way a window can span both displays without having one half of it shrunk.

The displays each have a different DPI (edit: In this case they are both set to 1920x1080 but the external monitor is bigger. There is not a resolution they can be set to to make the have the same DPI). I've tried applying a scale factor (and even a fractional scale factor) through the GUI. I went through every display option in settings and tweaks. I don't see a way to set them separately for each display or set them to match.

I actually got out a ruler, computed the DPI for each display, and figured out a scale factor for one display to make things the same size. Reading through other questions, it looks like you can use xrandr to then set a different scale factor per display.

That seems like a pretty round about way to accomplish it. Especially because I ended up needing a ruler to measure the displays and compute DPI. :)

Is there a simple way to get the same size in inches, not in pixels?

  • Try to set the resolution of the second display to match the one on your primary. Not sure if it's what you want but it might be worth a shot. – Stefan Campan Jul 30 '20 at 19:19
  • @Stefan Campan. Edited the question to say that the resolution is the same and there is not a resolution that will make the dpi the same. – David Richardson Jul 30 '20 at 20:16

For the scaling also you can set up by navigating to Fonts > Scaling Factor in Gnome Tweaks. I had the similar issue with scaling in my system, and it suits me better than other options.
Gnome Tweaks Screenshot

But you looking for the way to apply different scale factor per display. Maybe this method will help you.
You can achieve any non-integer scale factor by using a combination of GNOME's scaling-factor and xrandr. This combination keeps the TTF fonts properly scaled so that they do not become blurry if using xrandr alone. You specify zoom-in factor with gsettings and zoom-out factor with xrandr.
First scale GNOME up to the minimum size which is too big. Usually "2" is already too big, otherwise try "3" etc. Then start scaling down by setting zoom-out factor with xrandr. First get the relevant output name, the examples below use eDP1. Start e.g. with zoom-out 1.25 times. If the UI is still too big, increase the scale factor; if it is too small decrease the scale factor.

xrandr --output eDP1 --scale 1.25x1.25

You can find more info in the link below. I once used this on my system. But it did not suit me, because still some applications did not work properly.

Source: https://wiki.archlinux.org/index.php/HiDPI#GNOME

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.