Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Wake reason in Terminal

1,067 views
Skip to first unread message

dorayme

unread,
Apr 1, 2016, 7:02:15 PM4/1/16
to
Using

syslog |grep -i "Wake reason"

I got yesterday's (today is April 2 here)

...
Fri Apr 1 19:06:41 QS-2 kernel[0] <Debug>: Wake reason = EHC2
Fri Apr 1 19:21:52 QS-2 kernel[0] <Debug>: Wake reason = EHC2
Fri Apr 1 19:23:49 QS-2 kernel[0] <Debug>: Wake reason = EHC2

Since I woke it this morning too (deliberately unlike the above
instances)) I'm supposing that it does not record deliberate wake
reasons like key press on a USB connected external Apple keyboard.

--
dorayme

David Empson

unread,
Apr 1, 2016, 9:16:52 PM4/1/16
to
It does record keyboard wakes. Perhaps the computer wasn't asleep at
that point, only had its display sleeping.

The precise details will vary between models, but I get entries like
these (trimmed slightly) on my MacBook Pro (Retina, Late 2013):

Apr 2 13:20:22 kernel[0] <Notice>: Wake reason: EC.LidOpen (User)
Apr 2 13:48:00 kernel[0] <Notice>: Wake reason: XHC1

The "EC.LidOpen (User)" entry is obvious.

The "XHC1" entry was caused by doing a test by pressing a key on an
external USB keyboard to wake up the computer while the lid was already
open and I had manually put it to sleep. I got the same reason in other
tests using the built-in keyboard or trackpad to wake up the computer
(as long as I leave it asleep long enough - less than about fifteen
seconds and it isn't reported as a wake so presumably hadn't gone to
sleep yet).

For reference, "EHCI" and "XHCI" are two versions of the USB controller.
EHCI supports up to USB 2, XCHI supports up to USB 3. I assume the
number indicates the specific controller which woke up the computer, in
cases where the computer has more than one USB controller.

I also have entries which mention these reasons in the last few days.

EC.ACAttach (Maintenance) - plugging in power, judging by the times.

EC.ACDetach (Maintenance) - unplugged power while sleeping?

EC.DarkPME (Maintenance) - that will be "dark wake", triggered by
something like Wake on LAN but the computer didn't fully wake up. For
recent models it might also be the Power Nap feature waking up to do
some work while the computer is nominally asleep.

EC.LidClose (Maintenance) - presumably the computer stayed awake or woke
up again when I closed the lid to do some maintenance before going to
sleep again?

RTC (Alarm) - real time clock alarm, but not sure why as I don't have
any scheduled wakes configured on this computer, and the time wasn't
close to a minute boundary so unlikely to be a calendar/reminder alert.

--
David Empson
dem...@actrix.gen.nz

dorayme

unread,
Apr 3, 2016, 12:42:06 AM4/3/16
to
In article <1ml2zl5.18vfojdgiv4n4N%dem...@actrix.gen.nz>,
dem...@actrix.gen.nz (David Empson) wrote:

> dorayme <do_r...@bigpond.com> wrote:
>
> > Using
> >
> > syslog |grep -i "Wake reason"
> >
> > I got yesterday's (today is April 2 here)
> >
> > ...
> > Fri Apr 1 19:06:41 QS-2 kernel[0] <Debug>: Wake reason = EHC2
> > Fri Apr 1 19:21:52 QS-2 kernel[0] <Debug>: Wake reason = EHC2
> > Fri Apr 1 19:23:49 QS-2 kernel[0] <Debug>: Wake reason = EHC2
> >
> > Since I woke it this morning too (deliberately unlike the above
> > instances)) I'm supposing that it does not record deliberate wake
> > reasons like key press on a USB connected external Apple keyboard.
>
> It does record keyboard wakes. Perhaps the computer wasn't asleep at
> that point, only had its display sleeping.

Well, the light on the front of the MB was pulsating slowly on and off
("breathing slowly"). I think it was asleep, not just the external
screen. But I confess I did not do the most definitive, stick an ear
on the MB to hear if the HD was spinning or not.

Looking at same Terminal command today, I notice no entries for 3
April, today yet the MB was clearly asleep (by light and ear test). A
puzzle...

My wake reasons have usually been to do with the one numbered 2. This
seems connected to the one towards the back of the MB, the one with my
external Apple USB tethered keyboard plugged in. Swapping the keyboard
to the port closest to front confirms this, waking now shows up in
Terminal to be EHC1 (yes, it shows now and from a sleep (successful)/
wake test a minute back)

I will now see in coming hours or days if trying to sleep my Mac fails
because of this 1 bus. The trouble I have been having is it wakes
spontaneously immediately after manually sleeping it. Usually, but not
always a restart or shutdown and start fixes it for a while. A recent
SMC reset seemed to keep the prob at bay for a while.

--
dorayme
0 new messages