[SOLVED]Issues with Kwin after setting up Nvidia Prime

Hello, today I installed Manjaro KDE on my new MSI GP73 and I followed a tutorial to set up prime because i wanted to use just the nvidia gpu. I followed everything on the tutorial and rebooted the computer, everything was working fine, I tried a few benchmarks and everything was great, the gpu was running perfectly, but then I grabbed a window and dragged it to the left and then it froze and stayed frozen for like 10 seconds until everything worked again.
Everything works fine on the computer, the only problem is related with windows and window compositing, when i grab a window or select it to open int everything frozes for a few seconds until it works again, so I think the problem must be related with Kwin, anyone that can help?

inxi -G
Graphics:  Device-1: Intel UHD Graphics 630 driver: i915 v: kernel 
           Device-2: NVIDIA GP106M [GeForce GTX 1060 Mobile] driver: nvidia v: 418.56 
           Display: x11 server: X.Org 1.20.4 driver: modesetting,nvidia resolution: 1920x1080~60Hz 
           OpenGL: renderer: GeForce GTX 1060/PCIe/SSE2 v: 4.6.0 NVIDIA 418.56

Have you tried changing the different compositor settings in the system settings utility?

I don't really know what to change there, I have play a bit with the options like not letting applications to block composition, but it does not make any difference

You may need to log off/restart for changes to take effect. I cannot possibly predict which settings will be the best for your machine. Experiment with different combinations.

Great I will try. Did not now that i have to log off. Thanks

1 Like

Nothing, everything keeps the same after trying changins:
-Allow applications to block compositing
-Tearing prevention
-Rendering backend between opengl 2.0 and 3.1

I do not understand what is happening.

Perhaps you will need to enable the "force full composition pipeline" setting and "triple buffering" in kwin. Be aware these settings will affect your graphics performance if you game. Search the Manjaro forum or the Archwiki for setup instructions.

1 Like

I tried this from Archwiki:

Set GL threads to sleep by exporting __GL_YIELD="USLEEP" to just kwin_x11 . Unlike setting up a global environment variable, this affects only KWin. It should also have the advantage over other workarounds, like forcing triple buffering or forcing composition pipeline in the driver, that it doesn't introduce additional stuttering when scrolling in Firefox or moving windows.

The script can be executed automatically at login with an autostart script:


#!/bin/bash (sleep 2s && __GL_YIELD="USLEEP" kwin_x11 --replace)

Flag the script as executable.

The sleep argument helps to prevent issues when KWin is restarted/hanging after logging in, you might need to increase this time.

Nothing has changed, it still freezes when I move a window and drop it to a border of the screen.

Finally I solved it by enabling full composition pipeline and Changing the rendering backend from OpenGL to Xrender. Now everything works just fine.

1 Like

Glad you got it fixed with the ffcp setting. Just FYI the best way to mark your issue solved on a help thread is to set the check mark under the post that provided the correct answer.

Done! I am new to the forum, thanks.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by Bytemark