Compiz process with high CPU usage

Hi,

I am running an application / game on the Jetson Nano TX1 that renders its window content via OpenGL. That works great on a normal 1920x1080 computer display running with 60 Hz connected via HDMI. However attaching certain television sets or certain projection systems that can only run with 24/30/29.97/etc Hz, the compiz process that normally uses about 20% cpu, now uses 80-90% cpu plus it seems that X11 event handling has noticeable delays.

This issue can also be reproduced with the glxgears application.

Does anybody came across something similar before? I have total control over the game source code, but no matter what I tried (v-sync on/off), the problem persists.

Cheers,
Martin

Not sure at all, but you may :

  • delete compiz cache and reboot for trying a new display

  • Install compiz settings manager and in OpenGL options uncheck Sync to VBlank

sudo apt-get install compizconfig-settings-manager
/usr/bin/python /usr/bin/ccsm

Hi,
For profiling CPU usage, we suggest run sudo jetson_clcoks to fix CPUs at max clock, and sudo tegrastats to get the percentage.

I already tested a lot. For example, when I run the application in fullscreen mode without any compiz process, the thread that does the OpenGL render calls and the call to glXSwapBuffers has a CPU usage of around 99%. But, when I deactivate vsync with __GL_SYNC_TO_VBLANK=0, the thread cpu usage goes to normal (around 65%), but I get image tearing of course, which is not acceptable. What I don’t understand is, why this happens only with display frequencies other than 60 Hz?

So, when I run the app under compiz, the CPU usage is in compiz and when I run it without compiz, the high CPU usage is in the app process itself.

1 Like

Try removing compize and installing Compton I find the performance to be way better. Although you may need to install a separate window manage or switch to a different desktop environment like xfce/xubuntu because Compton is just a compositor and works on top of a window manager … You may be able to disable the compositing function within compize while keeping it’s window manager functionality prior to enabling compton.