gsettings set org.gnome.desktop.interface scaling-factor 1
gsettings set org.gnome.desktop.interface text-scaling-factor 1.5
Some applications also depend on Xft and X root window DPI..Xresources:
Xft.dpi: 144
Xft.hinting: 1
Xft.hintstyle: hintslight
Xft.antialias: 1
Xft.rgba: none
Xcursor.size: 48
Xcursor.theme: Adwaita
xrandr dpi (in my i3 startup config): $ xrandr --dpi 144
I have a smaller secondary monitor. I just render it at 1.5x resolution and scale down: $ xrandr --output DP-2-2 --scale 1.5x1.5 --pos 0x0
At least for me, the result is perfect HiDPI support (Chrome, GTK, Qt and IntelliJ respect it).With the latest xrandr master, you can set nearest-neighbor using "--filter nearest", which should provide better results.
While Android, Windows, Qt/KDE and the web went with real fractional scaling,
GTK/Gnome, macOS and iOS went with just increasing the framebuffer size and scaling it down.
As result, when rendering a GTK app (be it a video player or a game like Minecraft) on a 4K screen at 1.5x scale, you're actually rendering it at 6K resolution, which utterly destroys performance.
The Windows and Qt approach has it's own issues with fractional pixel positions, and the resulting problem with mapping integer input coordinates to these. And of course, it doesn't work nice with legacy apps (Gnome has to handle X11 apps, that won't tell anything about the scale they work with. See also: Gimp).
FWIW, this is possible under X11 directly. Try running:
xrandr --scale 2x2 xrandr --scale 2x2 --output OUTPUT
where OUTPUT will vary depending on what screens you actually have, but will usually be something like LVDS1 or VGA1. You can get the possible values with auto-completion in Bash (on Debian at least) or by running just xrandr.I'm currently running KDEv5 and while I got 'most' of the scaling adjusted properly, this setting fixed the size of the tabs, and other annoyances I was experiencing on FireFox.
Thank-you.
So I keep Gnome at 1.0x, and Firefox at 1.25x, which as an extra bonus means that "80%" scaling takes Firefox back to native scale again.
I had to disable it because videos would not play for long without freezing either on the browser or vlc. Only a hard restart of the machine would resolve this.