• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Troubleshooting PCs spontaneously waking from sleep

Joined
May 2, 2017
Messages
7,762 (2.65/day)
Location
Back in Norway
System Name Hotbox
Processor AMD Ryzen 7 5800X, 110/95/110, PBO +150Mhz, CO -7,-7,-20(x6),
Motherboard ASRock Phantom Gaming B550 ITX/ax
Cooling LOBO + Laing DDC 1T Plus PWM + Corsair XR5 280mm + 2x Arctic P14
Memory 32GB G.Skill FlareX 3200c14 @3800c15
Video Card(s) PowerColor Radeon 6900XT Liquid Devil Ultimate, UC@2250MHz max @~200W
Storage 2TB Adata SX8200 Pro
Display(s) Dell U2711 main, AOC 24P2C secondary
Case SSUPD Meshlicious
Audio Device(s) Optoma Nuforce μDAC 3
Power Supply Corsair SF750 Platinum
Mouse Logitech G603
Keyboard Keychron K3/Cooler Master MasterKeys Pro M w/DSA profile caps
Software Windows 10 Pro
So I have been having this weird issue for years, actually - across multiple subsequent and concurrent builds, which makes it all the more baffling. The issue is simple: neither of the two desktop PCs in my house will stay asleep, and wake on their own accord.

I first had this issue with my old PC, which I pretty much chalked up to running a Core2Quad PC in 2016-17 in W10. Can't remember when it started, but it was several years ago. It would wake up at random - it could be immediately after putting it to sleep, or an hour or more later. After replacing that with a Ryzen build last year (carried over the PSU, GPU and a game drive SSD, nothing else), I realized it had nothing to do with the old build, as it too refused to stay asleep. Started troubleshooting, and still can't pinpoint a source a year later. The event log varies between saying it was the Ethernet controller, USB controller, and occasionally the power button. None of which make any sense. I've tried disconnecting every single cable outside of the display (connected by DP), and it still wakes up. At one point I thought it was some weird WoL signal as I used a WoL tracking app which consistenly told me my PC was being sent magic packets from servers belonging to Steam, which ... was weird, but I've pretty much concluded that it's misreading some sort of response to the "I'm awake!" signal Steam sends when my PC wakes up. It still wakes up if Steam is closed, and it still wakes up if Ethernet is disconnected. I don't have WiFi on this PC.

Now comes the real kicker: the same thing happens to my GF's video editing rig. It was built last fall, so about half a year later, from scratch. Outside of being AMD-based (though Threadripper, so technically a different platform) and booting from a 960 Evo 500GB, it shares zero hardware with my PC. The motherboards, RAM, GPUs, PSUs, other storage, peripherals ... everything is different. My motherboard is Biostar, hers is Asus. I have a Radeon Fury X, she has a GTX 970. I have G.Skill RAM, hers is Corsair. My PSU is an EVGA G2, hers is a Seasonic Focus+. And so on. There is a certain overlap of software (f.lux, Fences, Dropbox, Samsung Magician, obligatory stuff like Office and Creative Cloud), but I haven't seen a single reported software wake timer in Event Viewer.

Oh, one thing I have noticed: ever since I activated Hybrid Sleep, it seems like my PC won't wake up if it stays asleep long enough to enter Hibernation. So I suppose that's something. S4 is fine, S3? Nope.

So: both PCs wake spontaneously. Both PCs wake without any cables connected. That includes Ethernet. Both PCs mostly show the integrated USB controller as the reason for waking up, regardless of connected devices. They even have an uncanny ability to wake up simultaneously (the PCs are on adjacent desks). So: What on earth is going on? I really can't figure this out. Does anyone have any tips?

Current theories (yes, they're ... out there. I'm grasping at straws here):
  • Some sort of power surge/fluctuation somehow triggering various wake-up signals on the motherboard - I have no way of eliminating this, as I don't have any sort of power conditioning equipment or an UPS, and besides, electricity here in Norway is generally excellent. Surges are pretty much unheard of. Our shitty old apartment does not have grounding, though, and both PCs are connected to the same circuit breaker.
  • EMI somehow triggering wake-ups - possibly through internal USB cables/headers? Yeah, that'd have to be some serious radiation to penetrate our cases ...
  • Malware? If so, it's entirely undetectable. I've run all kinds of scans, with no results. I've also tried different antivirus vendors, to no end. Currently we're using BitDefender.
  • Our monitors somehow ... messing with things? Both are Dell monitors, an U2711 and an U2713H, both connected by DisplayPort. DisplayPort has its oddities, but this is beyond what I'd expect, at least.
  • ... Aliens?

