Fix for laggy KWin when pausing and restarting Compositor

In my Optimus Laptop with an NVIDIA 1050TI, if I plug an external monitor and restart compositor, KWin gets very laggy, redenring it unusable. In order to partially fix that, go to Desktop Effects settings and turn on Background contrast. Unplug the monitor, turn compositor ON and replug the external monitor. This solves the problem of Compositor being interrupted when an HDMI output is plugged, but if compositor is restarted again, you’ll have to repeat this process. I will continue the search for a definitive patch and report back here (hopefully).

p.s: Currently using Layan theme with Kvantum.