Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

michael31986

macrumors 601
Original poster
Jul 11, 2008
4,590
704
I am trying to make it so that my WiFi on my MacBook stays connected even when I close the lid and the screen is off. I can’t seem to find a way to do that.
 
I am trying to make it so that my WiFi on my MacBook stays connected even when I close the lid and the screen is off. I can’t seem to find a way to do that.

Has nothing to do with the laptop turning off the wifi and everything with the laptop sleeping when the lid is closed.
 
  • Like
Reactions: me55 and robvas
Don't sleep the computer, just sleep the screen.

System preferences > Energy Saver

[√] wake for Network Access

Then Computer Sleep > Never.

You can turn the display off after a few minutes to save power. Just don't let the entire computer sleep.

Enable power nap may force it to re-establish its connection as well, which may reduce the wake up time. You may want to experiment for the settings that give you a good compromise between battery consumption and wake-up time.
 
Okay. So how can I have WiFi not turn off when I close the lid. That was my question.

So you want the wifi on, but the rest of the laptop sleeping, so it doesn't do anything with the wifi that you've somehow kept running. Got it.
 
  • Like
Reactions: me55
Don't sleep the computer, just sleep the screen.

System preferences > Energy Saver

[√] wake for Network Access

Then Computer Sleep > Never.

You can turn the display off after a few minutes to save power. Just don't let the entire computer sleep.

Enable power nap may force it to re-establish its connection as well, which may reduce the wake up time. You may want to experiment for the settings that give you a good compromise between battery consumption and wake-up time.

How do enable power nap? Also closing lid with wake for network access still turns WiFi off.
[doublepost=1519316506][/doublepost]
So you want the wifi on, but the rest of the laptop sleeping, so it doesn't do anything with the wifi that you've somehow kept running. Got it.
I just want WiFi on so I can stream to my sonos speakers via WiFi. Idc how I have to set it up. But if I could have the screen off I would be okay with that.
There has to be a way to keep WiFi on but lid closed.
 
I'm not sure why people aren't able to understand the question.

The OP wants to shut their laptop whilst it keeps running (with wifi) for music streaming. My half-solution is to set up a "hot corner" to turn the display off and I then swipe my cursor up to that corner. Of course, this isn't as convenient as shutting the lid but it does turn the screen off and save some battery.

System Preferences / Mission Control / Hot Corners / Put Display To Sleep
 
Why do you want this? Maybe if you explain your reasoning someone will have an alternative that will solve your actual problem.


I want to stream my music from my lap top to my
Sonos systems but it needs to be on WiFi all the time.
I'm not sure why people aren't able to understand the question.

The OP wants to shut their laptop whilst it keeps running (with wifi) for music streaming. My half-solution is to set up a "hot corner" to turn the display off and I then swipe my cursor up to that corner. Of course, this isn't as convenient as shutting the lid but it does turn the screen off and save some battery.

System Preferences / Mission Control / Hot Corners / Put Display To Sleep

Thank you. I don’t get why no one was understanding it. That’s a good alternative, but there has to be a way to make the computer think it is still open. Like a hack.
 
Even if you could find a way to keep the wifi card running, the system sleeps when the lid is closed.

Clamshell mode
is another option (closing the lid with external keyboard and display attached) Press a key on the keyboard, and the Macbook wakes up so you can do your streaming, even while the lid is closed. Turn the external display off, and the streaming would continue, but you can't make any changes to what you are doing (unless you can do that without needing to see the screen :D )
You don't get to be portable while in clamshell mode. The other option is to leave the lid open, and just sleep the display. You would then still be portable, but with an open lid, not exactly a great solution, but workable)
 
Not wholly convinced running the device closed is best for long term operation, better off just blanking the display whilst open. Not so much about ventilation being compromised (don't see much by way of vents being blocked...) more proximity of screen near main board etc. increasing thermal production for a given area.

(Is based on doing the above previously using the macbook as a USB power source for iPhone charging. The device would typically get quite hot)
 
  • Like
Reactions: jerryk
Even if you could find a way to keep the wifi card running, the system sleeps when the lid is closed.

Clamshell mode
is another option (closing the lid with external keyboard and display attached) Press a key on the keyboard, and the Macbook wakes up so you can do your streaming, even while the lid is closed. Turn the external display off, and the streaming would continue, but you can't make any changes to what you are doing (unless you can do that without needing to see the screen :D )
You don't get to be portable while in clamshell mode. The other option is to leave the lid open, and just sleep the display. You would then still be portable, but with an open lid, not exactly a great solution, but workable)
Thanks!

I am wondering if there is a hack for this? There use to be insomnia, but that doesn't work anymore. hmm
 
As far as I know, nothing works in High Sierra to disable sleep-on-lid-close. Well, apart from the official way:https://support.apple.com/en-gb/HT201834

This is why I just turn off the display with the lid open. One way to fix the issue would be to trick the laptop into thinking the display is open when it isn't. This would involve interfering with the magnets used to sense the lid being closed. On my late 2013 Pro, I think they're about half way down the chassis on the left hand side.
 
As far as I know, nothing works in High Sierra to disable sleep-on-lid-close. Well, apart from the official way:https://support.apple.com/en-gb/HT201834

This is why I just turn off the display with the lid open. One way to fix the issue would be to trick the laptop into thinking the display is open when it isn't. This would involve interfering with the magnets used to sense the lid being closed. On my late 2013 Pro, I think they're about half way down the chassis on the left hand side.
Thanks. I just decided to close lid as far as I could without it going to sleep. I guess that works for now.
 
This is currently (2020) possible using an app called InsomniaX.
It lets you disable the lid sleep, and also Idle sleep.
Some older macs don't have clamshell mode (lets you work with the lid closed if you have an external monitor) and can get hot when the lid is closed. There are safety checks in InsomniaX to go to sleep if nessecary.
 
wow I'm pretty sure all you need is the magic keyboard. I just tried on my MacBook Pro 16 and while apple music was playing , I closed my lid, the music stopped, but then when I press the play button (>II) on the wireless keyboard, the music starts up again and I assume the laptop is running as usual with wifi.
 
When you press the play button on the keyboard, your MBPro responds to that keyboard press, and wakes up. You can't play music (wifi or not) if your Mac is sleeping.
 
When you press the play button on the keyboard, your MBPro responds to that keyboard press, and wakes up. You can't play music (wifi or not) if your Mac is sleeping.
all im saying is I can play music on my MacBook in clamshell mode without an external display attached.
 
Yes, and, that's not all. If you have music playing, that means your MB is no longer sleeping.
Usually, that also means that the display is not off, with the lid closed -- so you want to be careful that the system does not overheat.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.