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

Foliate stopped working on Ubuntu 22.04 #879

Closed
tomicakorac opened this issue Mar 24, 2022 · 63 comments
Closed

Foliate stopped working on Ubuntu 22.04 #879

tomicakorac opened this issue Mar 24, 2022 · 63 comments
Labels
bug Something isn't working

Comments

@tomicakorac
Copy link
Contributor

tomicakorac commented Mar 24, 2022

Describe the bug
The Foliate application stops responding, and becomes unusable after a couple seconds.

To Reproduce
Steps to reproduce the behavior:

  1. Open Foliate
  2. Open any ebook (tried with numerous files of .epub format)
  3. Attempt to use any piece of user interface
  4. Foliate does not respond - does nothing

Expected behavior
User interface should respond as expected to the user interaction. For example, when I click on the right side, pages should turn forward, left side pages should turn back, moving page slider should move book pages appropriately, clicking content headings should jump to corresponding section etc.

Version:

  • Foliate version: 2.6.3, 2.6.4
  • OS/Distribution and version: Ubuntu 22.04
  • Desktop environment: GNOME Shell 40.alpha, GNOME Shell 40.beta
  • Installation method: Ubuntu PPT / apt, snap

Additional context
Foliate was working just fine before, but I am not sure exactly at which point it started malfunctioning. I'm suspecting this happened after upgrading from Ubuntu 21.10 to 22.04.

@tomicakorac tomicakorac added the bug Something isn't working label Mar 24, 2022
@amirHHP
Copy link

amirHHP commented Apr 2, 2022

I have same problem after upgrade to 22.04.

@Streppel
Copy link

Streppel commented Apr 5, 2022

Just stumbled upon this. Trying to start from command line outputs

Gtk-Message: 15:42:24.916: Failed to load module "canberra-gtk-module"Gtk-Message: 15:42:24.918: Failed to load module "canberra-gtk-module"

** (com.github.johnfactotum.Foliate:12663): WARNING **: 15:42:25.023: Could not open /sys/class/dmi/id/chassis_type: Failed to open file “/sys/class/dmi/id/chassis_type”: Permission denied

** (com.github.johnfactotum.Foliate:12663): WARNING **: 15:42:25.023: Could not open /sys/firmware/acpi/pm_profile: Failed to open file “/sys/firmware/acpi/pm_profile”: Permission denied

** (com.github.johnfactotum.Foliate:12663): ERROR **: 15:42:25.027: Unable to fork a new child process: Failed to execute child process “/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/WebKitNetworkProcess” (No such file or directory)

