Home / GitHub Page

Joplin Freezing on Linux Distros Running Kernel 5.5 Bug Update

As originally posted here after spending two weeks working on coming to a conclusion in my spare time:

I have good news:

  1. I can officially verify with 100% certainty that this specific commit is the culprit behind this entire fiasco: torvalds/linux@339ddb5 . It was suggested earlier here and on reddit, but I had to find out on my own through testing to make sure.
  2. Node-sqlite3 module just added official Electron 8 support in its master branch, meaning upgrading to Electron 8 in the future should be a fairly safe bet, since this was the one module that Joplin uses that I was scared would break the most on upgrade. mapbox/node-sqlite3@dc30669
  3. There is a bit of talk about this particular issue being fixed in the next official Electron 8 release (with a partial fix implemented in 8.0.3). I’m having problems finding the source here, though, so I could be terribly mistaken.

The bad news:

  1. If you use the btrfs filesystem for your harddrives, I’ve found that on the latest 5.5 releases after reverting the epoll commit above, there’s a chance that you won’t be able to boot properly. It’s a bit random when it happens, and I haven’t figured out a set pattern yet, so no bug report ensuing upstream there.
  2. There is no set release date or timeline that I can find for an official stable release to be deployed for Electron 8.0.4 or Node-Sqlite3 4.1.2 (or whatever they decide to use for versioning for that release).

There are two solutions to this problem that should fix the issue for most users here:

  1. Revert to the latest Kernel 5.4 release (whether it be the LTS release from your distro’s repos or a custom build if you know what you’re doing with building your own kernel)
  2. Cloning the official github repo, patching it to the latest kernel.org release, and reverting the above commit and running that kernel with the caveat above and the possibility of other issues arising.

@laurent, if you are able to wait for Node-SQLite3 to release their next release, I don’t really see any other major hurdles for upgrading to Electron 8 for the time being. It would definitely be good to fully test it and I did find one minor UI bug on 5.4 involving creating new ToDo lists breaking the placement of the editor in the app and needing to be restarted.

1 Like

Kernel 5.5.7 and 5.5.8 both are still showing this bug. The maintainers of the broken commit have acknowledged it and issued a fix but when it’ll show up in the main kernel is up in the air. Thanks for your patience all.

Great, nice to see that kernel developers know about this bug and intent to fix it. We can indeed also upgrade to Electron 8 and the latest SQLite if you think that can fix the issue. We’ll do so at some point in any case.

1 Like

Fixed that. Whoops. It’s the component maintainers not the kernel ones that issued the fix. It could still be turned down in main branch, so here’s to hoping.

Either way, Electron 8 definitely has some fixes for other Linux specific bugs or just plainly doesn’t have the problem code.

Electron 8.1.0 just released and the bug is still present.

1 Like

5.5.9 just released and the fix alluded to previously hasn’t been implemented yet.

One of the people helping me with this bug found a quick and easy way to get around it:

  1. Whenever Joplin Freezes during sync, go to Options=>Tools

  2. Click the WebClipper tab up top

  3. Enable and then Disable Webclipper

  4. Click Apply

  5. Go back to business as usual. :smiley:

Here’s a demo:

1 Like