Why is my keyboard stuck or repeating rapidly only after wake from suspend when using Linux on my HP Spectre x360 (2024)?

I am running Arch Linux more specifically Omarchy, (so Hyprland compositor with Wayland display server). I have a problem where right after waking from suspend when I type any character, it just keeps repeating for a while. The keyboard clearly detects what is typed because if I for example type ‘a’ it keeps repeating ‘a’ and when I type something else it switches to that, then after about 30s – 1min the repeating stops and starts working perfectly without any problems. Some interesting things to note:

  1. This does not happen on every suspend (but, it needs a suspend to happen, i.e. it doesn’t happen spontaneously)
  2. It seems to be mainly happening on longer suspends like more than a few hours or overnight, I’m not sure if it is related but the laptop is also charging during most of these longer suspends.
  3. The touchpad works perfectly during this time, but the fingerprint sensor sometimes responds and sometimes doesn’t (again might be unrelated), when the fingerprint authentication works the issue still persists until it ends after its natural duration (so this is not something only on the login screen).
  4. This happens on all Linux desktops (I have tried fedora with both GNOME and KDE, Ubuntu, Kubuntu and CachyOS), also happens with Arch installed the hard way with only the essential packages and kde, and now hyprland. Note that this does not happen on Windows.
  5. Also on my laptop the default sleep state is s2idle and I have tried setting it to deep which shows up when I do cat /sys/power/mem_sleep but it never recovers from suspend, forcing me to hard stop and start. I have spent several hours chasing that hoping that deep sleep would also solve this issue without any luck.
  6. Also as I mentioned earlier the keystrokes are clearly detected and repeating, so multi-key shortcuts do not work when the issue happens. (this might just be the result of the repeating keystrokes, just thought I would mention it anyway)

I have tried various updates, firmware updates (I even installed windows just so I could get a firmware update that was for some reason not available through fwupdmgr).

I have tried and removed various kernel parameters like atkbd reset (though this was a couple of months ago, and I did not document it so I would be willing to try it again).