[1]    12663 trace trap (core dumped)  foliate```

@Lagrang
Copy link

Lagrang commented Apr 6, 2022

Same problem on Ubuntu 20.04

** (com.github.johnfactotum.Foliate:1173356): ERROR **: 20:03:01.073: Unable to fork a new child process: Failed to execute child process “/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/WebKitNetworkProcess” (No such file or directory)

@archisman-panigrahi
Copy link
Contributor

archisman-panigrahi commented Apr 7, 2022

I cannot reproduce the issue in Xubuntu 22.04 (fully updated as of 7th April) with the PPA version of Foliate. It runs and opens books just fine.

@bpint
Copy link

bpint commented Apr 8, 2022

Same here. There is a workaround. When you login, choose 'Ubuntu on xorg' instead of 'Ubuntu', and you will get a functional Foliate.

@tomicakorac
Copy link
Contributor Author

Hm, that is really strange. I am in fact using Ubuntu on Xorg, and I am still experiencing the same issue - Foliate is practically unusable.

@ghost
Copy link

ghost commented Apr 8, 2022

No tricks work for me because it crashes on load, every time. No error message. Just starts to load and then never does.

@uriel1998
Copy link

Similar problem, Debian 11, glibc 2.72, installed from .deb package.

Interestingly, the same version of foliate, but flatpak (installed via bauh], works just fine. Which isn't a solution, but perhaps a short-term workaround for some other folks.

@johnfactotum
Copy link
Owner

johnfactotum commented Apr 13, 2022

@uriel1998 If you're seeing "Empty Response", that's #878. The Flatpak version is still using the GNOME 41 runtime so it probably has glib < 2.72.

@tomicakorac
Copy link
Contributor Author

So is there any hope that this gets fixed now? Or that we at least get a response from the maintainer?

@archisman-panigrahi
Copy link
Contributor

Cannot reproduce on Ubuntu MATE 22.04. Is this issue GNOME specific?

@tomicakorac
Copy link
Contributor Author

Yes, this is specific to GNOME.

@metawindow
Copy link

I'm pretty sure I am running into the same underlying error. I have been running a Ubuntu apt install of Foliate (2.6.4-1 stable PPA) on Ubuntu Cinammon 22.04 with no issues for weeks. It died on me this morning as described in the top level bug report, i.e. window frame is displayed but it hangs. Re-running from the terminal I get the following error message:
$ foliate

(WebKitWebProcess:2): Gdk-ERROR **: 09:36:32.022: The program 'WebKitWebProcess' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
(Details: serial 205 error_code 2 request_code 151 (GLX) minor_code 34)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the GDK_SYNCHRONIZE environment
variable to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)

The same thing continues to happen after removing Foliate and reinstalling (2.6.4-4202205071246ubuntu22.04.1) from the Daily PPA.

!!!==> The problem was probably triggered by the apt update that ran between yesterday and today. I suspect the nvidia driver upgrade, but anyway here is the full record:

Foliate killing upgrade

@tomicakorac
Copy link
Contributor Author

@apandada1 since you are marked as the Ubuntu package maintainer, is there a chance you look into this issue any time soon?

@johnfactotum if we do not get any responce from @apandada1, what other options do we have to have this fixed? Foliate is basically unusable for over half a year now.

@archisman-panigrahi
Copy link
Contributor

@tomicakorac I don't know how to fix the bug, but does deleting mime.cache help, as in #878 ?
Also, can you check if Atril can open epubs in Ubuntu 22.04? Someone found that it is also affected by the same bug, in Arch Linux.

Moreover, last time I checked in a VM, Foliate was working in MATE and XFCE.

@tomicakorac
Copy link
Contributor Author

Thank you @apandada1.

Deleting ~/.local/share/mime/mime.cache did not change anything, the issues remain.

I've never used Atril, so can't know for sure. On the first glance, it looks like Atril works just fine, no issues. On the other hand, Atril is a completely different product and is not related to Foliate. Its user preferences are very limited compared to Foliate, and Atril can not replace Foliate for me.

MATE and XFCE don't have anything to do with this bug, this is specific to GNOME Shell version 40, as indicated in the initial bug report, and confirmed by several users in this thread.

Judging from the direction this discussion is going in, I am very sorry to conclude that Foliate on Ubuntu is a dead project now. What a shame.

@gitkeerthi
Copy link

Broken in Fedora 36 as well. rpm build. Flatpak works.

@Nicolaith
Copy link

Google founds a lot of cases with the same error "run@resource:///org/gnome/gjs/modules/script/package.js:206:19" after upgrade to Gnome shell 40
There also is a guide to port extensions - https://gjs.guide/extensions/upgrading/gnome-shell-40.html , maybe it can help?

@tomicakorac
Copy link
Contributor Author

Just now I've realised something that might be useful: As described above, Foliate does not accept user commands (or doesn't accept them accurately), but as soon as you change focus from Foliate to anything outside of Foliate (e.g. switch to another app window, or open Gnome menu, or open Activities menu, anything really that is outside of Foliate), Foliate will actually execute the last commands.

@tomicakorac
Copy link
Contributor Author

Additional potentially useful detail: This issue consistently exists on regular users' accounts (both admin and user levels), but does not exist on the root account. When I run `sudo com.github.johnfactotum.Foliate' the app instance does not experience any problems. I can't conclude what may be the reason.

@tomicakorac
Copy link
Contributor Author

tomicakorac commented Jul 18, 2022

Some more details that I hope can help fix this. After discovering that the problem doesn't occur when Foliate is run as Root, I ran the app from the terminal as both non-root and root, using --verbose flag. The log shows that as root, this section gets run:

