Per-monitor scaling

Hi guys. I'm looking for a way to set different scaling for my monitors.

I have a laptop screen at 3072x1920 with an external one at 1920x1080. By default, the FHD looks great but things on the laptop screen looks really small. I then changes the scaling in display to 2x and things on the FHD screen began to become too big.

Is there a way I can keep the scale on the FHD screen to 1x but the laptop to 2x?

Been searching for a whole day but no clear answer.

Thanks!

1 Like

Welcome @Trung_Nguyen_Tr to the community!

Don't use scaling.
Just set your laptop also to FHD.
Use this:

FHD on a UHD display has the advantage of superior subpixel rendering over FHD on a FHD display

3 Likes

With both monitors connected, you should see a rectangle for each display in the Monitor Preferences window shown above. Here is a link to the Ubuntu Monitor Guide with details about how to set each monitor's settings independently. You should not need to use scaling, but you can set different scaling for each if you want/need to use it. Ubuntu MATE Guide: Display Settings

3 Likes

In this case the scaling will be done by the monitor, right? But every monitor has only exactly one physical resolution, which means the entire screen will be more or less blurry, right? Even applications that would be capable of native scaling.
Isn't this horrible advice?

It's been years since I last checked, and almost decades since many people started working remotely using mobile equipment with non-stationary or changeable internal and external displays. And Linux has still no consistent per-monitor fractional scaling???

Every time I ask, I get a gazillion excuses "oh, it's the toolkit" "oh, it's Xorg" "oh, Wayland doesn't support this" "oh, it's so difficult", "oh, there are so many toolkits and apps".

Come on, give me a break.

It's time to define 2-3 environment variables for each display - mostly size, dpi. And have applications that come with the distribution define all icons as vector graphics and do native dpi aware scaling regardless what display I connect to my laptop, period. It's not rocket science. (We landed on the moon in 1969!) Dump all applications that refuse to do native dpi-aware scaling, or leave them to their own demise - if there is any interest in an application from users and users can no longer read tiny icons or fonts, then the devs can and will implement native dpi aware scaling.

This is the primary reason that I hear that prevents people (including myself) switching to Linux.
I can't believe that this has not the highest priority ***** over any and all other new features or bug fixes *****. Frankly I don't need anything else. I used Linux with office apps as well as software dev suites already 10 years ago on hardware that was 10x slower than today's, and everything I needed worked perfectly; I work on the computer almost 24/7, and I don't need any other feature, except I don't want to look all day every day at a blurry screen or jump through hoops making things readable with silly solutions that consume a gigantic amount of CPU time and heat up my machine or what not. I'm sure many others think the same. Come on, it's 2023, not 1995.

If I were in charge, I would put all other development on hold, until scaling on remote work equipment (a.k.a. laptops + internal and external displays with different resolutions) works. This seems like a very basic need of computing.

Thanks! I was trying MATE on Fedora, probably should try again on Ubuntu to get that MATE Tweak

1 Like

Yep, this is definitely true. Since monitors these days are so cheap, some people tends to slap a couple of those with to a laptop.

Linux is perfect for laptops, it's fast, and you can do a lot with it, but it quickly becomes a problem if you have to do those things with blurry screens.

KDE and GNOME these days does fractional scaling pretty okay.

1 Like

Yes

  1. No different than with fractional scaling and not half as much as you are trying to imply here.
    Both methods are at most 1 pixel off and the anti aliasing of monitors is superb.

We are talking about a resolution so high that you can not see the pixels (otherwise you would easily be able to read the text, right?). We are also talking about a setup with a FHD monitor next to it.

  1. every pixel consists of 3 subpixels (RGB) which are not overlapping (physically impossible) but placed next to eachother which induces an effect visually not unlike chromatic aberration.
    (This is at the level of blur you spoke of although you, for whatever reason, never mentioned this effect. )
    Running FHD content on a UHD screen looks therefore better than FHD on a FHD screen because the smaller pixels induce less chromatic aberration.

The scaling and anti-aliasing is done in hardware. Better, faster and more precise than when done in the compositor.

I do have a 13" laptop with FHD screen. I often switch it to 1366 x 768 for better readability. I do not encounter any blurryness.

