Hi KDE community,
I use KDE Plasma 6.6.5 (Debian testing) with a 4K display, the display scale factor is set to 170%, which I believe translates to wp_fractional_scale_v1.preferred_scale of 1.7 being advertised to wayland clients. I use several GTK 3 applications daily, namely Gnome Evolution and Meld. I run into scaling issues with these applications.
As far as I understand, GTK 3 does not support wp_fractional_scale_v1 and instead relies on wl_output.scale. After some toying around I identified that with my configuration KDE compositor (kwin?) advertises wl_output.scale value of 2 to the clients, so that’s what GTK uses. At the same time KDE configures .config/gtk-3.0/settings.ini to use fonts DPI corresponding to the 1.7 scaling I have configured for KDE apps. This mismatch between UI scaling and fonts scaling results in some heavy spacing issues that make GTK apps quite depressing to look at
. See some examples below.
As a workaround/investigation tool I implemented a simple Wayland compositor proxy, that acts as a pass-through for all compositor communication with the clients except for wl_output.scale messages. For these it replaces 2 by 1. When I run both GTK applications through this proxy. The results look much nicer. Again, the examples are below.
(For people looking for a simple recipe, same results can be achieved when GTK apps are executed with GDK_DPI_SCALE=1.1 GDK_BACKEND=x11 set).
Therefore a question: is there a way to configure kwin such that it continues using wp_fractional_scale_v1 with scale of 1.7 but advertises wl_output.scale as 1 instead of 2?
Here is how Meld main window looks with such configuration:
And here is how the same app looks when I execute it behind my proxy (also with GDK_DPI_SCALE=1.1):
Notice much saner spacing in the menu and around button captions.
Here are side-by-sides for Gnome Evolution, default:
And when run via proxy (also with GDK_DPI_SCALE=1.1):
Again, notice the extra spacing when run w/o proxy.



