Create a text file in /etc/profile.d
========================================================
sudo gedit /etc/profile.d/kwin_triple_buffer.sh
========================================================
Write this here:
export KWIN_TRIPLE_BUFFER=1
Next you need to make the script.sh with this lines:
#!/bin/bash
source kwin_triple_buffer.sh && kwin_x11 --replace
===========================================================
Add it in startup and choose the item "Automatic" in KDE settings.