Performance issues in games

garuda-inxi
System:
  Kernel: 5.18.9-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=53e270ad-dfd5-4874-a125-69d21ada6b8d rw [email protected]
    rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
    sysrq_always_enabled=1 amdgpu.ppfeaturemask=0xffffffff nowatchdog
  Desktop: KDE Plasma v: 5.25.2 tk: Qt v: 5.15.5 info: latte-dock
    wm: kwin_wayland vt: 2 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: ASRock model: X470 Taichi serial: <superuser required>
    UEFI: American Megatrends v: P4.86 date: 01/27/2022
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 3
    serial: <filter> charge: 100% (should be ignored) rechargeable: yes
    status: discharging
  Device-2: ps-controller-battery-4c:b9:9b:1b:68:38 model: N/A serial: N/A
    charge: N/A status: discharging
CPU:
  Info: model: AMD Ryzen 5 2600X bits: 64 type: MT MCP arch: Zen+ gen: 2
    built: 2018-21 process: GF 12nm family: 0x17 (23) model-id: 8 stepping: 2
    microcode: 0x800820D
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 576 KiB desc: d-6x32 KiB; i-6x64 KiB L2: 3 MiB desc: 6x512 KiB
    L3: 16 MiB desc: 2x8 MiB
  Speed (MHz): avg: 2183 high: 2336 min/max: 2200/3600 boost: enabled
    scaling: driver: acpi-cpufreq governor: ondemand cores: 1: 2212 2: 2190
    3: 2160 4: 2122 5: 2336 6: 2170 7: 2184 8: 2215 9: 2133 10: 2083 11: 2115
    12: 2284 bogomips: 86408
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2
    mitigation: Retpolines, IBPB: conditional, STIBP: disabled, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M]
    vendor: Gigabyte driver: amdgpu v: kernel arch: RDNA 2
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4 speed: 16 GT/s
    lanes: 16 ports: active: DP-1,HDMI-A-1 empty: DP-2,HDMI-A-2
    bus-ID: 0f:00.0 chip-ID: 1002:73df class-ID: 0300
  Display: wayland server: X.org v: 1.21.1.3 with: Xwayland v: 22.1.2
    compositor: kwin_wayland driver: X: loaded: amdgpu
    unloaded: modesetting,radeon alternate: fbdev,vesa gpu: amdgpu
    d-rect: 5888x2160 display-ID: 0
  Monitor-1: DP-1 pos: primary,left res: 2048x864 size: N/A modes: N/A
  Monitor-2: HDMI-A-1 pos: right res: 3840x2160 size: N/A modes: N/A
  OpenGL: renderer: AMD Radeon RX 6700 XT (navy_flounder LLVM 14.0.6 DRM
    3.46 5.18.9-zen1-1-zen)
    v: 4.6 Mesa 22.1.3 direct render: Yes
Audio:
  Device-1: AMD Navi 21/23 HDMI/DP Audio driver: snd_hda_intel v: kernel
    pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 0f:00.1 chip-ID: 1002:ab28
    class-ID: 0403
  Sound Server-1: ALSA v: k5.18.9-zen1-1-zen running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: PulseAudio v: 16.1 running: no
  Sound Server-4: PipeWire v: 0.3.53 running: yes
