Wake-on-LAN, iMac G5, OS-X 10.3.6, inconsistent behavior

the machine seems to go back to sleep after about 1 minute, even though the Sleep time is set to 30 minutes.
Bill Bushnell wrote on :

I have observed 2 odd behaviors of my iMac when I attempt to wake it from sleep by sending it the wake-on-LAN magic packet to the ethernet port.
I am using the program I downloaded from:

http://gsd.di.uminho.pt/jpo/software/wakeonlan/

  1. If I put the iMac to sleep manually, I can re-awaken it within a minute or so by sending it the magic packet. Then I can login through ssh. Unfortunately, the machine seems to go back to sleep after about 1 minute, even though the Sleep time is set to 30 minutes. (discovered through pmset -g)

Why does the machine go back to sleep so soon?

  1. If I put the iMac to sleep manually and wait longer than 10 or 15 minutes before attempting to awaken it with the magic packet, the iMac will not wake up. It's as if it's been put into a deeper sleep from which only console action will awaken it.

Why doesn't the magic packet work in this case?

Other information:

I'm connected to the Internet through DSL, and I'm connected by wire through a Netgear WGR614 router, with port forwarding for ssh and a wake-up call on port 9 sent specifically to the iMac in question.

I'm trying to set up remote access to my home iMac without leaving the machine awake 24/7. Do any of you Mac/OS-X gurus have a solution?
Thanks.

Neill Massello replied on :

Bill Bushnell mrbill@redacted.invalid wrote:

I'm connected to the Internet through DSL, and I'm connected by wire through a Netgear WGR614 router, with port forwarding for ssh and a wake-up call on port 9 sent specifically to the iMac in question.

I'm trying to set up remote access to my home iMac without leaving the machine awake 24/7. Do any of you Mac/OS-X gurus have a solution?

AFAIK, magic packets can't be routed. To wake a machine from the WAN, you'd need a router that could send it a magic packet in response to some kind of command sent to the router in a TCP/IP packet from the WAN. It doesn't look like the WGR614 can, but one new wireless router promises to <http://www.buffalotech.com/products/product-detail.php?productid=88&cat egoryid=6>.

Tom Stiller replied on :

In article 1go55j0.rwod5eobczsgN%neillmassello@redacted.invalid, neillmassello@redacted.invalid (Neill Massello) wrote:

Bill Bushnell mrbill@redacted.invalid wrote:

I'm connected to the Internet through DSL, and I'm connected by wire through a Netgear WGR614 router, with port forwarding for ssh and a wake-up call on port 9 sent specifically to the iMac in question.

I'm trying to set up remote access to my home iMac without leaving the machine awake 24/7. Do any of you Mac/OS-X gurus have a solution?

AFAIK, magic packets can't be routed. To wake a machine from the WAN, you'd need a router that could send it a magic packet in response to some kind of command sent to the router in a TCP/IP packet from the WAN. It doesn't look like the WGR614 can, but one new wireless router promises to <http://www.buffalotech.com/products/product-detail.php?productid=88&cat egoryid=6>.

AFAIK, there is nothing special about a magic packet itself that would prevent it from being routed. It may be that the OP chose a port (e.g. 9) or broadcast route that his router doesn't forward. If that is the case, he might try using a known routable port which will be forwarded to the target machine.

Bill Bushnell replied on :

Tom Stiller tomstiller@redacted.invalid wrote:

In article 1go55j0.rwod5eobczsgN%neillmassello@redacted.invalid, neillmassello@redacted.invalid (Neill Massello) wrote:

Bill Bushnell mrbill@redacted.invalid wrote:

I'm connected to the Internet through DSL, and I'm connected by wire through a Netgear WGR614 router, with port forwarding for ssh and a wake-up call on port 9 sent specifically to the iMac in question.

I'm trying to set up remote access to my home iMac without leaving the machine awake 24/7. Do any of you Mac/OS-X gurus have a solution?

AFAIK, magic packets can't be routed. To wake a machine from the WAN, you'd need a router that could send it a magic packet in response to some kind of command sent to the router in a TCP/IP packet from the WAN. It doesn't look like the WGR614 can, but one new wireless router promises to <http://www.buffalotech.com/products/product-detail.php?productid=88&cat egoryid=6>.

AFAIK, there is nothing special about a magic packet itself that would prevent it from being routed. It may be that the OP chose a port (e.g. 9) or broadcast route that his router doesn't forward. If that is the case, he might try using a known routable port which will be forwarded to the target machine.

Thanks for your followups.

Perhaps I didn't make it clear in my original post that I could indeed send the magic packet through the router (by setting up port forwarding)
to my computer and that it would wake the computer, IF the computer had been asleep for less than a few minutes when put to sleep by selecting "Sleep" from the Finder. This worked. Asleep longer than a few minutes, and the computer was un-wakable by the magic packet. My question was why can I wake the computer within a few minutes of sleep, but not after the computer has been asleep longer.

My other related question was that after waking up the computer (after it had been asleep for less than a few minutes), why does it go back to sleep within a minute even if the sleep parameter is set to 30 minutes.

Sander Tekelenburg replied on :

In article f_Krd.9012$_3.106258@redacted.invalid, Bill Bushnell mrbill@redacted.invalid wrote:

[...]

My question was why can I wake the computer within a few minutes of sleep, but not after the computer has been asleep longer.

Sounds like you can only wake it up when it is only about getting ready to bed, not yet asleep.

My other related question was that after waking up the computer (after it had been asleep for less than a few minutes), why does it go back to sleep within a minute even if the sleep parameter is set to 30 minutes.

In my experience if a machine goes to sleep without logging out all Graphical Logins, then on wake-up, assuming it is configured to require a user/passphrase combo, when none is given it goes back to sleep - even when in the mean time I logged in remotely through ssh. I suspect the solution for your situation would be to make sure any Graphical Sessions are logged out before allowing the 'puter to sleep. Yes, that can be a practical problem. But at least it's worth to test, to make surewhether or not this is indeed the cause of your problem. If so, you'll be able to submit a nice bug report to Apple ;)

Tom Stiller replied on :

In article f_Krd.9012$_3.106258@redacted.invalid, Bill Bushnell mrbill@redacted.invalid wrote:

Tom Stiller tomstiller@redacted.invalid wrote:

In article 1go55j0.rwod5eobczsgN%neillmassello@redacted.invalid, neillmassello@redacted.invalid (Neill Massello) wrote:

Bill Bushnell mrbill@redacted.invalid wrote:

I'm connected to the Internet through DSL, and I'm connected by wire through a Netgear WGR614 router, with port forwarding for ssh and a wake-up call on port 9 sent specifically to the iMac in question.

I'm trying to set up remote access to my home iMac without leaving the machine awake 24/7. Do any of you Mac/OS-X gurus have a solution?

AFAIK, magic packets can't be routed. To wake a machine from the WAN, you'd need a router that could send it a magic packet in response to some kind of command sent to the router in a TCP/IP packet from the WAN. It doesn't look like the WGR614 can, but one new wireless router promises to <http://www.buffalotech.com/products/product-detail.php?productid=88&cat egoryid=6>.

AFAIK, there is nothing special about a magic packet itself that would prevent it from being routed. It may be that the OP chose a port (e.g. 9) or broadcast route that his router doesn't forward. If that is the case, he might try using a known routable port which will be forwarded to the target machine.

Thanks for your followups.

Perhaps I didn't make it clear in my original post that I could indeed send the magic packet through the router (by setting up port forwarding)
to my computer and that it would wake the computer, IF the computer had been asleep for less than a few minutes when put to sleep by selecting "Sleep" from the Finder. This worked. Asleep longer than a few minutes, and the computer was un-wakable by the magic packet. My question was why can I wake the computer within a few minutes of sleep, but not after the computer has been asleep longer.

I had no problem waking my iMac after it had been sleeping for about 40 minutes. Do you send a single magic packet or a sequence of them?

My other related question was that after waking up the computer (after it had been asleep for less than a few minutes), why does it go back to sleep within a minute even if the sleep parameter is set to 30 minutes.

I was able to make my iMac do this once; however, the rest of the time it only needed to be "shaken" once to wake it up.

Bill Bushnell replied on :

Tom Spiller wrote: I had no problem waking my iMac after it had been sleeping for about 40 minutes. Do you send a single magic packet or a sequence of them?

I'm using the following script: http://gsd.di.uminho.pt./jpo/software/wakeonlan/

It sends in a UDP packet, 6 times FFh followed by 16 repetitions of the MAC address of the target computer. The script doesn't claim compatibility with the Apple hardware, and that may be the problem. I've run the script multiple times in succession, and if it doesn't respond the first time, it won't respond the second or more times.

Another poster suggested that it worked within the first minute of being put to sleep because the hardware may not have completely "gone to sleep" within the first minute or so.

I was able to make my iMac do this once; however, the rest of the time it only needed to be "shaken" once to wake it up.

Have you gotten a Wake-on-LAN type script to work on a Mac?

Thanks.

Tom Stiller replied on :

In article Cf4sd.9194$_3.107492@redacted.invalid, Bill Bushnell mrbill@redacted.invalid wrote:

Tom Spiller wrote: I had no problem waking my iMac after it had been sleeping for about 40 minutes. Do you send a single magic packet or a sequence of them?

I'm using the following script: http://gsd.di.uminho.pt./jpo/software/wakeonlan/

It sends in a UDP packet, 6 times FFh followed by 16 repetitions of the MAC address of the target computer. The script doesn't claim compatibility with the Apple hardware, and that may be the problem. I've run the script multiple times in succession, and if it doesn't respond the first time, it won't respond the second or more times.

Another poster suggested that it worked within the first minute of being put to sleep because the hardware may not have completely "gone to sleep" within the first minute or so.

I was able to make my iMac do this once; however, the rest of the time it only needed to be "shaken" once to wake it up.

Have you gotten a Wake-on-LAN type script to work on a Mac?

Yes. I've used that script as well as a couple of little applications that do the same thing. All of them generate the proper magic packet and, as far as i know, there is no problem with Apple hardware. The only thing I can guess is that the the preference setting doesn't get communicated to the hardware properly or the ethernet interface isn't recognizing the WOL packet. You might try toggling the System preferences checkbox, quitting the perfpane in betweee to see if the selection is being communicated to the hardware. Good luck.