What's new

ether-wake not working for me...

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

bobfandango

Occasional Visitor
I'm trying to wake a sleeping iMac using ether-wake and failing miserably...

Using an Android app called 'WOL', I can wake the iMac by specifying its MAC address, the broadcast LAN address (e.g. 192.168.1.255) and port 9. So, I know the iMac is setup correctly and can be woken up with a magic packet. (note, the phone is on the LAN via wifi).

However, ether-wake fails when trying the same thing. In particular, I SSH into the router from the internet, and execute the following:

ether-wake -b -i br0 [MAC of the iMac]

The command returns silently, and the iMac fails to wake up. I've other ways too. For example, I've tried:

ether-wake -i br0 [MAC of the iMac]
ether-wake -b -i br0 [IP of the iMac]
ether-wake -i br0 [IP of the iMac]

I have no idea if using IP is supposed to work, but since the IP and MAC are in the ethers entry, I figured I'd give it a try. Anyhow, none of this works. Any ideas?
 
I'm trying to wake a sleeping iMac using ether-wake and failing miserably...

Using an Android app called 'WOL', I can wake the iMac by specifying its MAC address, the broadcast LAN address (e.g. 192.168.1.255) and port 9. So, I know the iMac is setup correctly and can be woken up with a magic packet. (note, the phone is on the LAN via wifi).

However, ether-wake fails when trying the same thing. In particular, I SSH into the router from the internet, and execute the following:

ether-wake -b -i br0 [MAC of the iMac]

The command returns silently, and the iMac fails to wake up. I've other ways too. For example, I've tried:

ether-wake -i br0 [MAC of the iMac]
ether-wake -b -i br0 [IP of the iMac]
ether-wake -i br0 [IP of the iMac]

I have no idea if using IP is supposed to work, but since the IP and MAC are in the ethers entry, I figured I'd give it a try. Anyhow, none of this works. Any ideas?

This is a not uncommon problem . . .a couple things to check first, just to make sure your hardware is correctly configured. Also, I'm pretty much skipping past the router and assuming that since you sent a magic packet via wifi and it worked that we're looking at a Mac config problem. First, have you assigned it a static IP address in the router? Sometimes that helps.

1. System preferences > energy savings - just double check this is checkmarked (wording might be a little different depending on if you have wifi/ethernet active).
eFzMAKL.jpg


2. Clear your SMC and PRAM, this is just a standard troubleshooting step that can reset hardware that is operational but acting goofy. It will not clear or delete any important settings.

3. Macs act a little funny regarding WoL due to Bonjour/Zero-config and the sharing of resources (and Back to my Mac functionality) that is supposed to be able to occur even when Macs are sleeping. This is especially true if you have multiple Apple devices (Macs, iOS, Apple TV). Unfortunately, some of this stuff just runs better on Apple routers or in the presence of other Apple equipment. Here is Apple's overview on "Wake on Demand" as they call it. Also, if you have other apple equipment on your network (including Apple TV) how does it respond to WoL commands, or actually testing by sending some audio to an AppleTV that is in a sleep state. This would be a good way just double check that other Apple devices are able to be woken up via hardwire or wifi.

3a. You could try doing things like: enabling "back to my mac" under the mail & accounts preference pane; leaving itunes open and share a music library; share a printer connected to the computer, things that have be known to theoretically heighten a Mac's "state of sleep awareness." Also I'm suggesting you maybe try one or another of those ideas, not saying all three simultaneously will help the odds.

3b. Here's some info on using the terminal command "sudo pmset" to change sleep/hibernate behavior. I know little about why one would use this in what particular situations.

4. If it's a desktop computer, you could just set it not to go to full sleep, while still letting the screen go dim and/or totally turn off (or worst case let a screensaver activate), telling the hard drive to spin down, etc., so still getting a significant power savings without letting it turn all the way off.

hope this helps! :)
 
Last edited:
Thanks very much for your thoughtful and detailed answer. A number of your suggestions were considered and implemented just to get the WOL app to work (e.g. clearing PRAM etc). It was indeed interesting discovering the bonjour related issues that seem to plague folks. There is a plist tweak that allows one to avoid so-called 'dark wake' and was the key to getting the app to wake the computer. As I mentioned, I *can* wake the computer over wifi from an app, just not from the router (which I need to be able to wake from the WAN). So I believe the Mac settings are as good as they get. The app can wake over wifi, and neither the app nor router are Apple products. So, I've got the computer in a state where it can wake, and it seems to like the packet that the WOL app throws at it.

