Hacker News new | ask | show | jobs
by ohthehugemanate 648 days ago
I've been on the "modern standby" hate train for as long as it's existed. Not because it's such a terrible idea per se. You can debate that if you like. I hate it because it fundamentally changes the behavior behind an existing API (lid close, suspend button, or ACPI S3 trigger, take your pick) without warning, and in most cases, without the ability to get the old behavior back.

Regardless of a valid use case for "modern standby", there is DEFINITELY a use case for "old suspend to RAM" and "old hybrid suspend to RAM", which have de facto been blown away by the change.

I have no problem with adding a new sleep state that makes sense for other users. Go ahead and add S22 for that exotic sleep state manufacturing robots use between shifts. S344 for bluetooth devices waiting for reconnection. Whatever, I don't care. But don't replace an existing PRIMARY UI PATTERN with them.

To be fair this is not on microsoft for inventing S0, or even pushing for it for windows devices. It's on device manufacturers like Dell and Lenovo for dropping S3 from UEFI in favor of it.

7 comments

I learned about this workaround a while back on some throwaway comment on a youtube video, and from what I can tell it really works. I never bothered to really look into system logs or whatever to verify what was going on.

But in a nutshell, unplug your laptop before you close the lid. Windows does not suspend to modern standby when that happens. I always had an overcooked and dead laptop at the other end of my commute, which went away when I started unplugging first. Now my windows machine can go literal days in sleep mode without really impacting remaining battery that much.

which points to a absurdity of s0, it seems to consistently miss or have bugs in things I would expect to be core aspects like

- monitoring if power is unpluged

- monitoring if battery level sings below threshold

- monitor CPU temperature

and take appropriate actions, like transitioning to "classical" S3 or better hybrid S3

it's totally a misterious for me how that doesn't work well even 10 years later

I mean bugs which idk. unexpectedly drain a bit more battery etc. are to be expected but I would expect the UEFI to be like "uh that's too much CPU heat lets stop here", "uh that's draining the batter too fast let's stop", "uh only 40% batter better not even try anything". And sure you want hello to work even with <40% battery but that's if its enabled, which often it isn't.

Yeah you are right, my little "hack" is really something that makes it less terrible, but it does not make it as nice as traditional S3 sleep. The fact that this sleep mess is still so buggy and annoyance prone beggars belief.

This might be an urban myth so read with a pinch of salt, but there was a line of Dells at some point that warned to not close the lid without a proper shutdown, because it'll literally cook the LCD and cause permanent damage. Dell decided this was the right course of action for this problem.

I think that wasn't just a urban myth, like AFIK (and that could be wrong) it did happen but only rarely and only under certain conditions etc.
This does work, however it’s really not ideal for Windows machines using a dock (which is usually the power connection) and external monitors. If you unplug first, all your windows get moved to the single laptop display, but if you close the lid first, everything is where it was when you resume.
I wonder if switching to a different user before undocking might somehow insulate your main-account desktop from the shift.

I remember there used to be utilities that could save and restore icon positions, but perhaps that was only for good versions of Windows.

> It's on device manufacturers like Dell and Lenovo for dropping S3 from UEFI in favor of it.

Note that even CPU manufacturers no longer provide firmware development support for making S3 work on recent series of CPUs. (Apparently some get an exception, as I’ve heard of some laptops from large brands that are sold with Linux and do have S3 support in the firmware.)

why should they spend engineering effort it their target platform (windows) doesn't really support it? You can't blame Intel for this one
Device manufacturers just want windows to run. And why wouldn't they? They sell the devices with windows. If windows doesn't use S3 then S3 never gets tested, whether it's present or not. So it doesn't work, whether it's present or not, and you can't use it, whether it's present or not.
What's the market share of windows on laptops these days, 20% perhaps? I don't know, but I know that Chromebooks and Macos are ahead, far ahead.

Once upon a time, there were fifty times as many Windows laptops as Linux (by which I mean debian, mint, etc) and Linux was ignorable. Now the factor is closer to ten, and I find it difficult to believe that device manufacturers simply ignore that. If they don't support S3, there likely is a better reason than the dominance of Windows.

Might I ask where you get these numbers from?

I don't like using Windows, and I would like them to be a smaller player. But if I search for "desktop" operating systems share world wide I get numbers that are way way different.

some show that Windows is around 70%.

I read "close to ten" as ten Windows machines per one Linux machine, so Windows would be 91%. 70% would be terrific news, mote than one fifth.
91% of what? Windows has been losing market share to tablets and macs.

Anyway, if you as CTO tell the CEO that testing with Linux will get you access to x% of the market, the CEO answer will obviously depend on x. As Windows loses market share to tablets and macs, x increases, and it becomes less plausible to suggest that vendors are simply ignoring Linux because it's small.

> Windows has been losing market share to tablets and macs.

We are talking about laptops. Not tablets.

Windows has been losing market share to Macbook-s at about one percent each year, so good luck reaching your 20% in your lifetime.

