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

Apr 11, 2020 7:22 AM in response to servo186

have this issue on a 2015 12 inch MacBook. I used to think it was caused by a USB type C dock. I would cut the power to the dock, then the keyboard or mouse would come back.


I later bought a 2020 Mac mini. At that point I realised it is an issue with the Mac. My observations of it

-effects at least 2 different Mac hardware types

-effects keyboard plugged in to USB type A

-effects Catalina, I cannot remember if it affects earlier OSs. 10.15.1-10.15.3 all effected.

-I use wifi only for Apple Watch authentication. Not connected to any routers. I use ethernet for internet.

-no VM use.

-effects both upgraded systems, and fresh installs from the factory.

-is intermittent, and occurs rarely

-if resuming from sleep with the issue, if you sleep again, and resume later, the keyboard comes back

Apr 12, 2020 2:30 PM in response to servo186

I have this exact same problem and i don't even have VMware Fusion installed.

I have a Late 2019 MBP 15" running Catalina 10.15.4.


My workaround is to lock/unlock the laptop until it starts responding (i have a shortcut in the touchbar to lock).


EDIT: Trying a new workaround, disabled IPv6.

Open Terminal and run "networksetup -setv6off Wi-Fi" (without quotes) where the "Wi-Fi" is your connection name.

May 29, 2020 5:11 PM in response to servo186

when turn off wifi before send to sleep and wakes up it works most of the times, not always....other think that i found is bluetooth stop working, i got a message "bluetooth not available", need to restart...


i love my iphone, love my ipad, my watch, even my apple tv and mac mini... but hates this kind of things on my mbp...all problems related with energy managment, it seems pmset will help, but is useless, mpb not obbey pmset, like disable auto on when you open lid it....

May 31, 2020 2:03 AM in response to servo186

For me, the exact problem only started recently after the upgrade to 10.15.4 and continued to the update to 10.15.5. There were several changes that had happened to my usage which could account for this behaviour and I have not yet pinpointed the exact cause of the problem.

  1. The behaviour became apparent after I started using Mobile Hotspots to connect to the internet as opposed to the WiFi (because our WiFi was down for about a week). I connected to both Apple and non-Apple hotspots, though I can't say if the issue is different with different hotspots.
  2. I cleaned my laptop keyboard recently using wet and dry cloth which made me suspect a hardware issue, but this seemed far fetched as the water involved was minimal, and the hardware damage would be more permanent.


There are a few things I tried, but the issue persists.

  1. I reset SMC which had no effect
  2. I rebooted to safe mode on the guidance of apple care executives, where the issue was rarer. When I booted back to the normal boot made, initially the issue seemed to have gone away but returned.
  3. I upgraded to MacOS 10.15.5, which also seemed to make the issue disappear, only to appear again after a few days.


Some other important factors to consider

  1. Yesterday, my WiFi connectivity was restored, but I can't conclusively say the issue is not present when connecting to WiFi because the connection soured again today. Also, I don't remember how well the installation of 10.15.5 and restoration of WiFi co-incide to conclusively say the disappearance of the issue I encountered after updating to 10.15.5 was due to reconnecting to WiFi. The restoration of WiFi came much after booting to and from safe mode, so there is no chance of there being a co-incidence.
  2. I have been using Catalina for a long time, and only now am I encountering this issue.
  3. Sometimes, there is a prompt that appears on opening the laptop's lid thus waking it from sleep and logging in looking for wireless keyboards. Is anyone else experiencing this as well?
  4. I disabled WiFi once, and the issue disappeared, but I didn't test enough to say this conclusively.

Jul 10, 2020 1:08 AM in response to JessTheBird

I have the same issue with my brand new MacBook Pro13" 2020. It happened few times when I had Parallels VM on, but my switched to the "Mac OS" desktop and left my MacBook to sleep. Then when I waked it up, I got this window that says lost bluetooth keyboard connection popped up. I had to plug in something into USB-C and my keyboard would back connected.

Jul 12, 2020 1:12 AM in response to PapaandMamaBear

@Papa & Mama Bear I think this is correct, but I also think @ngowerjo is correct.


An apple macbook's OS should not have this difficulty connecting to so many routers. It should not have this limitation and needs to be fixed in an update.


As for me, I have decided to go with an ASUS router that I will update to Merlin once I receive it. I am coming from a Xiaomi (very limited in control options to try to solve) and an older TPlink Chinese only model. I hope the new router will solve, but cannot be certain... which is disappointing. The new router should have more options to play around with settings too - therefore allow a fix similar fix/solve like this one: from @mallow_pl


This answer: "I solved this problem setting IPV6 to OFF in network settings => airport => tcp tab." in this old topic: https://discussions.apple.com/thread/5248738?answerId=29499974022#29499974022

helped me to solve my problem. I did something else, however. I didn't change my network settings in macOS, but I have changed one setting in my Asus Router. In IPv6 section > Connection type - I've changed to Passthrough from the default Disable. After this - problem with keyboard and trackpad freezing is almost gone. Happened maybe 2 times in 2 weeks.


At any rate, I am hopeful that the new router (unexpected and disappointing expense) will solve the issue, as I don't easily have the opportunity to change my provider. China only has two providers.


If a solve is not forthcoming, I am left with the only other option that Apple update a fix in their OS as suggested by @ngowerjo


Will let you know how I go in a few days.

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.