Thats an understatement. I never made suspend-then-hibernate work reliable on linux and I tried it over the years on different systems. So I just had developed the habit of always entering hibernation, if I intend to close the lid for longer.
On windows suspend-then-hibernate never failed so far.
Drivers are just the crux with linux in too many cases. Not much you can do about it, except reverse engeneering drivers as a side project.
I ended up configuring my machine to suspend to disk when the power button is hit. I would agree with the hibernation function being finicky under Linux except I ran across similar behavior under Windows, so it probably has something to do with how power management is handled on PC hardware.
TBF hibernation has never been entirely reliable under Linux due to hardware vendors being difficult (IIUC). Getting it working for me has typically involved trying to make sense of arcane kernel log messages. I never managed to on my current laptop.
Suspend runs perfectly on my 3 Linux systems. That is, laptop and desktop with Nvidia and closed source drivers, and a HTPC box thingie (Zotac Zbox nano) with Radeon and open source drivers. Suspend and resume takes about 2 seconds. Don't know about hibernate, probably works but takes longer.
The majority of Sleep/Suspend/Hibernate related issues I had on Windows were related to it either not sleeping at all, or waking up at the wrong time.
Annoying when it's a laptop that you've just unplugged and stuffed into your backpack, and you're wondering why there's now an oven on your back. Less fatal for a desktop when the goal is to save power.
For linux, sleep/suspend is also pretty reliably good in my experience.
Yea, hibernate/suspend issues are by far the biggest problem I have with Linux on laptops. Years of being in the mac ecosystem where you can just close the lid and it'll barely have lost battery over weeks of being idle spoiled me.
I essentially have to treat my linux laptop like a small desktop computer and just shut it down fully when I'm not using it and can't leave it plugged in to power or else it loses 5-10% battery per hour.
Thanks to Secure Boot (AFAIK), you can't implement hibernation until you implement hibernation file signing.
Sleep works fine for ages. Works better on Linux on my 2015 laptop than on Windows (hint: if you have a KIRA laptop, suspend stops borking after you update the drivers for the touchpad to a ~2019 version).
True enough, thanks for the info. I can't complain either way, whatever suspend mode I have works well and quickly. Hibernate does work (all under Linux here as a rule).
I'll have to try powercfg next time I boot into Windows.
I don't understand why Linux still does not have reliable hibernation. Sleep requires working with BIOS and other hardware components, so I could understand that without proper drivers things might be shaky. But hibernate is hardware-agnostic feature so it should be rock-solid by now.
Linux has no trouble with hibernate/suspend, at least on my machine.
It's just that I prefer to start from a clean state each day and don't want to be bothered with yesterday's clutter.
I also save downloads and small 'run once' experiments to /tmp, so booting the notebook is a good way to clean everything up.
Sleep/wake/hibernate isn't a feature servers, home routers, or a whole host of other Linux powered commercial devices use. That means it doesn't get much attention from Linux kernel developers.
In turn, the implementation is rather poor. For example, it is impossible to suspend any machine while any ssh directory is mounted. It's been a bug for 10+ years. The bug is architectural and pretty much impossible to fix (Any file or directory read hangs on the SSH connection, and a process can't be paused for hibernation while a non-restartable syscall is running.)
While this kind of architectural bug exists, Linux hibernation will never be good. Fixing that bug properly is probably $500k worth of developer resources. Nobody wants to pay.
Thats an understatement. I never made suspend-then-hibernate work reliable on linux and I tried it over the years on different systems. So I just had developed the habit of always entering hibernation, if I intend to close the lid for longer.
On windows suspend-then-hibernate never failed so far.
Drivers are just the crux with linux in too many cases. Not much you can do about it, except reverse engeneering drivers as a side project.
reply