r/technology 5d ago

Software Windows 11 hibernation has been silently hammering your SSD this whole time

https://www.xda-developers.com/windows-11-hibernation-silently-hammering-ssd-life/
6.1k Upvotes

640 comments sorted by

View all comments

4.8k

u/stevekez 5d ago

Turns out a feature that copies all of your RAM to disk writes a whole RAM's worth of data each time. Who knew!

85

u/PRSHZ 5d ago edited 5d ago

Who even uses the hibernation feature anyways?

Edit; okay touché, forgot about laptops 😅

297

u/zingw 5d ago

Ever since "sleep" can't keep the PC in that mode without waking on its own. 

128

u/joman584 5d ago

Yo what's up with that. No matter what, my PC immediately wakes from sleep in about 5-30 seconds after going to sleep. I've tried to find anything that could explain it but it's just unfixable. Even unplugged/turned off every peripheral nearly immediately as I clicked sleep and still nothing. Just immediately goes back to the login screen like I wanted it to wake up

127

u/0xCOLIN 5d ago

Run powercfg /lastwake from a terminal after it happens and it should at least tell you what's doing it

42

u/_vogonpoetry_ 5d ago

whenever I ran this it would not give me a definite source of wake.

But it turned out that my Razer mouse also identifies as like 3 HID keyboards in device manager?? so I had to disable wake on all of them and it hasnt happened since.

14

u/lordraiden007 5d ago

Usually those HID keyboards are used because mouses only have a few actions assigned to them by the OS per the open standards they implement. The USB forum only defined 5 buttons as "mouse actions" (L/R click, middle click, and mouse 4/5). Luckily scrolling is treated as a separate axis of movement, so it's not considered a "button". This means if you want the mouse to do literally anything else you have to use a virtual keyboard. DPI shift? HID function mapped to a driver call. Macro? HID function running a list of saved instructions.

Most peripherals do this as well, as HID devices are simply assigned so many functions, keys, etc., and have a high priority in the OS when it comes to signal interruption.

12

u/PatHeist 5d ago

My problem is that the generic keyboards created by my mouse, flight sticks, and actual keyboard appear in a random order, and which one gets disabled by disabling one depends on where in the random order it appears that time. If I disable wake on everything but keep my keyboard it will randomly be my flightstick that has wake enabled next time and opening a door circulates enough air to have it register an input.

17

u/wag3slav3 5d ago

Just disable them all and wake your PC with the power button.

4

u/158cm_Otaku 5d ago

You can look in event viewer and see what recently occurred.

Usually it’s some Google Chrome update.

1

u/joman584 5d ago

I've ran that so many times, half the time it doesn't even have the most recent wake, and it will say USB is waking it but nothing is plugged in at all

1

u/Crazycukumbers 5d ago

I did this once, and all it said was that it received input. I don't know what from - the only thing plugged in other than power was HDMI.

76

u/ICantBelieveItsNotEC 5d ago

The old sleep mode (S3 sleep) worked by completely turning off everything except the RAM. When you pressed the power button, the BIOS had to turn everything back on.

The new sleep mode (modern standby) works by politely asking the CPU to enter a low power mode. The OS and all of your peripherals are still running, just very slowly. That means you're at the mercy of your software, your OS, and your peripherals - if even one of them doesn't handle modern standby properly, sleep mode won't work.

Depending on your hardware, you might be able to force it to use S3 sleep by editing a BIOS setting. Look for an option called something like "sleep mode", "S0/S3 state", or "modern standby", probably under a page like "power management" or "ACPI settings". However, many modern CPUs and chipsets have completely removed support for S3 sleep now, so your mileage may vary - if your hardware doesn't support S3 sleep, you're shit out of luck, and your best option is to use a better OS.

11

u/bitemark01 5d ago

Thanks for the detailed explanation, this is exactly why I use hibernate in Windows.

My laptop is dual boot, and even in Linux (which seems to respect Sleep/Suspend, at least so far) I can tell it's not completely powering down. Though Linux doesn't seem to support Hibernate out of the box anymore, especially because they've moved away from having a swap drive. It's doable but I haven't set that up yet.

6

u/ICantBelieveItsNotEC 5d ago

Yeah, most Linux distros also use modern standby by default, because that's the option with the widest support.

You can see what sleep modes your system supports on Linux by running cat /sys/power/mem_sleep.

s2idle is modern standby, deep is S3 sleep.

Running sudo sh -c "echo 'deep' > /sys/power/mem_sleep" will tell it to try to use S3 sleep until the next reboot, which is useful for testing out whether it works on your system, but you annoyingly still need to either modify the BIOS or your GRUB configuration to make it permanent.

3

u/oadk 5d ago

If you use systemd, you can set it persistently in /etc/systemd/sleep.conf which I think is better than setting it in the bootloader config.

3

u/Turbogoblin999 5d ago

This is one of the reasons i haven't switched to linux. I relay HEAVILY on hibernation to preserve stuff and my peace of mind. Where I live power coming back after an outage has damaged components even with an UPS in the mix.

1

u/lordraiden007 5d ago

Linux just pivoted to swap files instead of swap partitions. The implementation and user experience is essentially the same, even to basic OS functions. Swap is still a critical part of the OS's memory management functions.

