Long story:
When dealing with heavier programs (Firefox with Flash and a bunch of tabs open, or OpenTTD, or Minecraft, or GIMP with larger images, or other applications), /usr/bin/X usage of CPU rises sharply, sometimes using 100% of one core. It starts randomly - sometimes as soon as I open the program, sometimes after one hour. When I close said application, X's CPU usage lowers a bit, but it's still in the range of 10-12%.
Checking htop, the "offending" process is always /usr/bin/X :0 -audit 0 -auth /var/lib/mdm/:0.auth -nolisten tcp vt8. Things I've already tried:
- Killing the offending process. When X restarts, the issue continues.
- Googling it for days. I've seem more people with this problem, but no answer for this.
- Swapping MDM with GDM3. The issue remains the same, only with /var/lib/gdm3 instead of /var/lib/mdm.
- Logging from console. Same as above, but with /var/lib/x-auth hogging CPU instead.
- Uninstalling the NVidia driver (302.17) provided by the distro and installing the one in NVidia's site (304.something). No change.
- Deactivating Compiz for Xfwm4. No change.
- Using 3.2.0-3-amd64 kernel instead of 3.2.0-3-rt-amd64 or the old kernel (3.2.0-2, I think). The issue remains.
Machine where this happens: CPU AMD Athlon II X2 dual core; 4GB RAM; GPU Geforce 9400GT. LMDE 64 bits with Xfce.
UPDATE: Since another program that got sluggish and slow was Vuze, I tried different JDK versions (sun, openjdk-6, openjdk-7). No success.