GTK4 apps have poor text quality on Plasma

I’ve been using EndeavourOS with the Plasma desktop for a few years now. However after a recent update, all GTK4 apps on my system (both native and flatpak apps) have poor text quality. All KDE and GTK3 apps look fine, it’s just the GTK4 apps that have the issue.

Here’s an example of what the font looks like in EasyEffects:


I have a dual 1440p monitor setup with 100% scaling. I’m also using an AMD GPU.

I’ve tried doing a fresh install of the system, but the issue still persists.

I’ve also tried installing xdg-desktop-portal-gtk and running /usr/lib/xdg-desktop-portal --replace as mentioned here https://wiki.archlinux.org/title/XDG_Desktop_Portal#Poor_font_rendering_in_GTK_applications_on_KDE_Plasma, but that didn’t work either.

Also when I run /usr/lib/xdg-desktop-portal --replace it gives the following output and doesn’t automatically stop (I have to press Ctrl+C to stop it). So maybe that command isn’t working properly?

(/usr/lib/xdg-desktop-portal:5500): xdg-desktop-portal-WARNING **: 12:18:47.335: Choosing gtk.portal for org.freedesktop.impl.portal.Lockdown as a last-resort fallback

(/usr/lib/xdg-desktop-portal:5500): xdg-desktop-portal-WARNING **: 12:18:47.335: The preferred method to match portal implementations to desktop environments is to use the portals.conf(5) configuration file

(/usr/lib/xdg-desktop-portal:5500): xdg-desktop-portal-WARNING **: 12:18:47.351: Failed to create background monitor: Failed to own background monitor D-Bus name

(/usr/lib/xdg-desktop-portal:5500): xdg-desktop-portal-WARNING **: 12:18:47.351: No skeleton to export
^C

I’ve also tried adding gtk-hint-font-metrics=true to ~/.config/gtk-4.0/settings.ini, but that didn’t do anything either.

Welcome to the community! :vulcan_salute: :enos_flag:

Have you tried this under both X11/Xorg and Wayland??

Ah, no I have not tried X11.

Yeah, the issue is fixed when I run X11, so it must be a problem with Wayland.

1 Like

Or a combination of Wayland and KDE.
Maybe it wouldn’t be a problem in Hyprland or Sway, for instance.

Yeah, although I definitely prefer Plasma, and Wayland feels noticeably smoother than X11 so I would prefer not to use X11.

1 Like

But I’ll try sway/hyperland really quick to see if I have the same issue there.

1 Like

Alright, the issue is not present on hyperland, so it must be Plasma + Wayland.

Ugh, honestly I’ve been having a lot small but annoying issues with Plasma over the years, maybe it’s time to look at something different.

Still, I’d like to see if we could solve this issue for anyone else having this problem.

There was a video from The Linux Experiment where he showed something similar to what you’ve shown in your screenshots. Problem is, that video is anywhere between 2 weeks to 6 months ago, so I don’t remember which one AND whether it was a fix or just a demo.

It was certainly related to Wayland and text resolution, though.

Perhaps this is related?

Try this instead: gtk-hint-font-metrics=1. Not sure if it will make a difference.

And/Or try forcing Font DPI: https://bbs.archlinux.org/viewtopic.php?id=255895

I don’t think it’s related, because I’m not using any scaling.

Found the video. It was for Cosmic DE, not KDE. And it was about fractional scaling.

gtk-hint-font-metrics=1 didn’t do anything, and I see no setting in KDE to “force font DPI” like in the article.

Figures. Setting it to 1 just seems like a binary argument anyway, and the link is from 2020, so they probably either moved the setting or removed it entirely.

Some reading for you: https://discussion.fedoraproject.org/t/fonts-in-gtk-4-apps-look-different-more-blurry/66778

Essentially, you may have to wait or use another Wayland compositor.

Yeah, it seems like I’ll just have to wait until there is a fix. I mostly use the KDE apps and VSCodium anyway, so I could live with it for a while.

1 Like

Yes, that’s right. I tried it on my system with KDE - wayland has a slightly less clear font compared to X11.

Are there some ways to improve it on KDE or is it up to the KDE team to fix?

I noticed that fonts were a bit off since I switched from Gnome recently, but couldn’t figure out a way to improve them (played around with all the font settings).

It’s technically both a KDE issue and a GTK4 issue. Either one of those groups could fix it.
KDE could add support for the way GTK4 renders fonts, or the Gnome team could add support for subpixel antialiasing. The latter is unlikely.

1 Like

Ok, after updating my system today the issue seems to be fixed for native GTK4 apps! Flatpak GTK4 apps still have the issue, but I imagine that will also get the fix soon.

2 Likes