No, it isn't. It is a perfectly good, technically sound and legal solution for the problem at hand.
You are trying to insinuate that the solution is not good and imply that you know of a better one, but silently drop the ball. Isn't that even more horrible ?

That is a nice idea, when will you start working/coding on these things ?
Are you going to partly or completely replace GTK ?
Do you think you could get it all done and working before the 2026 LTS release ? :slight_smile:

If it is the highest priority for you, I can't believe that you haven't start coding yet (or hired programmers) or at least started a project with that goal. :thinking:

A lot of people are not compulsively obsessive about pixels, they have other things to worry about.

So I expect you to start coding to scratch your own itch. Just like anyone else.
You will always find people who are willing to help you out if you got stuck. :slight_smile:

If you keep on doing nothing, except complaining, while demanding that other people design, create and implement your wishes. You will not see anything in that direction come to fruitition unless you draw your wallet. :person_shrugging:

Use resolution instead of scaling, this:

  1. works incredibly simple (no hoops to jump through)
  2. prevents consuming a gigantic amount of CPU time, contrary to software scaling.
  3. prevents heating up you machine
  4. minimizes blurryness.
    All because this, including anti-aliasing, is done in your monitor in hardware.

If that is not what you want, Linux is not for you at this moment:
You might be better of buying a Mac which, compared to most platforms, has superior scaling.

10 Years = You must be very experienced.
Dev suites = You are a programmer

You can be in charge if you want:
Linux is you and me and other people who like to code outside of their dayjobs, it just grew bigger than anyone ever expected.

Look at Ubuntu-MATE for instance.... It started as a hobby of Martin Wimpress to keep his family happy. And see how it is now.

So if you want "proper scaling" and you want to be in charge:
Start a project, find people who would like to code on that and you are in business, and in charge.

The problem is, as you discovered, the desktop-software itself that is based on bitmaps.
So if you want to really solve the problem: start with creating a new GUI toolkit that is 100% vectorized and convince every developer in the world to use yours.
Or, as a stopgap, fork GTK/MATE and replace all bitmaps for bitmaps with twice the resolution.

Oh, btw, Since (Hi-DPI) scaling is currently still based on the same low res "blurry" bitmaps, it has some but not much gain over just setting a lower resolution while at the same time it does consume more resources.

3 Likes

First off, thanks for sharing your experience.
How I spend my time, however, is irrelevant to the discussion. I appreciate the work of the Mate team, and I personally occasionally give back to society in other ways, if you are concerned about that.
I still stand by my statement. Making Linux work on laptops with external monitors seamlessly without blurriness, bandaids, or workarounds, should IMHO have higher priority than anything else. Your approach may work reasonably fine with a very high res monitor with high pixel density like 4k on a laptop; but it's still a bandaid, and very suboptimal use of resources - waste of money and electricity for the 4k monitor, not to mention you don't have the 4k resolution for apps where it might make sense. Your approach is probably not satisfactory for 1080p on a 1440p display. For my older eyes 1366*768 on a 14" laptop display is the perfect size, but laptops with this resolution are no longer available.
Look. I think computer UI development has reached a terminal state, sort of. There is little room for innovation. Once you have windows with menu bars, virtual desktops, and a very customizable layout like Mate has that can emulate and switch between MacOS, Windows look, etc. with a few mouse clicks, and all the other good stuff, what more can you wish for. We had all that already 10+ years ago. Look. I think the lack of room for innovation is why people like the folks of the Gnome team got so bored that they started going backward: removing stuff, removing customizability, removing menus, and then they call that "innovation", we all know that right? I think that's one of the reasons why the Mate project exists - to preserve the good stuff that just works and that looks good.
So, I still think making external and interchangeable monitors work seamlessly should be the #1 priority of any Linux UI project, instead of some feature here and some gimmick there. Just my opinion. The scaled UI is what every user looks at every moment they use their computer. Actually, not just my opinion. The internet is full of comments from people just waiting to switch to Linux, but disappointed for lack of a UI that works with their work-from-home equipment.
I'm also a little concerned that Mate will be left behind, as Gnome and Cinnamon seem to offer fractional per-monitor scaling (even though far from perfect) and there seems to be work in progress to adapt the toolkits and Wayland, but not the toolkits and frameworks that Mate uses.

1 Like

