You are not logged in.

#1 2025-01-13 09:40:50

evorster
Member
Registered: 2020-07-07
Posts: 90

[Solved]Occasional CPU spike and drop in frame rates in various games.

Hi there!

I have been noticing these occasional "freezes" in several of the games I play, Dirt 4 being the worst affected. As you can imagine, with the game freezing for a split second in a racing game, you frequently end up in a ditch, which is frustrating, to say the least.
However, this issue shows up on other games as well.

A while ago, I could see it on the laptop's internal monitor and an external monitor that was connected. Downgraded mesa, and that issue seemed solved.
I was happily playing games on the 4K 144Hz external monitor.

Now I am far away from my external monitor, and playing the occasional game on the laptop's internal monitor, and I'm seeing the pauses every couple of seconds again, but only in games, and not in glxgears.

So, I daily drive Wayland on KDE because I need different scaling for each of my monitors, and the color correction is nice too. Since I am not using the external monitor now, I thought let's just run X11, maybe that is better?

So, with DOOM on an X11 session, I can run 2560x1440 resolution, on Ultra settings and the laptop pulls a steady 200fps, with neither the CPU or GPU breaking a sweat.
Same story on Dirt 4, the game runs at max settings without any stuttering. Success, right? Wrong.

Metro the enhanced edition and No Man's Sky still have the drop in frame rate and CPU usage spike every couple of seconds. No Man's Sky crashes if I record it, and Dirt just does not start up, but I have uploaded a video to Youtube showing first DOOM running on X11 with Ultra settings, ruling out hardware capabilities, then on a Wayland session with Low settings and showing the spike in CPU and the drop in frame rates, then Metro in low and high graphics settings, showing the issue just on the loading screen, but it is present in the game as well.

Here is a Youtube video that shows the issue: https://youtu.be/92jAvw4A4rA

Some things I have tried to narrow this down:
This laptop has a AMD 3d vcache CPU, the driver for which is in the latest mainline kernel 6.13, but you have to configure and compile it in.
So, with that driver you can configure the CPU for frequency or cache, neither setting makes any difference to the CPU spiking issue.

The nvidia-open driver does not compile against mainline kernel, so I am running nvidia-55xx-dkms driver. This driver also solves an issue where the external monitor does not wake up if the display rate is higher than 30Hz.

The laptop has Advanced Optimus, with amdgpu driving the iGPU and nVidia driving the dGPU.
amdgpu has an issue with PSR, so I have this kernel switch active: amdgpu.dcdebugmask=0x10

When these issues occur, there is no messages in the journal.

More information on the hardware:

Operating System: Arch Linux 
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.9.0
Qt Version: 6.8.1
Kernel Version: 6.13.0-rc6-1-git-00262-gb62cef9a5c67-dirty (64-bit)
Graphics Platform: X11
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

Display adapters:

[evert@Evert logs]$ switcherooctl 
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

Any help in tracking down this issue, or things to try next would be highly appreciated.

Tracked the issue down to ddcutil being called by powerdevil. Disabled powerdevil's use of ddcutil, and now there are no more stutterings

Last edited by evorster (2025-01-13 15:55:55)

Offline

Board footer

Powered by FluxBB