Very strange framerate drops and lag with kwin + nvidia

Using kwin + nvidia on opensuse 12.1, I have these very strange framerate drops causing lag during various animations. I’ll try to describe how I can simulate it.

  1. kde startsup framerate is 59 fps (ok)
  2. I have 4 desktops and using the pager the desktop cube rotates.
  3. When all windows are minimized on desktop 1 and 2, rotating between desktop 1 and 2 goes well, no framerate drops (OK)
  4. Then I maximise a window (eg dolphin) on desktop 1
  5. Now rotating between desktop 1 and 2 causes framerate drop to 50 and screen lags
  6. Then I maximise a window (eg dolphin) on desktop 2 as well
  7. Rotating causes frameratedrop to 45 and even more lag

I tried changing various settings (disable Vsync etc) but none seem to help.

Then I noticed the following, which has me very confused and is very strange!!!

On both desktop 1 and 2 I do the following:

  • Maximise a window (eg dolphin)
  • Open another window, but not maximised but with very small size (eg 100 x 100 pixels)
  • So Each desktop then has two windows showing: a small window which has focus, with a maximised window laying beneath it

Then, strangly, rotating the cube with these smaller windows on top of the maximised windows doesn’t cause a framerate drop. It stabilises on 57-58 and doesn’t suffer from lag…

I also noticed that the larger the window laying above the maximised window is (tested by increasing from 100x100 to 200x200 to 300x300 and so on) the more the framerate starts to drop. Framerate drops are the largest with the above screen maximised.

Can someone help me figure out how to fix these issues? It also has impact on other animations (like magic lamp). The rotating cube issue I explained above is just an example to describe my problem.

PS I tried switching the KDE style (oxygen, qtcurve, motif, CDE, …) but framerate drops are on all these themes…

PS. I got the framerate from the kwin - showFPS plugin. Although I says 45 - 50 when rotating cube when windows are maximised, I suspect that actual framerate is lower because screen is lagging noticably.

Found the problem. I was using the standard oxygen window decoration. It has an option called “activate animation”. If I disable this, framerate is ok and no more lag. Don’t know what kind of animations I disabled since I don’t see any difference except for the lag that has dissappeared.