10

If I use a second monitor on Ubuntu 20.04 and if it has the highes resolution (4K), the 1st screen keeps glitching. I found out after many tries that putting it to 175% of fractional scaling then 200% again will fix this issue, however it returns after the screen sleeps

enter image description here

So, I'd like a way to change to 175% and then 200% from command line so I can automate this into a script

Poperton
  • 1,283

2 Answers2

5

You could probably handle this with xrandr, which is a more powerful tool than the Screen Resolution GUI. See, e.g., Monitor scaling does not work properly.

In your case, that would be

xrandr --output <out1> --scale 1.0x1.0 --output <out2> --scale 1.75x1.75
xrandr --output <out1> --scale 1.0x1.0 --output <out2> --scale 2.0x2.0

Note that you may need to tinker with other flags, e.g. --primary, --mode --pos, --fb.

1

I found cool script generator for this: HIDPI-Fixer:

This application allows you to create a script that acomplishes the following tasks:

- Allow fractional scaling of your display and its components in X11
- The end result looks nicer and is way less buggy than using Wayland
- The generated script is configured to run everytime you log in
- You can also instruct the application to modify the ~/.profile file to correctly scale Qt-based apps (as KDE does)
- Tested on GNOME, Deepin Desktop and KDE (you need to manualy set the scaling factor to 200% in Deepin and KDE)

It worked for me.

zx485
  • 2,865
3draven
  • 11