IntelliJ 2018.3启动卡顿报错,日志异常如何排查?
Hey there, let's tackle your problems one by one—they're mostly unrelated to the npm cache cleanup you did, so let's start with the most critical error first.
1. Fix the GLX Version Error (Root Cause of Lag/Startup Issues)
The error you're seeing (GLX version 1.3 or higher is required) is directly tied to IntelliJ's graphical rendering. IntelliJ relies on Java's Swing/AWT framework, which uses GLX (OpenGL Extension to the X Window System) for hardware acceleration. Your system's outdated GLX version is almost certainly causing the lag and startup failure. Here's how to fix it:
First, confirm your current GLX version:
Run this command in your shell to verify:glxinfo | grep "GLX version"If the output shows
GLX version: 1.2, that's confirmed as the problem.Permanent fix: Update your graphics drivers:
This is the best long-term solution. Depending on your GPU:- For NVIDIA GPUs: Install the official proprietary driver (avoid the open-source
nouveaudriver, as it often lacks support for newer GLX versions). - For AMD/Intel GPUs: Update your Mesa graphics libraries using your distro's package manager. For example, on Debian/Ubuntu:
On Fedora:sudo apt update && sudo apt install mesa-utilssudo dnf update mesa
- For NVIDIA GPUs: Install the official proprietary driver (avoid the open-source
Temporary workaround (if you can't update drivers right now):
Force IntelliJ to use software rendering instead of hardware acceleration:- Open IntelliJ's VM options file. On Linux, this is usually located at
~/IdeaIC2018.3/bin/idea64.vmoptions(oridea.vmoptionsfor 32-bit systems). - Add this line at the end of the file:
-Dsun.java2d.opengl=false - Save the file and restart IntelliJ. Alternatively, launch IntelliJ with this environment variable to bypass hardware acceleration temporarily:
LIBGL_ALWAYS_SOFTWARE=1 ./idea.sh
- Open IntelliJ's VM options file. On Linux, this is usually located at
2. Locate the Correct IntelliJ Log Files
The path ~/.IdeaIC2018.3/system/log might not contain the latest logs if IntelliJ failed to write to it during a faulty startup. Here's how to find the right logs:
If you can launch IntelliJ (even with lag):
Go toHelp > Show Log in File Manager(the exact wording varies by OS, but it will be similar). This will directly open the folder with the most up-to-date log files (likeidea.log), which will include details about startup failures or lag.If you can't launch IntelliJ:
Check these alternative paths for Linux:~/.cache/JetBrains/IdeaIC2018.3/log/tmp/idea-IdeaIC2018.3.log(temporary logs generated during failed startups)
You can also start IntelliJ in debug mode to get real-time logs directly in your shell:
./idea.sh --debug
3. Is the npm Cache Cleanup Related?
Short answer: No. The ~/.npm/__cacache folder is just npm's local package cache. Deleting it only affects how fast npm downloads packages in the future—it has no connection to IntelliJ's graphical rendering or startup process. The timing was likely a coincidence.
内容的提问来源于stack exchange,提问作者nadavgam

