If your PC won't sleep, your laptop battery drains faster than it should, or the display never seems to switch off on its own, Windows already includes a diagnostic tool that can help: powercfg. Its /energy option watches your system for a minute and writes an HTML report of common energy-efficiency and battery-life problems, and related options produce reports on sleep and power transitions.
Powercfg has lots of other uses, and we've covered several already: finding out what woke your PC with /lastwake and /waketimers in how to stop your PC waking from sleep, checking a laptop's battery health in how to generate a battery report, and turning hibernation on and off in sleep vs hibernate. This guide focuses on the diagnostic reports.
Which report do you need?
Command | What Microsoft says it does | Best for |
|---|
powercfg /energy
| Analyses the system for common energy-efficiency and battery-life problems; HTML report in the current folder | A quick health check of power settings and devices |
powercfg /requests
| Lists application and driver power requests, which stop the display turning off or the PC sleeping | "My PC never goes to sleep" |
powercfg /systemsleepdiagnostics
| Report of intervals over the last three days when you weren't present, and whether the system went to sleep | Checking whether a desktop actually sleeps when idle |
powercfg /sleepstudy
| Report of modern standby quality, over the last three days by default | Laptops and tablets that use modern standby and lose battery while "asleep" |
powercfg /systempowerreport (or /spr)
| Report of power transitions over the last three days, including connected standby power efficiency | A wider picture of power transitions |
powercfg /availablesleepstates (or /a)
| Reports which sleep states your PC supports and tries to explain why others aren't available | Finding out whether your PC uses modern standby |
Step 1: Open an elevated terminal
Open Windows Terminal, PowerShell or Command Prompt as administrator and approve the prompt. Microsoft's documentation says /systemsleepdiagnostics and /systempowerreport require administrator privileges, and its SleepStudy page says to run that report from an administrator prompt too, so it's simplest to start elevated for all of them. Powercfg runs from either Command Prompt or PowerShell; see Command Prompt vs PowerShell if you're unsure which one you've opened.
Microsoft's documentation says each of these reports is saved to the current folder unless you choose a path with /output, so it's tidier to move somewhere easy to find first, such as your desktop:
cd $env:USERPROFILE\Desktop
That's the PowerShell version. In Command Prompt, use cd %USERPROFILE%\Desktop instead.
Step 2: Get the PC idle
Microsoft says /energy should be used when the computer is idle, with no open programs or documents. So before you run it:
Save your work and close every app you can, including browsers and game launchers.
Leave the peripherals you normally use plugged in. If you suspect a particular USB device, dock or controller, you can run a second report later with it unplugged and compare.
Don't touch the mouse or keyboard while the trace runs.
Step 3: Run the energy report
Type:
powercfg /energy
By default powercfg observes the system for 60 seconds and then writes the report as an HTML file in the current folder. To watch for longer, or choose the file name, use the /output and /duration options. Microsoft's own example runs a two-minute trace:
powercfg /energy /output "longtrace.html" /duration 120
You can also add /xml to save the report as XML instead of HTML, or use /energy /trace to record system behaviour without analysing it. Trace files go in the current folder unless you set a directory with /d.
Step 4: Read the report
Open the HTML file in your browser. It sets out what powercfg found during the trace. Treat what it flags as a list of things to investigate rather than a list of definite faults, and remember a desktop and a laptop will produce quite different reports.
A practical way to use it:
Start with anything tied to a specific device or driver. If one USB device, network adapter or audio device keeps appearing, update its driver and check its power settings in Device Manager. Our guide to updating drivers in Device Manager walks through it.
Look at entries about your power plan or power mode. If you've deliberately chosen a performance-first setting, expect the PC to be less efficient. Our guides to Windows 11 power modes and Energy Saver explain the trade-offs.
Re-run after each change. Change one thing at a time, re-run powercfg /energy under the same idle conditions, and compare the two reports.
Step 5: If the PC won't sleep, check power requests
The energy report won't always tell you why a PC stays awake right now. For that, run:
powercfg /requests
Microsoft describes power requests as requests from applications and drivers that prevent the computer from automatically turning off the display or entering sleep. If a media player, browser tab, game launcher or driver is listed, close or update it and check again. Powercfg also has a /requestsoverride option, which sets a power request override for a particular process, service or driver. Use it sparingly, because some requests are legitimate, such as a download or a backup that's still running.
Step 6: Check whether the PC actually slept
To see whether your PC really went to sleep while you were away over the last few days, run:
powercfg /systemsleepdiagnostics
Microsoft says this produces an HTML report of intervals over the last three days when the user wasn't present, and whether the system went to sleep. If the report shows long periods with no one present but no sleep, go back to Step 5 and check your sleep timeout settings. If the PC sleeps but wakes again by itself, our wake-from-sleep guide covers /lastwake, wake timers and wake-capable devices.
Step 7: On modern standby laptops, run SleepStudy
Some laptops and tablets use modern standby instead of traditional sleep. Run powercfg /a to see which sleep states your PC supports. On these systems, SleepStudy shows what happened while the machine was meant to be asleep:
powercfg /sleepstudy
This creates a file called Sleepstudy-report.html in the current folder. It covers the last three days by default, and you can go back up to 28 days with /duration, for example powercfg /sleepstudy /duration 7. Microsoft says that from Windows version 2004 on modern standby systems, the report breaks each standby session into Active, Screen Off and Sleep states. For each segment it shows the start and end time, duration, whether the PC was on AC or battery, the battery power used and the average power drawn. Screen Off sessions get more detail, and the report ends with information about the battery, including its design capacity.
If one session used much more battery than the others, look at the activity listed for it, which may point to a particular app, driver or device. For a broader view of the same period, powercfg /systempowerreport produces a report of power transitions over the last three days, including connected standby power efficiency.
Our verdict
When a PC won't sleep or a laptop battery drains too quickly, start with powercfg /requests. Then run powercfg /energy on an idle machine and work through any devices or drivers it flags, changing one thing at a time. Use /systemsleepdiagnostics to confirm a desktop really sleeps when you're away, and on modern standby laptops, /sleepstudy shows where battery went overnight. They're all built into Windows 11 and need nothing more than an admin terminal. If you want to know how much power your PC actually draws from the wall, our guide to measuring PC power consumption covers the hardware side.