I have not yet tried disabling wake by USB or anything like that, as .. well, that would kind of ruin the point. The PC should be easy to wake up, but shouldn't wake on its own accord.
 
Do you have optical or laser mice connected to the PC's in question? I am not aware of any real seismic activity in your area. But if you have the wake by mouse set under BIOS and a large truck drives by it may shake enough that you may not feel it but the mouse does, or just you walking around the apartment. Vibrations. Is the computer desk very sturdy? Disconnect the mouse and see if it persists or disable wake by mouse under bios. My $.02

edit- I just tapped my daughters desk with my knuckles just now. Mouse did not move but it was enough for the computer to come out of sleep. ymmv

edit 2 just saw the part about not disabling the wake on mouse, you can use wake by keyboard. Just tap the space bar.
 
Last edited:
Click Start, type Command Prompt, right-click on the program and select Run as administrator. Type powercfg -lastwake and press Enter.
That should at least show you the cause, or causes.
 
Uncheck the "Allow this device to wake the computer" option for your USB devices in Device Manager.
 
My daughters computer used to do the exact same thing. I must've tried everything to stop it ,and what ended up working was when I swapped out the power supply for a new one. Just the same ill list the things that commonly cause this to occur, mine not only woke up from sleep, but would actually power back on after shut down (unless I hit the switch on the back Of the psu).

common culprits (i did read your OP, but just the same)
Mouse movement from footsteps ,shaking etc

Wake on lan

USB Selective suspend

Incorrect header orientation for power and reset button

Hubs


The times that I've encountered this and was able to actually resolve it without changing a component out, it always was a setting in the bios


GL
 
Sleep sucks. Just hibernate. I haven't seen sleep work right since Vista. Every OS prior to 7 sleep worked fine. Don't know if it's a newer OS or a newer hardware(or both) thing. I remember the good ol' days when computers slept like babies. Anyway, it's pretty much useless these days. Boot from SSD and it's all the same. Not really worth paying for the vampire load to save 2 or 3 seconds boot time.
 
I heard recently shadowplay can be a culprit, or something else you are installing.
 
Click Start, type Command Prompt, right-click on the program and select Run as administrator. Type powercfg -lastwake and press Enter.
That should at least show you the cause, or causes.
You didn't read the post at all, did you? Event Viewer tells essentially the same as powercfg, but lets you look up previous wake events too. In other words, far more useful when looking into why the PC has been going through sleep-wake cycles all night.
Event Viewer -> Windows Logs -> System -> Filter Current Log: Event sources: Power-Troubleshooter.

Do you have optical or laser mice connected to the PC's in question? I am not aware of any real seismic activity in your area. But if you have the wake by mouse set under BIOS and a large truck drives by it may shake enough that you may not feel it but the mouse does, or just you walking around the apartment. Vibrations. Is the computer desk very sturdy? Disconnect the mouse and see if it persists or disable wake by mouse under bios. My $.02

edit- I just tapped my daughters desk with my knuckles just now. Mouse did not move but it was enough for the computer to come out of sleep. ymmv

edit 2 just saw the part about not disabling the wake on mouse, you can use wake by keyboard. Just tap the space bar.
I've looked into this, and while the mouse on my GF's PC is ridiculously sensitive to stuff like this, it can't be the core reason here - simply because it keeps happening if the mice are switched off, have their batteries removed, or the receivers unplugged. As I said, both PCs wake up even with only the display connected - and the system still might say it was woken up by USB.
Uncheck the "Allow this device to wake the computer" option for your USB devices in Device Manager.
a) Did you even read my post? The PCs wake up without a single device connected. No mice, no keyboards, no USB dongles, no hubs, cables - nothing. Just the display. And it still wakes up.
b) I suppose I could try, but that would defeat the entire point of using sleep to begin with, making waking up a hassle.
My daughters computer used to do the exact same thing. I must've tried everything to stop it ,and what ended up working was when I swapped out the power supply for a new one. Just the same ill list the things that commonly cause this to occur, mine not only woke up from sleep, but would actually power back on after shut down (unless I hit the switch on the back Of the psu).

