Recently I faced a problem when my MacBook Pro (13 inches, early 2011, Mountain Lion) don’t want to go sleep either by closing the lid or by running sleep command. What was curious about that is that I experienced the same problem with my previous MacBook Air (13 inches, mid 2011, Mountain Lion) and never solved.
But this time I was pissed off because I had fresh system and everything was working fine for few days. And then suddenly stopped.
So, I start thinking that maybe the sensor in lid is broken but hey, it doesn’t react for sleep command. Next think I did was NVRAM/PRAM reset (option + command + p + r) in case if the system thinks that some usb is plugged in, but nothing changed. Checked disk with disk utility and all was fine, cleared cache, closed all aps and still no clue. Going deeper I run
syslog |grep -i "Wake reason" to find out that I’m the reason why the MBP is waking up. And to be more specific about that I also run
syslog -k Sender kernel -k Message Req Wake.
During all the steps above I unchecked the option “Wake for network access” and checked if I haven’t setup any schedule for waking up. And it doesn’t matter if the power is plugged in or not.
So, what was the problem? Well, PC and Windows 8! I forgot that few days ago I turned on internet sharing via ethernet on MBP to make internet connection available on Windows 8 to install fu..ing drivers for wireless.