Closed enricosavegnago closed 9 months ago
Can you try the flatpak as well? We need to know if this is a snap-only bug.
I've just tried the flatpak version. Same situation.
Did you open the book from the library view or did you open Foliate directly by opening the book from your file manager?
Can you reproduce the issue with other books? Try a free ebook like https://standardebooks.org/ebooks/jules-verne/an-antarctic-mystery/frances-cashel-hoey, and let us know.
Nvidia?
Same issue, Linux Mint 21.2 Cinnamon, Nvidia 535.129.03.
System: GNOME 45 (Flatpak runtime)
Desktop: X-Cinnamon
Session: cinnamon (x11)
Language: en_US.UTF-8
Versions:
- Foliate 3.0.0
- GJS 1.78.00
- GTK 4.12.3
- Adwaita 1.4.0
- GLib 2.78.1
- WebKitGTK 2.42.1
User directories:
- /home/brezanac/.var/app/com.github.johnfactotum.Foliate/data
- /home/brezanac/.var/app/com.github.johnfactotum.Foliate/cache
The application just hangs at loading the file after using the Open option.
It looks like something is crashing WebKitGTK.
If it's showing a blank page, probably the same as #1085 and #1093.
The crash looks like something different. See https://github.com/flatpak/flatpak/issues/5564 and https://github.com/flatpak/flatpak/issues/3712
While running Foliate with explicit locale did solve the loading issues, no actual book content was displayed, aside from what was in the sidebar.
flatpak run --env=LC_ALL=en_US.UTF-8 com.github.johnfactotum.Foliate
The output was showing following errors.
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 704x689: Permission denied
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 704x689: Permission denied
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 704x689: Permission denied
Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1
So I decided to explicitly instruct WebKitGTK inside the flatpak package to revert back to WPE/X11 renderer.
flatpak run --env=WEBKIT_DISABLE_DMABUF_RENDERER=1 --env=LC_ALL=en_US.UTF-8 com.github.johnfactotum.Foliate
This fixed the issue and Foliate was now properly displaying all content.
Now, WEBKIT_DISABLE_DMABUF_RENDERER
is kind of an ugly solution, soon possibly to be deprecated or even removed from WebKitGTK, but it gets the job done for now.
To make a more permanent solution without the need to run Foliate through shell, you could use Flatseal to define the necessary environmental varaibles like this.
Hope this helps.
@johnfactotum In the next minor version of Foliate, please consider adding a "Troubleshoot books not loading if you are running NVidia" link/button (which can point to the comment above) (https://github.com/johnfactotum/foliate/issues/1115#issuecomment-1809480892) in the library view page, which NVidia users can follow. That can also stop many duplicate of bug reports. Also, beginner users may not know about GitHub, and may install Foliate from a software center. They can troubleshoot the issue by following that link
Well, ideally it could be included in the "troubleshooting" section in the about dialog, but I don't think Libadwaita supports that.
Probably I'll pin an issue, add a section to the FAQ (which is linked to in the about dialog), and update the issue templates.
Did you open the book from the library view or did you open Foliate directly by opening the book from your file manager? Both way it doesn't work Can you reproduce the issue with other books? Try a free ebook like https://standardebooks.org/ebooks/jules-verne/an-antarctic-mystery/frances-cashel-hoey, and let us know. Same issue
Same issue here on Ubuntu 23.04 (snap) Open Foliate and then open any epub. ToC is visible, but reading pane is empty
Same issue on PopOS 22.04 LTS, had to add the env variables that @brezanac helpfully provided. Thanks.
Arch Wiki: Window does not appear in Flatpak on Nvidia
This is a known issue with Nvidia in Flatpak environments.
The linked Arch Wiki page includes a band-aid fix which does solve the issue, although inconvenient and not really a long-term solution. This could be made easier with a script if it this isn't resolved any time soon and it becomes too much of a headache to have to update the variable at each driver update.
The advantage over the other proposed "solution" of setting WEBKIT_DISABLE_DMABUF_RENDERER=1
is that you don't lose hardware acceleration. WEBKIT_DISABLE_DMABUF_RENDERER=1
makes the app noticeably sluggish due to this. The app runs perfectly fine with the linked "solution".
The environment variable to set for Nvidia driver version 545.29.06 would be:
GBM_BACKENDS_PATH=/usr/lib/x86_64-linux-gnu/GL/nvidia-545-29-06/extra/gbm
The driver version number would need to be updated to match the running Nvidia driver version.
You could then set this with an override with flatpak override --env=GBM_BACKENDS_PATH=/usr/lib/x86_64-linux-gnu/GL/nvidia-XXX-YY-ZZ/extra/gbm com.github.johnfactotum.Foliate
or through setting the environment variable in Flatseal, which does the same thing.
Describe the bug It's unable to read any kind of .epub file in the 3.0.0 version and neither it shows the loading of the page. It's possible to open the book and view chapters and details but the text doesn't load.
To Reproduce Steps to reproduce the behavior:
Screenshots![Reading page](https://github.com/johnfactotum/foliate/assets/73057645/ae1f231e-6a56-4bbc-a0dc-8ab7301f9b12)
Version:
Versions:
WebKitGTK 2.42.0