# Why does Windows get insomia?

**URL:** <https://boards.straightdope.com/t/why-does-windows-get-insomia/941692>\
**Category:** In My Humble Opinion\
**Created:** [May 9, 2021, 2:47am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692 "2021-05-09T02:47:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![squeegee](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/squeegee/32/14537_2.png) [@squeegee](https://boards.straightdope.com/u/squeegee)\
**Post date:** [May 9, 2021, 2:47am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/1 "2021-05-09T02:47:38Z")

</div>

Meaning it forgets how to go to sleep automatically. I mean, every single Windows system I’ve owned for like 20 years has been like this. You set it to Sleep automatically after so many hours, and that’ll work for a few days. A week or two. Then it just forgets how and stays on forever until you tell it to sleep directly, or you reboot and it suddenly remembers how to do it by itself again. I’m not talking about the monitor turning off, I’m talking about the system sleeping.

Every desktop, every laptop\*, personal and work machines do this in my experience. I have a work machine with virtually nothing on it: developer tools and Office and that’s it. It does it too. Why?

\*Though to be fair a laptop will sleep if you close the lid, just like a desktop will sleep if you choose power-\>sleep. They just forget how to do it themselves.

---

<div class="post-metadata">

**Author:** ![squeegee](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/squeegee/32/14537_2.png) [@squeegee](https://boards.straightdope.com/u/squeegee)\
**Post date:** [May 9, 2021, 3:24am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/2 "2021-05-09T03:24:12Z")

</div>

Since this is IMHO, I should have added: anybody else have this happen?

---

<div class="post-metadata">

**Author:** ![ZipperJJ](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/zipperjj/32/211_2.png) [@ZipperJJ](https://boards.straightdope.com/u/ZipperJJ)\
**Post date:** [May 9, 2021, 3:33am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/3 "2021-05-09T03:33:40Z")

</div>

Yeah this happens me. I always assume it’s some background process that is keeping it awake. Usually it rights itself after a day.

---

<div class="post-metadata">

**Author:** ![GuanoLad](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/guanolad/32/42_2.png) [@GuanoLad](https://boards.straightdope.com/u/GuanoLad)\
**Post date:** [May 9, 2021, 8:57am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/4 "2021-05-09T08:57:04Z")

</div>

> [@ZipperJJ](#):
>
> I always assume it’s some background process that is keeping it awake.

Yes, I’m confident it’s this, in combination with random factors like something recently installed sparking off against the offending process. Sometimes updating software, like your virus checker, might have changed its functions in some annoying way, it gets complaints, then updates get rushed again to correct it, so from your perspective it seemed just a weird inexplicable temporary glitch.

Recently, for some reason a HDD app “Samsung Magician” got itself reawakened, stationed itself in my systray, and kept my monitor from sleeping. I assume it updated itself automatically at some point that day and reset all its obnoxious settings that I had previously turned off.

---

<div class="post-metadata">

**Author:** ![Mijin](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mijin/32/9369_2.png) [@Mijin](https://boards.straightdope.com/u/Mijin)\
**Post date:** [May 9, 2021, 9:06am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/5 "2021-05-09T09:06:35Z")

</div>

If it’s a laptop, you might want to try the hibernate state. IME a system might try to sleep but be immediately woken by some process. Hibernate is not so easily disturbed.

I know in theory hibernate is much slower to wake from, because the whole system state is dumped to the hard drive. But if you’ve got an SSD, this is still just a few seconds. I can’t speak for how long it takes from magnetic disk.

---

<div class="post-metadata">

**Author:** ![squeegee](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/squeegee/32/14537_2.png) [@squeegee](https://boards.straightdope.com/u/squeegee)\
**Post date:** [May 9, 2021, 6:56pm UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/6 "2021-05-09T18:56:08Z")

</div>

> [@Mijin](#):
>
> If it’s a laptop, you might want to try the hibernate state. IME a system might try to sleep but be immediately woken by some process. Hibernate is not so easily disturbed.

I’ve had the same problem with hibernate. The system just forgets how to hibernate automatically after a week or so.

---

<div class="post-metadata">

**Author:** ![Gatopescado](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/gatopescado/32/5711_2.png) [@Gatopescado](https://boards.straightdope.com/u/Gatopescado)\
**Post date:** [May 12, 2021, 8:44pm UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/7 "2021-05-12T20:44:33Z")

</div>

No Sleep For The Wicked?

---

<div class="post-metadata">

**Author:** ![Dereknocue67](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@Dereknocue67](https://boards.straightdope.com/u/Dereknocue67)\
**Post date:** [November 14, 2021, 8:31am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/8 "2021-11-14T08:31:03Z")

</div>

To know what are the applications hinder sleep mode run cmd as admin… type in…  
powercfg -requests… and it will reveal what, if any, application is preventing sleep.

---

<div class="post-metadata">

**Author:** ![GreenWyvern](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/greenwyvern/32/2834_2.png) [@GreenWyvern](https://boards.straightdope.com/u/GreenWyvern)\
**Post date:** [November 14, 2021, 11:22am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/9 "2021-11-14T11:22:42Z")

</div>

If there’s a video player open, that may be the cause. They usually switch off screen savers (if any) and stop Windows sleeping.

---

<div class="post-metadata">

**Author:** ![Turble](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@Turble](https://boards.straightdope.com/u/Turble)\
**Post date:** [November 14, 2021, 2:55pm UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/10 "2021-11-14T14:55:25Z")

</div>

I have had success by making sure the mouse it not the culprit by un-checking the options to allow the mouse to wake the computer – just have to press a key instead of jiggling the mouse to wake up. Easy test was to unplug the mouse and see if the machine would sleep.

Device Manager \> Mice and other pointing devices \> Power Management \> Allow this device to wake the computer

---

<div class="post-metadata">

**Author:** ![squeegee](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/squeegee/32/14537_2.png) [@squeegee](https://boards.straightdope.com/u/squeegee)\
**Post date:** [December 19, 2021, 11:20am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/11 "2021-12-19T11:20:00Z")

</div>

It took a few weeks (Windows forced-rebooted me once for an update, making me start over) but I finally have my Win desktop in an ‘insomniac’ state: it won’t auto sleep now unless I reboot.

> [@Dereknocue67](#):
>
> To know what are the applications hinder sleep mode run cmd as admin… type in…  
> powercfg -requests… and it will reveal what, if any, application is preventing sleep.

```auto
C:\WINDOWS\system32>powercfg -requests
DISPLAY:
None.

SYSTEM:
None.

AWAYMODE:
None.

EXECUTION:
None.

PERFBOOST:
None.

ACTIVELOCKSCREEN:
None.
```

Any other tests I should try?

---

<div class="post-metadata">

**Author:** ![Dereknocue67](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@Dereknocue67](https://boards.straightdope.com/u/Dereknocue67)\
**Post date:** [December 22, 2021, 8:40am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/12 "2021-12-22T08:40:10Z")

</div>

If you ran the test after a reboot, the test makes sense since you say a reboot fixes the issue. I’m guessing here, but it sounds like when you first turn the PC on, it will not sleep unless you reboot and then sleep mode works. If you ran the test after your system would no longer enter sleep mode, it’s a mystery.

---

<div class="post-metadata">

**Author:** ![squeegee](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/squeegee/32/14537_2.png) [@squeegee](https://boards.straightdope.com/u/squeegee)\
**Post date:** [January 5, 2022, 3:06am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/13 "2022-01-05T03:06:06Z")

</div>

OK, after yet another reboot, I got Windows into this state again.

```auto
C:\WINDOWS\system32>powercfg -requests
DISPLAY:
None.

SYSTEM:
[PROCESS] \Device\HarddiskVolume6\Windows\explorer.exe
A file delete operation is in progress.
[PROCESS] \Device\HarddiskVolume6\Windows\explorer.exe
A file delete operation is in progress.
[PROCESS] \Device\HarddiskVolume6\Windows\explorer.exe
A file delete operation is in progress.
[PROCESS] \Device\HarddiskVolume6\Windows\explorer.exe
A file delete operation is in progress.

AWAYMODE:
None.

EXECUTION:
[PROCESS] \Device\HarddiskVolume6\Windows\explorer.exe
A file delete operation is in progress.
[PROCESS] \Device\HarddiskVolume6\Windows\explorer.exe
A file delete operation is in progress.
[PROCESS] \Device\HarddiskVolume6\Windows\explorer.exe
A file delete operation is in progress.
[PROCESS] \Device\HarddiskVolume6\Windows\explorer.exe
A file delete operation is in progress.

PERFBOOST:
None.

ACTIVELOCKSCREEN:
None.
```

I did get in a weird state a couple of days ago where I was deleting a folder and it was taking forever to move say 10 files to the trash, so I deleted them one at a time and all was well. This is apparently the result. Darn you, Windows.

---

<div class="post-metadata">

**Author:** ![squeegee](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/squeegee/32/14537_2.png) [@squeegee](https://boards.straightdope.com/u/squeegee)\
**Post date:** [January 5, 2022, 3:09am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/14 "2022-01-05T03:09:47Z")

</div>

Is there a power user command to blow all these silly things away?

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [January 5, 2022, 3:39am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/15 "2022-01-05T03:39:08Z")

</div>

If it’s deletes that didn’t quite delete, perhaps running chkdsk would clean this up for you. You can instigated a check by right clicking on the offending drive in Explorer, clicking the Tools tab, and clicking the Check button under Error Checking. Go ahead and let it Scan the drive even if it tries to tell you nothing is wrong. Hopefully it will find some errors and then prompt you from there. Just follow along, rebooting if necessary.

The only other thing I can think of is to check if the following registry key exists using RegEdit. You can safely delete the key if you find it.

```auto
HKEY_LOCAL_MACHINE/SOFTWARE/Session Manager/PendingFileRenameOperations

```

---

<div class="post-metadata">

**Author:** ![squeegee](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/squeegee/32/14537_2.png) [@squeegee](https://boards.straightdope.com/u/squeegee)\
**Post date:** [January 5, 2022, 3:45am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/16 "2022-01-05T03:45:55Z")

</div>

> [@BigT](#):
>
> The only other thing I can think of is to check if the following registry key exists using RegEdit. You can safely delete the key if you find it.
> 
> ```auto
> HKEY_LOCAL_MACHINE/SOFTWARE/Session Manager/PendingFileRenameOperations
> 
> ```

Nope, no keys or entry at HKEY\_LOCAL\_MACHINE/SOFTWARE/Session Manager. Is that the correct path?

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [January 5, 2022, 3:59am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/17 "2022-01-05T03:59:29Z")

</div>

Try also

```auto
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager

```

Or just click Find and try to search for the key PendingFileRenameOperations. If yo udon’t find it, then there aren’t any.

Also try it right when the problem starts, as well as after a reboot and after sleep is working.

I do note this one is a bit of a longshot. It’s just where Explorer stores files to be deleted later. In theory, it should only be trying to delete them before Windows loads. But it’s just the only place I know of where Explorer lists files to be deleted.

I put the chkdsk first because I though that would be more likely to work.

---

<div class="post-metadata">

**Author:** ![squeegee](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/squeegee/32/14537_2.png) [@squeegee](https://boards.straightdope.com/u/squeegee)\
**Post date:** [January 5, 2022, 4:05am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/18 "2022-01-05T04:05:52Z")

</div>

> [@BigT](#):
>
> Or just click Find and try to search for the key PendingFileRenameOperations. If yo udon’t find it, then there aren’t any.

Aha, I get it: this is where Windows installers sequester files to nuke when they say “you need to reboot to complete the install”. Interesting, thanks.

---

<div class="post-metadata">

**Author:** ![squeegee](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/squeegee/32/14537_2.png) [@squeegee](https://boards.straightdope.com/u/squeegee)\
**Post date:** [January 5, 2022, 4:25am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/19 "2022-01-05T04:25:38Z")

</div>

> [@BigT](#):
>
> I put the chkdsk first because I though that would be more likely to work.

Hey, big props! I ran chkdsk on all three of my disks and that cleared the

```auto
[PROCESS] \Device\HarddiskVolume6\Windows\explorer.exe
A file delete operation is in progress.
```

Nice!

I guess we’ll see if my system suspends tonight

---

<div class="post-metadata">

**Author:** ![squeegee](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/squeegee/32/14537_2.png) [@squeegee](https://boards.straightdope.com/u/squeegee)\
**Post date:** [January 6, 2022, 4:22am UTC](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692/20 "2022-01-06T04:22:00Z")

</div>

System suspended last night. I’m going to keep on checking this though next time it happens

[Next page](https://boards.straightdope.com/t/why-does-windows-get-insomia/941692.md?page=2)
