johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
6.17k stars 287 forks source link

Spinner keeps spinning, book not loaded #1093

Closed ritulahkar closed 10 months ago

ritulahkar commented 11 months ago

Spinner keeps spinning, book not loaded on Linux mint 21.2 on both ppa and flatpak. Previously it was working fine. I guess after some update its happening. when launching from terminal the following gets printed:

`ritu@ritu-B450M-DS3H-V2:~$ com.github.johnfactotum.Foliate KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied Failed to create GBM buffer of size 1664x974: Permission denied KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied Failed to create GBM buffer of size 1664x974: Permission denied KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied Failed to create GBM buffer of size 1664x974: Permission denied Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1

(com.github.johnfactotum.Foliate:8475): Gjs-WARNING **: 13:50:48.672: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the failed promise: main@resource:///com/github/johnfactotum/Foliate/js/main.js:478:24 run@resource:///org/gnome/gjs/modules/script/package.js:206:19 @/usr/bin/com.github.johnfactotum.Foliate:9:17 `

To Reproduce Steps to reproduce the behavior:

  1. Open any file in the app

Expected behavior View the book as previously.

Screenshots Iimage

Version:

Additional context The problem got solved if I change to NVIDIA driver from nvidia-driver-470 to nvidia-driver-390. It was working fine with previous versions of nvidia-driver-470 but this error occurs after update to the driver(tested with timeshift)

mojo5 commented 11 months ago

Hi! I am using manjaro and have the same problem. With this in the terminal:

(process:2): WARNING : 19:19:56.603: Error writing credentials to socket: Error sending message: Broken pipe src/nv_gbm.c:99: GBM-DRV error (nv_gbm_bo_create): DRM_IOCTL_NVIDIA_GEM_ALLOC_NVKMS_MEMORY failed (ret=-1)

Failed to create GBM buffer of size 982x708: Invalid argument src/nv_gbm.c:99: GBM-DRV error (nv_gbm_bo_create): DRM_IOCTL_NVIDIA_GEM_ALLOC_NVKMS_MEMORY failed (ret=-1)

Failed to create GBM buffer of size 982x708: Invalid argument src/nv_gbm.c:99: GBM-DRV error (nv_gbm_bo_create): DRM_IOCTL_NVIDIA_GEM_ALLOC_NVKMS_MEMORY failed (ret=-1)

Failed to create GBM buffer of size 982x708: Invalid argument Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1

(com.github.johnfactotum.Foliate:18940): Gjs-WARNING **: 19:19:58.035: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the failed promise: main@resource:///com/github/johnfactotum/Foliate/js/main.js:478:24 run@resource:///org/gnome/gjs/modules/script/package.js:206:19 @/usr/bin/foliate:9:17

This happened after the proprietary NVIDIA driver update.

But with Open-Source driver "Foliate" works well, and Snap version works well too.

onkelT2 commented 11 months ago

I am experiencing the same behavior as the original poster:

Gtk-Message: 17:16:56.500: Failed to load module "canberra-gtk-module" Gtk-Message: 17:16:56.501: Failed to load module "canberra-gtk-module" Failed to create /home/user/.var/app/com.github.johnfactotum.Foliate/cache for shader cache (No such file or directory)---disabling. KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied Failed to create GBM buffer of size 948x938: Permission denied KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied Failed to create GBM buffer of size 948x938: Permission denied KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied Failed to create GBM buffer of size 948x938: Permission denied Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1

(com.github.johnfactotum.Foliate:2): Gjs-WARNING **: 17:17:00.611: Unhandled promise rejection. To suppress this warning, add an error handler to your promise chain with .catch() or a try-catch block around your await expression. Stack trace of the failed promise: main@resource:///com/github/johnfactotum/Foliate/js/main.js:478:24 run@resource:///org/gnome/gjs/modules/script/package.js:206:19 @/app/bin/com.github.johnfactotum.Foliate:9:17

Version:

johnfactotum commented 11 months ago

This definitely looks like a WebKitGTK similar to or the same as #1085.

wenzezlaus commented 11 months ago

Starting foliate with WEBKIT_DISABLE_COMPOSITING_MODE=1 or with WEBKIT_DISABLE_DMABUF_RENDERER=1 fixes the problem for me. Arch Linux 6.5.7-arch1-1 nvidia 535.113.01

claui commented 11 months ago

I can confirm that @wenzezlaus’s fix works for me.
PureOS 10 (Byzantium) Kernel 6.4.0-1-librem5

nova-666 commented 10 months ago

Starting foliate with WEBKIT_DISABLE_COMPOSITING_MODE=1 or with WEBKIT_DISABLE_DMABUF_RENDERER=1 fixes the problem for me. Arch Linux 6.5.7-arch1-1 nvidia 535.113.01

For me, the second one resulted in EPUB files being loaded correctly on the 3.0 release of Foliate.

Ubuntu 22.04 LTS Nvidia 535.129.03

nobane commented 6 months ago

I ran into this issue trying use webkit2gtk on arch linux (with an nvidia card) and I was able to fix it without setting WEBKIT_DISABLE_DMABUF_RENDERER=1.

Here is how I fixed it:

  1. Check if you have modesetting enabled via

    cat /sys/module/nvidia_drm/parameters/modeset
  2. If you see printed N then you need to enable it with

    echo options nvidia_drm modeset=1 | sudo tee /etc/modprobe.d/nvidia_drm.conf
  3. Restart your computer

ritulahkar commented 6 months ago

One easy solution I found is:

  1. Install Foliate as Flatpak
  2. Install Flatseal
  3. Add WEBKIT_DISABLE_DMABUF_RENDERER=1 to environment variable of foliate in Flatseal.

It should work.

jaelsonwagner commented 3 months ago

I tried this but I'm getting intermittent behaviors. Very frustrating because that is my preferable ebook reader application.

image