common culprits (i did read your OP, but just the same)
Mouse movement from footsteps ,shaking etc

Wake on lan

USB Selective suspend

Incorrect header orientation for power and reset button

Hubs

The times that I've encountered this and was able to actually resolve it without changing a component out, it always was a setting in the bios


GL
Thanks! A couple of things there I haven't looked into. I'm going to try disabling USB Selective Suspend and see if that helps. It's definitely not WoL, seeing how both PCs will wake even with Ethernet disconnected, but the header orientation thing is ... puzzling. How can the orientation of a simple two-pole momentary switch matter? Or, more precisely, how can the PC tell at all? I get that one power pin will be positive and one negative, but given that the circuit is open unless the switch is pressed (and closed for a fraction of a second when pressed), is it at all possible to tell the orientation of the header? If this is actually a thing, I'd definitely want to look into it, but it definitely sounds odd to me.
Sleep sucks. Just hibernate. I haven't seen sleep work right since Vista. Every OS prior to 7 sleep worked fine. Don't know if it's a newer OS or a newer hardware(or both) thing. I remember the good ol' days when computers slept like babies. Anyway, it's pretty much useless these days. Boot from SSD and it's all the same. Not really worth paying for the vampire load to save 2 or 3 seconds boot time.
Unfortunately, both motherboards are rather slow to POST (the "perks" of having a motherboard from a small manufacturer, or of running an HEDT platform, I guess), so there's a very noticeable time difference between sleep and hibernation. Otherwise I'd switch over to hibernation in a heartbeat.


Just went through my Event Viewer logs again, and around six of the the last ten or so wakes (and some before that, spread out) were caused by "Wake Source: Device -PCI-to-PCI Bridge", whatever that means. A couple were "Wake Source: Device -AMD USB 3.0 eXtensible Host Controller - 1.0 (Microsoft)", and another few "Wake Source: Unknown". Real helpful stuff, that.
 
I've also battled with sleep/wake issues over the years, and from experience have learned that trying to find, or rationalise, the root cause is a waste of time. All you need is `powercfg`.

`powercfg -devicequery wake_armed` from an Administrator PowerShell window/Command Prompt will give you a list of all devices that can possibly wake the PC. This command is interesting because very often, it will show devices that you'd never expect being able to wake your computer. I think in one instance I had the chipset device listed!

`powercfg -devicedisablewake "device_name_from_device_query"`will prevent said device from ever waking the computer. This command is 100% the only thing I have found that will resolve sleep/wake problems. Updating drivers, unplugging peripherals, switching to a cleaner power supply (UPS), changing ethernet cables... none of those have helped, yet`powercfg -devicedisablewake` has done the trick.

Note that occasionally, devices you have disabled wake for may start waking up the PC again - this happens if you plug a USB device into a different port, or occasionally when drivers are updated, because Windows sees it as a new device. In that case rerun `powercfg` to find and disable that device again.

If this does not resolve your wake issues, I would start looking at power fluctuations.
 
Low quality post by Caring1
You didn't read the post at all, did you?
Stuff you, with an attitude like that you can figure it out yourself without the help of others. :slap:
 
First off: I tried disabling wake-up by the mouse on both PCs and disabling USB Selective Suspend too, to no avail.
I've also battled with sleep/wake issues over the years, and from experience have learned that trying to find, or rationalise, the root cause is a waste of time. All you need is `powercfg`.

`powercfg -devicequery wake_armed` from an Administrator PowerShell window/Command Prompt will give you a list of all devices that can possibly wake the PC. This command is interesting because very often, it will show devices that you'd never expect being able to wake your computer. I think in one instance I had the chipset device listed!

