Hardware device vendors don't always write or maintain Linux drivers there's no stable driver ABI for binary drivers to be built and distributed for Linux. Instead, vendors are encouraged to write drivers that follow the conventions of the Linux kernel with no hardware abstraction layers and submit them for inclusion in the upstream Linux kernel under the GPLv2. Not every vendor is willing to do that (NVIDIA for example), but some do (AMD, Intel).
I think Hibernation has been impractical since 2013 or so.
I have an Alienware that runs rings around any Mac and can do ML dev work with NVIDIA if it is on the plug but on battery I count on it to keep running as I move it to another plug and for the battery to maintain sleep mode for 48 hrs or so.
I don't have lots of RAM (but rather on the low side for present day), but hibernation takes maybe 15 seconds on a SATA SSD.
Hibernation was definitely a lot slower 10 years ago on a desktop with less RAM and a slow spinning disk.
My HP Pavillon with windows hibernates reliable today, my very old netbook acer with Ubuntu/LXDE did so, too (but that was years ago).
Nowdays I gave up with linux laptops to even enable it, as it is quite complicated to set it up when you dual boot and use encryption. And after I did set it up, it failed over 50% of times on various devices so I did not bother anymore.
This has a lot of advantages of this approach over binary drivers in that:
- The driver can be updated so it survives architectural changes (say from x86 -> amd64 -> armv7 -> aarch64 -> riscv).
- The kernel can be changed freely without worrying about supporting drivers that cannot be updated because they only exist as binaries.
- Bugs in the drivers can be identified and fixed by anyone (most importantly, critical security bugs).
Also, good ABIs are hard to get right. Windows had to completely rewrite their audio subsystem and the associated driver interfaces around the time of Vista to get low-latency right, for example.
But that said, the use of binary blobs exists even today (CPU microcode, various driver firmware blobs that people don't have time to reverse engineer, etc.).
Someone else also mentioned ndiswrapper, which reimplements the binary interface for supporting Windows network drivers on Linux.
So you can pick any Windows driver interface and write a Linux kernel module or a combination of a kernel module and some userspace framework that can host and utilize that driver. You might have to emulate or paravirtualize some hardware access or instructions to avoid causing conflicts, but there's nothing technical stopping you, other than it just being hard. It can also never be included in the upstream Linux kernel for the ideological reasons I already mentioned.
Nice theory. It is just, that writing drivers is hard and not many people are capable of it. So for most existing driver issues, it will be much cheaper to buy new expensive hardware that might actually be somewhat supported for a while - than hiring someone to write a reliable open-source driver for it. (oh and of course, you also cannot buy the latest hardware as then there is mostly no support there yet)
I would love my whole system to be fully open source and working.
But since hardware is very closed anyway, I would rather have a couple more binary blobs on my system, that work reliable - instead of a bunch of open, but very faulty drivers. So I very much would prefer a stable Linux ABI.
Because without - I am forced to use Windows on my new Laptop, as everything runs much slower and buggier on linux - and I would like to use my laptop to work on other things - and not on the laptop itself.
There are a lot of old computers in research laboratories running Windows XP because some proprietary driver for some important piece of equipment (like a mass spectrometer) doesn't have a 64-bit version.
The closest examples so far with Linux are System76 and Purism:
https://puri.sm/products/librem-14/
This is also what makes the Surface tablets and Surface Book so great. There's a top to bottom alignment of interest in creating the best user experience and making sure the product works.
The closest thing to computing hell is when a commodity operating system is slapped onto the cheapest commodity hardware by someone who isn't concerned at all about using it, but has a list a mile long of systems to configure. There are plenty of enterprise IT-managed work laptops with no display or chipset drivers that can't hibernate, but at least they have McAfee virus scanner installed and the corporate group policy enabled.
I use my desktop OSes for my job, but could be perfectly happy with a Chromebook for most of what else I do in my life.
Yes, your type of grandma exists, but I don't know her.
Who (outside of HN readership) wants this?
I hardly doubt you are kernel developer yet you "know better". Such people always do.
By the way, Linux did well on Android because it is made there with "grandma" in mind.
Linux did well on Android because it does not suck. Mainline kernel boots hundred of models (postmarketOS). Another part mostly unchanged — browser. ChromeOS is Linux kernel and browser.
You've said hibernation is a matter ideological purity, no, it is a matter of practicality. You have to be kernel developer to understand practicality.
I've never said that.
I think this conversation is going nowhere, no reason to continue it.
"Ok, there are at least three versions of the Linksco WG8211, all with different wireless chipsets. The box is identical except for the UPC sub-label - you want the one ending in -02. Some of the -01 boxes might work, but no guarantees, and the -03 definitely doesn't have support yet. You can't tell by the PCI ID, but if you poke this particular register, you can get the sub-version, which should tell you which chipset they're using - if they haven't changed it again."
Wireless cards on Linux, back in the early days of 802.11, were brutal to get working properly, mostly due to lack of drivers. The NDISwrapper was gross and sometimes hard to configure, but it also meant you had a snowball's chance in hell of getting a random wireless adapter working on Linux.
The hal (hardware abstraction layer) is always a hard problem that takes years to get right. Write the code, write the tests, fix insane little bugs, get market momentum. Once it is solved it kinda runs itself and is a massive moat.
(Apple tried this... 95? StarTrek project, os 8?)
This collection of issues is why i run windows as a host os and above that run wsl (far better than mac's weird port of bsd + homebrew), local vms, and cloud servers.
Unless you want to talk about the difficulty that is high dpi monitors? That has taken 5 years for 'the windows community' to shake out and i don't think linux ever will. Windows is the best solution right now for this very important problem, unless you like fuzzy text fonts.
I am not a windows fanboi. Far from it. I have all the ecosystems in my house, and have professionally gone back and forth as the winds have shifted. It is amazing to me that windows has come back, credit vmware, docker, wsl, and microsoft's new openness to being a sensible first stop for developers.
Windows makes the hardware vendors implement it in the their device drivers, and the "system integrator" (laptop manufacturer) is responsible to verify that it works. The laptop manufactures (a) have a limited and known set of hardware to verify works and (b) have "leverage" (i.e. promises to purchase large quantities of peripherals) to ensure the hardware vendors fix any problems found.
Linux drivers don't get much hardware vendor love.
But damn the number of issues I have on linux in 2021 outweighs the amount I’ve had on Windows, ever.
Still prefer linux over windows tho.
That's part of where the whole "Have you tried turning it off and back on again?" piece of wisdom comes in. You never know what might have flipped out from under agter a hibernate. When you turn it Off off. You know.
Unless...you dual boot linux. I have an Envy 47 something whose wireless still can't get it right. So I just ran an ethernet cable to it. Traced it down to being because Ubuntu wouldn't clean out the hardware registers between hot reboots. It would be fine after a cold shutdown, but once the card got stuck in a bad state, not even a switch to windows could save you. I'd have to pull the plug to get all the registers clear, and start anew.
And that was how I learned it's never the hardware until it is.
But for example, I threw Kubuntu (21.04 beta) on my Lenovo Thinkpad X1 Extreme 3 days ago. I'm already running Ubuntu 20.04 on a different partition and it runs fine.
Kubuntu + Wayland, omg, clean install, firefox wont run properly at all, if you change to any other theme the menu bars disappear. Running X11, mad screen tearing and makes the fans spin up like crazy. Wont detect BT so can't use headphones. It's a headache :(
And those are mostly highly-integrated, full-intel computers.
I have a small HP with a thunderbolt / usb-c port. Thunderbolt kinda sorta works. Sometimes. But even if the display goes to sleep, it's game over.
I also have a usb-c monitor. I've only ever seen it work one (1) time in windows. On linux it mostly works. Sometimes it doesn't detect the correct refresh rate for some reason. But in the BIOS it always works. I could actually even install Windows with it. And it sometimes gets to the login page. But once the session launches, it turns off.
Have a Dell XPS for work. Sleep used to work fine, and the machine would barely touch its battery if I put it to sleep over a weekend.
It doesn't work any more: the machine never sleeps properly and drains its battery very quickly, barely making it from Friday night to Monday morning (and not making it at all if I don't plug the power in before I plug anything else in).
Note that this isn't a fault with the battery that I can see: battery life is still fine when the machine is being used. I can only assume that at some point over the past couple of years an OS or firmware/driver update broke sleep... which is annoying.
(It's one of many reasons I prefer OSX to Windows: sleep always works.)
Modern standby is turning on my XPS so much it can actually get dangerously hot in my backpack.
Also, snrk:
> Symptoms
> Microsoft introduced Modern Standby in 2012 to improve battery life and the transition between power states, allowing Windows PCs to transition between on/off states faster, like your smartphone does.
It's a knowledgebase article using a standard Support/Resolution template (that might not be changeable). The irony is thoroughly amusing and IMO appropriate.
I recommend the powercfg command line approach instead of the UI.
TLDR: "enables the system to stay connected to the network while in a low power mode" [...] "with the added benefit of allowing value-added software activities to run periodically" [...] "When a system service or background task requires network access, Windows automatically transitions the networking device to an active mode" [...] "longer active intervals occur for a variety of reasons, for example, processing incoming email or downloading critical Windows updates."
Details about what can temporarily activate Windows in Modern Standby at https://docs.microsoft.com/en-us/windows-hardware/design/dev...
Don't you have a way to disable it and go back to what Microsoft calls Traditional Sleep?
Yes, on some laptops, such as Lenovo, you can switch from "Windows" to "Linux" sleep mode in BIOS (yes, they are really named after the OS).
Here's the rub: you have to reinstall Windows. There used to be registry edit you could do but that seems to no longer work. At least it didn't for me.
No OP, but most of Dell's current lineup no longer has support for any other modes in the firmware. So no, I can't disable it.
So often what happens is nothing: the battery often drains completely overnight and it's guaranteed to be dead on Monday morning if I let it "sleep" on Friday.
http://rachelbythebay.com/w/2020/10/03/repro/
We've also had pretty awful state issues with Filevaulted Intel Macs from 2014 to present. While more consistent in their quirks than the myriad models and configurations of PCs, Macs haven't really done much to impress anyone but shareholders this past half decade or so.
What is totally annoying is my monitor, which has USB C power delivery, won't charge the laptop if its battery is completely flat. So now I have to carry the XPS's power adapter too.
I have been an XPS fan for years. But I am so close to sending this one back.
(If anyone from Dell reads this, pass back the message that you've lots of really unhappy customers from this)
* I raised a service ticket with Dell.
* They asked me to install the latest firmware for the XPS13 9310, dated 8 April 2021.
* That solved the problem: now I can close the lid and the laptop properly sleeps; I can put it in my bag without it getting noticeably warm; battery loses just a couple of % overnight, not 75% as it did before.
So irrespective of whether this 11th gen does S3 sleep or not, my laptop is now performing in line with what I expected.
Thus: thank you Dell.
S3 = traditional "suspend to ram"
S1 = new fangled "kind of sleep, instant on mode"
At least, thats what I found on a System76 Lemur Pro, which has the same cpu as the XPS13 (and System76 had to restore the IME, whereas before they used to disable it, just to get some semblence of sleep working)
Solution: get an AMD 4800 - powered laptop instead. Same price, double the cores (8 vs 4), much (much) faster and yet runs cooler.
And S3 sleep works!
Do not expect the issue to be fixed. People bought XPS's years ago thinking Dell would release a patch in some reasonable amount of time, but it never came.
If your use case involves a lot of time away from a charger, I would send it back. Maybe splurge a bit more for a Surface Book, assuming Microsoft cares a little more about putting out a well finished product.
Both my 2015 and 2018 MBPs probably once every 2 days, sometimes multiple times in a single day will resume from sleep to a hard reboot and a kernel panic message or "Your computer restarted because of a problem" message.
My windows desktop workstation manages just fine, but maybe I won the hardware combination lottery.
Once the machine went back sleep, I could not get the video signal back. All the other hardware would wake up fine, but I’d have to fully reboot to get video back.
The board vendor knows what they put on the board, they have support from the suppliers, etc... So it's a tractable problem for them even if the solutions are often ugly ad hoc hackery.
The community has none of that. They need to figure out all this stuff by reverse engineering in most cases.
But the point is it's not an "OS" problem. "Windows" doesn't do anything different from Linux. The difference is that if you ship hardware and people only pay for windows, then you only make windows work.
In my particular case, I have a HP Elitedesk 800 G4 mini (a small form-factor desktop) that sleeps, hibernates, etc perfectly on linux. Worked ever since it was brand new.
On windows, for some reason, it randomly turns on at night. I've tried deactivating pretty much all I could, including the option to wake up to install updates (and I usually install the updates fairly quickly anyway).
This also happens on an older custom-built PC. Random screen problems (AMD RX card) and / or previously unused USB ports don't work. Everything goes back to normal after a reboot. As this computer doesn't have a TPM, bonus points for the screen turning on bright blue in the middle of the night for bitlocker unlock.
Linux sleeps and hibernates perfectly on all my PCs (all some form of HP elitedesk or probook - I haven't tried those on the custom-built PC).
I've seen companies run shelves full of sleep-wake machines. sleeping and waking. sleeping and... yawn... waking.
Also if you don’t implement it or you implement it poorly and you’re not the size of Nvidia your drivers will not pass the checks and will not be signed, so your customers won’t be able to load them.