Keyboard lag while under load in game

Hello, i seem to be having a weird issue when playing any game that puts my system under load. Any buttons i press on the keyboard appear to be getting queued up faster than they can be processed, so if i press “w” for a while and then let go itll keep acting like im pressing it for a second or so, sometimes even more.
I really have no idea where to start with it, it sounds like it could be something to do with kwin or libinput according to others but havent had any luck finding out what to do.
Anyone know how i would start fixing this?

System:
  Kernel: 5.12.19-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.12-x86_64 
  root=UUID=131e9ee0-8e8f-49c3-92f1-967416751be4 rw quiet apparmor=1 
  security=apparmor udev.log_priority=3 
  Desktop: KDE Plasma 5.22.4 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 
  dm: SDDM Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Laptop System: IT Channel Pty product: P95_96_97Ex,Rx v: N/A 
  serial: <filter> Chassis: type: 10 serial: <filter> 
  Mobo: IT Channel Pty model: P95_96_97Ex,Rx serial: <filter> UEFI: INSYDE 
  v: 1.07.01TMB date: 02/18/2019 
Battery:
  ID-1: BAT0 charge: 56.8 Wh (100.0%) condition: 56.8/56.2 Wh (100.9%) 
  volts: 17.0 min: 15.2 model: Notebook BAT type: Li-ion serial: <filter> 
  status: Full 
