Short freezes when playing games

I’ve been using Manjaro for years now, but recently (2-3 months) I’ve been experiencing seemingly random freezes of 1-5 seconds when playing games (Specifically CS:GO and Rocket League). In those 2-3 months I’ve changed pretty much every part of my PC and reinstalled Manjaro. I have windows in another HD and those games run fine without the random freezes in it.

I’ve ran memtest86+ to see if RAM was the issue (one of the few parts I did not change), but it does not seem to be the case. I’ve changed the MOBO, GPU, CPU, PSU and the problem persisted, so it shouldn’t be any of those. Now I suspect that the problem may be the M.2 drive that Manjaro is installed in, but I’m having a hard time testing this. I could install windows in it and see if it runs fine or install Manjaro in another drive, but I’d rather not. I tried running benchmarks on gnome’s disk utility, but there it seems fine.

Also one weird thing about the freezes is that only the game freezes, the system seems to be working fine. For example if a video is playing in another screen it does not freeze, or if while the game is frozen I can interact with firefox.

Does anyone have any ideas of things I could do to pinpoint the problem?

You may find what you are looking for over here

I already read through that thread (and many others as well), but I do not game on an NFTS drive, like the person in that thread does.

I have a suggestion that may be more relevant for KDE Manjaro… and a couple interesting things to share.

For me under KDE, I noticed I was experiencing some freezing when there was a lot of i/o related to baloo (a file indexer). As it turned out for me, some of my games (especially their addons) where writing lots of information back out to the disk during game play. An extreme example was that one addon for ESO had been continuously writing for months and had built up a 10MB data file that it was still writing to… and this was driving baloo nuts (which I also found to be rather flakey anyway as it was always hyper-inflating it’s index size). Needless to say I dumped that addon and it’s index file, and even decided to completely disable baloo and all my ESO freezes stopped.

And although not related to 1-5 second freezes, I recently found two very good performance enhancers for much smoother video performance/smoothness:

  1. disable the compositor for your gaming sessions
  2. if you have an amdgpu… look into enabling TearFree @ AMDGPU - ArchWiki. I use the command xrandr --output DisplayPort-0 --set TearFree on… but make sure to run xrandr -q first to make sure you are selecting the right monitor/connection (i.e. DisplayPort-0, DisplayPort-1, HDMI-A-0, etc…) and update the command appropriately

P.S. Another off the wall idea that might explain freezes “might” be… are your games installed on mechanical drives? And if so, have you looked into using hdparm @ hdparm - ArchWiki to disable APM, Acoustic, and Auto-suspend? i.e. hdparm -B255 -S0 -M0 /dev/sda

The compositor is already disabled. I just disabled baloo aswell, but I don’t think that is the problem. As for the gpu that I have it is a nvidia gpu, also some games are installed in an HDD and others in a NVME ssd and the freezes happen either way.

Just re-read that you changed pretty much every internal internal component… Maybe post the output of $ inxi -Fazy so folks can see what your working with.

  • Does you new Motherboard have an updated BIOS?
  • Are your BIOS settings “Safe Defaults”, or do you OC
  • Had you ever added any grub/boot commands for your previous hardware that might not be relevant any more and need to be disabled (or changed) for your new hardware?
  • Have you looked for clues in your journal around the freeze times to see if anything was going on in the background… $ journalctl --priority err --boot 0
  • I don’t know much about nVidia drivers under Linux, other than nouveau (open source) isn’t a good option for gaming… and from reading the release branches the past couple weeks I understand there has been some mention of certain proprietary driver versions needing more attention… but you’ll need someone with more nVidia experience to offer suggestions/guidance here
 ~  inxi -Fazy                                                                                                          seg 27 dez 2021 19:14:51
System:
  Kernel: 5.15.7-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-5.15-x86_64
    root=UUID=c9d3f242-a9bc-44d6-8651-7ccde815bc82 rw rootflags=subvol=@ quiet
    udev.log_priority=3
  Desktop: KDE Plasma 5.23.4 tk: Qt 5.15.2 wm: awesome 4.3 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: ASUSTeK model: PRIME X570-PRO v: Rev X.0x
    serial: <superuser required> UEFI: American Megatrends v: 4021
    date: 08/09/2021
CPU:
  Info: model: AMD Ryzen 7 5800X bits: 64 type: MT MCP arch: Zen 3
    family: 0x19 (25) model-id: 0x21 (33) stepping: 0 microcode: 0xA201016
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB
    L3: 32 MiB desc: 1x32 MiB
  Speed (MHz): avg: 3839 high: 4501 min/max: 2200/4850 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 4214 2: 4501
    3: 3655 4: 3550 5: 3256 6: 4436 7: 3218 8: 3863 9: 3726 10: 3774 11: 4102
    12: 3941 13: 3793 14: 3797 15: 3652 16: 3952 bogomips: 121421
  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: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional,
    IBRS_FW, STIBP: always-on, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GA104 [GeForce RTX 3070 Ti] vendor: Gigabyte driver: nvidia
    v: 495.44 alternate: nouveau,nvidia_drm bus-ID: 0a:00.0 chip-ID: 10de:2482
    class-ID: 0300
  Display: x11 server: X.org 1.21.1.2 driver: loaded: nvidia
    resolution: <missing: xdpyinfo>
  OpenGL: renderer: NVIDIA GeForce RTX 3070 Ti/PCIe/SSE2
    v: 4.6.0 NVIDIA 495.44 direct render: Yes
