How to troubleshoot periodic stutters

I have noticed a periodic(every second or so) stutter little bit after the 6.12 kernel release, not exactly sure when it started though.

First time I have noticed it in chrome when scrolling, but it doesn’t happen every time so I didn’t pay a lot of attention to it.

A few days ago I have started Against the storm and it has a similar stutter every second. It wasn’t a problem a few months ago when I have played that game the last time. Lowering the quality makes the stutter even worse. It’s almost bearable if I put the graphics high and lower the vsync to 1/2 of the monitor rate.

It doesn’t happen in two other games I have tried, but those are older and less intensive graphically.

It’s similar because it happens every second just like in chrome, only it’s constant. In chrome it only happens sometimes and it goes away.

Tried the lts kernel, the problem is present there too. So it’s not a kernel issue, something else that was updated around the same time. I don’t know what else can it be.

System:
  Kernel: 6.12.8-2-cachyos arch: x86_64 bits: 64 compiler: clang v: 18.1.8
  Desktop: GNOME v: 47.2 tk: GTK v: 3.24.43 wm: gnome-shell dm: GDM
    Distro: CachyOS base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82XM v: IdeaPad Slim 3 15ABR8
    serial: <superuser required> Chassis: type: 10 v: IdeaPad Slim 3 15ABR8
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: NO DPK serial: <superuser required>
    part-nu: LENOVO_MT_82XM_BU_idea_FM_IdeaPad Slim 3 15ABR8 UEFI: LENOVO
    v: KYCN31WW date: 03/18/2024
Battery:
  ID-1: BAT0 charge: 46.2 Wh (100.0%) condition: 46.2/47.0 Wh (98.4%)
    volts: 12.8 min: 11.3 model: BYD L22B3PF2 serial: <filter> status: full
