Laggy System what to do?

Hello I installed Manjaro yesterday on my main PC. Unfortunately the system is at times extremely laggy video and sound. This always occurs when the CPU is a bit busy or I start programs. Games run smoothly. Do you have any ideas? By the way I am new to Arch/Manjaro :smiley:

About my system:
AMD Ryzen 7 5800x
32GB 3600mhz RAM
1TB Corsair Force MP600
Everything is water cooled.

post formated output from: inxi -Fazy

  Kernel: 5.15.32-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=c6567baa-2209-4c6f-923a-0b2c08d56ed7 rw quiet apparmor=1
    security=apparmor resume=UUID=4af35bec-d739-4e74-8d87-548f428380bd
  Desktop: KDE Plasma v: 5.24.4 tk: Qt v: 5.15.3 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
  Type: Desktop System: ASUS product: N/A v: N/A serial: <superuser required>
  Mobo: ASUSTeK model: PRIME B550-PLUS v: Rev X.0x
    serial: <superuser required> UEFI: American Megatrends v: 2423
    date: 08/09/2021
  Device-1: sony_controller_battery_00:1f:e2:90:9e:0a model: N/A serial: N/A
    charge: N/A status: charging
  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: 4299 high: 4300 min/max: 2200/5753 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 4300 2: 4300
    3: 4300 4: 4300 5: 4300 6: 4300 7: 4300 8: 4300 9: 4300 10: 4300 11: 4300
    12: 4299 13: 4300 14: 4300 15: 4299 16: 4300 bogomips: 137660
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  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: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: always-on, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
  Device-1: NVIDIA GA102 [GeForce RTX 3080 Ti] driver: nvidia v: 510.60.02
    alternate: nouveau,nvidia_drm pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 07:00.0 chip-ID: 10de:2208 class-ID: 0300
  Device-2: Oculus VR Rift CV1 Sensor type: USB driver: uvcvideo
    bus-ID: 4-1:2 chip-ID: 2833:0211 class-ID: ef00 serial: <filter>
  Device-3: Oculus VR Rift CV1 Sensor type: USB driver: uvcvideo
    bus-ID: 4-3:3 chip-ID: 2833:0211 class-ID: ef00 serial: <filter>
  Display: x11 server: X.Org v: compositor: kwin_x11 driver: X:
    loaded: nvidia gpu: nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 5760x1080 s-dpi: 83 s-size: 1762x330mm (69.37x12.99")
    s-diag: 1793mm (70.58")
  Monitor-1: DP-0 pos: primary,left res: 1920x1080 hz: 60 dpi: 80
    size: 610x350mm (24.02x13.78") diag: 703mm (27.69") modes: N/A
  Monitor-2: DP-2 pos: primary,center res: 1920x1080 dpi: 83
    size: 590x330mm (23.23x12.99") diag: 676mm (26.61") modes: N/A
  Monitor-3: HDMI-0 pos: right res: 1920x1080 hz: 60 dpi: 82
    size: 598x336mm (23.54x13.23") diag: 686mm (27.01") modes: N/A
  OpenGL: renderer: NVIDIA GeForce RTX 3080 Ti/PCIe/SSE2
    v: 4.6.0 NVIDIA 510.60.02 direct render: Yes
  Device-1: NVIDIA GA102 High Definition Audio driver: snd_hda_intel v: kernel
    pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 07:00.1 chip-ID: 10de:1aef
    class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 09:00.4 chip-ID: 1022:1487 class-ID: 0403
  Device-3: RODE Microphones RØDE NT-USB Mini type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 3-2.1:3 chip-ID: 19f7:0015
    class-ID: 0300 serial: <filter>
  Device-4: Sony DualShock 4 [CUH-ZCT2x] type: USB
    driver: snd-usb-audio,sony,usbhid bus-ID: 3-2.2:4 chip-ID: 054c:09cc
    class-ID: 0300
  Sound Server-1: ALSA v: k5.15.32-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.49 running: yes
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: ASUSTeK PRIME B450M-A driver: r8169 v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 port: f000 bus-ID: 06:00.0 chip-ID: 10ec:8168
    class-ID: 0200
  IF: enp6s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Local Storage: total: 2.27 TiB used: 77.86 GiB (3.3%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Corsair model: Force MP600
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: EGFM11.3 temp: 28.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Crucial model: CT500MX500SSD1
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 022 scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 vendor: Samsung model: SSD 850 EVO 500GB
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 2B6Q scheme: GPT
  ID-4: /dev/sdc maj-min: 8:32 vendor: SanDisk model: SSD PLUS 240GB
    size: 223.57 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 04RL scheme: GPT
  ID-5: /dev/sdd maj-min: 8:48 vendor: LITE-ON model: CV1-8B256
    size: 238.47 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    type: SSD serial: <filter> rev: 201 scheme: GPT
  ID-1: / raw-size: 896.76 GiB size: 881.61 GiB (98.31%)
    used: 77.86 GiB (8.8%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 288 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 34.46 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
  System Temperatures: cpu: N/A mobo: N/A gpu: nvidia temp: 30 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
  Processes: 394 Uptime: 2h 40m wakeups: 1 Memory: 31.33 GiB
  used: 12.29 GiB (39.2%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.2.0 clang: 13.0.1 Packages: pacman: 1223 lib: 333 flatpak: 0
  Shell: Zsh v: 5.8.1 default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.15

you can try ‘tweaks’ from this link and see
also open ksystemlog app and check if you dont have log spamming

Example? Which application plays the video/music?

Please don’t say Firefox or Chrome at 4k videos…

Firefox with twitch and YouTube.
If I then start another program such as Steam or daedalus mainnet then everything lagging mouse video and sound.

I will try this thx

I understand… just a side note: Since Firefox has no video acceleration for NVIDIA to offer by default (still very experimental through vaapi), video playback works only with the CPU. Rendering Websites should be gpu accelerated through opengl.

That being said, if you start another demanding program, it could stutter, since your cpu governor is schedutil. Is is clocks up and down based on the kernel scheduler. Maybe switch to another govenour like performance. Maybe it goes away.

sudo cpupower frequency-info
sudo cpupower frequency-set -g performance 

okok that is unfortunate, is there a browser that supports this feature on linux?

Both, Chrome and Firefox have experimental implementations, but yeah it can work good, but has also bugs. It must be explicitly enabled.

Chromium: Hardware video acceleration
Firefox: Hardware video acceleration

I can’t say whether this is a firefox issue for sure or not but I can provide anecdotal evidence that it might not be. My system is far slower than yours in both single and multi-threaded applications, 4670k vs 5800x. I just tried opening steam while playing a youtube video at 1440p and no lag. I’ve also not experienced any lag after firefox temporarily disabled video acceleration due to the bugs with their sandbox rdd implementation. I can see cpu usage has gone up but it hasn’t impacted the user experience.

If that’s the case with my relatively weak cpu, I’d probably look at something other than the browser for the solution to your issue.

you should add theses options on boot kernel ( in /etc/default/grub )

"amd_iommu=on iommu=pt nvme_load=YES"
"processor.max_cstate=5 rcu_nocbs=0_15"
"systemd.unified_cgroup_hierarchy=true scsi_mod.use_blk_mq=1"