Mixing HiDPI screen with FullHD monitor with 20.04 Mate 1.24.0

My 3000x2000 laptop screen renders very well OOB with Ubuntu 20.04 and Mate 1.24.0.
However, when an external FullHD monitor is connected, things are going crazy, there are many discrepancy in the way applications adapt their size.

I can't really get what's going on, as I'm connecting or disconnecting the external monitor, I get various results: sometimes the HiDPI screen gets very small as if HiDPI wasn't supported, sometimes it does react well but the windows on top of it don't. KDE-based apps such as Kolourpaint seem to react a different way. Window titles don't have the same zoom factor as the window content... I just don't know where to start to describe the issue.

Here's an example of the discrepancies (I cropped the screenshot to focus on the opened windows):
HiDPI screen on the left vs Full HD screen (main screen, with the task bar) on the right:

Mate-screenshot/Blueman-monitor have a great zoom with FHD but are way too small for HiDPI
Caja/Kolourpaint have a great zoom with HiDPI but are way too big for FHD

I feel like the zoom factor isn't handled at the right level but some zoom parameter should be present in mate-display-properties itself at the screen level instead of at the window level. I would like to decrease the resolution of the HiDPI screen but 3000x2000 is the only available option.

Do you have ideas to make progress about this? How can I fix this at short term?

PS: I know this HiDPI subject is being discussed a lot on forums, however these topics are getting old and this hot topic has probably made progress since, so I'm writing a new topic to get up-to-date information.

1 Like

Here's what I did in the end: I decreased the resolution of the laptop screen to 1920x1280 by keeping the aspect ratio of the original screen (3:2).

I added this to ~/.xprofile:

#!/bin/sh
xrandr --newmode "1920x1280_60.00"  206.25  1920 2056 2256 2592  1280 1283 1293 1327 -hsync +vsync
xrandr --addmode eDP-1-1 "1920x1280_60.00"

This config behaves well when the external FullHD monitor is plugged or unplugged. However this doesn't apply to the login screen which looks awkward nor to other users if there are any.

The new modeline was generated with cvt 1920 1280 60.

1 Like

For QT applications such as git-cola, kolourpaint, kfilereplace, qtcreator, ... I added this environment variable:

echo "export QT_SCALE_FACTOR=1" >> /etc/profile