Network:
  Device-1: Intel I211 Gigabit Network vendor: ASRock driver: igb v: kernel
    pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: d000 bus-ID: 09:00.0
    chip-ID: 8086:1539 class-ID: 0200
  IF: enp9s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Edimax Bluetooth Adapter type: USB driver: btusb v: 0.8
    bus-ID: 1-8:3 chip-ID: 7392:c611 class-ID: e001 serial: <filter>
  Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
  Local Storage: total: 2.96 TiB used: 3.1 TiB (104.9%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
    model: SSD 970 EVO 250GB size: 232.89 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 2B2QEXE7 temp: 26.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:5 vendor: Samsung model: SSD 980 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 1B4QFXO7
    temp: 37.9 C scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 vendor: Seagate model: ST2000DX002-2DV164
    size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: CC41 scheme: GPT
Partition:
  ID-1: / raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 818.95 GiB (87.9%) fs: btrfs dev: /dev/nvme1n1p2 maj-min: 259:7
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 16.3 MiB (5.5%) fs: vfat dev: /dev/nvme1n1p1 maj-min: 259:6
  ID-3: /home raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 818.95 GiB (87.9%) fs: btrfs dev: /dev/nvme1n1p2 maj-min: 259:7
  ID-4: /var/log raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 818.95 GiB (87.9%) fs: btrfs dev: /dev/nvme1n1p2 maj-min: 259:7
  ID-5: /var/tmp raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 818.95 GiB (87.9%) fs: btrfs dev: /dev/nvme1n1p2 maj-min: 259:7
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 31.27 GiB used: 1.2 MiB (0.0%)
    priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 46.0 C mobo: 37.0 C gpu: amdgpu temp: 56.0 C
    mem: 58.0 C
  Fan Speeds (RPM): cpu: 1931 fan-1: 0 fan-3: 1309 fan-4: 1477 fan-5: 1232
    gpu: amdgpu fan: 0
  Power: 12v: N/A 5v: N/A 3.3v: 3.25 vbat: 3.28 gpu: amdgpu watts: 30.00
Info:
  Processes: 445 Uptime: 1h 4m wakeups: 4 Memory: 31.27 GiB
  used: 18.08 GiB (57.8%) Init: systemd v: 251 default: graphical
  tool: systemctl Compilers: gcc: 12.1.0 clang: 14.0.6 Packages: 2418
  pacman: 2400 lib: 590 flatpak: 18 Shell: fish v: 3.4.1 default: Bash
  v: 5.1.16 running-in: alacritty inxi: 3.3.19
Garuda (2.6.4-2):
  System install date:     2022-05-22
  Last full system update: 2022-07-04 ↻
  Is partially upgraded:   No
  Relevant software:       NetworkManager
  Windows dual boot:       Probably (Run as root to verify)
  Snapshots:               Snapper
  Failed units:

So as the title says I noticed that I hame having performance issues in games. So a user from a linux gameing discord suggested I set my cpu schudlar to performance using sudo cpupower frequency-set -g performance but it just reverts to ondemand according to sudo cpupower frequency-info

here is the output

sudo cpupower frequency-set -g performance
[sudo] password for zany130:
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
Setting cpu: 8
Setting cpu: 9
Setting cpu: 10
Setting cpu: 11

 ╭─[email protected] in ~ via  v3.10.5 as 🧙 took 8s
 ╰─λ sudo cpupower frequency-info
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 2.20 GHz - 3.60 GHz
  available frequency steps:  3.60 GHz, 3.20 GHz, 2.20 GHz
  available cpufreq governors: conservative ondemand userspace powersave performance schedutil
  current policy: frequency should be within 2.20 GHz and 3.60 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency: 2.20 GHz (asserted by call to hardware)
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  3600MHz
    Pstate-P1:  3200MHz
    Pstate-P2:  2200MHz

it should say "The governor "Performance according to the same user

I tried disabling all of the garuda performance tweaks to see if it was messing with something and it still reverts to ondemand and I'm getting terriblee performance

acpi-cpufreq is the driver in use.

That's why:

5 Likes

how do I disable it though? couldn't find much on CPU frequency scaling - ArchWiki. I guess its a kernel module so I would blacklist it? Should this be causing my performance issues though?

EDIT: from what I'm reading here CPU frequency scaling - ArchWiki You need a scaling driver? And it shouldn't override your govener? Also

"
Depending on the scaling driver, one of these governors will be loaded by default:

powersave for Intel CPUs using the intel_pstate driver (Sandy Bridge and newer).
Powersave (for Linux < 5.10) or schedutil (since Linux 5.10) for CPUs using the acpi-cpufreq driver."

so it should be using schedutil already ? (edited)

Garuda's settings manager allow you to change power vs. performance settings with the check of a box (plus a reboot). Please explore those more fully.

2 Likes

Yeah those weren't working either. It was getting set to ondemand no matter what. But i found out why corectrl was forcing the CPU governor. I had reset the global profile as i was messing with GPU clocks to troubleshoot my performance issues and forgot corectrl also affects the CPU by default (i normally disable it) and apparently it sets the ondemand scheduler by default globally

So although i figured out what was forcing the CPU scheduler im still getting pretty bad performance in games. Don't know what else to try.

The issue is strange as it's not even fully using my GPU as you can see here https://cdn.discordapp.com/attachments/417953566485905418/993250581865046096/Screenshot_16.png
I've tried restoring to a snapshot before the issue (Saturday) and no dice. Also tried different kernels including lts.

Is there anything else i can try?

This may just be a continuation of Radeon 6700xt performance issues on garuda after switching from 1080 cont

Really bad idea to get an 6700xt should have probably stayed with Nvidia but that ship already sailed

Or I'm just really really unlucky with computers

fixed my performance issues.

First I made sure my games are running fullscreen by adding a kwin rule to force that for all gamescope windows. (I know gamescope has a fullscreen option -f iirc, but I'm also forcing it through kwin just in case)

I'm doing this as when an application is run in fullscreen in kwin wayland. it does undirection to basicly skip the compositor according to Gaming on Wayland | Xaver’s blog

Next I lowered the nice level for games started through game mode ( it was 10 changed it 4 (it gets negated by gamemode so 4 becomes -4)

And now I get butter smooth performance. I still sometimes get some fps dips (with no gpu usage maybe a game bug or something) but no visible stuttering

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.