Lag Spikes on Graphics-Intensive applications

Hello there,
I’m running KDE Plasma on Manjaro (stable) on my Surface Laptop 3. Out of the box drivers, (I would think it should be fine considering the hardware is Intel).

Here is the INXI command, if it helps.

System:
  Kernel: 5.15.78-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=da2f461e-7834-4a0c-92cc-23a815fb50bf rw quiet
    resume=UUID=579177a4-b51d-4600-961f-b35d60f671c1 udev.log_priority=3
  Desktop: KDE Plasma v: 5.26.3 tk: Qt v: 5.15.7 info: latte-dock
    wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: Microsoft product: Surface Laptop 3
    v: 124I:00036T:000M:0300000D:0B:07F:1C:05P:48S:01E:0Y:0K:0U:02
    serial: <superuser required> Chassis: type: 9 serial: <superuser required>
  Mobo: Microsoft model: Surface Laptop 3 serial: <superuser required>
    UEFI: Microsoft v: 15.11.140 date: 07/08/2022
Battery:
  ID-1: BAT1 charge: 36.0 Wh (100.0%) condition: 36.0/45.8 Wh (78.6%)
    volts: 8.4 min: 7.6 model: SMP M1087273 type: Li-ion serial: <filter>
    status: full cycles: 664
Memory:
  RAM: total: 15.22 GiB used: 4.3 GiB (28.2%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: Intel Core i7-1065G7 bits: 64 type: MT MCP arch: Ice Lake
    gen: core 10 level: v4 note: check built: 2019-21 process: Intel 10nm
    family: 6 model-id: 0x7E (126) stepping: 5 microcode: 0xB6
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 320 KiB desc: d-4x48 KiB; i-4x32 KiB L2: 2 MiB desc: 4x512 KiB L3: 8 MiB
    desc: 1x8 MiB
  Speed (MHz): avg: 3183 high: 3412 min/max: 400/3900 scaling:
    driver: intel_pstate governor: powersave cores: 1: 3177 2: 3258 3: 3196
    4: 3412 5: 3284 6: 3120 7: 2978 8: 3040 bogomips: 23968
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities arch_perfmon art avx avx2 avx512_bitalg avx512_vbmi2
    avx512_vnni avx512_vpopcntdq avx512bw avx512cd avx512dq avx512f avx512ifma
    avx512vbmi avx512vl bmi1 bmi2 bts clflush clflushopt cmov constant_tsc
    cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms
    est f16c flexpriority flush_l1d fma fpu fsgsbase fsrm fxsr gfni ht hwp
    hwp_act_window hwp_epp hwp_notify hwp_pkg_req ibpb ibrs ibrs_enhanced ida
    intel_pt invpcid invpcid_single lahf_lm lm mca mce md_clear mmx monitor
    movbe msr mtrr nonstop_tsc nopl nx ospke pae pat pbe pcid pclmulqdq pdcm
    pdpe1gb pebs pge pku pln pni popcnt pse pse36 pts rdpid rdrand rdseed
    rdtscp rep_good sdbg sep sha_ni smap smep split_lock_detect ss ssbd sse
    sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust
    tsc_deadline_timer tsc_known_freq umip vaes vme vmx vnmi vpclmulqdq vpid
    x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: Enhanced IBRS
  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 status: Vulnerable: eIBRS with unprivileged eBPF
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Iris Plus Graphics G7 vendor: Microsoft driver: i915
    v: kernel arch: Gen-11 process: Intel 10nm built: 2019-21 ports:
    active: DP-1,eDP-1 empty: DP-2,HDMI-A-1,HDMI-A-2 bus-ID: 00:02.0
    chip-ID: 8086:8a52 class-ID: 0300
  Device-2: Microsoft Surface Camera Front type: USB driver: uvcvideo
    bus-ID: 3-6:5 chip-ID: 045e:0990 class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.5
    compositor: kwin_x11 driver: X: loaded: modesetting alternate: fbdev,vesa
    dri: iris gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 4176x1504 s-dpi: 96 s-size: 1104x397mm (43.46x15.63")
    s-diag: 1173mm (46.19")
  Monitor-1: DP-1 pos: primary,left model: Samsung S24E450 serial: <filter>
    built: 2020 res: 1920x1080 hz: 60 dpi: 92 gamma: 1.2
    size: 531x299mm (20.91x11.77") diag: 609mm (24") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  Monitor-2: eDP-1 pos: right model: Sharp LQ135P1JX51 serial: <filter>
    built: 2019 res: 2256x1504 hz: 60 dpi: 201 gamma: 1.2
    size: 285x190mm (11.22x7.48") diag: 343mm (13.5") ratio: 3:2
    modes: 2256x1504
  API: OpenGL v: 4.6 Mesa 22.2.3 renderer: Mesa Intel Iris Plus Graphics
    (ICL GT2) direct render: Yes
Audio:
  Device-1: Intel Ice Lake-LP Smart Sound Audio driver: snd_hda_intel v: kernel
    alternate: snd_sof_pci_intel_icl bus-ID: 3-2.3:6 bus-ID: 00:1f.3
    chip-ID: 1532:0529 class-ID: 0300 chip-ID: 8086:34c8 class-ID: 0403
    serial: <filter>
  Device-2: Razer USA USB Sound Card type: USB
    driver: hid-generic,snd-usb-audio,usbhid
  Sound API: ALSA v: k5.15.78-1-MANJARO running: yes
  Sound Server-1: JACK v: 1.9.21 running: no
  Sound Server-2: PulseAudio v: 16.1 running: yes
  Sound Server-3: PipeWire v: 0.3.59 running: yes
Network:
  Device-1: Intel Ice Lake-LP PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:34f0 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 3-10:7
    chip-ID: 8087:0026 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 238.47 GiB used: 48.84 GiB (20.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Toshiba
    model: KBG40ZNS256G MEMORY size: 238.47 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: AEMS0102 temp: 35.9 C scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 221.43 GiB size: 216.89 GiB (97.95%)
    used: 48.84 GiB (22.5%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
    label: N/A uuid: da2f461e-7834-4a0c-92cc-23a815fb50bf
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 312 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
    label: NO_LABEL uuid: B2A0-F90E
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 16.75 GiB used: 1.2 MiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3 label: swap
    uuid: 579177a4-b51d-4600-961f-b35d60f671c1
Unmounted:
  Message: No unmounted partitions found.
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 1 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 2-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-3: 3-0:1 info: Hi-speed hub with single TT ports: 12 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-4: 3-2:2 info: ALOGIC USB Hub - UAFUUA ports: 4 rev: 2.1
    speed: 480 Mb/s chip-ID: 32e8:2406 class-ID: 0900
  Device-1: 3-2.1:4 info: Razer USA RC30-0315 Gaming Mouse [Basilisk X
    HyperSpeed] type: Mouse,Keyboard driver: hid-generic,usbhid interfaces: 3
    rev: 2.0 speed: 12 Mb/s power: 500mA chip-ID: 1532:0083 class-ID: 0300
  Device-2: 3-2.3:6 info: Razer USA USB Sound Card type: Audio,HID
    driver: hid-generic,snd-usb-audio,usbhid interfaces: 4 rev: 2.0
    speed: 12 Mb/s power: 100mA chip-ID: 1532:0529 class-ID: 0300
    serial: <filter>
  Device-3: 3-2.4:8 info: Razer USA Huntsman Tournament Edition
    type: Keyboard,Mouse driver: hid-generic,usbhid interfaces: 4 rev: 2.0
    speed: 12 Mb/s power: 500mA chip-ID: 1532:0243 class-ID: 0300
    serial: <filter>
  Device-4: 3-4:3 info: VIA Labs USB 2.0 BILLBOARD type: Billboard
    driver: N/A interfaces: 1 rev: 2.0 speed: 12 Mb/s power: 500mA
    chip-ID: 2109:0103 class-ID: 1100 serial: <filter>
  Device-5: 3-6:5 info: Microsoft Surface Camera Front type: Video
    driver: uvcvideo interfaces: 4 rev: 2.0 speed: 480 Mb/s power: 500mA
    chip-ID: 045e:0990 class-ID: 0e02 serial: <filter>
  Device-6: 3-10:7 info: Intel AX201 Bluetooth type: Bluetooth driver: btusb
    interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 8087:0026
    class-ID: e001
  Hub-5: 4-0:1 info: Super-speed hub ports: 6 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Hub-6: 4-2:2 info: ALOGIC USB Hub - UAFUUA ports: 4 rev: 3.1 speed: 5 Gb/s
    chip-ID: 32e8:2405 class-ID: 0900
Sensors:
  System Temperatures: cpu: 66.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 248 Uptime: 5h 1m wakeups: 3 Init: systemd v: 251
  default: graphical tool: systemctl Compilers: gcc: 12.2.0 clang: 14.0.6
  Packages: pm: pacman pkgs: 1493 libs: 464 tools: pamac,yay pm: flatpak
  pkgs: 0 Shell: Zsh v: 5.9 default: Bash v: 5.1.16 running-in: konsole
  inxi: 3.3.23

When I try to run graphics-heavy applications, such as steam games (and even discord calls at times), I experience massive lag spikes for a minute or two at a time. During this time, music stutters and the entire desktop hangs and becomes unresponsive, as well as abysmal FPS on games (5-10).

At first I thought it was a memory issue, but I have 16GB of memory which is being around 50% utilized during the lag spikes, as well a a swap partition which too is being utilized, but barely. During the lag, CPU usage shoots up to 99.5%, but apart from that the other ‘vitals’ seem fine.

I have reinstalled Manjaro and used different desktop environments too, but to no avail. I’m sure my hardware is capable of running such applications, and it doesn’t seem to be a heavy load based issue (considering discord calls break too), so I think it may be something to do with drivers.

Does anyone have an idea of what’s up? I’ve looked at other forum posts, but everyone points to memory issues (which I doubt are the problem here). I’m new to the forum so I don’t know if I’ve provided enough info, but any and all help is appreciated.
Thanks.

Hi and welcome to the forums, please post output of:

mhwd -l; mhwd -li
> 0000:00:02.0 (0300:8086:8a52) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI


Warning: No installed USB configs!

Here it is.

Well at least it seems you have the proper drivers installed i guess :wink:
As i use a different GFX card, im unable to help you further, hope others using an Intel Iris Plus Graphics G7 can help further. :woman_shrugging:

The only relevant pages i found doing a search on the internet were:

Alright, no problem, thanks for trying! I’ll definitely check in on the wiki.