sleep without dropping network?

Is there a way to configure OS X to not drop network connections when the machine goes into sleep mode?
David Empson wrote on :

Joe kpfibmqjo@redacted.invalid wrote:

Is there a way to configure OS X to not drop network connections when the machine goes into sleep mode? I haven't been able to find one, but I'd like to be able to get to machines that are asleep over the network.

No. While the computer is asleep, the CPU is not operating. There is no way to communicate with it.

The only supported network function while in sleep mode is a Wake on LAN packet, which is recognised by the network interface hardware without assistance from the CPU. This will trigger a wakeup (if this feature is supported by your Mac model and is enabled in Energy Saver preferences).

If you want to communicate with a "sleeping" computer, the best you can do is not put it to sleep, but you can allow the display and hard drive to go to sleep.

Jolly Roger replied on :

In article m2d4rqokxn.fsf@redacted.invalid, Joe kpfibmqjo@redacted.invalid wrote:

Is there a way to configure OS X to not drop network connections when the machine goes into sleep mode? I haven't been able to find one, but I'd like to be able to get to machines that are asleep over the network.

You can send Wake On LAN packets to Ethernet-connected Macs to wake them up over an Ethernet network. Here's a handy GUI application that will send them:

http://www.macupdate.com/info.php/id/15779/wakeonlan

Each Mac you want to wake this way will need to be:

  • connected to your network with an Ethernet cable (Airport won't work)
  • configured to "Wake for Ethernet administrator access" in Sysem Preferences > Energy Saver > Options
David Empson replied on :

Joe kpfibmqjo@redacted.invalid wrote:

dempson@redacted.invalid (David Empson) writes:

Joe kpfibmqjo@redacted.invalid wrote:

Is there a way to configure OS X to not drop network connections when the machine goes into sleep mode? I haven't been able to find one, but I'd like to be able to get to machines that are asleep over the network.

No. While the computer is asleep, the CPU is not operating. There is no way to communicate with it.

The only supported network function while in sleep mode is a Wake on LAN packet, which is recognised by the network interface hardware without assistance from the CPU. This will trigger a wakeup (if this feature is supported by your Mac model and is enabled in Energy Saver preferences).

What's the difference between "wake on LAN packet" and recognizing a SYN or ack or keepalive probe from another machine?

My Energy Saver preferences only have the option to "Wake for Ethernet network administrator access". That's already enabled so I guess that's not it.

That's what I meant. Do a Google search for "magic packet technology" to see how it works.

In short, the packet required to wake a particular computer has to contain a specific repeated pattern which inclues that computer's MAC address. This will not appear in normal TCP/IP packets (but might in random data, with a very low probability).

You can send one of these packets using an application like "Wake on LAN". It just needs to know the MAC address of the target computer (which has to be on the same LAN - it is difficult to send one of these over the Internet or through a router without careful preparation and probably cooperation from the router).

If the computer is asleep, the magic packet is probably discarded without ever being processed by the CPU. Subsequent traffic might also be ignored or delayed for a second or two until the computer has fully woken, reacquired its DHCP lease and settled down again.

If you want to communicate with a "sleeping" computer, the best you can do is not put it to sleep, but you can allow the display and hard drive to go to sleep.

I don't see how to do that in my preferences either.

System Preferences > Energy Saver, Sleep tab, show details.

"Put the computer to sleep when it is inactive for" should be slid all the way to the right (never). You can use any setting you like for display sleep and hard disk sleep.

Putting the computer to sleep manually (e.g. via the Apple menu) will still work, but will prevent you receiving any TCP/IP traffic (apart from a magic packet which wakes up the computer).

David Empson replied on :

Joe kpfibmqjo@redacted.invalid wrote:

dempson@redacted.invalid (David Empson) writes:

Joe kpfibmqjo@redacted.invalid wrote:

dempson@redacted.invalid (David Empson) writes:

Joe kpfibmqjo@redacted.invalid wrote:

[...]

If you want to communicate with a "sleeping" computer, the best you can do is not put it to sleep, but you can allow the display and hard drive to go to sleep.

I don't see how to do that in my preferences either.

System Preferences > Energy Saver, Sleep tab, show details.

I don't have a "show details" option there.

On my MacBook Pro and other laptops, Energy Saver has a detailed view and a condensed view. There is a "Hide Details" or "Show Details" button in the lower left corner.

Desktop models only have a detailed view, so you can ignore that issue.

There's a checkbox that says "Put the hard disk(s) to sleep when possible". Is that what you mean?

That's part of it. If you turn that on, then your hard disk can spin down after the computer has not been using it for a little while. If the drive needs to be accessed again, the computer will spin it up (which will cause a short delay while it gets up to speed).

"Put the computer to sleep when it is inactive for" should be slid all the way to the right (never). You can use any setting you like for display sleep and hard disk sleep.

I don't have those options. Are you talking about Leopard?

You just described the hard disk sleep setting (the checkbox).

What Mac model do you have, and which version of Mac OS X are you running?

I've just checked several computers. The settings for computer and display sleep are there on 10.3, 10.4 and 10.5 on both desktop and laptop models (MacBook Pro, iBook G4, two mid to late model PowerMac G4s, Intel Mac Mini, Intel iMac). I also recall the same settings on my Titanium PowerBook G4 and I'm pretty sure they were the same on my iBook G3 and iMac G3, and on every other Mac model I've looked at in recent years.

Some of them might be missing from older models which have less hardware support for energy saver features, such as the PowerMac G3.

If you can see the "hard disk" checkbox, then immediately above it should be two horizontal sliders.

The top one is "Put the computer to sleep when it is inactive for".

The bottom one is "Put the display(s) to sleep when the computer is inactive for".

Both sliders have a logarithmic scale ranging from 1 minute through 15 minutes, 1 hour, 3 hours and never.

You should set the top one (computer sleep) to "Never" and the bottom one (display sleep) to whatever delay you want.

(You might need to unlock first - if the padlock in the bottom left corner is locked, then click on it and enter an admin user name and password.)