Areas of gtk4 apps flickering or distorted

After upgrading from F39 to F40 on an old MacBook, certain parts of certain apps are flickering and image is distorted (almost always when accessing the hamburger menu of Files, Gnome Software etc, but not only then), as per the screenshots below.

After testing this behavior with several apps, it seems to be the case only with gtk4 apps, but not with gtk3 apps (e.g. Gnome Terminal, Geary, Firefox, LibreOffice are fine).

I am on the nouveau drivers, because installing nvidia-340xx drivers as per RPM Fusion’s instructions didn’t work out (couldn’t boot into the system). As a side note, I didn’t follow the second part of the instructions from RPM Fusion, regarding the workaround for keeping 340xx driver on newer fedora (sudo dnf copr enable kwizart/kernel-longterm-6.1 etc), as I didn’t manage yet to research what these commands would do.

I am only posting this issue now, because I thought it might get fixed in the updates following the initial F40 release, but it didn’t. Any help is appreciated.

Screenshot from 2024-05-03 22-19-28

I’ve found F40/GTK4/Mesa has problems with some configurations because of GTK4’s shift to the “ngl” renderer. My older Dell laptop with an NVS3100M graphics card and the nouveau driver had all sorts of problems displaying GTK4 apps. I’ve not had good luck trying the patched nVidia series driver in F39 so I’m not going to waste my time trying to get it to work with F40 (it’s probably going to be even worse trying to get it to run).

The one thing that got me back up and running well was to disable the “ngl” renderer for GTK4 apps and revert back to the “gl” renderer. As root:

echo "export GSK_RENDERER=gl" > /etc/profile.d/

then reboot.

My suspicion is that Mesa is at the bottom of these issues. It doesn’t seem to be playing well with the GTK4 “ngl” renderer for some configurations. Newer Mesa version fixed a lot of issues I was seeing when running F40 in VMware virtual machines but they don’t seem to fix the issues I’m seeing on my Dell laptop.

I will try this and come back here with the outcome. Interesting though that I had no such issues with F39 fresh install, but only after upgrading to F40.

I have reverted to the gl renderer, as suggested, and I can confirm this solves the issue.

There was no /etc/profile.d/ file on my system, so I had to create it. One thing I noticed though is that the laptop fans are working harder, but there might be no correlation.

Would you advise that we should revisit the ngl renderer in a couple of months/releases? I have seen in this GTK Development Blog that for old hardware it is indeed advisable to use the old renderer, at least for now.

Not surprising that you didn’t see this in F39 - I didn’t either. F39 didn’t have GNOME 46, the newer GTK4 that defaults to ngl renderer, and Mesa releases.

The file does not exist by default.

Probably not a bad idea. There have been a couple of recent Mesa updates that have improved things. For example, enabling 3D acceleration on F40 aarch64 betas running in a VMware Fusion VM on Apple Silicon (ARM) gave the same symptoms. This got fixed in the Mesa 24.0.5 update. I suspect/hope that the Mesa developers are seeing these problems in other areas and addressing them.

The switch of the default GTK4 renderer to ‘ngl’ was premature, IMO.

1 Like

I just revisited the use of the ‘ngl’ renderer on my configuration as there have been updates to Mesa over the last couple of months.

The situation is better, but still too many glitches in the display of GTK4 UI items. I had to revert back to the ‘gl’ renderer.

1 Like