`powercfg -devicedisablewake "device_name_from_device_query"`will prevent said device from ever waking the computer. This command is 100% the only thing I have found that will resolve sleep/wake problems. Updating drivers, unplugging peripherals, switching to a cleaner power supply (UPS), changing ethernet cables... none of those have helped, yet`powercfg -devicedisablewake` has done the trick.

Note that occasionally, devices you have disabled wake for may start waking up the PC again - this happens if you plug a USB device into a different port, or occasionally when drivers are updated, because Windows sees it as a new device. In that case rerun `powercfg` to find and disable that device again.

If this does not resolve your wake issues, I would start looking at power fluctuations.
Thanks, I'll definitely look into that. Good to know that powercfg can list all wake-enabled devices, 'cause when I went through all ... eight-ish PCI-to-PCI bridge devices in Device Manager, none of them had wake events listed (in the "events" tab under Properties), which doesn't quite add up with one/more of them waking the PC a dozen or so times over the last few days. Of course, they don't even have the option to enable/disable waking the PC in the properties menu. I'll take a look at disabling a bunch of stuff through powercfg once I get home from work.

Stuff you, with an attitude like that you can figure it out yourself without the help of others. :slap:
Sorry if I came across as rude, but honestly, your reply did not at all indicate that you'd read my post in the first place. I said I'd been looking at wake-up history in the Windows event log, and I listed several of the devices cited there as having woken up the PC. If you came away with the impression that I hadn't investigated this thoroughly, I suppose I might not have been clear enough, but it's all there in the post. While powercfg does give out some more detail (device IDs and such) than Event Viewer, it only lists the last wake-up, and as such doesn't really help in this instance, as it's clearly not a single device at fault, and tracking wake-ups over time seems more useful. Also, figuring out how to view wake-up events in the Event Log is what you do after you've concluded that powercfg isn't giving you enough information ;)
 
Amateurs. What self-respecting enthusiast turns off their beloved PC? That hoe has to work 'round the clock.

You disabled all wake-timers? And USB Suspend for funsies?

Could this be a USB driver bug....ASmedia?

The times that I've encountered this and was able to actually resolve it without changing a component out, it always was a setting in the bios

I concur, doctor. I would definitely disable all power crap in UEFI.
 
Last edited:
Amateurs. What self-respecting enthusiast turns off their beloved PC? That hoe has to work 'round the clock.
Don't know about you, but I don't see any benefit to wasting electricity and wearing out components prematurely ;)
 
Don't know about you, but I don't see any benefit to wasting electricity and wearing out components prematurely ;)

Electrolytic caps 20 yrs old still work fine, so don't worry (solid Japanese ftw). Unless you abuse GPUs with Furmark or have an insane OC, it's of practically no concern. Even if they're defective and fail prematurely, they'll be long past their usefulness.

I also edited for maybe some helpfulness, above :p
 
Last edited:
Electrolytic caps 20 yrs old still work fine, so don't worry (solid Japanese ftw). Unless you abuse GPUs with Furmark or have an insane OC, it's of practically no concern. Even if they're defective and fail prematurely, they'll be long past their usefulness.

I also edited for maybe some helpfulness :p
Saw that now :P

USB Selective Suspend: Switched off this morning, made no difference in the 20 minutes I spent in front of the PC (the other PC woke up 3-4 times during that time).
Wake timers: were off until I tried enabling them again this morning. At this point, why not?
USB Driver bug: not unlikely. Unfortunately, that's not something I can diagnose.

As for BIOS settings, unfortunately the Biostar BIOS is ... not nice. I don't think it has sleep options beyond enabling/disabling S3 and the like. I'll have to look into it again, but truth be told, Biostar needs to step up their game. Haven't messed around too much with the bios on the Threadripper rig, but I suppose it's worth a shot. If @Assimilator 's "kill it with fire" powercfg approach fails, that'll be the next step.


