
If your computer turns on by itself, first find out what actually happened: did it wake up from sleep or hibernation, or did it start up after a full shutdown? In the first case, a device, a timer, or Windows maintenance is waking it, and the powercfg /lastwake command will show the culprit. In the second case, you'll look for the cause in BIOS settings, the power button, and its wiring.
Woke up or turned on: how to tell the difference
Sign in and check the windows. The same programs and documents are open: the computer woke from sleep or hibernation. Everything is closed, as after starting up: it booted fresh. Keep Windows Fast Startup in mind: standard Shut down saves part of the system to the drive, which looks like hibernation to the hardware. How to disable it for testing is explained in the article about a laptop that won't shut down.
| Symptom | Woke up from sleep | Started from scratch |
|---|---|---|
| What is on the screen | The same windows are open after signing in | Everything is closed after signing in |
| Where the cause lies | Devices, timers, maintenance | BIOS, power button, wires, power supply |
| How to check | The powercfg command, event log | Power settings in BIOS, inspect the button |
| When it happens | At night or minutes after going to sleep | After a power outage, on a schedule |
Computer wakes up from sleep by itself: find the culprit
Windows remembers what woke it up. Press Win, type cmd, and select "Run as administrator". Next are three commands, each answering its own question. If you have the opposite problem and the computer won't sleep at all, start with our article about sleep mode.
powercfg /lastwakeshows the source of the last wake event: a device or a timer. Run it right after the computer wakes up by itself.powercfg /devicequery wake_armedlists devices currently allowed to wake the computer. Usually, that's the mouse, keyboard, and network card.powercfg /waketimerslists active wake timers along with the program or task that set them.
The lastwake command only remembers the most recent time. Event Viewer keeps several days of history: press Win+R, type eventvwr.msc, then go to Windows Logs → System. Filter the log by the Power-Troubleshooter source: Event ID 1 records the wake time and its Wake Source, which is sometimes Unknown. If the computer wakes up at the exact same time, look for a timer or a scheduled task.

Mouse, keyboard, and network: stop them from waking the computer
An optical mouse can wake the computer from a slight desk vibration. The network card is woken by a Wake on LAN packet, and if the adapter wakes on a packet pattern, regular network traffic can wake it too. If powercfg /lastwake named one of these devices, take away its wake permission.
Press Win+X and open Device Manager.
Find the device from the command output: a mouse under "Mice and other pointing devices", a keyboard under "Keyboards", and network under "Network adapters".
Double-click it and open the "Power Management" tab.
Uncheck "Allow this device to wake the computer" and click "OK".
Computer turns on by itself at night: wake timers and maintenance
Scheduled wake-ups at night come from wake timers. They're set by Windows Update, Automatic Maintenance, and tasks in Task Scheduler with the "Wake the computer to run this task" checkbox. Microsoft describes such a case using Windows 8 as an example: a maintenance task wakes a desktop computer every night if timers are allowed when plugged in. Windows 10 and 11 have both switches too, and the paths are below.
Open Control Panel → System and Security → Power Options.
Next to the active plan, click "Change plan settings", then "Change advanced power settings".
Expand Sleep → Allow wake timers and select "Disable". On a laptop, set this for both plugged in and on battery.
In Control Panel, open System and Security → Security and Maintenance, expand "Maintenance", and click "Change maintenance settings".
Uncheck the box that allows the maintenance task to wake the computer at the scheduled time, and click "OK".
Turns on after a complete shutdown: BIOS settings
If the computer starts from scratch, it's the motherboard firmware making the decision, not Windows. You usually enter BIOS with the Del or F2 key at startup; read more in our guide on how to enter BIOS. Setting names vary across manufacturers; below are examples from ASUS, MSI, and Gigabyte motherboards, as well as Lenovo and Dell laptops. Some motherboards also have an option to power on from a USB keyboard or mouse, located in that same power section.
| What it does | Example names | What to choose |
|---|---|---|
| Power on after power loss | Restore AC Power Loss, AC BACK | Power Off or Always Off |
| Power on over network | Power On By PCI-E, Wake on LAN | Disabled if you don't need WoL |
| Power on by schedule | Power On By RTC, Resume By RTC Alarm | Disabled |
| Power on when opening the lid | Flip to Start, Power On Lid Open | Disabled if it gets in the way |
A laptop that turns on when opening the lid is usually in working order. On many Lenovo models, that's the Flip to Start feature, and on Dell, it's the Power On Lid Open setting in the BIOS. A MacBook with Apple silicon turns on by itself when opening the lid and connecting power. In macOS Sequoia and newer, the command sudo nvram BootPreference=%00 in Terminal disables this, and you can restore everything with sudo nvram -d BootPreference.

If it's a hardware issue: power button, wires, and power supply
When the settings are in order but the computer still turns on by itself, suspect the case button. A stuck or damp button shorts the contacts, and the motherboard registers it as a press. The wires from the button to the motherboard can fray against the edge of the case and short-circuit on their own.
A technician tests this by turning off the computer, unplugging the power supply, and disconnecting the button wire from the motherboard. If spontaneous startups stop after that, you need to replace the button or the wire. If the computer turns on even without the button, they check the power supply and motherboard next.

What you can do yourself
- Find the source using the powercfg command and Event Viewer
- Prevent the mouse and network adapter from waking the computer
- Disable wake timers and nighttime maintenance
- Take a photo of BIOS and turn off wake on power, network, and schedule
When it's better to call a technician
- The computer turns on by itself even with wake features disabled
- The case button sticks or works intermittently
- The computer turns on and immediately shuts off
- Clicking, crackling, or a burning smell from the power supply
Frequently asked questions
- Is it dangerous if the computer turns on by itself?
- Waking up on a timer or from a mouse isn't dangerous: it's just a matter of settings. You should be concerned if it turns on with wake features disabled in BIOS, or if there are clicks or a smell from the power supply: in that case, unplug it from the outlet before diagnostics.
- Why does the computer turn on after a power outage?
- Power loss recovery is selected in the BIOS: Restore AC Power Loss is set to Power On or Last State. In that case, the computer starts if it was running when power was lost; on Gigabyte, the setting is called AC BACK. Switch it to Power Off or Always Off.
- The computer wakes up right after going to sleep. Why is that?
- Usually a device is waking it up: a mouse, a USB receiver, or a network adapter. Run
powercfg /lastwakeright after waking and prevent the detected device from waking the computer. - How do I set up scheduled power-on instead?
- Enable an option like Power On By RTC in BIOS, set the time, turn off ErP Ready, and disable Windows Fast Startup. To wake from sleep, there's a checkbox in Task Scheduler: "Wake the computer to run this task".
- The laptop turns on when opening the lid. Is it broken?
- No, that's how Flip to Start works on Lenovo, Power On Lid Open on Dell, and the standard settings on a MacBook with Apple silicon. You can disable the feature in BIOS or the manufacturer utility, and on Mac with a command from Apple Support.

