osx lion never stays in sleep mode - macos

Since I updated to OSX Lion I got a strange issue.
I am used to never shut down my Mac, I simply put it in hibernate / sleep mode.
But since the update to Lion the mac just starts up at random times.
Day and Night I can hear the CD-Drive sound when it wakes up.
The screen does not even go on, it stays black but the as soon as you hit any key the monitor just turns on.
This is really annoying as it sometimes wakes you up at night when you MAC is booting up.
I could not find a similar issue reported yet.
Thanks
Sebastian

Given the RTC (Alarm) wake reason, ensure Wake for network activity is turned off. See the last comment in the thread at https://discussions.apple.com/thread/3247367?start=0&tstart=0
Also ensure you have not scheduled wake. See http://osxdaily.com/2010/07/17/why-mac-wakes-from-sleep/

Launch the Terminal and type the following at the command line:
syslog |grep -i "Wake reason"
OHC: stands for Open Host Controller, is usually USB or Firewire. If you see OHC1 or OHC2 it is almost certainly an external USB keyboard or mouse that has woken up the machine.
EHC: standing for Enhanced Host Controller, is another USB interface, but can also be wireless devices and bluetooth since they are also on the USB bus of a Mac.
USB: a USB device woke the machine up
LID0: this is literally the lid of your MacBook or MacBook Pro, when you open the lid the machine wakes up from sleep.
PWRB: PWRB stands for Power Button, which is the physical power button on your Mac
RTC: Real Time Clock Alarm, is generally from wake-on-demand services like when you schedule sleep and wake on a Mac via the Energy Saver control panel. It can also be from launchd setting, user applications, backups, and other scheduled events.
Hope this fixes your problem.

Related

Wake on lan doesn't wake up the display of OSX Mavericks

I updated to OSX 10.9.5 and realized that one function pipeline that I used flawlessly is now broken.
I send a wake-on-lan magic packet to my OSX from my Raspberry Pi which successfully wakes up the OSX, but unlike before the iMac's display stays dark. Previously the display also brightened up. The problem is not that particularly, but that when I run an applescript through SSH the iMac goes back to sleep by itself in the middle of running and I have to wake it up again to finish the interrupted script. I have setup my energy saving to "Never" so it shouldn't do that.
I even tried running a script that actually sets the brightness of iMac's display to highest, but that doesn't wake up the display either.
Only when I take a VNC connection or move the local USB mouse the display wakes up and OSX won't go back to sleep by itself.
I found a solution for this. Just run this on the remote OSX's terminal:
caffeinate -u -t 1
It will wake up the display immediately. I found the solution from this blog

Forgotten where I left an automatic shutdown script on Mac OSX

I let me Parallels Desktop running Windows XP to start automatically during mac log-in. And to start Windows upon launch to let my dad use his WinXP by just pressing the power button, bypassing the Mac login window and desktop completely. When he shuts down Windows, Parallels closes.
I seem to remember I have a trigger to shut down mac as soon as Parallels closes. But I don't remember where... I have an AppleScript that tells Finder to shut down. I understand that. But now the problem is Mac shuts down AS SOON AS it boots up every time! I can't figure out what's triggering the shutdown... And I've run out of places to look.
It seems like a normal shut down rather than a fatal error. Seems like someone has chosen the 'Shut Down' command as soon as Mac starts up. So could mac gurus suggest places I should look -- what might have triggered this -- I'm pretty sure it's Parallels-related. Maybe there is something in the Package Contents linked to the shutdown script??
You added the Applescript (that shut down the mac) to login items

lcd tv stopped working (dvi to hdim)

I have a dual monitor setup,
1: a computer monitor connected via vga
2: a samsung lcd tv conntected via dvi->hdim cable
Until yesterday, this setup was working just fine. Today when I booted windows 7, the bios & windows loading ... screen shows up fine on my lcd tv
however, when windows loads and shows my desktop, my TV goes blank, and I only get the desktop on my computer monitor.
When I go to "screen resolution" and "detect", I only see my computer monitor listed.
As far as I know, no new display drivers were installed, I am using nvadia gt300.
Also, since the bios/welcome screen does show up on my TV, I can root out the tv/cable being faulty.
has anyone encountered something similar before ?
I had exactly the same problem. I de- and reinstalled drivers, I deinstalled the 11/18 Windows Update, I turned my monitor off and on again at least a dozen times as did I unplug and replug the HDMI cable - nothing worked.
Then, in an act of despair, I unplugged my monitor's power cable, replugged it and.... here we go again!
HTH!
Chris

How to force Mac to into dirty shutdown state on every power off?

As Far as I can tell no one has actually solved this debacle.
How do you get a mac mini to power on every time the UPS it is connected to restores power?
It is easy enough to have the UPS communicate that power is about to turn off so have the mac run the command halt -u, or shutdown -h -u, etc, and many solutions such as powerchute from APC guarantee that it will shutdown etc. But it is not guaranteed that the mac will turn back on. If this bit/ file was permanently set so mac the mac believed that it dirty shutdown every time, whatever hardware is responsible for the power sensing of the power restored would always boot the mac when power is restored, even if the mini was powered off during while it booted. Currently if your mini powers off without dirty shutdown being set you are boned, and you must physically press the power button on the back for it to restart, which is unacceptable if the mini is says 5000 miles away or at the bottom of the ocean. You should be able to get this functionality even if no UPS is involved just by having the mac always try to reboot when power is restored. Has anyone ever figured this out?
Have you checked the setting in the Energy Saver preference panel?
System Preferences
-> Energy Saver
-> Options
-> Restart automatically after a power failure
Or see man pmset:
$ pmset -a autorestart 1
Ned almost had the answer - it's on [the man page][1](Apple copy, currently broken) he mentioned.
pmset schedule [cancel] type date+time [owner]
-g sched displays scheduled startup/wake and shutdown/sleep events.
Have a shutdown script run pmset to schedule the system to wake up half an hour or so (let the power stabilize and the UPS time to recharge) from now.
Oh, and BTW: looking through the output of pmset -g everything, I see:
INVOKE: pmset -g ups
UPS settings:
haltlevel off 0
haltafter off 0
haltremain off 0
[1]: Oddly, Apple has taken down its web-formatted man pages; best I can find: http://www.manpagez.com/man/1/pmset/

Emulate Sleeping Windows Mobile Device

Is it possible to emulate a device sleeping and waking using the Microsoft-supplied device emulators?
Yes, but you have to generate your own emulator image with a modified kernel (changing OEMPowerOff). Bruce Eitman blogged about it here. You didn't detail your needs, so it's hard to say, but you might be able to provide some form of simulation by manually setting the named power management events.
This is an old thread, but in case anyone else stumbles across it, you can make the Windows Mobile emulators 'sleep' and wake up, though not with the debugger attached.
Close the emulator window while your application is running and save the state. Or, configure power management to sleep the emulator at the desired time; the emulator will close and save its state automatically. If the debugger is attached, it will lose its connection and stop debugging.
Open Device Emulator Manager and click Refresh until the emulator shows up as disconnected (no icon next to it). Right-click on the emulator name and select Connect.
Emulator wakes up and reappears. If your application is listening for the wake-up notification, it will be signaled at this point.
You can also wake up the emulator using Debug > Attach to Process, though this does not always succeed. Either way, by the time the debugger attaches, the wake up sequence will already have executed. If you can get by with debug statements, though, this is easier than modding the emulator image.

Resources