I have an Optimus laptop with a GTX 1050, Intel i7 7700HQ, a 128GB SSD and 8GB of RAM. Using Arch Linux and KDE Plasma.
Using Nvidia proprietary drivers version 396.24-19.
KDE Frameworks: 5.48.0
I had tearing with the proprietary nvidia drivers, and enabling DRM KMS seemed to fix it. I did it this way: https://askubuntu.com/a/1024499/852424
Sadly, I came across a couple of problems after this:
Resizing windows by dragging them to one of the edges of the screen sometimes freezes the window in place for about 20 seconds. I can only move my mouse, change to another tty, numlock and capslock still work. There are no logs in journalctl -b when this happens.
There are also random freezes, where NOTHING responds. I can't use my mouse or my keyboard, even numlock and capslock don't work. When looking in the journalctl log, I can always see these errors:
ArchLinux kernel: nvidia-modeset: Allocated GPU:0 (GPU-c07c20bb-45d1-9ef7-5dec-2ccd17eb1af2) @ PCI:0000:01:00.0
ArchLinux kernel: nvidia-modeset: Freed GPU:0 (GPU-c07c20bb-45d1-9ef7-5dec-2ccd17eb1af2) @ PCI:0000:01:00.0
So how do I fix these problems? What other logs do I need to provide? Thanks.
EDIT: all my issues have gone away since I changed from KDE Plasma with KWin to bspwm with compton. Nvidia KMS works without freezes.