Key spamming only in games

System Details Report


Report details

  • Date generated: 2024-05-28 00:13:16

Hardware Information:

  • Hardware Model: Micro-Star International Co., Ltd. MS-7C95

  • Memory: 16.0 GiB

  • Processor: AMD Ryzen™ 7 3700X × 16

  • Graphics: NVIDIA GeForce RTX™ 3070

  • Disk Capacity: 3.0 TB

Software Information:

  • Firmware Version: H.90

  • OS Name: Fedora Linux 40 (Workstation Edition)

  • OS Build: (null)

  • OS Type: 64-bit

  • GNOME Version: 46

  • Windowing System: X11

  • Kernel Version: Linux 6.8.10-300.fc40.x86_64

I have this really weird issue where my keys start to spam only in games. Sometimes the keys inputs are delayed as well for 10+ seconds. This doesn’t seem to occur outside of the game’s window or regular desktop usage. This also happens on multiple games, multiple keyboards, and usb ports. This issue does not seem present on my PS4 Controller or my Windows 11 drive. Does anyone have any ideas as to what could be causing this issue?

Are you using steam?
Are you using wayland?

It is a known issue that steam does not always work well when using wayland and may be a factor in what you are seeing.

If you are using steam for gaming then you might try switching to X11 and see if it makes a difference.

Yes, I am using steam. I am not using Wayland. I’m on X11.

Added steam, xorg

Have a look in the journal for any errors at the time this happens to you.
Do you see anything interesting?

Hello @striderstroke ,
I’m going to assume your keyboard is mechanical, if you’re gaming with it. I am curios though this really sounds like an N-NKR (no key rollover) problem. It won’t likely ever happen in office software or normal use, only under heavy use of gaming on your keyboard.

I’ve only seen this on a X470 2700X desktop (AMD and NVIDIA GPU) GNOME and Xfce, and never on a i5 Intel UHD 630 laptop.

I thought the issue just magically went away but I’m inclined to think it’s something Ryzen-specific.

  • Disable IOMMU everywhere (BIOS and iommu=pt)
  • Disable CPU virtualization in BIOS (so it shows KVM errors in dmesg)
  • Disable SMT in BIOS
  • Force highest-performance CPU (disable C-states, performance governor, etc)