From the visitors to a large company's web sites. High-traffic sites, general public with a little bit of skew towards high earners, nothing can be named.
Reading your other comments I see where you're getting from. And if you're indeed adding phones and tables Apple and MS are both at a ~20% (android has an overwhelming +50% by the way) from the same sources I looked at before.

If you just look at "desktop/laptop" Windows still reigns supreme.

Now the question is could be: should you include those for this discussion or not?

Yes because lots of people use them. No because the conversation was about laptops.

regardless, I now understand your point

> I know that Chromebooks and Macos are ahead, far ahead [of Windows].

Perhaps in the US, though I doubt it. Chromebooks are not even sold in a lot of places. Apple products are much more expensive (relatively and absolutely) in the rest of the world.

So what?

Pretend that you know someone at your bank who can answer the question "what devices do people use for your online banking?" You don't need to really ask, you already know the answer: For a while it was overwhelmingly Windows on PCs/laptops, now Windows has been pushed to a minority position by smartphones, tablets and macbooks.

You might say that those don't count, but I think that for a device manufacturer they do count. I have private and work smartphones and laptops, mine are made by three different manufacturers, all three make both phones, tablets and laptops. AFAICT that's typical. There are exceptions (such as Dell) but overall, the markets overlap so much that most manufacturers need to regard it as one market with different nïches.

They are not one market, in any sense. The vast majority of adults in the country own both a computer and a phone. I'm not sure how they could possibly be treated as competing with one another.

Within the market of personal computers (not the fictional market of personal computers combined with other devices that aren't personal computers), Windows has very dominant market share.

> They are not one market, in any sense.

I agree, but there is a venn diagram here. Many use cases are covered by both products. As time goes on, the venn diagram gets closer to a circle. An iPhone of 2008 was a niche device, but nowadays you can complete 99% of tasks completely on an iPhone (yes I made up 99%, just pretend it's some number higher than it once was).

I think, for most adults, their primary personal computer is a smartphone. Many, not sure of the numbers here, don't own a laptop or desktop at all. They may have one for work, though.

> To be fair this is not on microsoft for inventing S0, or even pushing for it for windows devices. It's on device manufacturers like Dell and Lenovo for dropping S3 from UEFI in favor of it.

It's like they don't even use their products

Oh who am I kidding, if they used they would notice all the bloatware on it and the shoddy build quality, etc

How do you hibernate with zram file? Is a seperate swap partition necessary for hibernating?

Even if I create 200% swap file, I get `Call to Hibernate failed: Not enough suitable swap space for hibernation available on compatible block devices and file systems` on fedora 40.

You can't hibernate with zram, the kernel has no way of distinguishing zram swap and normal swap space.
I've concluded that it's a HW driver bug after trying out creating swap file, adding resume device and offset to grub; even tried setting SELinux to permissive.

It tries to go into hibernate but immediately wakes up.

There are others in Fedora forum who have had successful hibernate with Zram & swapfile.

I didn't find anyone else with my laptop Asus ROG Strix Scar 16 (2023) with successful Hibernate either on our Linux discord.

Yet another reason why I prefer zswap to zram swap. When properly tuned, it's really great.
> But don't replace an existing PRIMARY UI PATTERN with them.

You might be new to Microsoft (and Google). /s

I think somedody told them that you cannnot sale the same GUI for more money so they keep "inovating".

Modern standby has existed for longer than ACPI did when modern standby was introduced.

Yes I know ACPI was ratified in 1996 but it didn't ACTUALLY exist until 1998 and I would argue it wasn't actually implemented until early 2000 for enterprise users and 2001 for consumers.

Every single criticism, every single one, levied at modern standby was also made against pre-modern standby ACPI.

In addition to that, tech luminaries too numerous to count ranted for years and years and years that ACPI was a secret evil plot by the NSA to I don't know, kidnap your dog or something. That's not an exaggeration. That actually happened 20+ years ago.

> Modern PCs are horrible. ACPI is a complete design disaster in every way. But we're kind of stuck with it. If any Intel people are listening to this and you had anything to do with ACPI, shoot yourself now, before you reproduce.

Linus Torvalds, 2003. https://www.linuxjournal.com/article/7279 He's talking here about pre-modern standby ACPI, the standard everyone loves and misses today and writes long articles eulogizing.

I'm going to chalk this up to people hating change for the sake of hating change.

edit: I'm actually gonna chalk this up to hating for the sake of hating. I know, you know, and I know that you know that if old-skool BIOS was the standard, Hacker News would be flooded with 10,000 word Medium articles about how the evil tech companies are conspiring to keep our systems insecure so the NSA can kidnap our dogs and if pre-Modern Standby was the standard there'd be stories hating on that too.

It's like how haxxors reminisce about the days when the CPU bus was exposed on a port or card-edge connector out the back of a machine and everything was "so free and open" but when a modern interface with 1/10,000,000,000th the number of vulnerabilities is introduced those same people hate on it.

Nobody is mad that "modern standby" exists. We're mad that actual standby is no longer supported on modern hardware. It's very annoying to have to hibernate a laptop when you put it in a bag or else it will overheat and possibly crash.