-
-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Font is not antialiased with GTK apps on wayland #2861
Comments
|
Depends on what kind of session is running. If you are using X, gtk will get font settings via xsettings, which will come from a gnome-settings-daemon or some other xsettings manager implementation. If you are using Wayland and have a new enough gtk in the runtime, gtk will get font settings from the settings portal, which in turn will get them from gsettings (in GNOME) or from a native backend (in KDE). |
|
This is actually interesting, I had run into something similar and had done some research into it. What I found was:
These two led me to believe the issue could be related to fontconfig somehow as well, but I never had to time to research it at the moment and just ended up switching my fonts to work around it. |
|
Could also be fontconfig configuration, yes |
In
I'll dig into fontconfig and gsettings when I have time and try your mentioned fonts. |
|
gsettings are stored in dconf |
|
It kind of seems like a Also I can confirm that the issue only occurs on GTK since Quaternion which is QT based works. |
|
Any idea how to resolve this? It's getting annoying and tiring to look at. |
|
Okay I looked into GTK's source code. GTK is using gsettings to retrieve Now, @refi64 puts a bit of a hole in my theory, since I know he uses GNOME. However, his seems to be a different problem; maybe his system really does have some messed up fontconfig setup? In my case, any and all fonts are broken, and he's been working around by changing fonts. I'll open another issue on gtk's git and see if they can confirm/fix it |
|
that is not quite correct, no. If you are using X, gtk is getting font settings via xsettings from an xsettings manager, such as gnome-settings-daemon (but there are others). If you are using wayland, older GTK is using gsettings directly (which in turn requires holes in the sandbox for dconf, to work), while new GTK will talk to the settings portal, if you have it. |
|
@matthiasclasen Which keys exactly is it reading? I see it trying to read (through gsettings, looking at GTK's master) the gnome-settings-daemon keys, and since I don't have those installed I assume it doesn't work. |
|
lets establish some basics: X or Wayland ? What GTK version in the sandbox ? What xdg-desktop-portal version on the host ? |
|
|
@matthiasclasen Just to confirm that the issue is what I think it is, I copied over this into ~/.local/share and compiled the schema. A quick reboot and all of the fonts are smooth again. |
|
What does say ? |
|
@matthiasclasen Without the schema I copied over installed? |
|
You can run it on the host, but running it in the sandbox will give the same results. And the schema should not affect it one way or the other. |
|
Here's the output with the schema installed (working antialias): Here's the output without the schema installed (broken antialias): |
|
@matthiasclasen I just saw your comment on the issue I posted for GTK. My issue isn't that the portal is broken. My issue is that I don't have gnome-settings-daemon installed on my system because I don't use gnome-shell. It turns out that even though GTK reads the antialias settings from gsettings (through the settings portal), the schema is installed by gnome-settings-daemon, not gnome-desktop-schemas or gtk itself. Because I don't have the schema installed, gtk cannot read any antialiasing settings, and so it defaults to turning everything off. This is why I opened the issue on GTK's git. I think GTK needs to run properly without g-s-d |
|
The portal will use a backend instead of reading gsettings directly, if one is available. Kde has one. It seems we are coming to the conclusion that your desktop, whatever it is, needs one too. |
|
@matthiasclasen My desktop is custom, and it's entirely GTK based. Think of elementary's Pantheon or Solus' budgie. The difference is that I have my own wlroots-based Wayland compositor As I see it, GTK shouldn't depend on gnome-settings-daemon for critical options like this; they are part of the toolkit and not the session/environment. If GTK doesn't fix this, I'll just have a custom schema that provides the parts of gnome-settings-daemon that GTK needs. It would be preferable that GTK handled fonts independently of gnome-shell, however. Edit: |
|
My font configuration is the standard out-of-the-box Fedora config, I doubt it's anything weird on that end. |
|
There's various options for improving the situation, in varying degrees of effort, practicality, and likeliness:
|
|
|
i'm experiencing this too. with for example |
|
@AdrianVovk can you post a link to the issue you opend at GTK? I'll close the issue when you posted the link. |
|
Installing one package fixed the issue for me on Arch Linux. I do not
remember exactly, but I think it was `gsettings-desktop-schemas`.
…On Fri, Sep 13, 2019, 23:17 Marteon ***@***.***> wrote:
@AdrianVovk <https://github.com/AdrianVovk> can you post a link to the
issue you opend at GTK?
I'll close the issue when you posted the link.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2861?email_source=notifications&email_token=AAECYMHMLFABZAZIHLUXFPLQJPYO5A5CNFSM4HI4D7I2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6WCW3I#issuecomment-531377005>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAECYME6IHNUEM7TOJGDMZDQJPYO5ANCNFSM4HI4D7IQ>
.
|
|
@psnszsn In the issue I edited in a workaround. Thanks! |
|
@Marteon IIRC it isn't |
|
@AdrianVovk Fixed it! |
|
hmm my system already has |
|
Happens to me with Bottles on Arch Linux, KDE Wayland. Changing to X11 fixes it, installing |
You can unset variable |
|
Guys, try this: Edit then: |
This is the only thing that worked for me, or maybe it was a combination of multiple things. I literally tried every other suggestion on this page. |
Well, I bet that is what really fixed. You can try it on a fresh install and it will work (yes, I tested with a few distros and only those lines are needed to fix this annoying thing). |
Alas, doesn't work on Manjaro KDE plasma-wayland. |
Good to know! Maybe on Manjaro/Arch or even Fedora there are different steps? I tried only with debian based distros. |
I think it's something to do with the necessary GTK config file being missing by default. |
For Arch, your fix is a default config and it works: |
Works on Kubuntu 23.10 running KDE Plasma 5.27.8. Related bug tracker |
Once I ran the last command I found out |
Seconded. The config file was already correct for me but my Arch installation was missing |
|
I've just done a bit of a deep dive, and I can't understand how anyone could still be hitting this, even if If anyone has a GTK flatpak app with non-antialiased text like in the second screenshot in the issue description, please provide specific details. Otherwise, I think it's long past time to close this. In addition to basic information like which apps are affected, I'd like to see the output of
|
|
@chrisawi I can always try to uninstall Let me know if you'd like me to do that. I can provide any info you'd want. Otherwise, you can mark it as solved since installing |
You can also run
just to rule out the unlikely possibility that you have some other portal implementation providing an incorrect value. |
|
@Megalomaniak OK, so it's still happening for you. Can you provide this?:
Also, what distro, etc? |
This issue is still around for me, but I'm not sure what other details I can provide. I have no special setup on the host. I can reproduce this with Verbose logs for the portal: > /usr/libexec/xdg-desktop-portal -rv
XDP: Looking for portals configuration in '/home/hugo/.config/xdg-desktop-portal/portals.conf'
XDP: Preferred portals for interface 'org.freedesktop.impl.portal.ScreenCast': wlr
XDP: Preferred portals for interface 'org.freedesktop.impl.portal.Screenshot': wlr
XDP: Preferred portals for interface 'org.freedesktop.impl.portal.Settings': darkman
XDP: Using portal configuration file '/home/hugo/.config/xdg-desktop-portal/portals.conf' for non-specific desktop
XDP: load portals from /usr/share/xdg-desktop-portal/portals
XDP: loading /usr/share/xdg-desktop-portal/portals/wlr.portal
XDP: portal implementation supports org.freedesktop.impl.portal.Screenshot
XDP: portal implementation supports org.freedesktop.impl.portal.ScreenCast
XDP: loading /usr/share/xdg-desktop-portal/portals/darkman.portal
XDP: portal implementation supports org.freedesktop.impl.portal.Settings
XDP: providing portal org.freedesktop.portal.MemoryMonitor
XDP: providing portal org.freedesktop.portal.PowerProfileMonitor
XDP: providing portal org.freedesktop.portal.NetworkMonitor
XDP: providing portal org.freedesktop.portal.ProxyResolver
XDP: providing portal org.freedesktop.portal.Trash
XDP: providing portal org.freedesktop.portal.GameMode
(/usr/libexec/xdg-desktop-portal:14372): xdg-desktop-portal-WARNING **: 10:42:40.159: Failed to load RealtimeKit property: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.RealtimeKit1 was not provided by any .service files
(/usr/libexec/xdg-desktop-portal:14372): xdg-desktop-portal-WARNING **: 10:42:40.160: Failed to load RealtimeKit property: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.RealtimeKit1 was not provided by any .service files
(/usr/libexec/xdg-desktop-portal:14372): xdg-desktop-portal-WARNING **: 10:42:40.160: Failed to load RealtimeKit property: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.RealtimeKit1 was not provided by any .service files
XDP: providing portal org.freedesktop.portal.Realtime
XDP: Found 'darkman' in configuration for org.freedesktop.impl.portal.Settings
XDP: Using darkman.portal for org.freedesktop.impl.portal.Settings (config)
XDP: providing portal org.freedesktop.portal.Settings
XDP: Found 'wlr' in configuration for org.freedesktop.impl.portal.ScreenCast
XDP: Using wlr.portal for org.freedesktop.impl.portal.ScreenCast (config)
XDP: providing portal org.freedesktop.portal.ScreenCast
XDP: org.freedesktop.portal.Desktop acquired
XDP: Read org.freedesktop.appearance color-scheme
XDP: Read org.freedesktop.appearance color-scheme
XDP: Read org.gnome.desktop.a11y.interface high-contrast
XDP: Failed to Read() from Settings implementation: GDBus.Error:org.freedesktop.portal.Error.NotFound: Requested setting not found
XDP: Attempted to read unknown namespace/key pair: org.gnome.desktop.a11y.interface high-contrastI used flatseal to reproduce this, but it's reproducible with other GTK apps too. > flatpak info -M com.github.tchx84.Flatseal
[Context]
shared=ipc;
sockets=x11;wayland;fallback-x11;
devices=dri;
filesystems=xdg-data/flatpak/overrides:create;/var/lib/flatpak/app:ro;xdg-data/flatpak/app:ro;
[Session Bus Policy]
org.gnome.Software=talk
org.freedesktop.impl.portal.PermissionStore=talkI'm on Alpine Linux Edge on x86_64. I have Settings: > cat .config/xdg-desktop-portal/portals.conf
[preferred]
org.freedesktop.impl.portal.ScreenCast=wlr
org.freedesktop.impl.portal.Screenshot=wlr
org.freedesktop.impl.portal.Settings=darkman |
Oh, it's one of the most magical ones: manjaro /s |
|
Darkman actually logs all the calls to From what I can tell, no query for anything related to antialiasing is being made. |
GTK uses ReadAll, so it doesn't request any specific settings by name. If there are no matches for I wasn't simulating an empty portal response correctly, so I missed it. |
|
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/7090 sounds like it could be the cause of the issue (at least in my scenario and a few others here). I guess that the only way to confirm is to run some Flatpak application which includes GTK built with that patch, right? |
You can test it outside of flatpak using It will take some time for this to get into a stable release of GTK4; hopefully it will be backported to GTK3 as well. If anyone wants to verify for themself, they can build gtk from git main and run e.g.: |
|
Thanks for figuring this one out 👍 |


Linux distribution and version
Linux 5.0.9-arch1-1-ARCH x86_64Flatpak version
Flatpak 1.3.2Description of the problem
When using GTK Apps on wayland with flatpak the fonts are not antialiesed (I assume, see Screenshots).
When run with

flatpak run --socket=x11 --env=GDK_BACKEND=x11 org.gnome.Recipesit looks like the following:When run with
flatpak run --socket=wayland --env=GDK_BACKEND=wayland org.gnome.Recipesit looks like the following:I am using sway.
The issue also appears on weston.
Steps to reproduce
Start any GTK3+ App in an wayland session.
Workaround
As @AdrianVovk found out you have to have to have some GTK Schemas on your computer.
They should usually be installed by installing
gnome-settings-daemon.The text was updated successfully, but these errors were encountered: