Big Sur – unable to focus any app or make mouse/keyboard inputs after waking from sleep

big surkeyboardmousesleep-wake

Problem Description

Since upgrading to Big Sur I have been experiencing, sometimes multiple times per day, an issue where after waking the machine from sleep:

  1. I am unable to enter text input with the keyboard. Typing into text inputs produces the system alert sound, as if typing is not allowed. Some shortcut combinations like Cmd+Tab still work. Using the on-screen keyboard produces the same results, so it appears not to have anything to do with the keyboard hardware.

  2. I am unable to click on some kinds of UI controls with the mouse. Clicking on a window will bring it to the foreground. But links on webpages have to be double-clicked to navigate, as if the first click is ignored. Other kinds of controls such as the sidebar in Finder don't respond to clicks at all.

  3. When clicking between windows belonging to different apps, the active app in the system menubar does not update. So I may have a Finder window in the foreground, but Chrome's menu will still appear in the menubar.

  4. If I switch to a different desktop space, a different app may appear in the menubar (depending on what is open in that space) but then the menubar becomes complete unresponsive and does not respond to clicks after that.

  5. It's obvious when looking at some apps like System Preferences or Activity Monitor that even when their window has been brought to the foreground, the app isn't fully "focused", as some controls remain greyed out in the way they do when the app is in the background. (I think this gives a big clue about what's going on – is something stealing focus and won't allow any other app to be focused?).

  6. Putting the machine back to sleep does not resolve the problem, it remains in the same broken state after waking again. Using fast user switching to jump to another user profile reveals the other profile to be unaffected, but switching back to the first user returns it still in the broken state.

  7. I have tried force quitting Finder and sending kill signals to SystemUIServer and the Dock process, but this has no impact.

  8. The only solution I have found is to log out and log in again, or restart. Sometimes it is not even possible to log out, as the menubar may become unresponsive and the Cmd+Shift+Q shortcut doesn't always work, in which case a forced restart from the Login Window is required (the Login Window itself behaves normally throughout).

This issue began immediately after upgrading to Big Sur, so I think it must be a macOS bug – but as I have been unable to locate any other reports of this issue by Googling all the terms I can think of, it is conceivable that the problem results from a particular combination in my system of third-party apps or peripherals.

My machine is a MacBook Pro (16-inch, 2019) with i9 and Radeon Pro 5500M. Running Big Sur 11.0.1. I usually have a Thunderbolt 3 dock attached with external display, USB keyboard and mouse, but the problem has also occurred when roaming with nothing plugged in.

Question

Going with the focus-stealing theory, is there a way to debug this by determining which process owns the currently focused app/window in macOS? (I am able to run terminal commands by ssh'ing in from another machine when the problem occurs.)

Alternatively, is this a known issue or has anybody else experienced this? Are there other solutions or workarounds I can try to resolve the problem without logging out?

Best Answer

This has been happening to me as well, but after reading what Juan said about Touch ID, I tried resting my finger on the Touch ID sensor and it seems to fix the focus issue. Looks like its some sort of bug where the "Use Touch ID to unlock" screen isn't showing but the desktop is being shown instead.