Now, the packet that the router generates is apparently different. I will probably do a packet capture and compare when I have more time, but I managed a workaround.

Using the SSH client on my phone is rather cumbersome and I accidentally copied two consecutive invocations of the relevant ether-wake command (because selecting an area with ones finger on a tiny screen is error prone). When I pasted the command into the client and hit enter, the ether-wake command executed twice in quick succession. Guess what... the computer woke up!

If I send two WOL packets from the router quickly back to back, the computer wakes up. Needless to say, I have no idea why.... I have tested this both when I put the computer to sleep manually, and when it goes to sleep of its own accord (some have reported that it can make a difference). So, I can now wake the machine from the wild by just executing a small script on my jffs partition via SSH.

Thanks for the suggestion re: just letting the screen dim. Indeed, that saves a lot of power. But, that still consumes about 40 watts and sleep is less than 2.

Thanks again...
 
Interesting. . .what are you waking your Mac from the WAN in order to do? Some sort of file sharing or remote access?

Did you try turning on back to my mac or iTunes music library sharing and see if that has any effect?

I looked up your android app to see if I could find exactly what kind of command it sends and I couldn't figure it out.

I'm going to play around a little more on my end and see what I can find out.

There is also some interesting stuff in this thread re "low power wake" and ethernet vs. wifi.

http://forums.macrumors.com/showthread.php?t=1195152

I ran into this before, in some form. . .but it was a long ways back. I feel like I remember more than I actually remember. ;)
 
FWIW I was intrigued by this post and played around w/ 3 of my Macs (all on wifi) today trying to send WOL commands both from my RT-N66U and also a few different iOS apps with no success. I was, however, able to instantly bring any of them to life using the iOS Apple Remote app to access any of their shared iTunes libraries via airplay (instantly & seamlessly).

