IntelliJ Completely Freezes Ubuntu 19.04
In the last weeks, possibly since a recent Ubuntu update, IntelliJ freezes sporadically while using it, often while trying to dismiss a dialog box, such as within the settings panel, but just as often when I am running my app within the IDE and after a while, the whole computer locks up.
I can see there is no CPU spike before locking up.
I have tried completely removing IntelliJ, as well as testing all the versions that are available in the JetBrain toolbox installer.
I have tried multiple different projects, and they all experience the same.
I have tried completely removing my .idea folders and building new projects from scratch.
I have also tried using Wayland and Xorg variants of the Ubuntu desktop which are available on startup.
I have left the computer running overnight
I have tried switching to power save mode
I have tried pausing indexing
I have tried updating the JDK from 1.8 to 1.12.
Each time it hangs, the whole computer is not responsive (although, the mouse does move). I cannot switch tabs, open a terminal, ctrl+alt+delete, and all other windows are completely unresponsive. I have to hard-stop the computer and reboot.
This only started happening recently, and I'm baffled. Anyone else with this issue?
Please sign in to leave a comment.
Please see https://youtrack.jetbrains.com/issue/JBR-1644 for the solution.
I think I finally might have figured out why our Linux laptops are getting unusable when we run Rider or IntelliJ ... It has to do with the process "kswapd0" which moves stuff back and forth to the swap drive/"mem". I have 16GB or RAM so I don't understand why the swap mem is used so much. So I found this page on Stack Overflow: https://askubuntu.com/questions/259739/kswapd0-is-taking-a-lot-of-cpu I followed the first suggestion in the acccepted answer - don't use swap unless you have absolutely no memory left: echo vm.swappiness=0 | sudo tee -a /etc/sysctl.conf - after I did this my laptop acted normally again while using these products.
To clarify, the freeze is unrecoverable and the whole system must be restarted. It is not related to swap.
Thank you @Serge, your link above solves this issue.
Yes, my system was freezing everything for many minutes. Can barely move the mouse, clock is not updating etc. It was the java process that used 400% cpu for the most part, but I saw that kswapd0 occasionally used 100%. Your problem sounds quite similar to mine. But in your case there was another cause.
This issue was caused by a bug on the "mutter" package (used by Gnome). "mutter" has been upgraded to 4 on many distributions.
This will solve this issue without having to downgrade (that has broken many systems)
In this post,
https://youtrack.jetbrains.com/issue/JBR-1644
I'm using 19.10. so the command changed to:
```
sudo apt install \
gir1.2-mutter-5=3.34.1-1ubuntu1 \
libmutter-5-0=3.34.1-1ubuntu1 \
mutter=3.34.1-1ubuntu1 \
mutter-common=3.34.1-1ubuntu1
```
IDEA in Ubuntu 18.04 freezes for me about 2x per day. The rest of the OS is fine.
Switching workspaces and then come back to the original workspace has been fixing it for me.
There is a known kernel bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1872001 . If you run 5.3.0-46-generic, downgrading should help.