Audio:
  Device-1: NVIDIA GA104 High Definition Audio vendor: Gigabyte
    driver: snd_hda_intel v: kernel bus-ID: 0a:00.1 chip-ID: 10de:228b
    class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel bus-ID: 0c:00.4 chip-ID: 1022:1487
    class-ID: 0403
  Device-3: ASUSTek STRIX SOUND CARD type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-1:2 chip-ID: 0b05:180d
    class-ID: 0300
  Device-4: Antlion Audio Antlion USB Microphone type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 7-4:5 chip-ID: 2f96:0200
    class-ID: 0300
  Sound Server-1: ALSA v: k5.15.7-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.19 running: no
  Sound Server-3: PulseAudio v: 15.0 running: no
  Sound Server-4: PipeWire v: 0.3.40 running: yes
Network:
  Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: kernel
    port: f000 bus-ID: 06:00.0 chip-ID: 8086:1539 class-ID: 0200
  IF: enp6s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: ASUSTek ASUS USB-BT500 type: USB driver: btusb v: 0.8
    bus-ID: 7-3:4 chip-ID: 0b05:190e class-ID: e001 serial: <filter>
  Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
  Local Storage: total: 2.95 TiB used: 951.08 GiB (31.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:3 vendor: Samsung
    model: SSD 970 EVO Plus 500GB size: 465.76 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 2B2QEXM7 temp: 36.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: Samsung model: SSD 980 PRO 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: 3B2QGXA7 temp: 44.9 C scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 vendor: Kingston model: SA400S37240G
    size: 223.57 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: J4.3 scheme: GPT
  ID-4: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST500DM002-1BD142
    size: 465.76 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: KC45 scheme: GPT
  ID-5: /dev/sdc maj-min: 8:32 vendor: Western Digital
    model: WD10JPVX-22JC3T0 size: 931.51 GiB block-size: physical: 4096 B
    logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: 1A01 scheme: MBR
Partition:
  ID-1: / raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 151.42 GiB (16.3%) fs: btrfs dev: /dev/nvme1n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 25.8 MiB (8.6%) fs: vfat dev: /dev/nvme1n1p1 maj-min: 259:1
  ID-3: /home raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 151.42 GiB (16.3%) fs: btrfs dev: /dev/nvme1n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 151.42 GiB (16.3%) fs: btrfs dev: /dev/nvme1n1p2 maj-min: 259:2
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: nvidia temp: 50 C
  Fan Speeds (RPM): fan-2: 1251 fan-3: 1260 fan-4: 1249 gpu: nvidia fan: 58%
Info:
  Processes: 390 Uptime: 4h 14m wakeups: 0 Memory: 31.32 GiB
  used: 7.12 GiB (22.7%) Init: systemd v: 249 tool: systemctl Compilers:
  gcc: 11.1.0 Packages: pacman: 1620 lib: 446 Shell: fish v: 3.3.1
  running-in: kitty inxi: 3.3.11
  • Does you new Motherboard have an updated BIOS?
    Yes
  • Are your BIOS settings “Safe Defaults”, or do you OC
    Defaults
  • Had you ever added any grub/boot commands for your previous hardware that might not be relevant any more and need to be disabled (or changed) for your new hardware?
    Did not add any grub commands
  • Have you looked for clues in your journal around the freeze times to see if anything was going on in the background… $ journalctl --priority err --boot 0
    Did not do that, will do it and report back.

Journal is pretty empty

journalctl --priority err --boot 0                                                                                  seg 27 dez 2021 19:32:44
-- Journal begins at Fri 2021-12-17 00:22:46 -03, ends at Mon 2021-12-27 19:30:46 -03. --
dez 27 15:00:13 daniel-computer kernel: sp5100-tco sp5100-tco: Watchdog hardware is disabled
dez 27 15:00:14 daniel-computer kernel: 
dez 27 15:00:14 daniel-computer kernel: kvm: disabled by bios
dez 27 15:00:14 daniel-computer kernel: usb usb3-port5: Cannot enable. Maybe the USB cable is bad?
dez 27 15:00:14 daniel-computer kernel: kvm: disabled by bios
dez 27 15:00:14 daniel-computer kernel: hid-generic 0003:0B05:180D.0003: No inputs registered, leaving
dez 27 15:00:14 daniel-computer kernel: kvm: disabled by bios
dez 27 15:00:14 daniel-computer kernel: hid-generic 0003:2F96:0200.0007: No inputs registered, leaving
dez 27 15:00:14 daniel-computer kernel: kvm: disabled by bios
dez 27 15:00:14 daniel-computer kernel: kvm: disabled by bios
dez 27 15:00:14 daniel-computer kernel: kvm: disabled by bios
dez 27 15:00:15 daniel-computer kernel: kvm: disabled by bios
dez 27 15:00:15 daniel-computer kernel: usb usb3-port5: Cannot enable. Maybe the USB cable is bad?
dez 27 15:00:15 daniel-computer kernel: kvm: disabled by bios
dez 27 15:00:15 daniel-computer kernel: kvm: disabled by bios
dez 27 15:00:15 daniel-computer kernel: kvm: disabled by bios
dez 27 15:00:16 daniel-computer kernel: usb usb3-port5: Cannot enable. Maybe the USB cable is bad?
dez 27 15:00:17 daniel-computer kernel: usb usb3-port5: Cannot enable. Maybe the USB cable is bad?
dez 27 15:00:17 daniel-computer kernel: usb usb3-port5: unable to enumerate USB device
dez 27 15:00:17 daniel-computer systemd[1263]: Failed to start Update XDG user dir configuration.

I had a freeze at 19:29