As for components to wear out, I'm more concerned about fans and my water pump, and the AIO in the Threadripper build. I'm not really worried about my pump dying (I just got it replaced due to a minor leak, so it's brand new) in the next few years, but if keeping the PC asleep for the 50-70% of the day when it's not in use will extend its lifespan by 50-70%, then I'm definitely not saying no to that.


At this point, I'm suspecting the chipset of somehow being involved. It's one of the few common components between the builds (AFAIK, X370 and X399 are the same silicon, just slightly different firmware), and both Ethernet, (some) USB and everything else PCI(e)-based that isn't my GPU or SSD runs off of it. Now I'm hoping it'll show up as wake-enabled in powercfg so I can kill it quickly.
 
Check your Maintenance settings.

How to manage Windows 10's Automatic Maintenance feature

Automatic Maintenance is just a set of related tasks scheduled to run daily at 2:00 AM by default. These tasks run at the same time in the background, but only if your computer is powered on and sitting idle. If your device is asleep and plugged into a power source, Windows 10 is also able to wake it up to run the maintenance and put it back to sleep when it's done.

During a maintenance session, the feature will run specific tasks, such as disk optimization and defragmentation, system and apps updates, security and malware scans, diagnostics, and other tasks with the sole purpose of keeping your device healthy and running at peak performance. However, the number of tasks will be different on every computer, as software developers can also build their apps to plug tasks into this feature.

The optimization process can only run for one hour a day, and if tasks aren't finished within that window, they'll stop and resume during the next schedule. The only exception is when there are tasks marked as critical, in which case, they will continue to run until they're complete even if you're actively using the device.

Also, you may want to look through your "Scheduled Tasks"... there may be some software or Windows built-in functions which have the "wake computer" switch set to do this.
 
Check your Maintenance settings.

How to manage Windows 10's Automatic Maintenance feature

Also, you may want to look through your "Scheduled Tasks"... there may be some software or Windows built-in functions which have the "wake computer" switch set to do this.
I haven't looked too much into this, but I've touched on it, and pretty much concluded that it's not the cause. Why? Because Event Viewer would then list "System Wake Timer: Windows Update" or some such as the reason for waking (which it does when that's the case, but that's a few times a month at best). Still, I'll look into it, and perhaps try disabling it to see if it's somehow broken. Weird if that should be the case across multiple installations, but I've seen stranger things happen.
 
Saw that now :p

USB Selective Suspend: Switched off this morning, made no difference in the 20 minutes I spent in front of the PC (the other PC woke up 3-4 times during that time).
Wake timers: were off until I tried enabling them again this morning. At this point, why not?
USB Driver bug: not unlikely. Unfortunately, that's not something I can diagnose.

As for BIOS settings, unfortunately the Biostar BIOS is ... not nice. I don't think it has sleep options beyond enabling/disabling S3 and the like. I'll have to look into it again, but truth be told, Biostar needs to step up their game. Haven't messed around too much with the bios on the Threadripper rig, but I suppose it's worth a shot. If @Assimilator 's "kill it with fire" powercfg approach fails, that'll be the next step.


As for components to wear out, I'm more concerned about fans and my water pump, and the AIO in the Threadripper build. I'm not really worried about my pump dying (I just got it replaced due to a minor leak, so it's brand new) in the next few years, but if keeping the PC asleep for the 50-70% of the day when it's not in use will extend its lifespan by 50-70%, then I'm definitely not saying no to that.


At this point, I'm suspecting the chipset of somehow being involved. It's one of the few common components between the builds (AFAIK, X370 and X399 are the same silicon, just slightly different firmware), and both Ethernet, (some) USB and everything else PCI(e)-based that isn't my GPU or SSD runs off of it. Now I'm hoping it'll show up as wake-enabled in powercfg so I can kill it quickly.

Ah, water. I'm an air only guy. I don't need the complexity (aka failure), and I'll just have to build it myself if I want it done right (which also means I'm too lazy lol). I've got enough car work for that.

And that's an absurd amount of wake ups. It must be something bugged out. I wonder if disabling the ASmedia ports is enough or if you have to remove them (I assume no bios control since you said it's crappy)? B/c that's who I'd bet on driver bugginess.
 
Last edited:
Sorry if I came across as rude, but honestly, your reply did not at all indicate that you'd read my post in the first place.

The other party choosing to not read and comprehend your well-written and thoughtful post was the initial rudeness. You shouldn't have responded in the same manner, but you also shouldn't feel too bad that you did - I also get very frustrated by those who "try to help" by suggesting basic things that you've stated you've already done. That's the opposite of helping; it's just wasting everyone's time.
 
