Keyboard and touchpad lost after sleep

Occasionally, not always, after the Catalina upgrade, whenever my macbook sleeps, I lose the keyboard and the touchpad.

I must use my fingerprint to log in and once I do, I have no touchpad nor keyboard. I need to reboot everytime this happens.

Posted on Oct 10, 2019 2:08 PM

Reply
Question marked as Top-ranking reply

Posted on May 26, 2020 8:56 PM

Ok, I can confirm that 10.15.5 released today does not fix this issue.

For all the troubled souls like myself in this forum and beyond, here is a temporary workaround I figured out yesterday to get this gremlin out of your sight, until Apple officially fixes this.

Since the bug only occurs when Wi-Fi is on, we can create a process that automatically turns off Wi-Fi upon sleeping and turns it back on from waking up.


  • Install Homebrew

Copy this line to Terminal and hit Enter.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"


  • Enter
brew install sleepwatcher

to install Sleepwatcher.


  • Enter the following code to create two files . sleep and .wakeup in the home directory ~/
touch ~/.sleep && chmod 700 ~/.sleep
touch ~/.wakeup && chmod 700 ~/.wakeup


  • Go to ~/ and edit .sleep and .wakeup with a code editor of your choice, I used Xcode. These would dictate how Sleepwatcher would perform.

For .sleep

#!/bin/bash
networksetup setairportpower en0 off


For .wakeup

#!/bin/bash
networksetup setairportpower en0 on


  • Finally, enter the following code in Terminal that would configure launchd to run Sleepwatcher at startup or login
cp /usr/local/Cellar/sleepwatcher/2.2.1/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/de.bernhard-baehr.sleepwatcher-20compatibility-localuser.plist



Now everything is set, go on and close the lid, wait awhile and reopen it, notice the Wi-Fi icon is off and quickly turns back on.


Although this is not the most elegant solution, it eases me from the paranoia that makes my blood frozen every time I suspect to see a yet again frozen computer. A moment of idea and inspiration just can't wait an extra 15 seconds.


I'm not an expert in these, if anyone would spot a mistake or suggest a better solution please post here, thank you.


I learned from these sources:

https://www.kodiakskorner.com/log/258

https://gist.github.com/ziadoz/7bddcf346adb89da1e990126c9f82429

https://github.com/wujunchuan/wujunchuan.github.io/issues/9


Similar questions

282 replies

Nov 18, 2019 8:38 AM in response to Azkrath

I have a very similar problem. After waking up my MacBook Pro 13” 2019 (with latest Catalina) the keyboard and trackpad need around 10 seconds to work.


I have noticed that if the WiFi is OFF and I put my Mac to sleep it wakes up without issues. But if WiFi is ON and I close the lid for at least 1 minute - keyboard and trackpad are not responding for around 10 seconds. Tapping ESC key on touchbar has some effect - the light changes on touchbar. But it doesn’t do anything more than that.


I have tried resetting SMC and PRAM. No change.


Another thing - tried Recovery Mode and after closing lid there - keyboard and trackpad work.

One Apple advisor told me it’s probably not a hardware issue and reinstalling macOS will help. But I just spent 2 days reinstalling because of another bug (Apple Music not working) and not willing to lose more days.

Feb 13, 2020 2:58 PM in response to servo186

Hi I have a solution, plug an usb keyboard and mouse and it will work. Here is my experience:

I had the same problem and I always forced shutdown keeping pressed the power button, it was my only solution. But today I realized that plugging an usb keyboard and mouse it worked. Still the mac keyboard and trackpad are not working, but I can control the mac using these usb devices and now I have the opportunity of shutdown properly the mac without affecting the OS.

After shutdown this problem is not happening its just when waking up after a hibernation or long sleep of the machine.

Apple must take care of this.

Feb 25, 2020 3:04 AM in response to johannes14

1) Add "sleep" icon to touchbar

2) When the MacBooc wakes up and the keyboard and touchpad are not responding, press sleep in the touchbar

3) The Macbook sleeps. In my case, it wakes up again immediately.

4) When the MacBook wakes up, the keyboard and touchbar work as usual again. As a side effect, all keys pressed and touchbar inputs performed during the keyboard/touchpad failure are sent to the OS/apps.

Sep 2, 2020 4:15 AM in response to servo186

Though I noticed one more thing.

MBP'20 with touchbar: occasionally keyboard and trackpad do not wake up. The OS itself does fine, though.

Sometimes touchbar awakes alone and works normally.

Putting the laptop to sleep and awake it back after about half a minute in most cases resolves the occasion.

The issue happens randomly, on any WiFi, with or without power supply.

Feb 26, 2020 7:43 AM in response to johannes14

I am gonna mention it again. I already tested a lot of things, and I use vmware. However, I had the issues with and without vms running and even with vmware not running. The only way of avoiding the issue is to turn off wifi before putting the machine to sleep.


In order to avoid rebooting, what I do is call siri, tell her to put the Mac to sleep, wait 2 minutes and waking it up just fixes the issue.

Mar 19, 2020 8:54 AM in response to Juhalo

After almost a month without the problem resurfacing, this happened to me again today.


I left it alone for about 2-3 minutes and neither the trackpad or the keyboard recovered on their own, and the "connect bluetooth keyboard" popup didn't disappear. So, the 30-second wait solution doesn't seem to work for me.


I tried my own "workaround" (described above), and after putting the MacBook to sleep via TouchBar and waking it again, the problem was still there. Bummer. So no, this is not the solution. HOWEVER, after clicking a few keys on the keyboard and clicking the touchpad, I put it to sleep again via the TouchBar, woke it up again using the TouchID button and voila! after a couple of seconds everything was working again.


SO:


  • The problem persists. Only not as often (at least for me).
  • Sleeping it again and waking it up seems to eventually fix the problem. I'll have to try again (it's difficult to come to a conclusion when this happens not very often now).


Catalina 10.15.3, btw.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Keyboard and touchpad lost after sleep

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.