Problem connecting to iMac when the computer is asleep.
I have been working on this for a couple of weeks and researching it on this community for days. I have tried lots of options to fix this.
I can connect to TeamViewer on my iMac just fine when the computer is awake and I am logged in. When I try to connect to it when the computer is asleep, I get the errors "Could not connect to partner" and "A connection to the requested partner could not be established".
I don't know if it is related but when I wake the computer from sleep and immediately look at the TeamViewer window, I see the red dot and error "Not ready. Please check your connection".
I have allowed Wake on LAN on my iMac by System Preferences, Energy Saver, Wake for network access. I know it is receiving the Magic Packet because I can see it by using this command from Terminal: "pmset -g everything | grep Magic". I see the Magic Packet received when I use the WakeOnLan app from my tablet. But I don't see it received when I try to connect using TeamViewer from my tablet.
I have found a workaround by using the JuiceSSH app from my tablet. I use SSH to send the command "caffeinate -u -t 1" to my Mac. This command turns the display on and then after a few seconds, TeamViewer will work. But this shouldn't be necessary.
FYI: I have created an account and both my iMac and tablet are in that account and Easy access is granted. I have disabled all passwords and only allow access from my account. (I did add a random password to see if it would help, but it didn't.) I have also added the Partner ID from my tablet in the allowlist on my iMac. I have added TeamViewer to the list of allowed programs in the Mac Firewall. I have tested with my Antivirus turned off. My iMac is connected by both Ethernet and Wi-Fi. I am running TeamViewer version 15.11.6 on an iMac running MacOS Big Sur version 11.2.3. I am running the TeamViewer app version 15.15.46 CL on my Samsung Galaxy S5E tablet running Android 10.
Any suggestions on what to try would be greatly appreciated. Let me know if you need any more information or want me to run any tests."
Thanks
Dan