Hello, I tried 18.04 on a laptop 15.6" with 1080p resolution. If the HiDPI option is set on automatic or regular the elements displayed are too small on this screen. In other hand, the HiDPI option set on regular or “HiDPI” make elements really too big! How to set HiDPI on half of the HiDPI option? I’m not sure if you can understand my ask.
Hi @Philippe
What is your current screen resolution?
Gtk doesn’t support fractional scaling. The regular hack is to manually change the font DPI until you like it.
So, set either HiDPI or regular, whichever has the window control size that you prefer more. Then open the font settings and click on Details… There adjust the font DPI until you like it.
resolution: 1920x1080
Even change font DPI, the elements are too big with HiDPI. So, no way to set a kind of half regular?
No. “Half regular” would be 0.5 scale, which GTK does not support. However, none of that should be necessary: 1920x1080 is not a HiDPI resolution. You should be able to set scaling to regular and your font DPI to either 0 (auto-detect) or 96 (default).
If you open the display properties, what is the highest resolution that you see there?
Also, could you run ubuntu-report show
and paste the result here?
I give up. The regular show elements too small and the HiDPI show elements too big. Even if I change the font DPI.
I have a similar setup, and yes, although the MATE HiDPI support works brilliantly if all of your displays are HiDPI, it is less useful if you have some HiDPI displays and some regular. After a ton of time spent messing around with manual xrandr configuration, trying to get different displays to scale differently, what I ended up doing is just setting my HiDPI display to 2560x1440 and went on with life; it looks fine. Eventually this stuff will get worked out, but it’s just not worth messing with at the moment.
@mcdonc - tell me what monitor setup you have. I use a HiDPI laptop with a regular monitor and I have some scripts that will scale and reposition the regular monitor so that you can still have HiDPI where it matters
I hope! But the reality is that GTK doesn't support fractional scaling. Per-monitor scaling is technically supported but seems pretty unfeasible to achieve at the moment.
Our best bet is to wait until we have GTK4 running on Wayland, but it'll be a few years before any of that happens on MATE. It's currently too tied to X11, and we just finished migrating to GTK3. Not to mention that neither Wayland nor GTK4 are really ready yet...
@mcdonc - tell me what monitor setup you have. I use a HiDPI laptop with a regular monitor and I have some scripts that will scale and reposition the regular monitor so that you can still have HiDPI where it matters
Thank you! You tried to help me before with xrandr config at HiDPI and Multiple Monitors - #3 by mcdonc but I just lost patience trying to mutate your config (and others') to my specific setup (left-to-right, laptop monitor is 1080p, one external monitor is 2560x1440 natively, other external monitor is 4K). TBH, the only reason I was trying to get it to work was because I figured that downsetting to 2560x1440 would cause the rendering look blurry on my 4K monitor, but in reality, it looks as good as my non-4K monitor anyway, so I retreated.
Our best bet is to wait until we have GTK4 running on Wayland, but it'll be a few years before any of that happens on MATE. It's currently too tied to X11, and we just finished migrating to GTK3. Not to mention that neither Wayland nor GTK4 are really ready yet...
I'm not worried about it, and maybe I can even help with that effort if I learn enough before it starts in earnest.
Thanks!
@mcdonc - ah, okay - yeah I’m not sure how to do a 3 monitor setup. I just modified the script to do sideways monitors (but only 2). If you’re still interested in playing with it, here it is:
#!/bin/sh
# extend non-HiDPI external display on DP* above HiDPI internal display eDP*
# see also https://wiki.archlinux.org/index.php/HiDPI
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949
# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319
# Determine the name of the different connected monitors
EXT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^eDP | head -n 1`
INT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^DP | head -n 1`
# Set second monitor to scaled 2x2 to the left of the internal monitor. This allows us
# to calculate its dimensions below so that we can reposition it correctly
xrandr --output "${INT}" --auto --output "${EXT}" --auto --scale 2x2 --left-of "${INT}"
# Calculate internal monitor dimensions
int_w=`xrandr | sed 's/^'"${INT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
int_h=`xrandr | sed 's/^'"${INT}"' [^0-9]* [0-9]\+x\([0-9]\+\).*$/\1/p;d'`
# Calculate external monitor dimensions
ext_w=`xrandr | sed 's/^'"${EXT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
ext_h=`xrandr | sed 's/^'"${EXT}"' [^0-9]* [0-9]\+x\([0-9]\+\).*$/\1/p;d'`
# Calculate offset height and width between monitors
off_w=`echo $(( ($int_w-$ext_w)/2 )) | sed 's/^-//'`
off_h=`echo $(( ($int_h-$ext_h)/2 )) | sed 's/^-//'`
xrandr --output "${INT}" --auto --pos ${ext_w}x${off_h} --scale 1x1 --output "${EXT}" --auto --scale 2x2 --pos 0x0
Other than that, if you’re currently satisfied with your setup, then I’m happy