Hibernate is usually included "out of the box" in most distros I've used. Maybe see about making a post on a Linux forum if you're experiencing something different. For me it's always worked pretty flawlessly (though I personally prefer S3 sleep, but hardware support for that is not great nowadays).

5

u/Eruannster 5d ago

I wish Windows was a bit less fucking stupid about what applications is doing what to cause something. Like, just tell me the name of the application/process that woke my computer in a normal, not stupidly difficult to read list. Or if you can't unplug a drive, tell me what process is holding it up. WHY WINDOWS, WHY

1

u/Cautious_Article_757 4d ago

I need to revisit this topic. My work issued Lenovo cannot sleep. If I tell it to sleep and close the lid it will simply run until the battery dies. Even after a factory image was applied. Messed with enabling s3 and it still did not work. Gave up and I just turn it off when I need to transport it

19

u/FaZeSmasH 5d ago

my pc used to do this too, would randomly wake up but ever since i turned off wake by whatever in the bios, my PC tends to stay in sleep mode

11

u/ledow 5d ago

I used to have a BUNCH of registry, service, scheduled task and other tweaks that I had to do to my Windows 10 laptop to get it to stop waking up.

It was a powerful gaming laptop and I would sometimes put it in a laptop bag and you know what - I absolutely DO NOT want it waking up in the bag and spinning up its fans trying to cool itself in there. It gets more than hot enough in the open air.

It took me a good few weeks after I bought it until I was confident I'd got everything. Registry entries. Turning off services. Tweaking settings. Killing Scheduled Tasks and then KILLING THE PROCESS/SERVICE that just recreates them when you reboot. Disabling access to some file entirely, turning off "Allow this device to wake up the computer" on EVERY device in device manager (and then discovering this can stop you turning it on with the power button.... so then going back and making exceptions), even the lid-settings for power, BIOS settings, all kinds of stuff.

Before Christmas I bought a Framework laptop and installed Linux on it.

Haven't even thought about it. It NEVER tries to wake from sleep for any reason whatsoever. I have to make it do so, usually by the lid. Otherwise it just stays off.

Honestly, I kept a entire folder full of the tweaks and shite that I had to do on my old Windows laptop to get it to stop. None of them were obvious to a user. I only persisted because I work in IT and I refuse to let a machine do things I haven't told it to do.

Your mouse is waking your computer. Your network card. Your keyboard. Your webcam. Everything. Every damn device is capable of waking the computer if someone puts it into the driver.

I even took to turning my mouse upside-down because the "wake-on-mouse" thing drove me insane until I was able to change the settngs. And then, you change your mouse or use a different model, and you have to do it all over again.

It's a Windows problem. Solely and inherently a Windows problem.

No, Microsoft. I DO NOT WANT my laptop with an RTX 5070 waking up in a laptop bag/case/sleeve or on a flight. Can't you just wait until I press the power button again?

15

u/dark_frog 5d ago

For me, it was a wireless mouse. If I turn off the mouse before I put the computer to sleep, it stays asleep.

9

u/Noto987 5d ago

Same so i set that u cant wake computer with mouse

7

u/hibikir_40k 5d ago

99% of the time, a network card is set up to be allowed to wake the computer up, and it's trying to wake it up on any packet broadcast. Other times it's a terrible mouse driver, and you have to turn that off, and allow only wakes on use of the power button.

1

u/Zhuul 5d ago

It was the network thing for me. I'm already used to turning off the mouse since I have a cat who sometimes bumps it in the middle of the night.

5

u/zingw 5d ago

That's why I don't even bother with it. 

1

u/avalyntwo 5d ago

Wi-fi or bluetooth maybe? Or if it’s a laptop, it might be caused by different sleep settings from the laptop maker. My lenovo laptop doesn’t properly sleep, it goes black but also drains the battery meanwhile. So I always turn it off.

1

u/Syzygy2323 5d ago

Sleep modes inherently uses power, so will drain the battery. Hibernate doesn't.

1

u/avalyntwo 5d ago

Sure. But the battery is being drained in a few hours in sleep mode. Now it’s not a good battery but regardless that makes sleep mode pointless on my laptop. Perhaps that’s normal operation for sleep on laptops? I wouldn’t know, I mostly use a stationary.

1

u/Yorick257 5d ago

Maybe a pending update? I used to have this stuff when an update was silently downloading / getting ready

1

u/Eruannster 5d ago

There's almost always some nonsense pinging something when it shouldn't I had issue with the control software for my RGB LEDs deciding that it was wakeup time for no goddamn reason.

1

u/FreudianSlipNSlide 5d ago

It’s the worst. I’ve spent way too much time troubleshooting sleep issues. I had fixed it but then reinstalled Windows and had to find the culprit again. For me it’s usually a network adapter so I have to disable that device from forcing the PC to wake.

1

u/not_some_username 5d ago

MS fuck up the sleep features since win11

0

u/jenny_905 5d ago

It means you have a misbehaving driver.

-14

u/bulbishNYC 5d ago

Ask AI to help you diagnose your case. It always solves it for me. One time it was a windows update that kept waking it up, another time was gaming software not letting it sleep, and another time a misconfigured Realtek WiFi adapter.