I have one router/AP on my network (the N66) and have an Airport Express hardwired to it in bridged mode serving as an auxiliary AP to another area of the house. Doing Bonjour services scans I see approx 25 individual Bonjour services (including "bonjour sleep proxy") on various devices on my network through the N66 (and also devices connected to wireless to Ethernet DD-WRT bridges) but I noticed if I do a Bonjour scan while connected to my AP Express I suddenly see no Bonjour services (which makes little sense b/c I use that AP's AirPlay function all the time). Just another bit of weirdness to an already difficult to make heads or tails of situation.

Maybe that's why they sell the Apple Remote Desktop admin software, it has the special sauce baked in. ;)
 
Hey again... This is all very interesting... I'm back at it again with this issue because while my work around works, it doesn't work for long. If the Mac sleeps too long (I don't really know how long), I can't get it to wake anymore. I tried the mobile mouse server trick that seems to work for some folks... Nothing... I disabled the bonjour sleep proxy client altogether thinking the failure to wake happens after a dark wake induced by mDNSResponder...

Anyhow, to answer your question.... PLEX. I can get wake my NAS remotely, but it doesn't have the horsepower to transcode. So I want to use my Mac to stream stuff to myself when I'm traveling. I've just been leaving the mac awake, but want to solve this problem. Oh, I also access the machine by logmein from time to time.

Re back to my Mac, I don't have the stated requirements to use it. I have only one Mac for example. Also, I'm not sure my first generation airport express would work.

What I've not done is try the remote trick you mention. Am I correct in understanding that it fully wakes the Mac, not just dark wake? I will try it out...

Thanks for the help, I will report back.
 
Yes the iOS remote app fully wakes a sleeping Mac.

There is a "back to my mac" toggle in the pref panes you can enable without actually making use of the service, I'm unsure what, if any difference it might make.

How are logging into your Mac to view the transcoded video?

You can also try putting your media files in a network share and try using an alternate app that supports the file format to play them. You can even put the files in a Dropbox folder and the Dropbox app can play & transcode quite a few, and mobile apps like VLC can access network streams (probably not too helpful for this case) but also use dropbox as a file source and play files from that.

p2JsAXI.png


Just throwing some other stuff out there that may or may not be easier thank figuring out how to reliably wake a sleeping Mac. ;)

Edit - I appear to be able to do file & screen sharing from any Mac on my network to any other Mac (that has "wake for network access" turned on), despite not being able to successfully send a WOL packet from an iOS app or the router's WOL command. Perhaps you could open port 5900 and direct it to your Mac and/or 80/443 (with selective firewall setup in the router and on the destination machine) depending on how you're trying to access it from the outside and what you're trying to access it with.

I also saw dyndns.org has an interesting beta right now for global local host name + DDNS + bonjour.
 
Last edited:
Hello again,

I have already tried the toggle in pref pane to no effect.

I have Plex Media Server (http://www.plexapp.com/) running on the iMac. It autoconfigures via UPNP, and streams media to the client on my other devices (Android phone, iPad, laptop). The transcoding is required for size, not format. I could certainly play anything I have natively, but I often don't have the bandwidth to support streaming the full size originals. Even if the wifi pipe were fat enough, it is nice to be able to stream directly to the phone over 4G from time to time, and that certainly requires transcoding. Plex handles the transcoding on the fly (assuming you have enough compute horsepower, hence my need for the iMac). For the same reason, Dropbox is too small. Plex just works... If you've got the bandwidth, and a client with native support for whatever you are trying to stream, the Plex server will stream it directly without transcoding. It kind of does everything really well. If you stream remotely, I highly recommend it.

Edit - I appear to be able to do file & screen sharing from any Mac on my network to any other Mac (that has "wake for network access" turned on), despite not being able to successfully send a WOL packet from an iOS app or the router's WOL command. Perhaps you could open port 5900 and direct it to your Mac and/or 80/443 (with selective firewall setup in the router and on the destination machine) depending on how you're trying to access it from the outside and what you're trying to access it with.

I hadn't gotten around to testing it, but I figured I should be able to do what you describe here above if I only had another mac... As it turns out, my brother has an old macbook he doesn't use anymore, so I will probably get that from him. I could leave on the laptop while I travel (screen off), which should use relatively little power, logmein to the macbook, wake the imac from there and go.... Unbelievable kludge Apple has forced me into here...

As a side rant, I'm really getting tired of this kind of thing from Apple... there are few good engineering reasons for the kind of user experience they are intentionally inflicting on their customers more and more (hello? how many different charging cables and base stations are you going to force us to buy???). I mean, Bonjour and traditional WOL coexisted on the Mac before... There is no reason they should not be able to now. But, nope, a magic packet cannot reliably wake a mac... They seem intent to force you to do EVERYTHING the apple way (like MS is always derided for). The devious motive just seems more likely here... people have been screaming about this issue since at least Lion and I think maybe it came in during Snow Leopard (not sure there). So, since it isn't fixed by now, it is "by design" which is BS...
 
<snip snip>

As a side rant, I'm really getting tired of this kind of thing from Apple... there are few good engineering reasons for the kind of user experience they are intentionally inflicting on their customers more and more (hello? how many different charging cables and base stations are you going to force us to buy???). I mean, Bonjour and traditional WOL coexisted on the Mac before... There is no reason they should not be able to now. But, nope, a magic packet cannot reliably wake a mac... They seem intent to force you to do EVERYTHING the apple way (like MS is always derided for). The devious motive just seems more likely here... people have been screaming about this issue since at least Lion and I think maybe it came in during Snow Leopard (not sure there). So, since it isn't fixed by now, it is "by design" which is BS...

I understand your frustration, and don't consider myself an Apple "fan boy," though I do have several of their products, I also have PCs (my first two computers were a Mac Classic and a 286 12mhz clone w/ monochrome monitor, so I go way back w/ both). So I won't try to defend "for them" or whatever, your gripes are legitimate, however I don't think there are "devious" motives in play. Making things work easily for customers sells stuff and brings them back, shackling them to crappy design and/or hardware will not keep them around long. But, WOL is really sort of a black art on any OS, just google around and you'll see a bunch of really weird almost esoteric and not totally stable implementations on the consumer side where OSes, NICs, routers, switches, etc, vary wildly compared to a more controlled corporate environment. Why do some of my PC NICs ask if I want to turn on WOL, and also if they should only respond to a "magic packet?" An imprecise barometer, but not too many wikipedia articles have the phrase ". . .can be a frustrating technology to implement," however, WOL's wikipedia entry does. hah.


Even the best case scenario in PCs is a little difficult to understand, and also this is just the OS side, you then want to make sure your BIOS supports it, you adjust your NIC card properly, then hopefully if your switch/router has the right firmware to pass it along.

So, a couple things in no good order.

- I think the energy savings in any computer or standalone device that's used in a "server" type role should take a backseat to that device's stability and performance. Having a regular consumer OS computer go to sleep only to be woken up so that it can stream and transcode video is a tradeoff I would not want to make just because Macs and PCs both will tend to wake up and automatically go into generally more and more CPU significant background task processes the longer they have been in a sleep or powered off state. Macs run a pretty big slew of cleanup & housekeeping scripts, along with system updates, and spotlight indexing usually in the very early AM hours. If your Mac hasn't been on for a day or two or more, and you bring it to life remotely and instantly ask it do transcode video and stream it, that can be a big performance killer. I'm slightly rusty on the inner workings of Windows, but also know that it does a variety of similar things like file indexing, OS updates, malware & virus definition updates and scans in off hours and/or upon wake up of the OS.

So, of all the places in your home computing/networking/entertainment, etc. devices, potentially the most tangible trade off for power savings would be felt on a computer that you want to go into as full of a sleep mode as possible except when using it to stream.

I have 3 desktops in my home and none of them ever go to full sleep (i.e. the drives spin down, display goes to powersave, but they'll still do CPU operations and network activity, and kick on the drives if they need to) because I am probably only going to use them for 5-10 minutes here or there once or twice a day, and I don't want my exact time of usage to coincide with full overlap onto when it wants to do its maintenance and housekeeping, just making me work slower when all I wanted to do was one simple task.

I also have a NAS that is a faster file server than any of my PCs are to each other, and can also house, organize, transcode, and stream to the outside world any video I have stored on it, and it draws 30w/h while its disks are active, and significantly less when its idle and spins them and its fans down (here's a pic of me testing its draw w/ a "killawatt meter, it's the pic on the bottom).

- All that said, I played around more with devices on my LAN, and ways of sending WOL commands or otherwise waking stuff up and have a couple of observations.
1. I don't believe Macs themselves use the "Bonjour sleep proxy," I used a few network activity monitors and believe it's just for A/V devices like AirPlay speakers and Apple TVs.

2. With varying degrees of success I could send my Macs WOL commands, but it seemed to be about the least reliable method to consistently bring them out of sleep. Doing a screen share or direct file share was 100% consistent (as was using the iOS remote app to stream music through their speakers or from their iTunes libraries to other computers/speakers).

3. I installed the AiCloud Smart Access app and turned that feature on my router, despite it sort of scaring me for how many holes it punches through w/ UPNP and unknown security risks (correction, known risks ;) ). Oddly, it didn't recognize the actual Mac I was typing from as being on my network, but it did recognize a few other PCs & Macs (including a sleeping one) I did not stay around long enough to try its WOL command.

4. I tried maybe 4 different iOS apps to try to hit my Macs with WOL commands and they were very flaky, at best. I tried doing it just by IP, none of them asked for MAC address, some were occasionally kind of effective.

5. You mentioned using "gotomypc" on the Mac and logging into it remotely, OSX has a built in VNC server (sharing > screen sharing) and you can log into it from any VNC viewer (some work better just setting a VNC p/w, some you can use your login credentials), I wasn't clear if you planned on watching your streamed video via remote connection to the Mac or were just using the connection to wake your Mac up. Hopefully it would be just to wake up, I would speculate the overhead on both CPU and bandwidth might make simultaneously streaming video difficult or impractical.

- I also just found the difference between a regular WOL packet and a "magic packet"

Wake on Directed Packet - accepts only patterns containing the adapter's Ethernet address in the Ethernet header or containing the IP address, assigned to the adapter, in the IP header.
Wake on Magic Packet - accept only patterns containing 16 consecutive repetitions of the adapter's MAC address.

Oh I'll sleep well tonight knowing that! ;)

So ya, long story short, maybe swap a few bulbs out to LED and use those as personal green credits to just keep your Mac on medium alert instead of asleep, or get a NAS, the wattage is low, the speeds are fast, and my Synology can transcode many kinds of video probably faster than my upstream could manage smoothly.
 
...ink there are "devious" motives in play. Making things work easily for customers sells stuff and brings them back, shackling them to crappy design and/or hardware will not keep them around long. But, WOL is really sort of a black art on any OS, just google around and you'll see a bunch of really weird almost esoteric and not totally stable implementations on the consumer side where OSes, NICs, routers, switches, etc, vary wildly compared to a more controlled corporate environment. Why do some of my PC NICs ask if I want to turn on WOL, and also if they should only respond to a "magic packet?" An imprecise barometer, but not too many wikipedia articles have the phrase ". . .can be a frustrating technology to implement," however, WOL's wikipedia entry does. hah.

Very good points, and right on the money... It took a fair amount of fiddling and ultimately a new NIC to get my NAS (Freenas on an N40L) to WOL. I'm just being bitchy. ;)



I think the energy savings in any computer or standalone device that's used in a "server" type role should take a backseat to that device's stability and performance.

Agreed. But with the exception of spotlight (which I disabled ages ago), I just do not see any significant performance degradation due to maintenance scripts or the like on wake. And I mean from deep sleep.... The machine is mostly usable very soon, and completely awake and usable for all purposes in less than 10 seconds. Perhaps there are housekeeping tasks I've never butted heads with, I don't know... If I can get the thing to WOL, I guess I will find out if housekeeping on-wake causes me streaming headaches....

But your points are well taken and long term, when I have a few more bucks, I will just get a Gen8 microserver which is more than capable of doing the transcoding and, as it happens, it seems there is now a plugin for Plex on Freenas. That is my preferred option, but I just don't have the money right now.

1. I don't believe Macs themselves use the "Bonjour sleep proxy," I used a few network activity monitors and believe it's just for A/V devices like AirPlay speakers and Apple TVs.

Not by default, no. But you can configure a Mac to act as a sleep proxy... http://stuartcheshire.org/SleepProxy/

Doing a screen share or direct file share was 100% consistent (as was using the iOS remote app to stream music through their speakers or from their iTunes libraries to other computers/speakers).

Not useful over WAN unfortunately...


3. I installed the AiCloud Smart Access app and turned that feature on my router, despite it sort of scaring me for how many holes it punches through w/ UPNP and unknown security risks (correction, known risks ;) ). Oddly, it didn't recognize the actual Mac I was typing from as being on my network, but it did recognize a few other PCs & Macs (including a sleeping one) I did not stay around long enough to try its WOL command.

I tried this too.... It works (or doesn't work) exactly the same as my other means of waking the Mac (i.e. it will wake the mac fine until the mac won't wake any longer having been asleep too long or whatever makes it do that). So yeah, I turned off AiCloud pretty quickly myself when I realized it wouldn't do what I wanted.



5. You mentioned using "gotomypc" on the Mac and logging into it remotely, OSX has a built in VNC server (sharing > screen sharing) and you can log into it from any VNC viewer (some work better just setting a VNC p/w, some you can use your login credentials), I wasn't clear if you planned on watching your streamed video via remote connection to the Mac or were just using the connection to wake your Mac up. Hopefully it would be just to wake up...

Correct... The plex server and client would handle the streaming once the machine is awake.


So ya, long story short, maybe swap a few bulbs out to LED...

Every bulb in the house (except for those in poorly ventilated fixtures) already has an LED. But good suggestion... ;) You see, were we live, we are into the third tier rates which are about $.20 a KWhr! So, from that perspective, maybe you can see my obsession with power. I've been a bit of a holy war against power consumption over the last 8 months, and I have cut my power bill in half. So, it's been a pain in the butt, but over the long term, I will save a lot of money....
 
