The conversation on this page has been archived and is no longer active.

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

Message #1 - Posted 2004/12/02 - Bill Bushnell

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?

2) 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.

Bill Bushnell

Message #2 - Posted 2004/12/02 - Neill Massello

Bill Bushnell 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>.

Message #3 - Posted 2004/12/02 - Tom Stiller

Previously, Neill Massello wrote:

Bill Bushnell 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.

Tom Stiller

PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3
7BDA 71ED 6496 99C0 C7CF

Message #4 - Posted 2004/12/02 - Bill Bushnell

Tom Stiller wrote:

Previously, Neill Massello wrote:

Bill Bushnell 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.

Bill Bushnell

Message #5 - Posted 2004/12/03 - Sander Tekelenburg

Previously, Bill Bushnell 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 ;)

Sander Tekelenburg, <http://www.euronet.nl/~tekelenb/>

Mac user: "Macs only have 40 viruses, tops!"
PC user: "SEE! Not even the virus writers support Macs!"

Message #6 - Posted 2004/12/02 - Tom Stiller

Previously, Bill Bushnell wrote:

Tom Stiller wrote:

Previously, Neill Massello wrote:

Bill Bushnell 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.

Tom Stiller

PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3
7BDA 71ED 6496 99C0 C7CF

Message #7 - Posted 2004/12/03 - Bill Bushnell

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.

Bill Bushnell

Message #8 - Posted 2004/12/03 - Tom Stiller

Previously, Bill Bushnell 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.

Tom Stiller

PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3
7BDA 71ED 6496 99C0 C7CF

Need Help? Have a Question?

Looking for more help, comments, and answers?

Ask your questions on Ask Different. Ask Different is a community of Apple users ready to help.