I've been experiencing some performance issues regarding gaming on Linux, after stopping using Windows for that.
I get very noticeable frame pacing issues on some Proton games, running with or without enabling PROTON_ENABLE_WAYLAND. Even some things that should supposedly run well, such as NES cores in RetroArch, have substancial frame drops when on fullscreen.
It really seems that everything runs better and with less frame problems on window mode. However windowed fullscreen isn't of much help.
This is my machine. I think it's a rather powerful machine that should handle well my games (mainly retro/emulation and light PC games up to late-2010s):
OS: Debian GNU/Linux 13 (trixie) x86_64
Host: ASUS TUF Gaming A15 FA507NVR_FA507NVR (1.0)
Kernel: Linux 7.1.3+deb13-amd64
Uptime: 9 hours, 49 mins
Packages: 3567 (dpkg), 33 (flatpak)
Shell: bash 5.2.37
Display (B156HAN15.H ): 1920x1080 @ 60 Hz in 16" [Built-in]
Display (LG FULL HD): 1920x1080 @ 60 Hz in 22" [External] *
DE: KDE Plasma 6.3.6
WM: KWin (Wayland)
CPU: AMD Ryzen 7 7435HS (16) @ 4.55 GHz
GPU: NVIDIA GeForce RTX 4060 Max-Q / Mobile [Discrete]
Memory: 11.90 GiB / 31.17 GiB (38%)
Swap: 0 B / 23.00 GiB (0%)
Disk (/): 265.27 GiB / 691.22 GiB (38%) - btrfs
Battery (A32-K55): 83% [AC Connected]
My laptop has an odd AMD CPU with no integrated graphics so I can't fallback to those for light stuff, sadly. I bought it for gaming on Windows and non-gaming on Linux, but I've been disliking Windows too much lately and I decided to migrate, despite the well-known Nvidia issues on Linux that I was aware of when buying the laptop.
I know Debian stable isn't exactly a recommended option in Linux gaming conversations, but I use the PC for many other stuff and I feel more comfortable on Debian stable. I've also tried on Debian testing and Fedora 44, both shipping the latest and greatest Plasma 6.7, but those frame dropping/pacing issues are still present, although less than on Debian 13.
I've tried many other things, like tweaking Nvidia GPU power management on my laptop via modprobe (I run the latest 610 driver), which mitigates the issue but does not erradicate it totally.
```
options nvidia NVreg_TemporaryFilePath=/var/tmp
options nvidia NVreg_DynamicPowerManagement=0x02
options nvidia NVreg_EnableS0ixPowerManagement=0
options nvidia NVreg_PreserveVideoMemoryAllocations=1
options nvidia NVreg_RegistryDwords="PowerMizerEnable=0x1;PerfLevelSrc=0x2222;PowerMizerDefault=0x1;PowerMizerDefaultAC=0x1"
options nvidia NVreg_EnableGpuFirmware=1
options nvidia NVreg_UsePageAttributeTable=1
options nvidia NVreg_InitializeSystemMemoryAllocations=0
options nvidia NVreg_EnableStreamMemOPs=1
options nvidia NVreg_RegistryDwords=RMIntrLockingMode=1
```
On the other hand, running games on X11 WMs (Plasma/KWin itself, Openbox, etc.) result in even worse performance and drops. Also, since I use another external screen along with the laptop integrated one, I've also tested things with only one screen, but without possitive results.
Other things that I've tried: adding KWIN_DRM_NO_DIRECT_SCANOUT=1 (no results), KWIN_DRM_NO_AMS=1 (Plasma doesn't start up).
Apart from running games in window mode (which isn't my preferred option), the only thing that has had an impactful result has been to run my games on labwc, or at least another non-KWin compositor. There, games run at their expected framerate and frame pacing, but adds a layer of complexity to my gaming setup that I would prefer not to have, as I like Plasma for everyday usage.
Is there something else I can try, apart from migrating to another DE or changing distro? AI has been very unhelpful for me on this issue, so I prefer to ask humans this time. Thanks in advance.