Link to home
Start Free TrialLog in
Avatar of arthurboehm
arthurboehm

asked on

Lose Internet Connection after Mac Goes Into Sleep Mode

On Mac Sierra. Recently, after my Mac is awakened after being in sleep mode, my Internet connection is lost. To restablish it, I have to reboot. There's no trouble with the WI-fi connection that I can tell.

Thanks.
Avatar of bbao
bbao
Flag of Australia image

when you say "my internet connection", do you mean the Wi-Fi connection of the Mac?
Avatar of arthurboehm
arthurboehm

ASKER

Yes, exactly.
you may first reset the NVRAM, see below the how-to guide.

https://support.apple.com/HT204063
Will try--thanks.
What you require is to install one of the https://github.com/search?q=nosleep+mac projects on your Mac.

You can dig around in docs to find the defaults settings to accomplish this, or just install one of the above.

https://github.com/integralpro/nosleep provides the version I've been using for years.
So, David, what these will do when installed is prevent the computer from ever entering sleep mode? Thus no problem with WiFi connection? If so, is this advisable? Please explain.
First try to reset the SMC, then the NVRAM.  You should try to fix it instead of working around it.

As for keeping your computer from going to sleep, there is the built in command line /usr/bin/caffeinate; no need for any 3rd party app.  It's normally used to extend your default Energy saver sleep time once to let your script finish running.  However, it's even easier to go to your Energy Saver settings and set it to never sleep.  If you need to run your laptop as a server, then that's simpler than running some 3rd party extra utility.  The UNIX way is about keeping it simpler with fewer processes.

caffeinate -u will create an assertion that the user is on.  There's other options, depending on how long you wish to set it.  There's no really good or bad.  Having it sleep means it's not always on and using electricity and connected to the internet to be hacked.


P.S.  You should probably consider upgrading to High SIerra, Mojave, or Catalina (if you no longer use 32 bit programs).
I would wait on Big Sur.
I forgot one more thing.  Boot into Apple Hardware Diagnostics and run the tests to rule out a hardware issue.  Start the computer and hold down d until it boots into Diagnostic mode.
Thanks, Serialband. Some of what you write is above my (technical) head. So some questions:

I'm told above how to reset the NVRAM. How do I reset SMC?

How and where to I insert the command line--and what will be the result of my doing so? To put it another way, what does "caffeinate -u will create an assertion that the user is on" mean?

I've got my computer set to Never Sleep in the energy saver, have for some time. Still, the problem occurs when I close my computer and then open it. Does this mean the WiFi disconnect issue ISN'T related to the computer's sleep mode?

Thanks.


If you find resetting various settings fails to have any effect... run a NoSleep tool on your machine...
SMC reset on older Macbook Pros (without T2, before 2018 or 2019)
Turn off your computer.  Make sure it's fully shut off.
Press and hold left shift control option keys, then press and hold the power button.  Hold for 5 to 10 seconds then release all 4 keys.

SMC reset on newer T2 Macbook Pros
Turn off computer
Press and hold left control option keys, then press and hold right shift key.  Then press and hold the power button. Hold for 5 to 10 seconds then release all 4 keys.
Thanks, Serialband. Would you kindly answer my other two questions?
ASKER CERTIFIED SOLUTION
Avatar of arthurboehm
arthurboehm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
As above.
Glad you found a solution!
Thanks, David.
You're welcome!