News for hackers. Stuff that matters.
Re:Ask HN: Why is the Linux community struggling to implemen... by gvb on Thursday April 08, 2021 @10:53AM (#26739472)
Hardware (peripherals) have state. Reading the hardware state is difficult and sometimes impossible so recreating that state correctly after powering down is very difficult. Then multiply that difficulty across all the different hardware that can be in a PC and it becomes extremely difficult to do on an arbitrary laptop/PC.

Add to that difficulty the fact that many hardware (peripheral) vendors provide incomplete documentation making it difficult or impossible to implement "off-nominal" situations like hardware state reading/writing-restoring.

VMs have an advantage that the peripherals are limited in types and numbers and the state is "virtual" so the state is directly accessible (r/w) in the virtualizing driver software, not buried in physical hardware. When you "hibernate" a VM, no physical device actually powers down and no (buried in hardware) state is lost.

Re:Ask HN: Why is the Linux community struggling to implemen... by addicted on Thursday April 08, 2021 @03:41PM (#26742847)
I think the non server Linux community needs a reference device.

Basically, you develop against that device, and it's upto hardware manufacturers to try and match the reference device to make their laptops/desktops compatible.

If you could get a couple of distro owners such as Red Hat, Ubuntu, Arch, etc. to agree upon such a device it would go a long way to resolving a lot of the issues that the desktop community faces.

Disclaimer: I have no expertise in this on either the hardware or software end so this idea might be completely nonsensical for all I know.

Re:Ask HN: Why is the Linux community struggling to implemen... by dylan604 on Thursday April 08, 2021 @04:17PM (#26743229)
>If you could get a couple of distro owners such as Red Hat, Ubuntu, Arch, etc. to agree upon such a device

I think I would rather (it'd be easier) to wrangle cats.

Re:Ask HN: Why is the Linux community struggling to implemen... by Pokepokalypse on Thursday April 08, 2021 @08:57PM (#26745645)
yeah. RedHat (owned by IBM) will surely step up to the plate here. . .
Re:Ask HN: Why is the Linux community struggling to implemen... by dylan604 on Thursday April 08, 2021 @11:38PM (#26746425)
I feel like there's a punchline coming, then realized that was the joke
Re:Ask HN: Why is the Linux community struggling to implemen... by gh-throw on Thursday April 08, 2021 @06:24PM (#26744581)
Red Hat would never participate. Their current (and for like the last decade or more) strategy seems to be to run toward various goals in convoluted and incompatible ways such that they're always "ahead" of everyone else, using their weight and the combined power of several projects they head to force the rest to burn resources playing catch-up with their meandering path to sub-optimal-but-sufficient solutions.
Re:Ask HN: Why is the Linux community struggling to implemen... by satellite2 on Thursday April 08, 2021 @06:45PM (#26744744)
Never heard that

Do you have any source? (Even if those are opinion based)

Re:Ask HN: Why is the Linux community struggling to implemen... by gh-throw on Thursday April 08, 2021 @07:52PM (#26745209)
Gnome, systemd and its increasingly-tight integration with same, plus its eating everything in sight, wayland conveniently leaving everything up to the DE/WM (but gnome works, so why don’t you just use gnome?).

Ubuntu also tried to do a bunch of their own stuff, but not very well and without this apparent overall strategy that Red Hat has. They seemed to just be trying to differentiate themselves, not to also drive everyone else nuts as they’re forced to try to keep up.

Re:Ask HN: Why is the Linux community struggling to implemen... by zaat on Thursday April 08, 2021 @08:15PM (#26745369)
Is Gnome driven by Red Hat? According to the project site the board and the advisory boards are not controlled by Red Hat employees, the Gnome foundation president isn't from Red Hat either, and the project is a GNU project.

Same question regarding to Wayland, from a shorter check I see that it is developed by the freedesktop.org which was founded by Havoc Pennington from Red Hat 21 years ago but it is seems that it isn't really under Red Hat control nowadays.

Re:Ask HN: Why is the Linux community struggling to implemen... by lmm on Thursday April 08, 2021 @09:42PM (#26745886)
It's hard to escape being de facto controlled by the entity that's providing the overwhelming majority of your development resources. The board doesn't have the time or expertise to take a position on deep technical questions, and the main contributors are Red Hat employees with a Red Hat worldview.
Re:Ask HN: Why is the Linux community struggling to implemen... by zaat on Friday April 09, 2021 @04:27PM (#26755684)
Red Hat is also the main contributor to the linux kernel, almost every year. Red Hat is probably the company with the largest contribution to the open source world at large, and it's been that way before most of the other big players of today were born.
Re:Ask HN: Why is the Linux community struggling to implemen... by silly-silly on Thursday April 08, 2021 @08:51PM (#26745602)
You're bringing logic into this, please stop. The propaganda narrative is to just bash Red Hat for any work done. Of course the company that employs many opensource people across the world is going to have some effect on the ecosystem.

The really funny part is that people think there is some metaphorical gun to developers heads to use this technology. There is a choice, there always has been.

Re:Ask HN: Why is the Linux community struggling to implemen... by gh-throw on Thursday April 08, 2021 @09:33PM (#26745843)
> The really funny part is that people think there is some metaphorical gun to developers heads to use this technology. There is a choice, there always has been.

Of course, but when the choices are "support A and B for C" or "support A and B for C but now it'll be a ton of extra work to package and maintain because C deliberately cut out A (and every other alternative that's not B)... or drop A and only support B for C, which is becoming popular fast anyway because it has lots of money behind it" then those two sets of choices aren't exactly the same.

"There's a choice" doesn't mean the choices & options aren't being nudged pretty hard.

> You're bringing logic into this, please stop. The propaganda narrative is to just bash Red Hat for any work done. Of course the company that employs many opensource people across the world is going to have some effect on the ecosystem.

I used to like them a lot, but at some point noticed I dislike an awful lot of the ways they influence the Linux desktop, and the tech they push, often by intertwining the projects they have influence over and driving them in ways that practically exclude and marginalize alternatives. If they changed I'd change my opinion. But yeah, I'm probably just some sort of simpleton.

Re:Ask HN: Why is the Linux community struggling to implemen... by taway098123 on Friday April 09, 2021 @10:08AM (#26750769)
These kind of comments are really baffling to me. If they have no interest or investment whatsoever in A, then what are they supposed to do? Can you blame any distribution for not wanting to put in all that extra work to package and maintain it themselves, for every single other piece of open source out there that someone might have a passing interest in? It's a business, they don't have infinite money to spend towards everyone's side project on Github. I wish they did but sadly, they don't.

I get that you feel excluded and marginalized but those may be misplaced emotions, if you were never a paying customer or a developer then you were probably never part of the club. It's just some company posting free stuff online, and you're welcome to take it or leave it.

Re:Ask HN: Why is the Linux community struggling to implemen... by gh-throw on Friday April 09, 2021 @10:35AM (#26751087)
> These kind of comments are really baffling to me. If they have no interest or investment whatsoever in A, then what are they supposed to do? Can you blame any distribution for not wanting to put in all that extra work to package and maintain it themselves, for every single other piece of open source out there that someone might have a passing interest in? It's a business, they don't have infinite money to spend towards everyone's side project on Github. I wish they did but sadly, they don't.

Were my terms too abstract? Systemd is written such that it's a pain in the ass to keep the multiple options for the several systems it replaces around, if a piece of software that's very important decides to go all-in on Systemd. Gnome did exactly this. Before that happened this problem did not exist. Systemd + Gnome created the problem, for any distros that wants to package them, forcing them to choose between a bunch of extra work or marginalizing anything that's not systemd. I'm not talking about "side projects on GH" but the ability to, practically, not theoretically, replace important parts a Linux system at all, or to write a new implementation that does things usefully-different from existing options because the spec is reasonably broad and the system loosely-coupled. Those are on their way out, and that's on purpose. Side projects on GH indeed. Haha. I think I see where the disconnect is, yeah. Maybe we're talking about totally different things?

> I get that you feel excluded and marginalized but those may be misplaced emotions, if you were never a paying customer or a developer then you were probably never part of the club.

Rad, I'll stop having an opinion or even noticing things that are happening because I'm not part of... what club is this? HN posters couching insults in armchair psychology to try to evade downvotes? Is that the club?

Re:Ask HN: Why is the Linux community struggling to implemen... by taway098123 on Friday April 09, 2021 @10:54AM (#26751298)
I completely disagree with your comment and I'm not talking about different things. There are a lot of side projects on Github to replace various parts of a Linux system, and various parts of systemd. They exist. What else were you talking about? When you want to replace something then you have to re-implement all its functionality. Systemd isn't any harder to replace than anything else, and it certainly didn't create the problem that someone has to actually put in the work to write the replacement. If it feels like too much extra work, then maybe ask yourself if it's really worth it to replace it to begin with? What are you really getting out of it?

The "club" is people who were invested in that particular project. If you're just a free user and you didn't have an active investment in pushing the project forward, then you're not in that club. Sorry, I don't mean to be blunt and I'm not trying to insult you, but the honest truth is that your opinion doesn't really matter unless you have the resources or the clout to push it forward. And if you did, then you'd be the one running the company, and then people would be complaining about how you're marginalizing them. Again I don't meant to be rude here or shut down your opinions or anything but let's just be real. Someone's got to foot the bill eventually, and when you're that person you get to be the one who says no, and then everyone else gets to be mad at you.

Re:Ask HN: Why is the Linux community struggling to implemen... by gh-throw on Saturday April 10, 2021 @01:19AM (#26759125)
> I'm not talking about different things. There are a lot of side projects on Github to replace various parts of a Linux system, and various parts of systemd. They exist. What else were you talking about?

So, we are talking about different things? Because most of the things I'm talking about pre-date Github.

> The "club" is people who were invested in that particular project. If you're just a free user and you didn't have an active investment in pushing the project forward, then you're not in that club. Sorry, I don't mean to be blunt and I'm not trying to insult you, but the honest truth is that your opinion doesn't really matter unless you have the resources or the clout to push it forward. And if you did, then you'd be the one running the company, and then people would be complaining about how you're marginalizing them. Again I don't meant to be rude here or shut down your opinions or anything but let's just be real. Someone's got to foot the bill eventually, and when you're that person you get to be the one who says no, and then everyone else gets to be mad at you.

Sweet, so I'm the everyone else who gets to be mad. Glad we agree I get to. For fuck's sake, I'm just pointing out a pattern of behavior a corporation is engaging in, which may be used to predict other things they may do. This is bizarre.

Re:Ask HN: Why is the Linux community struggling to implemen... by addicted on Thursday April 08, 2021 @10:58PM (#26746238)
Systemd is winning because it’s clearly a lot better than the alternatives.

Red Hat didn’t force it on any other distro. A majority of major distro makers chose it because it works really well for their purposes.

Re:Ask HN: Why is the Linux community struggling to implemen... by andagainagain on Friday April 09, 2021 @01:59PM (#26753786)
I assumed the majority of distro makers chose it because of red hat and canonical choosing it, making it a defacto standard.

Kinda like gnome, even though kde is more customizable and has more features.

Re:Ask HN: Why is the Linux community struggling to implemen... by antonvs on Friday April 09, 2021 @07:58PM (#26757612)
This seems like it could just be a case of Hanlon's razor. Software projects are quite capable of being convoluted and incompatible without any agenda having caused it.
Re:Ask HN: Why is the Linux community struggling to implemen... by afarrell on Saturday April 10, 2021 @04:01AM (#26759805)
Yes, but there would be a sufficiently-well-resourced agenda to mostly avoid convolution....except the incentive is misaligned.
Re:Ask HN: Why is the Linux community struggling to implemen... by sam0x17 on Friday April 09, 2021 @12:18AM (#26746661)
With the death of CentOS, is Red Hat really relevant anymore in the consumer space anyway? My gut instinct would be no but happy to be corrected if this is false.
Re:Ask HN: Why is the Linux community struggling to implemen... by Geezus_42 on Friday April 09, 2021 @12:29AM (#26746734)
CentOS isn't dead.
Re:Ask HN: Why is the Linux community struggling to implemen... by sam0x17 on Saturday April 10, 2021 @07:24PM (#26766231)
Re:Ask HN: Why is the Linux community struggling to implemen... by slrz on Sunday April 11, 2021 @12:44PM (#26771654)
So CentOS is actually getting better with a more open development model. Awesome.
Re:Ask HN: Why is the Linux community struggling to implemen... by edgyquant on Friday April 09, 2021 @12:36AM (#26746773)
Fedora?
Re:Ask HN: Why is the Linux community struggling to implemen... by pfranz on Thursday April 08, 2021 @09:47PM (#26745908)
Maybe not a single reference device, but there are fairly standard devices that are advertised, ship with, and offer support for Linux. The HP Z8 claims "Ubuntu. Certified and pre-installed." I've always run RHEL or CentOS on them and the company I worked for paid Red Hat for kernel customizations...so I figured there was comparable support. Yes, these are workstations, but HP says the same thing about their zbook. I've just never used those.

System76 manufactures computers exclusively for Linux. Dell XPS laptops are also pretty popular with Linux users. Thinkpads were historically, as well.

I would think you could get financial support for a few base models and enough widespread support for at least half a dozen hardware configurations.

https://www8.hp.com/us/en/workstations/z8.html

Re:Ask HN: Why is the Linux community struggling to implemen... by techrat on Thursday April 08, 2021 @05:42PM (#26744146)
>I think the non server Linux community needs a reference device.

Currently, as it stands, you'd need 10,000+ 'reference' devices to match what's in use and to wait several years for them to fall out of use if you want that to be a lower number.

Even Chromebooks, which are largely based on specific boards for several models, have a few hundred reference boards that would need to be specifically supported.

Re:Ask HN: Why is the Linux community struggling to implemen... by dirkt on Friday April 09, 2021 @01:49AM (#26747109)
> and it's upto hardware manufacturers to try and match the reference device to make their laptops/desktops compatible.

Good luck with that.

On most hardware I buy, I can read "compatible with Mac and Windows" on the package, but nobody seems to bother if it's compatible with Linux or not ...

Re:Ask HN: Why is the Linux community struggling to implemen... by infogulch on Friday April 09, 2021 @02:14AM (#26747227)
Maybe because "being compatible with Linux" doesn't mean anything specific. There's no spec so nobody can follow it... which is what GP is saying I suppose: Define a bar so people can try to aim for it.
Re:Ask HN: Why is the Linux community struggling to implemen... by minkiu on Friday April 09, 2021 @09:50AM (#26750557)
Wouldn't "Compatible with Kernel 5.11" be a pretty good/accurate bar? That is if they upstream their drivers or develop their closed sourced ones against certain kernel?
Re:Ask HN: Why is the Linux community struggling to implemen... by dolmen on Friday April 09, 2021 @04:55PM (#26756044)
Except that when you get the device in your hands, the kernel version advertised is in the very best case one year old. So irrelevant.
Re:Ask HN: Why is the Linux community struggling to implemen... by floatingatoll on Thursday April 08, 2021 @08:12PM (#26745348)
ARM9 SystemReady is designed to offer manufacturers of devices a way to target a "reference platform", where all compliant devices can be booted from a single kernel/os image. I detailed this out in a comment earlier this week, with PDF links, if you'd like to read more. I think they're specifically thinking of mobile phones and servers (and the Server spec is its own standalone thing, which is smart). https://news.ycombinator.com/item?id=26694321
Re:Ask HN: Why is the Linux community struggling to implemen... by brudgers on Thursday April 08, 2021 @08:44PM (#26745551)
Any hardware manufacturer deciding hibernation for Linux was worth doing would have done it already.
Re:Ask HN: Why is the Linux community struggling to implemen... by remexre on Thursday April 08, 2021 @04:41PM (#26743504)
Back in the day, this was basically how Thinkpads were, right?
Re:Ask HN: Why is the Linux community struggling to implemen... by Zak on Thursday April 08, 2021 @09:21PM (#26745790)
My recent-ish Thinkpad (T470) didn't give me much, if any trouble with hibernation on Linux. I can reliably use it to switch operating systems (dual-boot with Windows 10) without losing the state of either OS. I've had rare occasions where the presence of certain USB devices caused it to resume unexpectedly, but that's the only issue.
Re:Ask HN: Why is the Linux community struggling to implemen... by riffic on Thursday April 08, 2021 @05:15PM (#26743851)
I'd suggest today, raspberry is filling that role.
Re:Ask HN: Why is the Linux community struggling to implemen... by packetlost on Thursday April 08, 2021 @05:50PM (#26744257)
Sort of, but that's not a laptop.
Re:Ask HN: Why is the Linux community struggling to implemen... by ben0x539 on Thursday April 08, 2021 @07:37PM (#26745101)
Sounds like a great idea. I suggest that as a reference device we use this device sold by my company. :)
Re:Ask HN: Why is the Linux community struggling to implemen... by lmm on Thursday April 08, 2021 @09:44PM (#26745897)
Honestly if your company made a firm commitment to publishing the necessary specs, fixing reported bugs, and maintaining that stance going forward, then that would probably be a deal many open-source people would take.
Re:Ask HN: Why is the Linux community struggling to implemen... by Kalium on Thursday April 08, 2021 @03:43PM (#26742877)
That's a good idea! What do you think would convince hardware vendors to match a reference device?
Re:Ask HN: Why is the Linux community struggling to implemen... by dylan604 on Thursday April 08, 2021 @04:18PM (#26743240)
A large number of sales of said device. That's pretty much what drives any manufacturer.
Re:Ask HN: Why is the Linux community struggling to implemen... by kortilla on Thursday April 08, 2021 @05:35PM (#26744045)
In consumer space it’s probably 1 sale for every 100 Windows. If you’re constrained on engineering resources guess which one you won’t care about ?
Re:Ask HN: Why is the Linux community struggling to implemen... by zaat on Thursday April 08, 2021 @08:01PM (#26745273)
1 to 100 in the consumer space seems to me extremely optimistic, not sure if I'm betting that it's a 2 or 3 orders of magnitude miss.
Re:Ask HN: Why is the Linux community struggling to implemen... by yissp on Thursday April 08, 2021 @08:46PM (#26745569)
I know it's not representative of the consumer space as a whole, but Linux users apparently make up about 1% of the Steam userbase fwiw https://www.phoronix.com/scan.php?page=news_item&px=Steam-Li...
Re:Ask HN: Why is the Linux community struggling to implemen... by sdenton4 on Thursday April 08, 2021 @09:07PM (#26745723)
Yeah, but that 1% can choose either the Linux reference hardware or keep buying some other random laptop and throwing Linux on it.

So, the market is really rather less than that 1%...

Re:Ask HN: Why is the Linux community struggling to implemen... by zaat on Friday April 09, 2021 @04:38PM (#26755833)
Well, since Steam is the only gaming platform available on Linux, and since Steam is sold as a system based on linux with its own Linux distribution, SteamOS, and since Steam have its own version of Wine that magically runs Windows games on Linux, I would say that this statistic says nothing at all.
Re:Ask HN: Why is the Linux community struggling to implemen... by addicted on Thursday April 08, 2021 @04:20PM (#26743255)
It would be difficult to get the mainstream vendors to match this initially, but I suspect the Linux focused vendors like Pine and System76 would do so fairly rapidly.

The way to convince the mainstream vendors would be what's attracting them to release Linux support right now. The popularity of Linux devices for people who want to work on the same machines they run their servers on.

Like I said though, I'm not sure whether this idea is workable or even makes sense.

Re:Ask HN: Why is the Linux community struggling to implemen... by remexre on Thursday April 08, 2021 @04:35PM (#26743431)
I mean, Pine's and System76's laptops don't even use the same CPU architecture as each other currently...
Re:Ask HN: Why is the Linux community struggling to implemen... by jlg23 on Thursday April 08, 2021 @05:39PM (#26744094)
Some certification of genericity required for all future device purchases by publicly funded institutions, for example.
Re:Ask HN: Why is the Linux community struggling to implemen... by takeda on Thursday April 08, 2021 @05:49PM (#26744241)
That's what Microsoft did. Initially there were a lot of issues and also things like hibernation didn't always work right.

Linux needs to have similar certification. The rest would be to have customers look for it and prefer hardware that's certified.

Re:Ask HN: Why is the Linux community struggling to implemen... by zaat on Thursday April 08, 2021 @07:59PM (#26745255)
You mean something like this:

https://certification.ubuntu.com/make/Lenovo

Or this:

https://support.lenovo.com/il/en/solutions/pd031426-linux-fo...

It's all really very nice, but even on certified machines, some hardware parts are not working on Linux (X1 fingerprint reader, for example).

Re:Ask HN: Why is the Linux community struggling to implemen... by takeda on Saturday April 10, 2021 @03:47AM (#26759746)
> It's all really very nice, but even on certified machines, some hardware parts are not working on Linux (X1 fingerprint reader, for example).

But then I guess they aren't really doing their job when certifying things that don't work.

Re:Ask HN: Why is the Linux community struggling to implemen... by zsmi on Thursday April 08, 2021 @08:27PM (#26745440)
HW vendors that want to race to the bottom, sure.

But if I want to differentiate, commanding a higher price, then I'll probably be different.

Re:Ask HN: Why is the Linux community struggling to implemen... by kbumsik on Thursday April 08, 2021 @10:39PM (#26746144)
> I think the non server Linux community needs a reference device.

The question is, who is going to make this reference device? Intel? AMD? ARM?

Re:Ask HN: Why is the Linux community struggling to implemen... by jimmont on Friday April 09, 2021 @08:57PM (#26757957)
imo they already have them--they're all the unsupported macbooks
Re:Ask HN: Why is the Linux community struggling to implemen... by ducttapecrown on Thursday April 08, 2021 @06:12PM (#26744476)
Re:Ask HN: Why is the Linux community struggling to implemen... by woah on Thursday April 08, 2021 @05:52PM (#26744275)
Apple computers might actually be a good device for that role. Enough variability to cover most pricepoints, high quality build, consistent components.
Re:Ask HN: Why is the Linux community struggling to implemen... by barkingcat on Thursday April 08, 2021 @05:55PM (#26744312)
Good luck trying to get specs out of Apple.

Apple computers are some of the worst documented computers out there. Also, niche components, one-off chips, secret registers and unidentifiable chips on the logic board, the T2 chip alone is a nightmare for linux (and the T2 is on every Apple laptop since 2018). The M1 isn't even minimally documented yet, and reverse engineering it will probably take a decade.

Re:Ask HN: Why is the Linux community struggling to implemen... by rcxdude on Thursday April 08, 2021 @12:54PM (#26741074)
Also the amount of stuff the firmware does nowadays, especially on a laptop, is quite high. The OS-UEFI interface is quite complex and involves a fair amount of firmware code which keeps running after boot. This code is heavily involved in operations like suspend and hibernate, and is usually developed by the laptop OEM themselves, so quality is not very high and they have little incentive to test with anything other that windows. This results in a tendency towards fragility (even with windows), as well as worse battery life under linux.
Re:Ask HN: Why is the Linux community struggling to implemen... by cesarb on Thursday April 08, 2021 @12:11PM (#26740526)
And besides all that, hibernate is fundamentally more complex than sleep. With sleep, when waking up the computer resumes directly to the already loaded operating system in RAM, and the operating system "only" has to restore all the hardware state. With hibernate, the computer does a clean boot of a fresh copy of the operating system, which has to initialize all hardware, read the hibernation image, de-initialize (quiesce and/or power off) all hardware, and finally jump to the copy of the operating system found in the hibernation image, which only then will restore all hardware state.
Re:Ask HN: Why is the Linux community struggling to implemen... by salawat on Thursday April 08, 2021 @03:42PM (#26742861)
On top of that. All that state is written to disk, and if someone else goes romping through where you've written your hibernate state to, you get a corrupted state to restore to.
Re:Ask HN: Why is the Linux community struggling to implemen... by Izkata on Thursday April 08, 2021 @05:26PM (#26743957)
Speaking of disk, on a laptop where hibernate did work, I once ended up with more disk space available than there was in total, because it was mounted through the hibernate and I was using it from another OS. Lucky a reboot fixed that bit of weirdness.
Re:Ask HN: Why is the Linux community struggling to implemen... by liquidify on Thursday April 08, 2021 @10:55AM (#26739515)
how does winndows resolve these issues?
Re:Ask HN: Why is the Linux community struggling to implemen... by jodoherty on Thursday April 08, 2021 @11:01AM (#26739630)
Most hardware device vendors write Windows drivers and test them. Since they built the hardware, the vendor driver developers are privy to all the internals. Windows also has a stable ABI for drivers.

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).

Re:Ask HN: Why is the Linux community struggling to implemen... by panarky on Thursday April 08, 2021 @12:52PM (#26741051)
And even with all these advantages, my four month old Windows laptop fails to resume from hibernation 3 times out of 10. Sometimes wifi won't work, sometimes USB won't work, sometimes it just freezes.
Re:Ask HN: Why is the Linux community struggling to implemen... by PaulHoule on Thursday April 08, 2021 @01:59PM (#26741800)
Don't forget that "hibernating" a laptop with a lot of RAM might take long enough to run down your battery.

I think Hibernation has been impractical since 2013 or so.

Re:Ask HN: Why is the Linux community struggling to implemen... by wtallis on Thursday April 08, 2021 @02:13PM (#26741944)
It's basically impossible for hibernating a laptop to take more than about 5-6 minutes unless you deliberately configured it with insanely imbalanced components, ie. more RAM than mainstream laptop hardware platforms support, and the slowest storage you can find.
Re:Ask HN: Why is the Linux community struggling to implemen... by nitrogen on Thursday April 08, 2021 @02:46PM (#26742279)
Could still be a problem if you are expecting hibernation to save you at 1% battery remaining.
Re:Ask HN: Why is the Linux community struggling to implemen... by medstrom on Thursday April 08, 2021 @03:43PM (#26742876)
Especially when 1% is displayed as 5% or 10%.
Re:Ask HN: Why is the Linux community struggling to implemen... by PaulHoule on Thursday April 08, 2021 @03:54PM (#26743005)
The monster laptop consumes more power because it has all of that RAM, the battery is sized to "not cause a crisis on an airplane if it burns up" not to power a machine of that type, particularly after a year of battery aging.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by Delk on Thursday April 08, 2021 @03:00PM (#26742420)
SSDs have also been getting pretty fast, though.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by jimmaswell on Thursday April 08, 2021 @04:29PM (#26743365)
Really? Hibernate has never taken more than 30 seconds for me even on a mediocre laptop with an HDD.
Re:Ask HN: Why is the Linux community struggling to implemen... by snovv_crash on Thursday April 08, 2021 @05:44PM (#26744169)
My bog-standard PCIe laptop SSD writes at 3GB/s, so anything over 10s seems like it is an implementation problem not a hardware limitation.
Re:Ask HN: Why is the Linux community struggling to implemen... by lefty2 on Thursday April 08, 2021 @05:38PM (#26744086)
Strange. I never reboot, only use hibernation. I've been doing that for years and never had any problem.
Re:Ask HN: Why is the Linux community struggling to implemen... by hutzlibu on Thursday April 08, 2021 @08:43PM (#26745546)
You might want to share your setup then.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by 2rsf on Friday April 09, 2021 @03:56AM (#26747808)
Same, the main instabilities come when I go out of hibernation with changed hardware, ie. haven't plugged back the mouse or changed the display from desk to meeting room
Re:Ask HN: Why is the Linux community struggling to implemen... by Abishek_Muthian on Thursday April 08, 2021 @02:07PM (#26741875)
Also availability of drivers in Windows doesn't necessarily mean everything is comfy, certain manufacturers/BIOS vendors were notorious for not implementing ACPI correctly leading to several such issues; I hope with UEFI things have improved.
Re:Ask HN: Why is the Linux community struggling to implemen... by pharmakom on Thursday April 08, 2021 @12:39PM (#26740894)
I’m wondering if a clever solution of presenting the Windows ABI to drivers but translating to Linux calls under the hood would be feasible?
Re:Ask HN: Why is the Linux community struggling to implemen... by jodoherty on Thursday April 08, 2021 @02:08PM (#26741888)
It is, but the point of not defining a Linux ABI is to avoid proprietary, binary blob drivers and instead force drivers to exist in the upstream Linux kernel where they can be maintained by the kernel developers and freely distributed.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by hutzlibu on Thursday April 08, 2021 @09:02PM (#26745691)
"The kernel can be changed freely without worrying about supporting drivers that cannot be updated because they only exist as binaries."

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by jimmaswell on Thursday April 08, 2021 @04:36PM (#26743462)
There will never be a year of the Linux desktop if ideological purity (of a highly questionable ideology in the first place) continues to stay in the way of practicality. Grandma doesn't care if her network driver doesn't give her the whatever number of software freedoms as defined by RMS and honestly neither do I.
Re:Ask HN: Why is the Linux community struggling to implemen... by jodoherty on Thursday April 08, 2021 @05:28PM (#26743973)
It's easy to criticize the chosen trade-offs, but I would argue that Linux would actually be in worse shape today if it had taken the driver ABI approach and encouraged proprietary drivers. Many drivers originally upstreamed in the 32-bit x86 era would no longer be usable on amd64 had they been 32-bit proprietary drivers, and a good number of 64-bit proprietary drivers would be useless on ARM platforms like the Raspberry Pi.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by badsectoracula on Thursday April 08, 2021 @05:00PM (#26743697)
None of the issues mentioned are about some theoretical ideological purity, they're all about very practical pragmatic concerns. There are a lot of open source software that put some ideological purity above all other concerns, but the Linux kernel is certainly not among them - if anything they're among the most "flexible" when it comes to GPL compliance.
Re:Ask HN: Why is the Linux community struggling to implemen... by jodoherty on Thursday April 08, 2021 @05:49PM (#26744240)
If you really care about user experience, I recommend seeking out products made by companies that are vertically integrated, like Apple, because they have the power to curate the components of their products for maximum compatibility and support.

The closest examples so far with Linux are System76 and Purism:

https://system76.com/

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by pjmlp on Friday April 09, 2021 @05:37AM (#26748471)
That is what I thought when I decided to give money to Asus with 1215B pre-installed with Linux, I was wrong.
Re:Ask HN: Why is the Linux community struggling to implemen... by ben0x539 on Thursday April 08, 2021 @07:41PM (#26745140)
Grandma doesn't care about the year of Linux on the Desktop either because she probably just uses a macbook to manage the server farms that are running on Linux and won't need to hibernate.
Re:Ask HN: Why is the Linux community struggling to implemen... by phendrenad2 on Thursday April 08, 2021 @04:57PM (#26743667)
Honestly how old is "grandma" in 2021? Grandma is probably 60-70 years old, and likely grew up in the "space age" of computers. She likely has a Facebook and uses an Android phone. Grandma should take some time to learn the Linux way, she'll be a better computer user for it.
Re:Ask HN: Why is the Linux community struggling to implemen... by zaphar on Thursday April 08, 2021 @05:26PM (#26743954)
Why should she? Grandma primarily uses Facebook, Instagram, and Facetime. Grandma doesn't have a goal to become a better computer user in general terms. Linux gives effectively 0 value to her over any other OS. And negative value in a number of various ways. Driver support among them.
Re:Ask HN: Why is the Linux community struggling to implemen... by jfengel on Friday April 09, 2021 @10:07AM (#26750757)
At this point, I wonder if Grandma wants a desktop at all. Maybe Grandma just wants a tablet, perhaps with a keyboard. Tablet OSes don't really hibernate, but they use a lot less battery and have software designed to come back from a cold boot quickly.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by pvorb on Thursday April 08, 2021 @05:28PM (#26743972)
Or she doesn't care about computers and just wants to call her friends via Skype in a pandemic. Why would she care about becoming a better computer user?

Yes, your type of grandma exists, but I don't know her.

Re:Ask HN: Why is the Linux community struggling to implemen... by nl on Thursday April 08, 2021 @07:18PM (#26744959)
> she'll be a better computer user for it

Who (outside of HN readership) wants this?

Re:Ask HN: Why is the Linux community struggling to implemen... by sergeykish on Thursday April 08, 2021 @05:45PM (#26744195)
Linux is tremendously successful. You want to enforce restriction on kernel developers because of "grandma", that's impractical.
Re:Ask HN: Why is the Linux community struggling to implemen... by ridethebike on Friday April 09, 2021 @01:40AM (#26747071)
Linux is tremendously successful as server OS. Desktop - not very much, because of "grandma"
Re:Ask HN: Why is the Linux community struggling to implemen... by sergeykish on Friday April 09, 2021 @02:58AM (#26747467)
On server and Android, and IoT. Sleep is enough for my laptop.

I hardly doubt you are kernel developer yet you "know better". Such people always do.

Re:Ask HN: Why is the Linux community struggling to implemen... by ridethebike on Friday April 09, 2021 @09:58AM (#26750670)
One doesn't have to be kernel developer to acknowledge the fact that Linux on desktop is not doing very well.

By the way, Linux did well on Android because it is made there with "grandma" in mind.

Re:Ask HN: Why is the Linux community struggling to implemen... by sergeykish on Friday April 09, 2021 @03:49PM (#26755231)
Kernel is one of the best parts about Linux on desktop. It works. I've recently tried Windows, annoyed by hibernate, few seconds to wake up but sleep is instantaneous.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by ridethebike on Friday April 09, 2021 @06:34PM (#26757052)
>> You've said hibernation is a matter ideological purity

I've never said that.

I think this conversation is going nowhere, no reason to continue it.

Re:Ask HN: Why is the Linux community struggling to implemen... by voxadam on Thursday April 08, 2021 @01:11PM (#26741280)
Sounds a lot like NDISwrapper.[1] God, that was a pain in the ass.

[1]https://en.wikipedia.org/wiki/NDISwrapper

Re:Ask HN: Why is the Linux community struggling to implemen... by Syonyk on Thursday April 08, 2021 @02:16PM (#26741970)
I don't miss that. But it was better than the alternative at the time...

"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.

Re:Ask HN: Why is the Linux community struggling to implemen... by keanebean86 on Thursday April 08, 2021 @12:46PM (#26740971)
AMD tried something similar and the Kernel maintainers rejected the patch. At least that's how I understood it. I think this is a HN post about it: https://news.ycombinator.com/item?id=13142285
Re:Ask HN: Why is the Linux community struggling to implemen... by bbulkow on Thursday April 08, 2021 @12:57PM (#26741119)
As others have said, essentially by being the single os for a multibillion dollar pc industry for decades. I forget exactly when the hibernate api came online... 90's?... and Microsoft has a porting layer test suite as a manufacturer that you have to pass to get that little windows stamp. All done by paid professionals and spread over the cost of the large number of pcs sold.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by gvb on Thursday April 08, 2021 @11:02AM (#26739642)
Delegated and distributed responsibility.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by noen on Thursday April 08, 2021 @11:04AM (#26739675)
It doesn't, really. Hibernation and even the levels of "sleep" mode have and still have issues in Windows. I have a brand new Dell Precision workstation that still can't properly come back from sleep mode every time.
Re:Ask HN: Why is the Linux community struggling to implemen... by philliphaydon on Thursday April 08, 2021 @11:08AM (#26739748)
I haven’t had any issues with hibernating or sleep on windows with any device I’ve owned.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by salawat on Thursday April 08, 2021 @03:55PM (#26743013)
You've never had games that would only start and run without crashing from a clean boot?

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by philliphaydon on Thursday April 08, 2021 @11:46PM (#26746462)
I've never had that problem. :D

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 :(

Re:Ask HN: Why is the Linux community struggling to implemen... by rightbyte on Thursday April 08, 2021 @04:34PM (#26743428)
I dual booted Win10 and Ubuntu on my laptop and I could only use the dedicated graphic card in Ubuntu if I turned Windows off with the power unplugged. Maybe that was a symptom of similar properties?
Re:Ask HN: Why is the Linux community struggling to implemen... by selectodude on Thursday April 08, 2021 @04:59PM (#26743683)
Windows 10 doesn't completely turn off by default anymore. It closes all the applications and then hibernates the Windows system stuff so doesn't need to re-initialize everything on boot. There's a way to fully shut down but you'd have to look into that.
Re:Ask HN: Why is the Linux community struggling to implemen... by vladvasiliu on Thursday April 08, 2021 @01:05PM (#26741210)
Heh, as I've posted above, I've had the reverse. All kinds of weird broken behavior on Windows, everything works perfectly on Linux.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by bartread on Thursday April 08, 2021 @11:21AM (#26739910)
Same.

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.)

Re:Ask HN: Why is the Linux community struggling to implemen... by AzN1337c0d3r on Thursday April 08, 2021 @11:32AM (#26740068)
The reason is that Dell replaced S3 sleep with Modern Standby.

Modern standby is turning on my XPS so much it can actually get dangerously hot in my backpack.

Re:Ask HN: Why is the Linux community struggling to implemen... by exikyut on Thursday April 08, 2021 @12:06PM (#26740466)
"Modern Standby": https://www.dell.com/support/kbdoc/en-au/000177661/what-is-m...

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by bartread on Thursday April 08, 2021 @01:40PM (#26741603)
Thanks. This, and the GP, are helpful. Does naturally lead to the question of why in hell they'd implement this when, from my perspective as a user, it's much MUCH worse than S3 sleep.
Re:Ask HN: Why is the Linux community struggling to implemen... by rzzzt on Thursday April 08, 2021 @02:21PM (#26742016)
The Bay Trail Atom-based tablets used this, they behaved really like oversized x86 smartphones. When it works ;), it is quite impressive.
Re:Ask HN: Why is the Linux community struggling to implemen... by throwaway8581 on Thursday April 08, 2021 @02:55PM (#26742375)
You can enable Network Disconnected Modern Standby. Documented well at https://www.tenforums.com/tutorials/108378-add-networking-co... and https://www.tenforums.com/tutorials/146593-enable-disable-ne...

I recommend the powercfg command line approach instead of the UI.

Re:Ask HN: Why is the Linux community struggling to implemen... by gre on Thursday April 08, 2021 @12:28PM (#26740749)
My Macbooks have cooked themselves in my backpack plenty of times over the years.
Re:Ask HN: Why is the Linux community struggling to implemen... by bartread on Thursday April 08, 2021 @01:37PM (#26741585)
Sure, mine's done it occasionally (rarely enough to be a surprise when it does happen), but do they do it every single time you put them to sleep? I doubt it. My Dell does this every single time it goes to sleep. It's really aggravating.
Re:Ask HN: Why is the Linux community struggling to implemen... by cma on Thursday April 08, 2021 @03:26PM (#26742690)
If you use an SD card, Apple issued an update to have it cook itself every single time, and never enter hibernate, to sell more 2-3x markup native storage space. If you try to fix it, the next update will break it again.
Re:Ask HN: Why is the Linux community struggling to implemen... by pmontra on Thursday April 08, 2021 @12:05PM (#26740450)
I don't use Windows so I didn't know what Modern Standby is. I googled this page https://docs.microsoft.com/en-us/windows-hardware/design/dev...

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?

Re:Ask HN: Why is the Linux community struggling to implemen... by deckard1 on Thursday April 08, 2021 @01:00PM (#26741157)
> 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.

Re:Ask HN: Why is the Linux community struggling to implemen... by FeistySkink on Thursday April 08, 2021 @12:30PM (#26740769)
On ThinkPads it can be disabled in BIOS.
Re:Ask HN: Why is the Linux community struggling to implemen... by terinjokes on Thursday April 08, 2021 @07:11PM (#26744917)
> Don't you have a way to disable it and go back to what Microsoft calls Traditional Sleep?

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by pmontra on Friday April 09, 2021 @08:21AM (#26749594)
What happens if you install Linux? Does it stay in traditional sleep because there is no software in the OS to temporarily awake the computer?
Re:Ask HN: Why is the Linux community struggling to implemen... by terinjokes on Friday April 09, 2021 @12:59PM (#26752983)
The new Dell laptops only support "modern sleep". Linux doesn't support this very well, so while things look to go to sleep (eg, screens turn off) the system is still on, just idling. Since Linux doesn't have all the hardware support that Dell's drivers for Windows might, not all hardware devices are put into a low power mode.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by washadjeffmad on Thursday April 08, 2021 @10:01PM (#26745975)
Sleep doesn't always work on Macs. For instance, when the kernel panics because you shut the lid and stuffed it in your bag before you detached your USB-C mouse and keyboard, so it's overheated or dead by the end of your commute.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by novirium on Friday April 09, 2021 @12:43AM (#26746806)
Highly specific to Dell XPS laptops, but I used to have a similar issue to this. Eventually realised that the display wasn't actually turning off sometimes when I closed the lid. After much mucking around, it eventually turned out that in some of these laptops the magnet in the lid that triggers the "lid closed" action can become physically unstuck, and move around in the display housing (on my XPS 9350 this is in the bottom right corner of the display). Using an external magnet to jiggle it around both allowed testing to trigger the sensor and confirm the issue, and also to move it back to its proper location. Seems to work properly again now.
Re:Ask HN: Why is the Linux community struggling to implemen... by superjan on Thursday April 08, 2021 @05:04PM (#26743730)
Windows machines have the habit of waking from sleep after 3 hours, to do whatever and then fail to go back to sleep when they are done. I only use hibernate for that reason, on an Ssd resume is fast enough.
Re:Ask HN: Why is the Linux community struggling to implemen... by tssva on Thursday April 08, 2021 @05:33PM (#26744020)
I got rid of my MacBook about a year ago but when I had it sleep never always worked for me. My current current ThinkPad is just as reliable when sleeping as my MacBook was.
Re:Ask HN: Why is the Linux community struggling to implemen... by throwaway8581 on Thursday April 08, 2021 @02:57PM (#26742397)
Some XPS models from recent years have known sleep problems. There is essentially no fix. The best you can do is switch to "network disconnected modern standby." Search for my other post in this thread.
Re:Ask HN: Why is the Linux community struggling to implemen... by stevesimmons on Thursday April 08, 2021 @04:44PM (#26743530)
I bought a new Dell XPS13 two weeks ago and discovered the hard way - after totally flat batteries - that sleep mode doesn't work. Whereas my other XPS13, the previous year's model, works perfectly.

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)

Re:Ask HN: Why is the Linux community struggling to implemen... by stevesimmons on Thursday April 15, 2021 @05:44PM (#26826513)
Adding to my comment on my XPS13 7 days ago:

* 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.

Re:Ask HN: Why is the Linux community struggling to implemen... by isr on Friday April 09, 2021 @03:31AM (#26747649)
I believe that on (some?) Intel 11th gen chips, S3 sleep states are disabled, and only S1 works?

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!

Re:Ask HN: Why is the Linux community struggling to implemen... by throwaway8581 on Thursday April 08, 2021 @05:12PM (#26743811)
Sorry to hear it's happening in the latest generation product too. This is really disgraceful by Dell as the issue has been known about for years and they don't seem to care. Same with the crappy thermal pasting job that their factory does.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by whywhywhywhy on Thursday April 08, 2021 @04:21PM (#26743276)
I have issues on all the Macs I own too, it honestly seemed to work perfectly but about 3 years ago maybe they all became unreliable after some OS update, I want to say maybe High Sierra.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by MattGaiser on Thursday April 08, 2021 @11:05AM (#26739692)
Yep. I have a Surface for work. It just reboots when you tell it to hibernate or even sleep.
Re:Ask HN: Why is the Linux community struggling to implemen... by terhechte on Thursday April 08, 2021 @11:48AM (#26740240)
I have a gaming PC with Windows and Linux. "Sleep" on Windows fails every second time for me (the screen is off but the machine continues to run), whereas on Linux it fails every ~10th time. No idea what the issue is but I have fairly standard hardware. On the other hand, I can't remember the last time sleep didn't work on any of my Macs.
Re:Ask HN: Why is the Linux community struggling to implemen... by crummel on Thursday April 08, 2021 @04:12PM (#26743181)
How long are you giving it for sleep to actually turn off? "Hybrid sleep", which is on by default now, can look like this - the monitor and peripherals will turn off first and then it can take another minute or so while the machine writes out its RAM for the hibernate portion.
Re:Ask HN: Why is the Linux community struggling to implemen... by the_only_law on Thursday April 08, 2021 @12:49PM (#26741009)
I had an odd issue with Windows sleeping on one of my machines a while back.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by gsich on Thursday April 08, 2021 @02:04PM (#26741848)
Sleep might not be hibernate. If it's just standby some device (Mouse, ethernet ...) might wake it instantly.
Re:Ask HN: Why is the Linux community struggling to implemen... by rdc12 on Thursday April 08, 2021 @07:55PM (#26745225)
My old T420 couldn't sleep overnight in Windows 7 (something would trigger a resume), but would sleep fine under Linux and FreeBSD.
Re:Ask HN: Why is the Linux community struggling to implemen... by ajross on Thursday April 08, 2021 @12:37PM (#26740853)
They make it the OEM's responsibility. The board integrator tests hibernate, sees that it fails, checks the docs, eventually figures out that it's the driver for (just to invent a random example) their oddball audio codec forgetting to reset the RST_OR_BADSTUFF register on hardware reset, so it starts pushing bad data at the hardware DMA controller which confuses the media stack.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by vladvasiliu on Thursday April 08, 2021 @12:59PM (#26741154)
Meh. For what it's worth, Windows doesn't always do this right either.

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).

Re:Ask HN: Why is the Linux community struggling to implemen... by c0nsumer on Thursday April 08, 2021 @06:20PM (#26744548)
'powercfg /lastwake' (in Windows) will tell what woke it up.
Re:Ask HN: Why is the Linux community struggling to implemen... by passivate on Monday April 12, 2021 @12:22AM (#26776033)
I haven't had an issue with hibernation on W10. Its likely that you have third-party software/drivers installed that are messing up the OS. Have you tried to troubleshoot?
Re:Ask HN: Why is the Linux community struggling to implemen... by tyingq on Thursday April 08, 2021 @10:59AM (#26739587)
I had to disable "Fast Startup" in Windows because it would make WSL lose its mind. So whatever they are doing, it has issues as well.
Re:Ask HN: Why is the Linux community struggling to implemen... by danieldk on Thursday April 08, 2021 @02:26PM (#26742057)
Here, the trackpad is broken after fastboot 1/2 times (basically registers button presses all the time, making it unusable). Without fastboot no such issues, plus modern machines boot fast even without fastboot ;).
Re:Ask HN: Why is the Linux community struggling to implemen... by tffgg on Thursday April 08, 2021 @12:28PM (#26740758)
Wsl1 wsl2 - No issue with fast startup, sleep or hibernation
Re:Ask HN: Why is the Linux community struggling to implemen... by dboreham on Thursday April 08, 2021 @10:18PM (#26746057)
Similar experience, except there is a time of day drift issue that afflicts docker. It's a single magic powershell command to fix, once you Google the error and find the right SO article.
Re:Ask HN: Why is the Linux community struggling to implemen... by tyingq on Thursday April 08, 2021 @12:56PM (#26741107)
Sure, though it's not just me. Plenty of issues in the WSL github repo and results from Google.
Re:Ask HN: Why is the Linux community struggling to implemen... by _trampeltier on Thursday April 08, 2021 @06:30PM (#26744620)
Even windows has sometimes troubles with it. On work with my HP ZBook and the HP Docking Station I had many, many crashes and bluescreens allways, when I the external monitors felt asleep. Now, no monitors goes blank ever and since then everything works fine.
Re:Ask HN: Why is the Linux community struggling to implemen... by 6gvONxR4sf7o on Thursday April 08, 2021 @11:56AM (#26740347)
My windows think pad has had a super buggy hibernation for a few years. Better than Linux laptops I’ve tried, but still not at all solved. Only my mac seems to get hibernation right.
Re:Ask HN: Why is the Linux community struggling to implemen... by ghshephard on Monday April 12, 2021 @09:48AM (#26779382)
I don't believe the latest version of macOS supports Hibernation anymore. At least I couldn't get it working with an hour or two of finagling/googling around.
Re:Ask HN: Why is the Linux community struggling to implemen... by aksss on Thursday April 08, 2021 @12:56PM (#26741114)
Closed hardware platform, no coincidence there.
Re:Ask HN: Why is the Linux community struggling to implemen... by m463 on Friday April 09, 2021 @02:06PM (#26753861)
Pay people to fix these i-hate-my-life bugs.

I've seen companies run shelves full of sleep-wake machines. sleeping and waking. sleeping and... yawn... waking.

Re:Ask HN: Why is the Linux community struggling to implemen... by sigg3 on Thursday April 08, 2021 @02:48PM (#26742311)
In my experience, it doesn't. Hibernation is a hit and miss on Windows too, just less so.
Re:Ask HN: Why is the Linux community struggling to implemen... by tinus_hn on Thursday April 08, 2021 @03:58PM (#26743049)
With Windows 10 shutdown means hibernate so if it’s flakey you’ll crash every time.

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.

Re:Ask HN: Why is the Linux community struggling to implemen... by ironmagma on Thursday April 08, 2021 @04:30PM (#26743375)
When does restoring state become a necessity as opposed to just disconnecting the devices upon hibernate and reconnecting them afresh when the device wakes up?
Re:Ask HN: Why is the Linux community struggling to implemen... by bboreham on Friday April 09, 2021 @02:03AM (#26747169)
If there is a running process using that device before/after hibernate, it needs to know it should re-configure it. There is currently no way to pass this information to a Linux process, and quite a task to add the feature to all existing programs.
Re:Ask HN: Why is the Linux community struggling to implemen... by ironmagma on Friday April 09, 2021 @01:04PM (#26753047)
Right, that seems more tractable than trying to restore the actual state of the device though which sounds like a different problem.
Re:Ask HN: Why is the Linux community struggling to implemen... by test6554 on Thursday April 08, 2021 @04:22PM (#26743296)
Why not create a low-level hardware state interface layer that linux uses to save/restore hardware state. The attitude could be "it's not linux's job to fix your hardware" At first nothing would use it and it would be basically useless, but eventually manufacturers would add support. In the meantime, Another layer on top of this low layer could be created to make older hardware compatible. For hardware that is worth the effort, people could write drivers or other things that could bridge the gap between hardware and the low-level interface.
Re:Ask HN: Why is the Linux community struggling to implemen... by chousuke on Thursday April 08, 2021 @04:30PM (#26743385)
The problem with that is that it doesn't work. People will buy the cheap broken hardware and then complain that Linux doesn't work. That's basically how it is already.

I'm pretty certain ACPI is supposed to be at least one part of such a "hardware state layer" already, but as far as I know broken implementations are more common than functional ones.

Re:Ask HN: Why is the Linux community struggling to implemen... by njibhu on Thursday April 08, 2021 @04:34PM (#26743429)
This wouldn't be a silver bullet, many hardware have their own controllers, with their own firmware and their own state that the kernel cannot directly control. And for the same type of hardware some might have a full reset with a power cycle, and other might not. For some reference you can look at the GPU reset bug for navi 10 and below.
Re:Ask HN: Why is the Linux community struggling to implemen... by m463 on Friday April 09, 2021 @02:04PM (#26753843)
I remember things like getting initialized by at boot cleanly vs coming back from sleep and having to remember the no-boot-state setup.

It's like savegames - I think it's hard and bug-ridden so some folks just add checkpoints and don't bother with complex restores in the middle of the bossfight with rockets in the air.

Re:Ask HN: Why is the Linux community struggling to implemen... by whatever1 on Thursday April 08, 2021 @04:38PM (#26743475)
Have no clue from hardware, but why we cannot take a full memory snapshot to the hard disk and then just load it back bit to bit ?
Re:Ask HN: Why is the Linux community struggling to implemen... by H8crilA on Thursday April 08, 2021 @04:40PM (#26743494)
The "memory", or more like "relevant state" is spread across lots of hardware pieces. It's not just RAM. Saving all RAM blocks is indeed easy. Consider the RAM of the graphics card as an example, it can have lots of complicated structures stored by the running programs.
Re:Ask HN: Why is the Linux community struggling to implemen... by saltedonion on Thursday April 08, 2021 @10:41PM (#26746155)
Can’t this also be said about windows. How do they solve this problem ?