Every bulb in the house (except for those in poorly ventilated fixtures) already has an LED. But good suggestion... ;) You see, were we live, we are into the third tier rates which are about $.20 a KWhr! So, from that perspective, maybe you can see my obsession with power. I've been a bit of a holy war against power consumption over the last 8 months, and I have cut my power bill in half. So, it's been a pain in the butt, but over the long term, I will save a lot of money....

Wow, I'm at 4.9 cents @ kw/h, locked in for at least a year! PM me your address, I'll charge up some batteries and send them to ya. . .ha. ;)

Well, playing around trying to replicate and/or sidestep your dilemma allowed me to learn some as well. God at $.20 @ kw/h I'd probably rent one of those FLIR imaging cameras and go through my whole house looking for insulating deficiencies.

Glad you were able to find a solution, even if it wasn't the one you started off trying to fix. I would be surprised if WOL/WoWLAN and other power saving tech don't make significant strides in the next few years with how green and eco-conscious consumer electronics seem to be trending.
 
Wow, I'm at 4.9 cents @ kw/h, locked in for at least a year! PM me your address, I'll charge up some batteries and send them to ya. . .ha. ;)

Seriously, no joke... We also have differential rates based on time of day, so at .20 a peak KWh, it would almost be cost effective to charge batteries off the grid at night for use during the day... Installing solar panels is on the to-do list, and if they do away with net metering here as they are threatening to do, OMG, another awesome kludge may end up in my garage: an array of lead acid batteries. Again, no joke...

Thanks again...
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top