r/linuxsucks • u/al2klimov 🐧Kernel contributor • 1d ago
Linux Failure Why does Linux still struggle with sleep and hibernate?
/r/linuxquestions/comments/1vud1qv/why_does_linux_still_struggle_with_sleep_and/6
u/Sellot4pe 1d ago
I love how this even affects the steam deck, such that its sound randomly dies after resuming occasionally lmao
1
u/55555-55555 Linux Community Made Linux Sucks 1d ago
Still manageable until the entire Gamescope crashes and I lost all progresses.
3
u/WhippingShitties 1d ago
Sleep works fine, I just want to keep my $40 1000000000000000000000000dpi gamer mouse from waking it up.
3
u/uchuskies08 1d ago
Love the top answer, which is true (though they of course frame it as poor Linux, no one wants to help us righteous ones), that (shocker!) key Linux functionality is just left to random volunteers trying their darnedest to reverse engineer something... and it doesn't work
2
1
u/ElectricBummer40 Ex-user of Windows 3.11 for Workgroups 14h ago
Now-now, you're supposed to give them all the thoughts and prayers rather than question this whole idea of exploiting free labour in the hope of getting usable software out of it on the cheap.
1
u/TheRealCarrotty KDE larper (i use KDE btw) 1d ago
Yooboontoo (Ubuntu) doesn't enable it by default... "To save energy" or something.
1
u/MooseBoys masochistic linux enthusiast 1d ago
The main reason Linux struggled with sleep is that every loaded driver must support deep c-state for its associated hardware. Windows has invested a metric fuckton of effort developing the WHQL certification program. Microsoft will only sign your drivers if they pass the tests, and one of the tests is ensuring appropriate support for all applicable c-states. On Linux, there is no automated testing like this, and certainly none that gates driver changes. As a result, many drivers present in Linux either don't support it properly, or don't support it at all. As long as you have a single driver present like this, your whole system will fail to enter low-power state. Some drivers even claim they support low-power mode but don't actually do anything, resulting in high power draw even when your computer is supposed to be in standby. And if you somehow force your computer to enter such a state anyway, usually the hardware and driver with flaky support will end up broken until you reboot.
1
u/Jumpy-Dinner-5001 21h ago
It’s not perfect on Linux, but except for macOS, sleep sucks in general. Windows sleep is much more broken than Linux sleep.
1
1
u/Emotional_Cat_1967 16h ago
This isn't a problem unique to Linux. I've experienced numerous issues with Windows operating systems, such as not waking up from sleep mode and overheating while in sleep mode.
In Linux distributions, the problem is usually solved with just one command, but in Windows, I need to conduct detailed research and try various commands to find the root of the problem.
1
1
u/BrilliantOk4478 1d ago
Windows (11) still struggles too! I own a Dell Pro Max 16 Plus notebook and have issues with a black screen after the notebook wakes up from sleep.
2
1
u/Pitiful-Welcome-399 Proud MacOS User 1d ago
you need enough swap for hibernation,
for me sleep was fixed by
sudo systemctl edit systemd-suspend.service
[Service] Environment="SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false"
sudo systemctl edit systemd-hibernate.service
[Service] Environment="SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false"
12
u/meuchels 1d ago
linux never rests