In 8 hours it uses 20% of the battery. When Windows or Mac are put to sleep, the damn things can sleep for a week! This is the case with Linux on multiple laptops.

Is there some kind of manipulation going by ring -1 that detects Linux is running? Is Linux not respecting some procedure and kissing a step?

you are viewing a single comment's thread
view the rest of the comments
[–] 75 points 8 hours ago (11 children)

If only going to sleep was simple. There's a bunch of different sleep states. S3 is ram and S4 is hibernate.

Check your supported sleep states. At the command line type cat /sys/power/state

https://www.kernel.org/doc/html/v5.4/admin-guide/pm/sleep-states.html

  • source
  • hideshow 11 child comments
  • [–] 2 points 2 hours ago (3 children)

    Is that true for Mac and Windows too? Why do I need to differentiate the two on Linux but not the others? Why isn't the default the better one?

  • source
  • parent
  • hideshow 3 child comments
  • [–] 5 points 1 hour ago (1 child)

    suspend to RAM (aka sleep) means the computer stays powered on in a very low-power state. Everything in memory is kept as-is, and it consequently draws a little power to keep the RAM active. This makes it very quick to enter this state and to wake up from it.

    suspend to disk (aka hibernate) dumps the RAM to disk, and then powers down fully. It takes a little while to dump all RAM to disk and also to restore it.

    So "the better one" depends on what works best for your particular circumstances. If you don't know and want a big corporate entity to make those decisions for you, stick with Microsoft and Apple products. If you would rather take the time to find out what's best for you, then go FOSS.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 41 points 6 hours ago (2 children)

    It also doesn't help that ACPI is a badly-designed mess of a standard. I remember that in the 2010s one of Apple's selling points was that their laptops had sleep and hibernation that worked every time. Heck, MacOS X could even decide intelligently when to do which. This mostly worked because they fully controlled the hardware, firmware, and software. Other laptop manufacturers could just take their best stab at implementing ACPI power states and hope their implementation matched Microsoft's.

    Microsoft tried to solve the mess by introducing the S0ix ACPI state (aka "Modern Standby"), which was defined in a way that could actually be implemented without too much guesswork. Unfortunately, this was during the Windows 8 era when Microsoft decided that laptops should be more like smartphones so S0ix is much closer to turning your screen off on a phone than to actual standby.

    The system randomly waking up and deciding to do work is an explicitly intended feature because what if you get a Teams message while your laptop is in your bag? Sure, you might say that you'd either have Teams on your phone or wouldn't immediately care but that kind of thinking won't get you anywhere within Microsoft. Also, Windows actually has very little restraint about what it does when it wakes up so it might decide to install a heavy update or an application might decide it's important enough to do work right now. While the laptop is in your bag. Cue you wondering if the laptop turned off because the battery's empty or because it overheated.

    And to make things worse Microsoft specified that in order to be allowed to use Modern Standby, the device must not offer S3 (sleep/suspend-to-ram). Some manufacturers still allow you to enable S3 but it's a legacy feature that's even less well supported than before.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 8 points 3 hours ago (1 child)

    The system randomly waking up and deciding to do work

    My work macbook did this by default as well, among other dumb things like leaving bluetooth enabled on sleep so my headphones would constantly connect to the laptop when on the train trying to listen to music.

    Thankfully the waking up thing is just a setting, but by default, imho, mac os's sleep is also garbage.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 1 hour ago*

    I've got Sony Bluetooth earbuds a few years back and I guess they have something called "multipoint" where they can connect to multiple devices at once. I had to Google why anyone would want that, but I guess it's to make switching between devices faster.

    Sometimes I'll be walking down the sidewalk with my earbuds in, connected to the phone in my pocket, and they'll just randomly make the sound it makes when connecting or disconnecting. Like I'm connecting to the BT of a random house or business I walked past that I never explicitly paired with.

    I can't exactly put my finger on why, but I find it very unsettling every single time and wish I could turn that feature off.

  • source
  • parent
  • [–] 2 points 3 hours ago (2 children)

    This is the one I was going to link.

    I have my laptop in s2idle mem_sleep most of the time because this boots quick and allows me to wake the computer by pressing a key on my USB keyboard plugged into a hub plugged into my dock into my laptop.

    And it gets from my office and back just fine on that. But if I'm traveling or something I'll switch it to deep mode before I leave so it actually actually goes to sleep in my bag.

    It takes extra time and jank to boot, and I have to wake it up by opening the lid, but if I'm traveling that's normal since I don't travel with my dock or USB keyboard anyway.

    This is one of those cases where it would be nice if the tech always did what I wanted, but I do actually want different things at different times, and so I do actually benefit from the control of being able to choose.

    My hardware doesn't support "shallow" sleep, for whatever reason.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 5 points 2 hours ago (1 child)

    The reason is, as usual, that Microsoft lobbied hard to make their way the standard way of doing sleep modes. Then, when implementing it, they strong armed all the OEM to make hardware fit their nonstandard, slightly off center, way.

    So, now windows kind of work with all hardware, but open source is fucked because to make the hardware actually work requires reverse engineering whatever custom crap windows does.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 1 hour ago

    The sleep stuff is part of the ACPI standard, it's all documented.

    It's up to the motherboard/SoC to support it properly, and Microsoft has an "entire system view" of how Windows works and can integrate it deeply. Compare that to Linux, the companies involved mostly care about servers, and the distros are assembled by disparate groups that don't have the hardware testing capability that MS or OEMs have.

  • source
  • parent