Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The application can't open epub files anymore - Arch Linux #1085

Closed
mauromotion opened this issue Oct 3, 2023 · 9 comments
Closed

The application can't open epub files anymore - Arch Linux #1085

mauromotion opened this issue Oct 3, 2023 · 9 comments
Labels
bug Something isn't working not our bug Needs to be fixed upstream or elsewhere

Comments

@mauromotion
Copy link

Describe the bug

Foliate can't open .epub files anymore, when trying to open them it hangs until I close it.

To Reproduce

Open an .epub file with Foliate.

Expected behavior

The ebook file would open.

Version:

  • Foliate version: 2.6.4
  • OS/Distribution and version: Arch Linux 6.5.5-arch1-1
  • Desktop environment: No DE, just i3 WM
  • Installation method: package from the official Arch Linux extra repository.

Additional context
It used to work perfectly until a few weeks ago. The rest of my system and applications work fine.

Output from the terminal:

`❯ foliate
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 1420x735: 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 1420x735: 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 1420x735: Invalid argument
Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1`

@mauromotion mauromotion added the bug Something isn't working label Oct 3, 2023
@johnfactotum johnfactotum added the not our bug Needs to be fixed upstream or elsewhere label Oct 4, 2023
@nestorwendt
Copy link

Adding the kernel parameter nvidia_drm.modeset=1 fixed the problem for me.

@mauromotion
Copy link
Author

Adding the kernel parameter nvidia_drm.modeset=1 fixed the problem for me.

I've tried adding that parameter and I get a different error now, and a different Foliate behaviour. It still doesn't show the eBook, though, but it doesn't hang. It's just blank.

`❯ foliate

(com.github.johnfactotum.Foliate:5349): Gjs-WARNING **: 12:21:11.202: 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`

Is it still Nvidia's fault?

@nestorwendt
Copy link

I've tried adding that parameter and I get a different error now, and a different Foliate behaviour. It still doesn't show the eBook, though, but it doesn't hang. It's just blank.

I'm using foliate-git from AUR, maybe you can try that.

@mauromotion
Copy link
Author

I've tried adding that parameter and I get a different error now, and a different Foliate behaviour. It still doesn't show the eBook, though, but it doesn't hang. It's just blank.

I'm using foliate-git from AUR, maybe you can try that.

Thanks, using foliate-git works. Albeit in a weird way, as in I can't access any preferences, I can only switch from light to dark mode and that's it. ALso the gtk buttons look different (which I don't care but still). At least the books are readable.

I'm not sure this is an Nvidia bug at this point. If it is, it only manifests itself with Foliate.

I will have to look for an alternative.

@johnfactotum
Copy link
Owner

It's just blank. [...] Is it still Nvidia's fault?

It's probably a WebKitGTK bug on Nvidia.

I don't have Nvidia, and v2.6.4 works for me on Arch Linux.

I can't access any preferences, I can only switch from light to dark mode and that's it.

If you're talking about the "Preferences" item in the main menu of the library view, that indeed doesn't work, as it's not implemented yet (among other things that are still missing from the GTK 4 rewrite).

There are some preferences, though, that you can change in "Font & Layout Settings" in the view menu.

ALso the gtk buttons look different

That's just GNOME's new Adwaita stylesheet for GTK 4, which looks different from the GTK 3 version.

@mauromotion
Copy link
Author

Fair enough. Thanks.

@wenzezlaus
Copy link

Starting foliate with WEBKIT_DISABLE_COMPOSITING_MODE=1 fixed the problem for me.
Arch Linux 6.5.7-arch1-1

@nobane
Copy link

nobane commented Mar 2, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working not our bug Needs to be fixed upstream or elsewhere
Projects
None yet
Development

No branches or pull requests

5 participants