Apps using Webkit, like Foliate, Wike, Caveliar or GNOME Web do not show content Ubuntu 22.04 with NVIDIA graphics
This only seems to happen to snaps and flatpaks (not even AppImages). Several apps like Wike, Foliate, Cavalier (Snaps), Wike-Flatpak, and even GNOME Web (Flatpak) run but then show no content / do anything. The app doesn’t throw any error, 404, or anything else. Moneta at least indicates you can’t connect to the server. As far as I see, permissions are correctly set, and setting all of them on yields no result. This very same app worked fine in regular Ubuntu releases (23.04, 23.10…).
Wike Wikipedia reader (Snap and Flatpak) allows search queries and history, but nothing shows up. It does not integrate with GNOME Shell search, as it should, either.
Tangram web browser (Flatpak). The same issue. The same with GNOME Web flatpak.
PS: I checked the terminal. There seems to be some permission or access issue with KMS or anything else. Excuse the Spanish captions. ‘Falló al abrir el archivo’ -> Failed to open file. ‘Permiso denegado’ -> Permission denied.
This is a known webkit bug with NVidia graphics cards.
The workaround is to run the apps with the environment variable
For Foliate, run the command
flatpak run --env=WEBKIT_DISABLE_DMABUF_RENDERER=1 com.github.johnfactotum.Foliate
flatpak run --env=WEBKIT_DISABLE_DMABUF_RENDERER=1 com.github.hugolabe.wike
In Foliate particularly, sometimes the sidebar is not displatyed if the locale is not set to be English. That can be done with the environment variable
flatpak run --env=WEBKIT_DISABLE_DMABUF_RENDERER=1 --env=LC_ALL=en_US.UTF-8 com.github.johnfactotum.Foliate
To make this change permanent when you open the apps with the GUI, you can add the environment variables in the Flatseal app.
You can add the environment variable
/etc/environment, and reboot for the changes to take effect.