I also get very frustrated by those who "try to help" by suggesting basic things that you've stated you've already done. That's the opposite of helping; it's just wasting everyone's time.
And also Rehashing Suggestions made by others ( its either them not fully reading posts or just post whoring!)
tho sometimes its seems nessary if a Thread OP is not following given advice to sort out a problem or answer a query.
 
it shares zero hardware with my PC

Well, does it share any installed software from the same sources...
Are you using the same install media for the OSes? Drivers? Apps? Games?
Checked real good for malware, miners, etc.?
 
Check wake on LAN on the BIOS, that's how mine was turning on from complete shutdown by itself. A great white screen at 4am was a good enough reason to either check BIOS settings or to pull the plug.
 
Well, does it share any installed software from the same sources...
Are you using the same install media for the OSes? Drivers? Apps? Games?
Checked real good for malware, miners, etc.?
Only shared installation media was the W10 USB drive, but I always update that to the latest update before doing an install, so it's always freshly formatted. Everything else is downloaded, and only from official sites. As stated in the first post:
Malware? If so, it's entirely undetectable. I've run all kinds of scans, with no results. I've also tried different antivirus vendors, to no end. Currently we're using BitDefender.

Check wake on LAN on the BIOS, that's how mine was turning on from complete shutdown by itself. A great white screen at 4am was a good enough reason to either check BIOS settings or to pull the plug.
WoL won't work if the Ethernet cable is unplugged ;)


It's been a long and busy day, but hopefully I'll get around to implementing some of the above suggestions soon. Funny thing: in the (admittedly limited) time I've spent home after returning from work today, both PCs have stayed off from what I've seen. Right now I'm using my laptop on the desk in front of the desktop, mostly tempting fate :p Seems like they're both hibernating though (I activated hybrid sleep on the Threadripper build this morning), as there are no blinking power lights. Still, some times they wake up all willy-nilly (like this morning with 3-4 wake-ups in a matter of minutes, at least one immediately after I put it to sleep (as in: the PSU clicks off, then clicks back on within half a second or less)), and other times they can stay asleep for hours. My favorite is still when it wakes up and the power settings bug out so that the screen stays on and it never returns to sleep. That's a particularly good one. At least the W10 login backgrounds are nice looking.
 
Only shared installation media was the W10 USB drive, but I always update that to the latest update before doing an install, so it's always freshly formatted. Everything else is downloaded, and only from official sites. As stated in the first post:



WoL won't work if the Ethernet cable is unplugged ;)


It's been a long and busy day, but hopefully I'll get around to implementing some of the above suggestions soon. Funny thing: in the (admittedly limited) time I've spent home after returning from work today, both PCs have stayed off from what I've seen. Right now I'm using my laptop on the desk in front of the desktop, mostly tempting fate :p Seems like they're both hibernating though (I activated hybrid sleep on the Threadripper build this morning), as there are no blinking power lights. Still, some times they wake up all willy-nilly (like this morning with 3-4 wake-ups in a matter of minutes, at least one immediately after I put it to sleep (as in: the PSU clicks off, then clicks back on within half a second or less)), and other times they can stay asleep for hours. My favorite is still when it wakes up and the power settings bug out so that the screen stays on and it never returns to sleep. That's a particularly good one. At least the W10 login backgrounds are nice looking.
Check anyway. I had my wifi card in when it did it at times, switched to wired still did it. Shut off WoL and it all stopped.
 
Don't know about you, but I don't see any benefit to wasting electricity and wearing out components prematurely ;)

I back up (5) networked PCs to my box, then my box gets backed up to a HD Dock to be removed off site 1st thing in the AM... before that, AV scanners run, both on my box and then my scanner scans all the storage devices on the (5) networked PCs (yes Im anal about it) and then HDs get defragged before the backups start. I don't want any of that hapening while Im running AutoCAD ... or playing Witcher 3 :)

Also be aware ... electronic components, like circuit boards, incandescent bulbs, etc. suffer more "wear and tear" from thermal cycling ... cold +> hot = > cold => hot than they do from sitting doing nothing at the same temp.
 
Back
Top