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?

top 50 comments

sorted by: hot top controversial new old
[–] 8 points 1 hour ago*

No idea if this applies to a lot of laptops, but on my HP with an i5-8350U every Linux distro I've tried seems to come configured using s2idle instead of deep sleep, and battery will drain very quickly even in 'sleep' mode.

If running cat /sys/power/mem_sleep returns "[s2idle] deep" then you can add mem_sleep_default=deep to your kernel args and it will actually go to sleep properly.

On Fedora this was sudo grubby --update-kernel=ALL --args="mem_sleep_default=deep" but it varies by distro.

Why it seems like every distro I've used has this set incorrectly I do not know, it's baffling.

  • source
  • [–] 2 points 30 minutes ago

    Too much screentime before bed?

  • source
  • [–] 2 points 45 minutes ago

    Debian has worked fine on my old laptop, probably only a few days for me but the battery is a decade old or so.

  • source
  • [–] 6 points 2 hours ago (1 child)

    I've only used windows at work in the past 10 years or so but my windows experience with sleep was far far worse.

    My laptop would always wake up in my bag on my hour+ commute. The laptop would be scorching hot and the battery dead by the time I got to the office. Every time.

    Never experienced that in Linux.

    Recently I switched to a Linux computer at work and it's much better in every regard.

    My personal desktop (runs arch (btw)), did have some trouble with sleep recently tho...I replaced my 5700G with a 5600X3D and it would refuse to wake from sleep, necessitating a hard shutdown (by PSU switch!)...but I think that was a bios bug. My bios was already very close to latest but I think upgrading that was what ultimately fixed it. Now it works fine.

  • source
  • hideshow 1 child comment
  • [–] -1 points 43 minutes ago* (2 children)

    SWAP avenger here. And they said SWAP partitions were old hat.. Pah!

    I have an Acer Swift 3:2 running Manjaro with a swap partition encrypted with LUKS2. I recently got a new laptop so poor old Swifty been languishing in a messenger bag.

    The important distinction here being that my lid is tied to hibernate, not sleep, because fuck sleep mode.. why do I want my laptop in "low power mode"? So I can charge it as soon as I open it? No thanks!

    Three months pass. Crap can't seem to connect to my VNC over SSH, hmm, what to do.. I wonder if my Acer can connect?

    Pull old Swifty out of the bag, open it up, enter decryption key, it's on in moments, 95% battery.

    Skill issue? (I'm joking, or am I?) 🐸

  • source
  • hideshow 2 child comments
  • [–] 12 points 5 hours ago

    When Windows or Mac are put to sleep, the damn things can sleep for a week!

    When I put my Windows work laptop to sleep, it damn well can sleep for a week. In fact, it sleeps so well that you could fell a tree next to it and it still wouldn't wake up.

    They should really rename that button to "coma". "Sleep" implies you can wake it up.

  • source
  • [–] 76 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
  • [–] 6 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
  • [–] 42 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
  • [–] 9 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
  • [–] 3 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
  • load more comments (1 reply)
    [–] 74 points 8 hours ago (2 children)

    Your system goes to sleep and wakes up? My system goes to sleep and then crashes. We are not the same

  • source
  • hideshow 2 child comments
  • load more comments (1 reply)
    [–] 33 points 7 hours ago (6 children)

    Windows doesn't sleep. Ever. Sleep is now just a nickname for Modern Standby, which is just running in low power mode doing a whole bunch of shit. The amount of times I come back to my laptop and it has gotten stuck at a reboot is just embarrassing. I dual-boot and have Grub, so whenever Windows tries to reboot itself it gets stuck.

    People have gotten their laptops damaged because they thought they were sleeping and put them in a bag, when Windows decides to try to update itself while the fans are blocked inside the bad. Bam, heat damage.

  • source
  • hideshow 6 child comments
  • [–] 12 points 6 hours ago* (5 children)

    Shouldn't modern laptops have temperature sensors and just deal with it in some way? I had this happen to me a few times with my old Thinkpad from 12 years ago. Threw it into the backpack in a rush and an hour later I'd pull it out, hot and doing something I didn't want it to do... But it never suffered any kind of damage from that. Was just very annoying.

  • source
  • parent
  • hideshow 5 child comments
  • [–] 10 points 5 hours ago (3 children)

    You can't interrupt Windows Update either. So, rock meets hard place?

  • source
  • parent
  • hideshow 3 child comments
  • [–] 5 points 5 hours ago

    Sure 😆 In the meantime I found a solution for all the Windows Update debacle. Bought a newer laptop, went home and just wiped the entire SSD before installing Linux. Now I don't get any dual-boot or Windows update. Also goes to standby 100% of the time. ¯_(ツ)_/¯

  • source
  • parent
  • [–] 1 point 4 hours ago (1 child)

    I would expect overheating protection to occur at the hardware level: first downclock the CPU and forcibly just halt if heat gets critical for too long.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 3 hours ago* (last edited 3 hours ago)

    Sure but the update can already have done some stuff, leaving your machine in a half-updated and maybe corrupted state. If downclocking doesn't work there really isn't a good solution here.

    Edit: oh wait there is, DON'T UPDATE WHEN SLEEPING. And on top of that, just don't update without my explicit approval at all. Thankfully I run linux where, if it's not the default already, it's a config value away.

  • source
  • parent
  • [–] 11 points 5 hours ago (6 children)

    I recommend using hibernate (suspend to disk): your computer will "sleep" for 10 years without draining. The only cost is about 7 seconds to boot on modern hardware. For short interruptions with instant wakeup, you can still use light sleep states.

    It combines perfectly with LUKS-encrypted root and swap partitions: your data is safe even if someone steals your computer and swakes it up.

  • source
  • hideshow 6 child comments
  • [–] 2 points 4 hours ago (2 children)

    I've found full shutdown and subsequent boot up on my current Bazzite setup takes less time then hibernate used to in Windows 10 on the same PC. Haven't even felt the need to look into setting up swap (Bazzite uses zram by default).

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

    full shutdown and subsequent boot up on my current Bazzite setup takes less time than hibernate

    maybe, but a full shutdown and reboot does not restore all your apps, open documents, terminals etc exactly as they were.

  • source
  • parent
  • [–] 0 points 2 hours ago* (1 child)

    Hibernate doesn't work with secure boot/kernel lockdown for $REASONS, a lot of folks can't even use it. Supposedly if Linux can determine you're resuming from an encrypted partition it will work, but I was never able to get it to work with a swap file on BTRFS on LUKS

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

    True, kernel developers should resolve the Secure Boot issue with hibernation, but the development focus is on servers, not laptop computers. Also, hibernation should probably use a dedicated hibernate image file instead of requiring a huge swap partition. That being said, it works regardless of hardware capabilities if you turn off secure boot and just configure a LUKS-encrypted SWAP partition. You should figure this out before you install the OS.

  • source
  • parent
  • [–] 17 points 7 hours ago (1 child)

    I once did a deep dive on sleep mode for some problem a friend was having. I'm now convinced it might be the worst thing I've ever seen in modern computing. It's globally horrendous, poorly implemented, and causes random problems in unfathomable places. It's amazing it ever works at all.

  • source
  • hideshow 1 child comment
  • [–] 43 points 8 hours ago

    It's mostly a mix of newer laptops not supporting suspend to RAM (only suspend to idle), and faulty hardware requiring proprietary hacks to actually go idle.

  • source
  • [–] 26 points 8 hours ago (5 children)

    Always wondered this. My steam deck dies in a day if put to sleep or hibernate.

  • source
  • hideshow 5 child comments
  • [–] 17 points 8 hours ago*

    Really, hibernate as well? On my linux desktop and laptops, hibernate completely cuts the power. It's definitely possible that this works differently for a handheld device, though, and I don't think I even tried using hibernate on an ARM device.

  • source
  • parent
  • load more comments (1 reply)
    [–] 21 points 8 hours ago (1 child)

    I just want the option to put my Linux laptop into S3 ACPI power State. Daim you modern W11 hardware and S0!!!

  • source
  • hideshow 1 child comment
  • load more comments (1 reply)
    [–] 4 points 5 hours ago (2 children)

    My previous laptop was fine - it lost a few percent per day. Now with s0ix, it's more like 10 or 20% per day. Is just turn it off if it weren't fit the fact that it also takes ages to boot for some reason. Sigh. And hibernate doesn't work with an encrypted disk.

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

    Windows has same problems. Its hot bag syndrome. Issue lies at hardware and firmware level. FYI my T480 configured for deep sleep looses only 1% per day sleeping.

    I didn't configure hybernation though.

  • source
  • hideshow 1 child comment
  • load more comments
    view more: next ›