CPU:
  Info: 6-Core model: Intel Core i7-9750H bits: 64 type: MT MCP 
  arch: Kaby Lake note: check family: 6 model-id: 9E (158) stepping: A (10) 
  microcode: EA cache: L2: 12 MiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  bogomips: 62431 
  Speed: 1212 MHz min/max: 800/4500 MHz Core speeds (MHz): 1: 1212 2: 800 
  3: 1005 4: 800 5: 800 6: 800 7: 862 8: 878 9: 3305 10: 4200 11: 957 12: 4140 
  Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
  Type: l1tf 
  mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
  Type: meltdown mitigation: PTI 
  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 generic retpoline, IBPB: conditional, 
  IBRS_FW, STIBP: conditional, RSB filling 
  Type: srbds mitigation: Microcode 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: CLEVO/KAPOK 
  driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:3e9b class-ID: 0300 
  Device-2: NVIDIA TU106M [GeForce RTX 2060 Mobile] vendor: CLEVO/KAPOK 
  driver: nvidia v: 470.63.01 alternate: nouveau,nvidia_drm bus-ID: 01:00.0 
  chip-ID: 10de:1f11 class-ID: 0300 
  Device-3: Acer BisonCam NB Pro type: USB driver: uvcvideo bus-ID: 1-8:8 
  chip-ID: 5986:9102 class-ID: 0e02 
  Display: x11 server: X.Org 1.20.13 compositor: kwin_x11 driver: 
  loaded: intel,nvidia display-ID: :0 screens: 1 
  Screen-1: 0 s-res: 3840x1080 s-dpi: 96 s-size: 1013x285mm (39.9x11.2") 
  s-diag: 1052mm (41.4") 
  Monitor-1: eDP1 res: 1920x1080 dpi: 128 size: 380x210mm (15.0x8.3") 
  diag: 434mm (17.1") 
  Monitor-2: HDMI-1-0 res: 1920x1080 hz: 60 dpi: 305 size: 160x90mm (6.3x3.5") 
  diag: 184mm (7.2") 
  OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 21.2.1 
  direct render: Yes 
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: CLEVO/KAPOK 
  driver: snd_hda_intel v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl 
  bus-ID: 00:1f.3 chip-ID: 8086:a348 class-ID: 0403 
  Device-2: NVIDIA TU106 High Definition Audio driver: snd_hda_intel v: kernel 
  bus-ID: 01:00.1 chip-ID: 10de:10f9 class-ID: 0403 
  Sound Server-1: ALSA v: k5.12.19-1-MANJARO running: yes 
  Sound Server-2: JACK v: 1.9.19 running: no 
  Sound Server-3: PulseAudio v: 15.0 running: yes 
  Sound Server-4: PipeWire v: 0.3.33 running: no 
Network:
  Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel 
  port: 5000 bus-ID: 00:14.3 chip-ID: 8086:a370 class-ID: 0280 
  IF: wlp0s20f3 state: up mac: <filter> 
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: CLEVO/KAPOK driver: r8168 v: 8.049.02-NAPI modules: r8169 port: 3000 
  bus-ID: 08:00.0 chip-ID: 10ec:8168 class-ID: 0200 
  IF: enp8s0 state: down mac: <filter> 
  IF-ID-1: anbox0 state: down mac: <filter> 
  IF-ID-2: docker0 state: down mac: <filter> 
  IF-ID-3: virbr0 state: down mac: <filter> 
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB 
  driver: btusb v: 0.8 bus-ID: 1-14:10 chip-ID: 8087:0aaa class-ID: e001 
  Report: hciconfig ID: hci0 rfk-id: 1 state: down bt-service: enabled,running 
  rfk-block: hardware: no software: no address: <filter> 
  Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff 
  link-mode: slave accept 
Drives:
  Local Storage: total: 2.84 TiB used: 1.16 TiB (40.9%) 
  ID-1: /dev/mmcblk0 maj-min: 179:0 model: N/A size: 62.5 GiB block-size: 
  physical: 512 B logical: 512 B type: SSD serial: <filter> scheme: MBR 
  SMART Message: Unknown smartctl error. Unable to generate data. 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-2: /dev/sda maj-min: 8:0 vendor: TeamGroup model: TM8PS7001T 
  size: 953.87 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s 
  type: SSD serial: <filter> rev: 9A0 scheme: GPT 
  ID-3: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST2000LX001-1RG174 
  size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  type: HDD rpm: 5400 serial: <filter> rev: SDM1 scheme: GPT 
  ID-4: /dev/sdc maj-min: 8:32 type: USB vendor: Samsung 
  model: Flash Drive DUO size: 29.88 GiB block-size: physical: 512 B 
  logical: 512 B type: SSD serial: <filter> rev: 1100 scheme: MBR 
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure? 
Partition:
  ID-1: / raw-size: 242.79 GiB size: 237.98 GiB (98.02%) 
  used: 113.98 GiB (47.9%) fs: ext4 dev: /dev/sda7 maj-min: 8:7 
  ID-2: /boot/efi raw-size: 99 MiB size: 95 MiB (95.96%) 
  used: 30.7 MiB (32.3%) fs: vfat dev: /dev/sda2 maj-min: 8:2 
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) 
  ID-1: swap-1 type: partition size: 9.54 GiB used: 0 KiB (0.0%) priority: -2 
  dev: /dev/sda5 maj-min: 8:5 
Sensors:
  System Temperatures: cpu: 58.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 367 Uptime: 34m wakeups: 1 Memory: 15.35 GiB 
  used: 4.49 GiB (29.2%) Init: systemd v: 248 tool: systemctl Compilers: 
  gcc: 11.1.0 alt: 10/9 clang: 12.0.1 Packages: 1820 pacman: 1811 lib: 521 
  flatpak: 0 snap: 9 Shell: Zsh v: 5.8 running-in: yakuake inxi: 3.3.06 

Kernel 5.12 is EOL so please install both 5.4 and 5.10 LTS (Long Term Support) and see which one of the two troubles you least.

If that would not solve your problem, or if you don’t know how to do that, please shout out!

:crossed_fingers:

1 Like

they both seemed to have the same issue

it is the exact same as yours, i just reinstalled manjaro yesterday

Then you should read this:

especially the section What’s this Upstream / Downstream business? and file a bug with the game developer.

GZDoom on my system works flawlessly and that uses a lot of W too…

:sob:

GZDoom? Why you talk about this game (or any game to report bug for)? From the explanation this doesn’t seem to be a game bug, but an issue on his system.

@cupiditas How are you starting your games? Is it using the integrated video card or the Nvidia one?

PS: no need to rephrase my posts, thanks.

@omano im using optimus to use both integrated and nvidia, i think all my games start on the nvidia card though.
The only one that i think wasnt was minecraft for a bit, but i had the issue there too for both integrated and nvidia cards.
I am just starting them using the the .desktop for them