XFCE Input hangs with Electron apps

Hi there!

I have a weird issue with the XFCE and Electron based apps. When I use them, my input randomly freezes (keyboard and mouse) and it hangs for 1-2 seconds. That happens randomly within a 10-20 second timeframe.

I have also discovered this issue on Xubuntu, since I wanted to try Xubuntu first and wanted to see, if the problem occurs on Manjaro aswell, and it did.

I looked in the logs and found entries in the Xorg.0.log, which I will append here:

[  2401.241] (EE) event25 - Keychron Keychron K2: client bug: event processing lagging behind by 24ms, your system is too slow
[  2445.016] (EE) event25 - Keychron Keychron K2: client bug: event processing lagging behind by 19ms, your system is too slow
[  2445.016] (EE) event25 - Keychron Keychron K2: WARNING: log rate limit exceeded (5 msgs per 60min). Discarding future messages.
[  2476.522] (II) event20 - Mionix Castor: SYN_DROPPED event - some input events have been lost.

With other apps, such as Firefox, Thunderbird, Thunar, xfce4-terminal, etc. it does not happen. Only on some Electron Apps like VSCode or Atom. This bug is extremely annoying and I could not find a solution for it, yet.

Maybe some of you have an idea, whiy this is happening on the XFCE version.

My system:
i9-9900K
32 GB RAM
RTX2070 with 460.39 driver
Linux manx 5.9.16-1-MANJARO #1 SMP PREEMPT Mon Dec 21 22:00:46 UTC 2020 x86_64 GNU/Linux

Just for conformation: I’ve used many many distros on my system before and never had this issue with any other desktop environment.