5 ms·
> Ah, but when people say “power management”, what they usually mean is “suspend”. See, ancient x86 platforms (where “ancient” means “everything prior to 2015 o
by bityard 4y ago
> Ah, but when people say “power management”, what they usually mean is “suspend”. See, ancient x86 platforms (where “ancient” means “everything prior to 2015 or so”) don’t have reasonable real idle power management like Apple Silicon Macs do.
Well, I've been perfectly happy with the "ancient" power management of my computers. It took a decade or two until suspend/resume actually _worked_ most of the time, and now all of that has been swapped out wholesale by a set of states that are at least an order of magnitude more complicated.
Apparently on newer chipsets, there is no such thing as "suspend to RAM" anymore. Instead, they rely on the OS to micro-manage the sleep states of all the various component that make up the system. I can see this being effective in smartphones where one vendor (Apple, Google) owns the whole stack of hardware, firmware, and software plus a large chunk of every third-party application by tightly controlling what code can run. They can actually run functional tests on the whole stack under varying conditions and have access to every part to debug issues.
Heck, it probably works great on Apple computers for the same reasons. But on general-purpose computers made up of components from dozens of manufacturers running dog-knows-what software and drivers, I don't think it can ever work well. There is already lots of evidence that these "modern" intermediate sleep states are causing real problems not only for Linux users (poor battery life while running, high battery drain while suspended) but also Windows users whose laptops bake themselves to death inside a backpack because a toolbar widget or something woke the system up at 3 a.m. and it then decided to run Windows Update.
When I suspend my laptop, I want to know, with _certainty_, that it will stay suspended until I physically open it. From everything I've been reading, newer laptops offer no such guarantee. The only way to know that your computer won't wake up on its own is by powering it completely down, like we did in the 1990s. Not looking forward to that.
I am all for more power-efficient computers but introducing these new sleep states while throwing out the old ones completely really feels like some backwards pageantry.
- bombcar 4y agoPowering them all the way down doesn't even work sometimes; you have to physically open the case and disconnect the battery. It's really annoying.
- fnordpiglet 4y agoThat’s why I do all my computing on a Univac 1100/80. I’ve even hacked a clamshell for it so I can port it around.
- deaddodo 4y ago> Well, I've been perfectly happy with the "ancient" power management of my computers. It took a decade or two until suspend/resume actually _worked_ most of the time, and now all of that has been swapped out wholesale by a set of states that are at least an order of magnitude more complicated. This. I want suspend/deep sleep. I don't mind slow wake; and I definitely don't want bluetooth, wifi, etc running while it's supposed to be idle. 90% of the issues with Windows on Laptops waking and causing them to overheat in backpacks is because of this bullshit half-sleep/smart-sleep they've started adding and forcing users to live with. At least let me, as an informed person, choose to allow my laptop to suspend still.
- astrange 4y agoThere’s no cost to “bluetooth wifi etc” being on and not doing anything unless you’re operating an RF chamber or have the security needs of a head of state. It doesn’t significantly affect battery life; any time in your own life you’ve spent thinking about this would be better spent playing with your dog, or getting a dog so you can play with it.
- wtallis 4y agoKeeping WiFi and BT on usually means you're keeping the PCIe and USB links on (or at least waking up frequently), which means you're also preventing the processor from staying in a low-power state where all the IO is power-gated. Once the display is powered off, getting the rest of the components to be properly asleep can reduce idle power by another order of magnitude.
- astrange 4y ago“On” is a UI state though; the actual power state of the hardware is up to it, and its idle power usage can be managed by things like offloading idle tasks to the wifi SoC so they don’t have to communicate with the rest of the machine. That’s more well known for performance (where faster Ethernet interfaces do increasingly more offloading) but it works for power savings too.
- est31 4y agoThe weird thing is, not even Mac OS is doing it on that hardware: they just do proper S3 suspend. I think the advantage of this "modern standby" feature is that you can sometimes wake up and do some minor processing. But I'm not sure that linuxes actually make use of that functionality.
- smoldesu 4y ago> But I'm not sure that linuxes actually make use of that functionality. It's funny, the answer is both yes and no. I have a funky Skylake CPU in my current travel laptop, and one of it's cool party tricks is that Linux can drop the CPU into suspend state just by limiting the CPU to it's lowest frequency. I've seen it drop all the way down to 400mhz when leaving it alone, which gives me a chuckle. Totally useless for the "power nap" functionality you're thinking of, but ironically useful for certain other use-cases.
- est31 4y agoCan you expand on the use cases it's useful for?
- smoldesu 4y agoIf I'm watching video or editing text I'll often drop into the lowest availible CPU power setting to save on battery and keep the system below 30c.
- mjg59 4y agoRunning the CPU constantly at 400MHz is likely to consume more power than bursty workloads at full speed. There are various linked clock domains, and if the CPU cores can't get into low power states then neither can other bits of hardware on the SoC.
- yjftsjthsd-h 4y agoWho says the CPU is running constantly at 400MHz? I assume for video to work at all like that it must by bypassing the CPU, and text editing would look to the machine like "all CPU cores idle... waiting... waiting... oh, the user pressed a button, let's handle that for 50ms, okay now we can idle while we wait for the slow human to press another key..."
- kibwen 4y ago> Heck, it probably works great on Apple computers for the same reasons. Nope, the very first (and last) time that I suspended my Macbook and stuffed it in a backpack, it was hot to the touch when I went to go take it out. I looked online and everyone was just advising each other to power down every time they wanted to take their laptop anywhere. So no, Apple can't get it right either. FFS, will OS vendors please just let me hibernate to disk like the old days?
- rrdharan 4y agoYou can hibernate to disk on macOS (even with modern M1 Macs). It’s a pmset option.
- deleted 4y ago[deleted]
- astrange 4y agoIt is there, but hibernation is a pain to implement since it doesn’t have much in common with other OS functions, so eg device driver engineers don’t enjoy implementing/maintaining it much. It is useful in laptops as a last ditch effort to avoid losing data when the battery dies, but that’s one reason phones don’t implement it even though their batteries die much more often.
- minusf 4y agosorry to hear your bad experience. i close the lid multiple times a day on 2 m1 macbooks and i really have to rake my brains to remember when it failed. in 7 years i had the "taking it out hot from a backpack" exactly 1x (with intel). that's a track record i am super happy with. on the other hand i got macos black screens of death for a year as the last stage of every reboot... apple is by far not flawless. but i cant imagine using windows as a daily driver. the shit to put up with is just endless. and it makes my eyes bleed
- fshbbdssbbgdd 4y agoIn my experience, the macbook’s sleep mode isn’t very effective. But if I turn the machine entirely off and turn it back on later, it does a good job loading all my apps back the way they were. Functionally, the experience is similar to the old days of “hibernate”.
- mort96 4y ago> But if I turn the machine entirely off and turn it back on later, it does a good job loading all my apps back the way they were. ...If you don't really use the terminal at all, and don't mind a really slow "resume".
- fshbbdssbbgdd 4y ago> ...If you don't really use the terminal at all That’s valid. I don’t notice it, since I’m always ssh’d into a server. > and don't mind a really slow "resume". I remember wake from hibernate being pretty slow too. I can’t quantify it, but macOS boot feels like a similar delay to me.
- mort96 4y agoWake from hibernate is pretty slow, but wake from suspend to RAM is like a second or two on my Linux machines.
- bigDinosaur 4y agoIs this with an M1 (or related) machine? I've found sleep to be much better, Intel macs became an afterthought in the past 5 years.
- PartiallyTyped 4y agoI remember that an older machine, a core 2 duo laptop that I had could stay in deep sleep for weeks and it’d function just fine after. Modern laptops don’t seem to have this capability unfortunately. Both my Mac and Linux machine (even with windows) doesn’t seem to last as long these days.
- Const-me 4y ago> but also Windows users I’m a Windows user, and I can confirm. My HP ProBook 445 G8 laptop doesn’t support any of the proper S1-S3 sleep states. Luckily, I discovered that before any hardware has failed due to overheating, by reading the output of `powercfg /availablesleepstates` console command. To workaround, I have set up the OS to hibernate when the lid is closed, instead of going to sleep.
- bartimus 4y ago> Apparently on newer chipsets, there is no such thing as "suspend to RAM" anymore. Newer chipsets? Or AMD chipsets particularly?
- bityard 4y agoI don't know about AMD, but I'm pretty sure it's a thing with newer Intel chipsets (there was lots of hubbub about it when the Framework laptop came out, which I was following at the time).
- igneo676 4y agoThis is why I power down my laptop physically and ensure startup is speedy. You simply can't trust suspending the laptop to not jack up the overall stability of the system after wakeup or drain the battery unnecessarily or whatever unforeseen disaster awaits you. I can't stand other platforms comparatively. On Linux, I can start my laptop and be productive in the time other platforms take _to wake up from suspend_. No thanks