Keyboard input freezes - anyone else having this problem?

I’m having a problem and I’m having a hard time pinning down where this is coming from. Has anyone else had something similar?

About 19 seconds after I start a test play, all keyboard input freezes. This lasts for about three seconds. I’ve timed it; it is very reliable. My player will get stuck moving in whatever direction they are facing because no keyboard press will call “OnMove.” I can’t fire either. No keyboard input (that I have bound and can test) will work.

This does not happen to my gamepad input. If I’m using a controller my input never gets interrupted.

I can’t find a valid explanation for this. I have not edited any code related to my character at all, let alone anything related to input. I have not updated to a new version of unity. This bug just came out of nowhere.

It may be a red herring, but the only thing I can even think of that has changed is that I am now running in Windows 10 instead of Windows 7. It’s the same hardware though. I have a dual-boot set up and I can check if there are problems when I run in Windows 7. Both OS’s are running the same version of the editor, and the game’s folder is on a separate drive that both OS’s can access.

By any chance are you using hibernate/sleep features?

We’re currently fixing related issues Unity Issue Tracker - [Input System] InputInteractionContext.timerHasExpired property breaks in Editor after waking up the PC from Sleep Mode and Unity Issue Tracker - [Input System] Input lags when keeping the Editor open for a long time on Windows 7 where timestamps on events were wrong so input lags somewhat.

Indeed I have been putting my computer to sleep, and I had left the editor open. So perhaps it is related that. Although those posts don’t match my situation that well, but hey, there still might be a connection.

Okay, I got to make some tests this last week, and I think you’re right about the sleep thing.
I didn’t have problems when I changed my OS, neither did I have this problem after changing back. But after leaving the editor open while the computer sleeps I DID manage to reproduce the bug. (Although the exact timing is different.) And resetting the editor seems to have eliminated the problem.

So yeah, l guess this was caused by leaving the editor open while I put my computer into sleep mode.