rendition-ready
run_javascript: setStyle({"fontFamily":"Serif","fontSize":16,"fontWeight":400,"fontStyle":"normal","fontStretch":"normal","spacing":1.5,"margin":40,"maxWidth":1400,"usePublisherFont":false,"justify":true,"hyphenate":...
run_javascript: setupRendition()
run_javascript: display('epubcfi(/6/36!/4/2/18/14/2/2/2/1:0)')
layout
book-displayed
relocated
epubcfi(/6/36!/4/2/18/14/2/2/2/1:0)

As mentioned before, for non-root users this section does not get run until Foliate loses and regains focus.

@tomicakorac
Copy link
Contributor Author

tomicakorac commented Jul 20, 2022

This is the warning after which Foliate becomes unrespnosive:

(com.github.johnfactotum.Foliate:15965): Gjs-WARNING **: 11:51:16.013: 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

@tomicakorac
Copy link
Contributor Author

tomicakorac commented Jul 23, 2022

Attaching logs for comparison:

@Nicolaith
Copy link

Finally, it works again since I deleted the file ~/.local/share/mime/mime.cache

@tomicakorac
Copy link
Contributor Author

@Nicolaith I'm very happy to hear there's hope. I've deleted that file and still no joy :( Should I re-create mime.cache after it's deleted?

@kaia009
Copy link

kaia009 commented Aug 13, 2022

I just did a fresh Jammy install and ran into Foliate errors including the ones mentioned in this thread. Then I remembered: The first time I installed Jammy (on another computer) several months ago, the first thing I did was to check whether Wayland was causing the trouble, so I rebooted to Jammy using the Ubuntu on Xorg option. There were no problems on Xorg. What was odd, though, was that when I rebooted into Jammy with wayland, Foliate was absolutely fine.

So today, I did the same thing:

  1. Rebooted using the "Ubuntu on Xorg" option before entering log-in details (a little wheel bottom right)
  2. Tested Foliate
  3. Rebooted making sure to change back to standard "Ubuntu"
    Foliate was fine.
    Hopes this helps somebody.

@tomicakorac
Copy link
Contributor Author

tomicakorac commented Oct 21, 2022

@johnfactotum 's comment in #962 made me curious again. He thinks these issues might arise from malfunctioning of WebkitGTK. Looking around my system I noticed the following:

  • I do not have installed any package named WebkitGTK (I'm running Ubuntu 22.10);
  • I do have several versions of libwebkit2gtk package installed, namely 4.0. 4.1 & 5.0; From this package's description, this package is Web content engine library for GTK; Am I right to understand that in Ubuntu world, libwebkit2gtk is equivalent to WbkitGTK generic package?
  • As mentioned, there are 3 versions of this package installed; I can't uninstall any of these versions, because apparently a large number of system critical packages dipend on each of these versions;
  • Foliate seems to be using the 4.0 version - or at least it depends on it (if I attempt to purge libwebkit2gtk-4.0-37 package, com.github.johnfactotum.foliate is listed as one of the packages that will also be removed;

Is it possible to make Foliate use a different version of libwebkit2gtk package? Can I somehow make it use version 5.0*? How likely is it that this might fix any of the above issues?

Edit: For reference, Epiphany browser uses version 4.1, and testing foliate-js in Epiphany does seem to fix at least a couple of issues described in this thread.

Edit 2: It's still worth noting that none of these issues exist if I run Foliate with sudo privileges. Could this have anything to do with a graphic card/driver?

@johnfactotum
Copy link
Owner

Honestly I think perhaps the best way to debug your issue would be to try one of the 1.x versions of Foliate. If it works, try to do a git bisect (or just manually try other different versions) to find the culprit.

If not even the 1.x versions work, the best way would be to try to make a minimal GTK window with a WebView, and load a very minimal Epub.js page, and go from there.

@tomicakorac
Copy link
Contributor Author

Thank you for the suggestion John. Sadly, even 1.x versions are showing the same set of issues for me. At least from 1.4 and above, as lower versions don't have .deb packages ready.

If not even the 1.x versions work, the best way would be to try to make a minimal GTK window with a WebView, and load a very minimal Epub.js page, and go from there.

I would be happy to try this, but I'm sorry to say I'm not a programmer and don't really understand how I would go about doing this. That said, I'll still give it my best try.

@johnfactotum
Copy link
Owner

Well, I guess one could go with something like this

imports.gi.versions.Gtk = '3.0'
imports.gi.versions.WebKit2 = '4.0'
const { Gtk, Gio, GLib, WebKit2 } = imports.gi
const app = new Gtk.Application({ application_id: 'com.github.johnfactotum.Foliate' })
app.connect('activate', () => {
    const win = new Gtk.ApplicationWindow({
        application: app,
        default_width: 900,
        default_height: 600,
    })
    const webView = new WebKit2.WebView()
    win.add(webView)
    webView.load_uri('https://johnfactotum.github.io/foliate-js/reader.html')
    win.show_all()
})
app.run([])

Run the file with gjs.

In the .load_uri() function, it loads the new renderer's demo. You can change it to anything.

So e.g. change it to https://futurepress.github.io/epub.js/examples/input.html to test Epub.js.

If this works, then I guess one could debug by building the 1.0.0 version, and try to remove some code at a time until it works. I'm afraid I can't think of another way. (Well, you could do it in the opposite direction. Which basically amounts to recreating Foliate from scratch until it breaks. So it's not really easier.)

@tomicakorac
Copy link
Contributor Author

tomicakorac commented Oct 22, 2022

Amazing, you're a star. I'll test this today.

Opening https://futurepress.github.io/epub.js/examples/input.html in any browser I have available (Vivaldi, Epiphany, Firefox, Chromium) does show several issues loosly similar to the ones described here - hanging on load, unable to scroll pages, a few others. I'm really not sure how relevant this is, but there is clearly something wrong with Epub.js.

None of these issues exist at https://johnfactotum.github.io/foliate-js/reader.html at least not in the web browsers. I'll continue testing John's script, but my hopes are still live that foliate-js renderer might help resolve this report.

@tomicakorac
Copy link
Contributor Author

After the first round of testing:

Summary: Basically, the script gives the exact same results as all the browsers. foliate-js seems to be working ok, at least those features that are currently available, while epub.js is practically unusable.

Foliate.js

Tested:

  • The interface loads properly, no infinite loading until focus change;
  • Epub file loads properly, again no infinite loading until focus change;
  • Forward/backward buttons work as expected, even while clicked very quickly;
  • Chapter menu works - clicking any Chapter name in the Chapter menu moves the ebook to the selected Chapter;

Not tested:

  • Mouse scroll;
  • Keyboard navigation;
  • Progress bar slider;

Epub.js

Tested:

  • Interface shows loading animation which doesn't go away until a file is loaded;
  • Epub file seems to be loading properly; In fact, only the first (cover) page can be seen, since page navigation doesn't work;
  • Forward/backward buttons do not work - it is impossible to change pages;
  • Mouse scroll does not work (is this expected?;
  • Keyboard navigation does not work (is this expected?);

Not tested:

  • Chapter menu (doesn't exist);
  • Progress bar slider;

@tomicakorac
Copy link
Contributor Author

tomicakorac commented Oct 22, 2022

To compare with the above test, all Epub.js examples from this address work absolutely fine:

https://futurepress.github.io/epub.js/examples/

Except the "Open from file" example, obviously, which is what was tested above.

@tomicakorac
Copy link
Contributor Author

tomicakorac commented Oct 22, 2022

Edit: Unfortunately, this has proven to not solve my problem, as commented further. Please disregard the instructions from this comment. Specifically, it is NOT SAFE to execute sudo update-mime-database /usr/share/mime.

Ok, wow... I think I was finally able to fix this problem. It was indeed caused by mime.cache file. BUT...

  • In Ubuntu there are two mime.cache files. Not one.
  • It was not enough for me to just delete mime.cache, as indicated in this thread. I had to update the mime database.

For future reference, this seems to have helped:

$ rm ~/.local/share/mime/mime.cache
$ update-mime-database ~/.local/share/mime
$ sudo rm /usr/share/mime/mime.cache
$ sudo update-mime-database /usr/share/mime

In my case, the only one causing the problem was /usr/share/mime/mime.cache, but there's no harm in updating ~/.local/share/mime/mime.cache. Also, removing the files perhaps isn't even necessary, maybe it was enough to just update-mime-database.

I wonder how none of the thread participants thought of suggesting this before. I got the idea from this thread: What is the purpose of mime.cache files

I'll continue testing for final confirmation, but I'm closing this thread for now. If needed, I'll reopen it.

@johnfactotum
Copy link
Owner

Epub file seems to be loading properly; In fact, only the first (cover) page can be seen, since page navigation doesn't work;

Sorry, I keep forgetting that the version on Epub.js's website is broken (futurepress/epub.js#1066). The problem has been fixed (futurepress/epub.js#949) for some while. It just appears that the website branch (https://github.com/futurepress/epub.js/tree/gh-pages) hasn't been updated since 2018.

@tomicakorac
Copy link
Contributor Author

Thank you very much for the time, patience and suggestions @johnfactotum. I confirm that sudo update-mime-database /usr/share/mime fixed the issue for me completely.

For others, the problem might also be caused by ~/.local/share/mime.cache file.

I always say that all is well that ends well, but I still got irrationally angry this morning after finding out that such a simple solution fixed the issue that's been causing me aggrevation for more than 6 months.

@tomicakorac
Copy link
Contributor Author

Ugh, my problem is back! After almost 2 days working normally, I can't open any ebook again. This time, the commands I thought had resolved my problem are not helping. This is terrible 😭

@tomicakorac tomicakorac reopened this Oct 25, 2022
@tomicakorac
Copy link
Contributor Author

@johnfactotum this set of problems is caused by Ubuntu's Power Mode settings, specifically, I today found out the following:

  • These issues persist every time when Ubuntu's Power Mode setting is set to "Power Saver";
  • These issues do not occur if any other value is selected ("Balanced" or "Performance").

I'm not sure how this can help further debugging, but I'll continue digging around. Also, if you or anyone else has any ideas, please let me know.

@johnfactotum
Copy link
Owner

I have no idea, honestly. Perhaps you can also try posting on https://discourse.gnome.org/.

@archisman-panigrahi
Copy link
Contributor

archisman-panigrahi commented Oct 26, 2022

I can reproduce this on a VM running Ubuntu 22.04 (no NVidia card/drivers). Only occurs in the "power saver" mode.
I could not reproduce this bug in any other Ubuntu flavor (including GTK based DEs like MATE, XFCE or Unity).

@johnfactotum
Copy link
Owner

johnfactotum commented Oct 26, 2022

Just a guess: perhaps it has something to do with the WebView (or one of its ancestor widgets) having zero opacity. I mean that sounds like something that might get optimized when in power saver mode, right? If that's what's causing the problem then it could be fixed by deleting this line:

<property name="opacity">0</property>

And maybe also this line:
this._mainBox.opacity = loaded ? 1 : 0

@archisman-panigrahi
Copy link
Contributor

archisman-panigrahi commented Oct 27, 2022

I removed the lines in #879 (comment), and it seems to work in a live session in virtualbox (however, Foliate takes ~10 seconds to load in the power saver mode).
@tomicakorac I made a PPA with this patch. https://launchpad.net/~apandada1/+archive/ubuntu/foliate-experiments Please verify if it works.

@tomicakorac
Copy link
Contributor Author

tomicakorac commented Oct 27, 2022

Thanks for the quick reaction guys.

@apandada1 that's a negative. Unfortunately the experimental version did not fix the problem on my computer, it only made it a little different, but essentially all the same issues still remain.

Honestly, now that we are 100% certain of the culprit -- and we have a really simple workaround (just change power profile to 'balanced' or 'performance') -- I can live with this. It would be great to fix this bug, but I assume its priority is far lower than much of the other workload @johnfactotum has already.

Also, Ubuntu's (or more precisely, GNOME's) Power Profiles feature is fairly new, poorly documented and nobody seems to know precisely how the feature works, i.e. what exactly do the profiles do to the system. I think it would be difficult to proceed with the debugging until we understand this first. I've raised an issue in the Power Profiles Daemon Gitlab repository and will update you as I receive new information.

Lastly, since this whole thread has become a wreck, containing outdated (and potentially even harmful) assumptions, I suggest that we close it now. I will open a new issue with a more precise bug report, for future tracking, and I suggest that it is addressed with relatively low priority (of course, if anyone disagrees, feel free to say so).

@wimdows
Copy link

wimdows commented Apr 23, 2023

The same problem also occurs on the Librem5 running PureOS. It does not have a Power Saver Mode.

@kaia009
Copy link

kaia009 commented Apr 23, 2023

I have Ubuntu 22.04 running on no less than three laptops (Huawei and Samsung). On all three, Foliate is working beautifully, BUT their doing so required preliminary steps that I have described in a previous post.

I admit that the few steps I took seem illogical, and I cannot explain why they worked. But, I insist, they had to be repeated for all three laptops.

  1. I installed using the PPA
    sudo add-apt-repository ppa:apandada1/foliate

I started Foliate and it did not perform properly.

  1. I restarted Ubuntu with Xorg (i.e. at restart, before entering the password, press the settings wheel bottom right, and choose Xorg to disable Wayland.)

I started Foliate and it worked perfectly.

  1. I restarted Ubuntu and made sure that Xorg was not chosen.

I started Foliate, and it worked perfectly (in Wayland)


True there is one issue: I can "export annotations" to JSON, HTML and plaintext (have not tried the other options), but I cannot "import annotations" from JSON. To move my annotations to another computer I have to physically copy/paste them between the following directory of the two computers.

/.local/share/com.github.johnfactotum.Foliate

I was in fact reading a book on Foliate until I was interrupted by recent mail in this thread. Foliate was working beautifully tonight, 23 April, on Ubuntu 22.04 as it has been working beautifully for me ever since I performed the above steps.

@tomicakorac
Copy link
Contributor Author

@kaia009 from your work-around steps it looks to me like they can't be used for anyone who is not on Wayland, correct? For example, I use Ubuntu on Xorg as my default environment, I can't change from Xorg to Wayland and stay there.

@accplan
Copy link

accplan commented May 4, 2023

I have similar issue on Linux Mint 21.1 but not sure if it has something with 'Power Saver' power profile described in #969 since I couldn't find 'Power Saver' option here.

When I launch foliate from the terminal bwrap complains about permissions:

bwrap: Can't find source path /root/.cache/at-spi: Permission denied

Solution was found here: https://www.mail-archive.com/[email protected]/msg38043.html
I just need to add WEBKIT_FORCE_SANDBOX=0 to environment like this:

WEBKIT_FORCE_SANDBOX=0 com.github.johnfactotum.Foliate

and it works fine for me

@nomadbl
Copy link

nomadbl commented Jan 10, 2024

I may have found another workaround (or missed it in this huge thread):
Open foliate on its own and then open whatever file.
I got the bug initially when opening a file with foliate from the file manager.

System info:
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
window manager/system: GNOME 42.9 on Wayland
Mesa Intel® UHD Graphics (ICL GT1)
installed foliate with snap

@David-Duffy
Copy link

To be boring (it's now 2024!) - this used to work for me until fairly recently but

A tower PC on AC power, I can't find any relevant CPU power management utilities installed
Linux tinonee 5.15.0-105-generic #115-Ubuntu SMP Mon Apr 15 09:52:04 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Ubuntu 22.04.4 LTS (jammy)
Xubuntu Xfce 4.16

foliate

Library pane comes up OK but once select an epub,
The contents bar is OK but the text pane is blank, and the following messages are emitted:

** (com.github.johnfactotum.Foliate:7218): WARNING **: 14:35:14.192: Could not open /sys/class/dmi/id/chassis_type: Failed to open file “/sys/class/dmi/id/chassis_type”: Permission denied
** (com.github.johnfactotum.Foliate:7218): WARNING **: 14:35:14.192: Could not open /sys/firmware/acpi/pm_profile: Failed to open file “/sys/firmware/acpi/pm_profile”: Permission denied
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 900x750: Permission denied
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 900x750: Permission denied
KMS: DRM_IOCTL_MODE_CREATE_DUMB failed: Permission denied
Failed to create GBM buffer of size 900x750: Permission denied
Failed to create EGL images for DMABufs with file descriptors -1, -1 and -1

Furthermore, the invisible text can be selected and copied.

  1. At least some of these error messages are similar to those reported earlier for this (Foliate stopped working on Ubuntu 22.04 #879)
  2. The same behaviour now appears for the Liferea RSS program

@archisman-panigrahi
Copy link
Contributor

@David-Duffy How did you install foliate? As a workaround, can you try another installation method?

@alizshow
Copy link

alizshow commented May 5, 2024

Using an nvidia card and the proprietary nvidia-535 on Ubuntu 24.04.

I also have these warnings which are likely unimportant and can be ignored:

  • Requiring Tracker
  • /sys/class/dmi/id/chassis_type
  • /sys/firmware/acpi/pm_profile

Following this post, setting this variable when calling foliate solved my problem:

WEBKIT_DISABLE_DMABUF_RENDERER=1

copied the snap desktop file

cp /var/lib/snapd/desktop/applications/foliate_foliate.desktop ~/.local/share/applications/

and added the env value by editing the desktop Exec line
mine looks like this.

Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/foliate_foliate.desktop env WEBKIT_DISABLE_DMABUF_RENDERER=1 /snap/bin/foliate %U

then used ALT+F2 and run the gnome-shell command restart to reload applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests