SUMMARY This bug was driving me MAD! Every two or three seconds, most of my games would stutter. When you are playing a racing game, that is enough to make you end up in a ditch somewhere. In FPS's it gets you killed. It would affect native linux games on Wayland, but not on X11. It affects proton games on X11, but not on Wayland. The hardware I am running these games on is pretty powerful, able to handle any game at native resolution and very high fps. (200fps for DOOM on Ultra, for instance) Countless kernel rebuilds, downgrading of mesa, nvidia's drivers, trying git versions of the same, running X11 sessions, then Wayland sessions... literal MONTHS were spent looking for the reason that this system would stutter every two or three seconds. STEPS TO REPRODUCE 1. Start your system normally with a Wayland session. 2. Run a native game on Steam. OBSERVED RESULT Every couple of seconds, the game would freeze just for a second. Youtube video here: https://youtu.be/92jAvw4A4rA EXPECTED RESULT Power management not to have any effect on frame rates of games. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.2.5 KDE Frameworks Version: 6.9.0 Qt Version: 6.8.1 Kernel Version: 6.12.8-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 32 × AMD Ryzen 9 7945HX3D with Radeon Graphics Memory: 62.0 GiB of RAM Graphics Processor: AMD Radeon 610M Manufacturer: ASUSTeK COMPUTER INC. Product Name: ROG Strix G733PYV_G733PYV System Version: 1.0 ADDITIONAL INFORMATION This is an advanced optimus laptop, with two GPUs: Device: 0 Name: Advanced Micro Devices, Inc. [AMD®/ATI] Raphael Default: yes Environment: DRI_PRIME=pci-0000_09_00_0 Device: 1 Name: NVIDIA Corporation AD103M / GN21-X11 [GeForce RTX 4090 Laptop GPU] Default: no Environment: __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only -------------------------------------------- How am I so sure its powerdevil causing this? I could see powerdevil eating up significant percentages of a CPU at the same interval at which the games were lagging. Then, I stopped power-profiles-daemon.service, and killed the powerdevil process. The games that were stuttering before now all ran smoothly, with no stuttering in sight. I am happy to do troubleshooting and small modifications to determine the root cause, and a fix
It seems that powerdevil was interrogating my displays with ddcutil, freezing the displays while doing so. Disabled powerdevil's use of ddcutil by setting POWERDEVIL_NO_DDCUTIL=1 in /etc/environment. Now powerdevil runs happily, and does not disturb the games.