CPU:
  Info: 8-core model: AMD Ryzen 7 7730U with Radeon Graphics bits: 64
    type: MT MCP arch: Zen 3 rev: 0 cache: L1: 512 KiB L2: 4 MiB L3: 16 MiB
  Speed (MHz): avg: 2972 min/max: 400/4546 boost: enabled cores: 1: 2972
    2: 2972 3: 2972 4: 2972 5: 2972 6: 2972 7: 2972 8: 2972 9: 2972 10: 2972
    11: 2972 12: 2972 13: 2972 14: 2972 15: 2972 16: 2972 bogomips: 63884
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Barcelo vendor: Lenovo
    driver: amdgpu v: kernel arch: GCN-5 pcie: speed: 8 GT/s lanes: 16 ports:
    active: eDP-1 empty: DP-1,HDMI-A-1 bus-ID: 04:00.0 chip-ID: 1002:15e7
    temp: 38.0 C
  Device-2: Luxvisions Innotech Integrated Camera driver: uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 bus-ID: 1-3:2 chip-ID: 30c9:00a7
  Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.4
    compositor: gnome-shell driver: gpu: amdgpu display-ID: 0
  Monitor-1: eDP-1 model: ChiMei InnoLux 0x1552 res: 1920x1080 dpi: 142
    diag: 394mm (15.5")
  API: EGL v: 1.5 platforms: device: 0 drv: radeonsi device: 1 drv: swrast
    gbm: drv: kms_swrast surfaceless: drv: radeonsi wayland: drv: radeonsi x11:
    drv: radeonsi
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.3.3-cachyos1.2
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon Graphics (radeonsi
    renoir LLVM 18.1.8 DRM 3.59 6.12.8-2-cachyos) device-ID: 1002:15e7
    display-ID: :0.0
  API: Vulkan v: 1.4.303 surfaces: xcb,xlib,wayland device: 0
    type: integrated-gpu driver: N/A device-ID: 1002:15e7
Audio:
  Device-1: Advanced Micro Devices [AMD/ATI] Renoir Radeon High Definition
    Audio vendor: Lenovo driver: snd_hda_intel v: kernel pcie: speed: 8 GT/s
    lanes: 16 bus-ID: 04:00.1 chip-ID: 1002:1637
  Device-2: Advanced Micro Devices [AMD] ACP/ACP3X/ACP6x Audio Coprocessor
    vendor: Lenovo driver: N/A pcie: speed: 8 GT/s lanes: 16 bus-ID: 04:00.5
    chip-ID: 1022:15e2
  Device-3: Advanced Micro Devices [AMD] Family 17h/19h/1ah HD Audio
    vendor: Lenovo driver: snd_hda_intel v: kernel pcie: speed: 8 GT/s lanes: 16
    bus-ID: 04:00.6 chip-ID: 1022:15e3
  API: ALSA v: k6.12.8-2-cachyos status: kernel-api
  Server-1: PipeWire v: 1.2.7 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Realtek RTL8852BE PCIe 802.11ax Wireless Network vendor: Lenovo
    driver: rtw89_8852be v: kernel pcie: speed: 2.5 GT/s lanes: 1 port: 2000
    bus-ID: 02:00.0 chip-ID: 10ec:b852
  IF: wlan0 state: up mac: <filter>
  IF-ID-1: tailscale0 state: unknown speed: -1 duplex: full mac: N/A
Bluetooth:
  Device-1: Realtek Bluetooth Radio driver: btusb v: 0.8 type: USB rev: 1.0
    speed: 12 Mb/s lanes: 1 bus-ID: 3-4:3 chip-ID: 0bda:4853
  Report: btmgmt ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: <filter> bt-v: 5.2 lmp-v: 11

If you’re speaking only about games, there were proton updates this week too.

I’m launching this game from heroic, I saw a proton 7.0 and a wine-ge 8.0 in the wine list, tried them. Same stutter.

What comes to mind is either BORE regressions or regressions with AutoFDO (unlikely tbh). To check for the first case, you can try to load a sched-ext scheduler or use the EEVDF kernel sudo pacman -S linux-cachyos-eevdf linux-cachyos-eevdf-headers.

The second case also involves using another kernel, namely the bore-lto kernel which is pretty much identical with the default kernel but it wasn’t built with AutoFDO profiles sudo pacman -S linux-cachyos-bore-lto linux-cachyos-bore-lto-headers.

Are these two the same thing? It’s hard to know what to use with all these options.

I think I have sched-ext enabled with lavd

systemctl status scx_loader
● scx_loader.service - DBUS on-demand loader of sched-ext schedulers
     Loaded: loaded (/usr/lib/systemd/system/scx_loader.service; enabled; preset: disabled)
     Active: active (running) since Thu 2025-01-09 12:06:35 EET; 5h 36min ago
 Invocation: 771959d0b74840519627837a3b4f23da
   Main PID: 723 (scx_loader)
      Tasks: 22 (limit: 16451)
     Memory: 4.9M (peak: 35.1M, swap: 18.9M, swap peak: 18.9M)
        CPU: 1.886s
     CGroup: /system.slice/scx_loader.service
             ├─723 /usr/bin/scx_loader
             └─752 scx_lavd

Jan 09 12:06:35 cachyos-lenovo systemd[1]: Starting DBUS on-demand loader of sched-ext schedulers...
Jan 09 12:06:35 cachyos-lenovo scx_loader[723]: [INFO]: Starting as dbus interface
Jan 09 12:06:35 cachyos-lenovo scx_loader[723]: [INFO]: Starting default scheduler: Lavd
Jan 09 12:06:35 cachyos-lenovo systemd[1]: Started DBUS on-demand loader of sched-ext schedulers.
Jan 09 12:06:35 cachyos-lenovo scx_loader[723]: [INFO]: switching Lavd with mode Auto..
Jan 09 12:06:35 cachyos-lenovo scx_loader[723]: [INFO]: Got event to switch scheduler!
Jan 09 12:06:35 cachyos-lenovo scx_loader[723]: [INFO]: starting scx_lavd command
Jan 09 12:06:35 cachyos-lenovo scx_loader[752]: 10:06:35 [INFO] Autopilot mode is enabled by default.
Jan 09 12:06:36 cachyos-lenovo scx_loader[752]: 10:06:36 [INFO] scx_lavd scheduler is initialized (build ID: 1.0.9-gdda32c72-dirty x86_64-unknown-linux-gnu)
Jan 09 12:06:36 cachyos-lenovo scx_loader[752]: 10:06:36 [INFO] scx_lavd scheduler starts running.

I think I have already tried the bore-lto kernel, but I will check again later today.

Should I download and try the eevdf kernel too? Googled eevdf, I don’t really understand what it does. Tried to read up on the sched-ext schedulers too, before enabling them. They all seem to try to do the same thing more or less. :confused:

No they’re not :smile: EEVDF is the default scheduler from the upstream kernel.

Try disabling lavd then and see if your stutters disappear as it seems thaat you’re using it.

I have enabled lavd, because of the stutters. It had 0 effect on the game, so I didn’t bother trying out the others.

I will try both of those kernels later. Thanks.

Tried bore-lto and eevdf, disabled sched-ext. No difference. Is it a good idea to downgrade mesa or something else?

Maybe. It doesn’t seem to be proton-related since you said it stutter while scrolling in the browser. It could also be an upstream change in the kernel, which downgrading the kernel may also help.

I have tried the lts kernel too. I’m not 100% sure that the browser stutter is related. Maybe I will try downgrading mesa. I don’t know what else could this be.

It seems a PSR realated issue. See https://gitlab.freedesktop.org/drm/amd/-/issues/3743

Nginx Directory This one should help if it’s related to PSR.

@leejm516

I have installed the kernels from the link, but it doesn’t change anything.

1 Like

@mihalycsaba You mean you applied the patch in the link? The patch has not been backported to upstream kernels yet.

Try adding amdgpu.dcdebugmask=0x10 to the kernel boot parameter and see what will be happening.