PDA

View Full Version : Compiz very slow when cpu is near 100% usage


rev_b
December 12th, 2006, 02:47 PM
Hello there.
I have a problem with Compiz 0.3.3 and 0.3.4. When I'm running something intensive on the background (like encoding a movie, or ripping a DVD), the interface gets very, very slow and jerky, rendering the PC almost unusable. If I disable Gl Desktop everything is fine, and if I start beryl 0.1.3, it hasn't this problem, it's smooth even when CPU is at 100%.

I'm using a Nvidia 7900GT with latest official drivers, Ubuntu 6.10 with 2.6.17 generic kernel , Athlon64 3200+ with 2Gb of RAM.

What can be the problem?

Thanks in advance.

RAOF
December 13th, 2006, 03:56 AM
The problem is the nVidia drivers. They react poorly to CPU load. I think it's their GL_YIELD implementation.

I believe beryl gets around it by launching itself with the environment variable __GL_YIELD="none" (or something similar). You could launch compiz with that, too.

Alternatively, there's a small LD_PRELOAD hack around which disables GL_YIELD entirely.

rev_b
December 13th, 2006, 07:01 AM
I see. So exactly, how do I launch it with that workaround?

RAOF
December 13th, 2006, 07:21 AM
I believe you want to launch compiz as:
GL_YIELD="NOTHING" compiz --replace gconf --indirect-rendering --use-cow

rev_b
December 17th, 2006, 12:28 AM
Thanks, that solved it.
I created a script and started it automatically in my sessions startup programs.

#! /bin/bash
gtk-window-decorator --replace &
export __GL_YIELD="NOTHING"; compiz --replace --use-cow gconf


Wouldn't it be a good idea to make GL_YIELD="NOTHING" as default? Many Linux users do favor Nvidia cards because of its linux support, and Compiz, as it is, run badly for them...

Or at least, make it configurable on GLDesktop settings.