A bug of the keyboard

When typing for a long time, the keyboard fails intermittently. At this time, I can still type smoothly when I open the matlab interface. But in other interfaces, such as vim and chrome, there is no response. And it will recover for a while. I am very eager to know why this happens and how to solve this problem.

I’m in 6.2.15-300.fc38.x86_64. And the bug came after I update this kernel.