Skip to Main Content

How to Find Out What Woke Up Your Computer Last

How to Find Out What Woke Up Your Computer Last
Credit: Shutterstock

I occasionally let my desktop computer chug on a task throughout the night, and it can be jarring when it wakes up for no reason—blasting my room with light from my 34" monitor. Whether you’re confronted by random wakeups, or you enter a room to find out that your computer is on when it shouldn’t be, don’t just shrug your shoulders. With a little detective work, you can figure out what’s preventing your PC from sleeping peacefully.

What woke up my Windows PC? 

If your computer is waking up regularly from a sleep state, finding the culprit can be tough—but finding the most recent wake cause is a good place to start. To do that, click your Start button and type in “Command Prompt.” Right-click on the Command Prompt listing and open it as an administrator. Then type:

powercfg -lastwake

The output will tell you what woke up your computer last, which—if you didn’t initiate it yourself—is probably your culprit. (You can also try powercfg -waketimers, which might help.)

If you need more information, you can deepen your search by consulting Windows’ Event Viewer. Pull that up by typing in “Event Viewer” after clicking on the Start button. When it loads, click on Windows Logs on the left-most folder structure, and then select System. You’ll then want to poke through the logs to find the approximate time when your system woke up and see what Window can tell you.

In an example I just ran, Event Viewer was able to correctly note that I powered my system back on by messing with the USB keyboard/mouse:

Lifehacker Image
Credit: David Murphy

Other information you might be able to glean from the Event Viewer is whether a scheduled task slept (or woke) your system or if some kind of network event was to blame (e.g. something used your system’s Wake-on-LAN feature). You’ll also see if your system’s power button turned on the PC, but you probably would have remembered that (unless you’re a heavy sleepwalker).

Browsing through the “Kernel-Power” source might also shed a little extra information on why your system powered on (or off), but it probably won’t be exactly what you’re looking for. I’d stick with checking (or filtering) for the “Power-Troubleshooter” source, first.

What woke up my Mac?

For Mac: If you want to find out what woke up your Mac at a specific time, open up Terminal and enter the following:

log show —style syslog | fgrep “Wake reason" 

It might take a little time for this command to process, but when it does, you should see what’s been kicking your Mac back from blissful sleepytime. If you don’t see anything, you can also try opening up the Console (just type that into Spotlight) and searching for “wake reason.”

Lifehacker Image
Credit: David Murphy

If you aren’t sure what any of the wake reasons means, check out this older glossary from CNET for more information.

This article was first published on 3/25/14. It was updated on 10/11/19 with more recent information.