"Oh, btw, Since (Hi-DPI) scaling is currently still based on the same low res "blurry" bitmaps, it has some but not much gain over just setting a lower resolution while at the same time it does consume more resources." - Can you please explain how would software scaling be better in this scenario?

Also, I hear fonts use subpixel rendering methods - wouldn't those get lost when scaling up, even integer like 2x up? I read somewhere that even 2x integer scaling to a native resolution twice the logical resolution looks actually NOT as good as a native display at the lower resolution. I guess it depends - probably very high res like 4k make subpixel rendering rather irrelevant.

1 Like

B.t.w. what percentage of "standard" / "native" Mate applications are currently dpi aware and would be rendered correctly if I were to install Mate on my laptop with multiple monitors at different resolutions (not simultaneously)? Things like LibreOffice, Firefox, Chrome, command line terminal, file manager? What about the desktop and the UI itself (icons, menu bars) - would those scale depending on dpi?

1 Like

And it is indeed a bit of a mixed bag. All parts of MATE are , through different hacks, HiDPI capable. Other applications like LibreOffice, not so much.

Fonts:

  • No problem, they are already, as vector glyphs, scalable.

Icons:

  • most are bitmaps and per icon in several sizes, probably generated from svg
  • another part of the icon collection is true svg
    ( look in /usr/share/mate/icons/Yaru, the directorynames ending in @2x are the HiDPI versions, there you see that a 24x24@2x is actually 48x48 px )
ls /usr/share/icons/Yaru
16x16     24x24       32x32     8x8           icon-theme.cache
16x16@2x  24x24@2x    32x32@2x  8x8@2x        index.theme
22x22     256x256     48x48     cursors       scalable
22x22@2x  256x256@2x  48x48@2x  cursor.theme  scalable-max-32

Window decorations:

  • are all bitmaps, they are either native double the size or single size using pixeldoubling.

Widgets:

  • AFAIK also bitmaps.

If you want the details, @Frieder_Saugschmerle knows a lot more about that.

Now, the case of LibreOffice which does not do HiDPI:
LibreOffice's bitmap based textures and icons must be upscaled
But Libreoffice also uses MATE-icons and those are icons natively double size.
Together on the same toolbar on a low res screen it looks a bit...weird.

The Mate-terminal is, because of vectorfonts absolutely fine.
It has hardly any graphics and only uses standard MATE icons (also HiDPI).

The problem for visual fidelity is upscaling: low res stays low res, even upscaled. Downscaling hi res bitmaps however, is not a problem at all.

So in the case of applications who only use their own icons and bitmaps, you have more or less the same result as changing the resolution of the screen, where the latter is much more consistent in image quality.

In the case of a valid HiDP setting?

  • no, The fonts are scaled accordingly (because they are vector based)

Inthe case of switching to a non native resolution?

  • Yes, it is theoretically advisable then to disable subpixel-rendering

Yes indeed, I switched in on and off and even on a 1920x1080 24" and I can hardly see it (and have to look up close) , so I doubt if it is even visible on 4k.

2 Likes

Reading a bit more on the subject, it seems like HiDPI scaling can be implemented on different levels: The Xorg/Wayland display server level, or the toolkit (GTK) and/or window manager or desktop (Gnome, Cinnamon, Mate) level. So it's an OR (display server OR toolkit/desktop), not a dependency. There seem to be environment variables that can be set for GTK or Gnome applications.
I gather that the Mate window manager / compositor (Marco) poses a problem here.
Correct me if I'm wrong, but my understanding is that Gnome and Cinnamon (Linux Mint) now have per-monitor fractional scaling. My understanding is that this is implemented in a seamless way with no computational overhead by the "native" applications that are compiled specifically for the toolkit or the desktop and "dpi-aware" - the way it should be; but applications that are compiled against other toolkits (e.g. QT, Java) have to be scaled "after-the-fact" on a bitmap basis which causes both computational overhead and visual blurriness to some degree; or separate QT environment variables be set for the QT apps.
My understanding is that once Wayland supports fractional and/or per-monitor scaling, the benefit would be that the dpi parameters and scaling settings could be read by both GTK and QT apps. (Not sure about Java apps.)
If true, then I think Mate should dump Marco. Fractional per-monitor scaling for the common apps (terminal, text editors, ...) would be a big step forward.
I think Java applications would eventually be forced to implement their own way of scaling, perhaps by reading monitor settings from the OS, or people couldn't use them any longer as HiDPI monitors become more prevalent.

