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…).
Some examples:
Foliate (Snap). Loads the book but no content shown.
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 WEBKIT_DISABLE_DMABUF_RENDERER=1
.
Flatpak
For Foliate, run the command
flatpak run --env=WEBKIT_DISABLE_DMABUF_RENDERER=1 com.github.johnfactotum.Foliate
For Wike,
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 LC_ALL=en_US.UTF-8
.
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.
Source: https://github.com/johnfactotum/foliate/issues/1115#issuecomment-1809480892
Snap/Debian packages
You can add the environment variable WEBKIT_DISABLE_DMABUF_RENDERER=1
to /etc/environment
, and reboot for the changes to take effect.