10 ms·
I mean, I know it's too late to help you, but running "powercfg.exe /lastwake" after a windows computer wakes from standby will tell you exactly what woke it up
by naikrovek 5y ago
I mean, I know it's too late to help you, but running "powercfg.exe /lastwake" after a windows computer wakes from standby will tell you exactly what woke it up, if it knows.
I've never had it return with "unknown" once in over a decade, but some people I know have.
if you can find all the things waking the computer, and fix those things, it will never wake without user intervention.
usually, for me, it's been device drivers which have permission to wake the computer from sleep by default, for some stupid reason. removing that permission on those devices has eliminated "hot bag syndrome" for me entirely.
I agree that these steps should not need to be taken. device driver authors are the source of almost all bad crap like this in windows.
- oauea 5y agoPower & Sleep settings > Additional power settings > Change plan settings > Change advanced power settings > Sleep > Allow wake timers > Disable
- Vrondi 5y agoThis "Allow Wake Timers" option does not exist in this location on my PC.
- errantspark 5y agoI have NEVER in my life ever gotten a useful output from `powercfg.exe /lastwake`. I'm honestly surprised to hear someone mention it as working, I thought it was the sort of thing that was just copypasted on clickfarming tech-help blogs without any sort of verification that it actually works. In fact I just tried it again on 4 computers and every one of them said "Wake History Count - 0".
- naikrovek 5y agonote that it won't report reasons the machine was woken from hibernate, since hibernate isn't a sleep state. also, run the command as an administrator. not just using an account that is an administrator. use an elevated cmd prompt or PowerShell window. if you're doing all that, idk what's going on. You can, however, see what devices are capable of waking your machine, and then disable them, by using the commands in my other comment: https://news.ycombinator.com/item?id=28647492 https://news.ycombinator.com/item?id=28647492
- errantspark 5y ago¯\_(ツ)_/¯ No hibernation, yes admin, yes elevated prompt, nada. Disabling devices has never worked for me either, again I'm legitimately surprised that these things have ever worked for anyone since it's never had any effect whenever I've tried it.
- naikrovek 5y agocheck the tasks in Task Scheduler, too. those can also wake a PC from sleep.
- errantspark 5y agoI wish that were true! I'd love to know how to do that one too since back in Windows 7 Foobar2k was able to wake my PC from sleep and play my music as an alarm, and this functionality has not worked for me since then.
- diedyesterday 5y agoFor a device to be able to wake a Windows system, it has to be allowed both in the BIOS and also in Windows's device manager (In the "power management" tab on a device, the checkbox on "Allow this device to wake the computer" has to be set/unset). It is available only on certain classes of devices. Also what you are referring to as an application's capability (Foobar...) to wake a computer (from sleep or hibernation only) it most probably has to do with setting an RTC (real-time clock) alarm and the computer being allowed to resume from such an event. Again this is also a setting which can be disabled in most BIOS configurations and yours probably is. By the way, Windows' task scheduler exposes this option to everyone so you can set your computer to wake up and run some script and then sleep again (I used to do this all the time ages ago for night downloads, etc.) So, there are a series of switches (in BIOS and in windows device manager) that all have to be set/unset, for a computer to resume from some event;
- Drew_ 5y agoIt only works for the most basic mouse/keyboard scenarios in my experience
- gambiting 5y ago>>I mean, I know it's too late to help you, but running "powercfg.exe /lastwake" after a windows computer wakes from standby will tell you exactly what woke it up, if it knows. I'm one of those people - my computer kept waking up in the middle of the night and that command would always just return "wake source: unknown" for me.
- naikrovek 5y agoare there devices which are allowed to wake your computer? powercfg -devicequery wake_armed if anything shows up, disable those devices with this command: powercfg -devicedisablewake "Device Name" I quickly googled this but I don't expect a lot of people to know what to search for, so if you've already found this and tried it, then I really am out of ideas this time. if you haven't tried this, try it, and I really hope it helps.
- gambiting 5y agoI got rid of that PC a year ago :P But trust me, I tried literally every trick in the book, including the one above. No devices had the capability to wake up the PC(yes, including the mouse and the keyboard), disabled all wake timers, disabled all networking(in fact unplugged the ethernet cable).....it would still wake up in the middle of the night. It was the most confusing thing I ever dealt with in computers.
- naikrovek 5y agoyeah, software can wake the PC too. alarms and the like will wake a sleeping PC. in your case I would scrutinize the task scheduler for tasks that are allowed to wake the PC.
- exikyut 5y agoWas this exactly at midnight, as in 12:00? It's possible auto wakeup was enabled in the BIOS, with the wake time set to the default of 00:00. Alternatively, if it was a different time, perhaps *that* was the default, or maybe the value accidentally got changed. Alternatively-alternatively, maybe the BIOS had a bug in it that somehow enabled auto wake without presenting an option. To tackle this, I would've reset the BIOS settings. (I once had an ADSL2+ modem that randomly started flaking out and not connecting correctly. Changed every accessible setting I could, no dice. Factory reset = instantly back to normal.)
- pavel_lishin 5y ago> I know it's too late to help you But it's not too late to help others! Thank you for showing us how insane this is.
- oauea 5y agoWhat's insane here? Waking the machine up is a legitimate use case, and it's easily traceable and configurable.
- myself248 5y agoA machine doing something I didn't tell it to is insane. I am the user. I use the machine, not the other way around.
- BHSPitMonkey 5y agoThe hardware and software making the decision to wake the device isn't necessarily privy to concepts like "user" or "intent"; At that layer, it's all just signals. Someone has to design the system to interpret what those signals/events are supposed to lead to (e.g. should connecting a cable to a closed laptop wake it up? What if the thing on the other end of that cable is a mouse, or a storage device, or a charger, or a docking station? What if I jiggle my Bluetooth mouse, causing it to re-establish its connection to the laptop's Bluetooth radio? Should other state be considered before making a decision?). The fact that such a subsystem exists isn't an indication of malice or a subversion of your will. There will be bugs in such a system, but the system still needs to be there.
- matsemann 5y agoI had this problem for months with my computer booting randomly some nights, waking me because of its loud fans. Turns out it was our dog pushing my desk chair so that the armrest bumped some key on the keyboard.
- fxtentacle 5y agoHaha I should have mentioned that one as a repeat offender. After the Surface wakes up, reboots, makes noise, gets hot, and drains 20% of its battery, if I then run "powercfg.exe /lastwake" it'll pretend that it did not wake up X_X And in my case, there wasn't any non-Microsoft drivers on the system. The issue appears to be that they do magical stuff when they spot a WiFi connection, or when my WiFi router does its daily reboot.
- AuthorizedCust 5y agoAre you sure it went to sleep? I’ve had prior issues on a Surface and a 9310 where it appeared to sleep but didn’t. I found that out through Event Viewer.
- mjaniczek 5y agoOfftopic: > or when my WiFi router does its daily reboot. Damn, I think that might fix 99% of the issues I have with my WiFi router.
- naikrovek 5y agoI have a $300 Ubiquiti Dream Machine and that thing CANT be scheduled to reboot. doesn't matter because Ethernet dies twice a day, and I need to use my phone to get to the admin page to restart the thing. most annoying and expensive router I've ever owned. I DO NOT understand how all routers I have ever owned are total garbage, but they all have been.
- exikyut 5y ago(Computer that's always on + $2 Wi-Fi dongle (or a slightly more expensive one with an actual antenna, if required) + network namespace-specific alternate route = scriptable scheduled reboot. Hm, or you could just use a Raspberry Pi.
- pixiemaster 5y agoi use a mechanical clocked power outlet that cuts power once a day to the router
- GSGBen 5y agoA new wake-up reason might get installed in the future. Instead I found some powershell code ages ago, created a `nap` function in my $profile, and set the option to not allow waking it from sleep: # load assembly System.Windows.Forms which will be used Add-Type -AssemblyName System.Windows.Forms # set powerstate to suspend (sleep mode) $PowerState = [System.Windows.Forms.PowerState]::Suspend; # do not force putting Windows to sleep $Force = $false; # don't allow the computer to be woken by devices or tasks (e.g. windows updates) $DisableWake = $true; # do it! Set computer to sleep [System.Windows.Forms.Application]::SetSuspendState($PowerState, $Force, $DisableWake) | Out-Null;
- muststopmyths 5y agoWindows update is one of the things that don't show up with powercfg, as far as I can recall. My desktop used to wake itself up all the time to update and in addition to hunting down all the devices, there was a scheduled task for Office updates that I had to disable. It would wake the computer up and then Windows updates would install because the computer was awake at the scheduled time, giving me the false impression that Windows update was causing the wake. In 8-9 years of using Surface Pros, on the other hand, I have never had one that woke from sleep to install updates or cooked itself in a bag. They have been trouble-free for me and my favorite travel computer. Really need to look into a BSD with Windows VM for my next desktop though.
- pkulak 5y agoAnd people say Linux is the difficult OS.
- antifa 5y agoThis stuff previously worked correctly on windows 7, I guess they saw things like spotty headphone jack detection, 100% CPU fan blasting while lid closed, etc. and thought it was a good idea to copy it.