The most common resolution of current laptops on the market is 1920x1200. This results in text and icons too small on 14" laptops for many mid-age and older users.
Fractional scaling by the monitor leads to blurriness at this resolution, from what I read on the internet. It may work on 2.5k or 4k monitors and up. 4k laptops are measurably more expensive, and have less battery life.
Setting the low res on the 4k monitor relieves the GPU from work and thus from getting hot, but is a bandaid and defeats the purpose of buying a 4k laptop.
My external monitor is 28", 1920x1080. I would be fine with pressing a button or a command line when switching monitors, but I can't go into a gazillion of settings, change font sizes, etc., every time I switch to or from the external monitor.
In summary, I'm having a hard time finding hardware compatible with the Mate desktop as long as fractional per-monitor scaling is not there. I would say most currently available hardware on the market is not suitable for the Mate desktop.
Gnome and Mint Cinnamon seem to be there. Can Marco be dumped and the same done for Mate?
I understand that the Wayland conversion is also not a high priority for Mate, and progress there is not as far as Gnome and Cinnamon is. So if both the Mate window manager (compositor?) prevent scaling, and Wayland is not a priority, then I see no path for Mate to become compatible with laptops on the market any time soon. Mate will be left behind vs the other distributions, and be unusable for many users.

Yes, that is largely correct.

So until we have a wayland compositor , the least complicated solution is switching the to a lower resolution. If the scaling is about 1.5 it wouldnt differ much from software scaling and without the overhead and the hassle.

A compositor is in developement. It mostly works. You can download it as a snap and test it.

Here some very early (2019) user experience and conversation:

1 Like

About HiDPI, written by one of the founders of the graphically critically acclaimed 'elementary OS'

3 Likes

Really? do they?
For you information, MATE is Gnome.
And how please would they pass the info to the applications?
This could only be done if you kill the ability to spread an application over several monitors.
Think further...

1 Like

You first must explain which sorcery you would involve to pass the info to the apps and get them to handle the process gracefully.
And you won't be able to spread an app between monitors any more.
Think further before ranting...

1 Like

You might try the autorandr application (available in the Ubuntu repositories) so that you can save a profile for each of your monitor setups and have it automatically change which monitor is powered on, what resolution is set for each, and where the monitors are positioned as you plug and unplug your external monitor.

2 Likes

Thanks, but this is not a viable solution as has been pointed out earlier in this thread and all over the internet. This would be scaling on a per pixel raster basis (even for native applications), which will inevitably lead to blurry screens. It may work for very high pixel densities, like 4k on a laptop (and would be an utterly inefficient use of money and resources, along with a waste of energy, along with not having the native screen resolution for photos etc.); but it doesn't work for 1366x768 on a 1920p laptop monitor for example - it's too blurry. I tried.

I think Mate needs to implement fractional per monitor scaling at least for native applications, to stay relevant. I think Ubuntu Gnome and Mint Cinnamon, KDE etc. did just that. I don't even care for dragging windows across multiple monitors and fancy stuff; I just need to be able to use my laptop monitor and my desk monitor interchangeably. Mid-aged or older people with modern hardware who can no longer read tiny fonts can't use Mate any more unless they like working with a blurry screen. It's a show stopper.

You can try...after setting to HiDPI

xrandr --output DP-2 --mode 3840x2160 --scale 0.75x0.75

or the likes of

xrandr --output DP-2 --mode 3840x2160 --scale 1.25x1.25

Depending on where you're trying to get to. Increasing pixels size on the panels. For 4K I find 50px the sweet spot.

To reset:

xrandr --output DP-0 --mode 3840x2160 --scale 1.00x1.00

Just replace DP-0 with DVI-D-0 and your applicable target resolution.

If you have the proprietary NVIDIA drivers I am sure you can make adjustments there, I could be wrong.

Also look into Appearance>Fonts and adjust lower or higher to get where you need.

If it is the highest priority for you, I can't believe that you haven't start coding yet (or hired programmers) or at least started a project with that goal. :thinking:

And this ^^

Having a 4k and a 1440p monitor, after some time and attention its fine. This is what worked for me, seems like you at not having luck but there are many ideas generated above. If you have patience it'll be fine.

1 Like