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?

  • Maestro ( Maestro@fedia.io ) 
    link
    fedilink
    arrow-up
    47
    ·
    2 months ago

    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.

    • hendrik ( hendrik@palaver.p3x.de ) 
      link
      fedilink
      English
      arrow-up
      12
      ·
      2 months ago

      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.

        • hendrik ( hendrik@palaver.p3x.de ) 
          link
          fedilink
          English
          arrow-up
          9
          ·
          2 months 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. ¯_(ツ)_/¯

        • dbdr ( dbdr@nord.pub ) 
          link
          fedilink
          English
          arrow-up
          3
          ·
          2 months ago

          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.

          • Ghoelian ( Ghoelian@piefed.social ) 
            link
            fedilink
            English
            arrow-up
            6
            ·
            edit-2
            2 months 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.

      • rumschlumpel ( rumschlumpel@feddit.org ) 
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        2 months ago

        I’ve been using it pretty consistently for years, I achieve uptimes upwards of 60 days like this. The downside is that it takes kinda long to enter that state and there’s a chance that it fails to enter it (though it doesn’t crash, just goes to the screenlock), especially on my laptop - it refuses to go into hibernation unless I kill most webbrowser windows, especially stuff like YouTube.

        And you do need a pretty large swap space; with those super long uptimes, even swap size = ram size isn’t always enough, because sometimes the swap space is actually used as swap and not just as hibernation image storage.

      • tomenzgg ( tomenzgg@midwest.social ) 
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 months ago

        Works great with HP Elitebooks G3–G4; honestly, worked great on any HP I’ve used. Might’ve worked on the Dells I’d used but they had other problems and didn’t last very long so I don’t remember.

        But I’ve largely used older laptops so I’m not sure if the hardware, specifically, may have anything to do with it.

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

    • fdnomad ( fdnomad@programming.dev ) 
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 months ago

      I kept losing tons of battery on my steam deck even when turned fully off. I had to disable quick boot (in the bios) and its been better but of course takes longer to boot

  • Baggie ( Baggie@lemmy.zip ) 
    link
    fedilink
    arrow-up
    23
    ·
    2 months ago

    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.

  • teawrecks ( teawrecks@sopuli.xyz ) 
    link
    fedilink
    arrow-up
    22
    ·
    2 months ago

    Worth noting that this is also an ongoing issue with windows. Only apple has actually solved this, and they do so by owning the whole stack. Each apple product has a specific OS, CPU, and motherboard that were all specifically designed with the end-product user-experience in mind.

    But for PCs, the OS, CPU, and motherboard are all designed and built by different companies, each only designed to be generically compatible with the other components. None of them are designed for a specific end-product, so features that require all of the components to play perfectly together for a specific end-user experience (like sleep state) often end up not quite aligning.

    None of this helps you, but I think it’s worth understanding why the problem exists and why it may just always exist. The best bet is that companies like System76 or Valve solve sleep states for specific linux-based products, and then the rest of us maybe hopefully see some benefit from that.

    But IMO this is just a trade-off. It’s like a pick 2 situation between Customization, Stability, and Privacy (where a reliabile sleep state is Stability). You can have stability and customization, but you’ll probably pay a lot, and the company who sold it will want telemetry data to improve the experience for others. You can have stability and privacy, but the product will be very locked down to a specific use case to ensure a stable experience.

  • moth ( moth@anarchist.nexus ) 
    link
    fedilink
    English
    arrow-up
    19
    ·
    2 months ago

    moth doesn’t know what CPU you use, but newer AMD chips don’t support S3. AMD removed that because they think modern suspend is better, an opinion that doesn’t seem to be shared by the consumers.

  • TehPers ( TehPers@beehaw.org ) 
    link
    fedilink
    English
    arrow-up
    18
    ·
    2 months 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.

  • Taasz/Woof ( MangoPenguin@lemmy.blahaj.zone ) 
    link
    fedilink
    English
    arrow-up
    15
    ·
    2 months 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.

  • Linda R ( Lehmuusa@nord.pub ) 
    link
    fedilink
    suomi
    arrow-up
    14
    ·
    2 months ago

    On my Linux computer I just close the laptop’s lid and it goes to sleep, consuming almost no battery power. I can open it hours later and have basically the same amount of battery left as before.

    But some laptop manufacturers have proprietary systems in place for the sleep mode that are not supported in Linux because it would be a gargantuan effort when the laptop manufacturer refuses to coöperate.

  • HelloRoot ( HelloRoot@lemy.lol ) 
    link
    fedilink
    English
    arrow-up
    14
    ·
    2 months ago

    I rarely put my linux to sleep because I had this experience in the past, but yesterday I’ve had my minisforum v3 laptop in sleep for 3 hours and it stayed fully charged at 100% battery. It made me think the battery percentage readout was broken, but no, it strarted draining after using it for a while.

    No clue if it’s something I did back then during install (arch linux btw) or whether it was like this out of the box, but it really surprised me. And I’m gonna try using it more in the future.

    • In my experience, it’s probably a hardware/driver thing. Lenovo laptops are generally really good, but the sleep still drains the battery at the usual rate that forces you to keep an eye on it every day. However, Framework seems to have a pretty amazing battery life during sleep. My guess is, Framework has done something right, and the kernel is able to handle power states way better than any laptop I’ve ever owned.

      It’s clearly not about the custom tweaks either. I’m running just plain Debian KDE, and I haven’t tinkered with the power settings at all.

        • Hamartiogonic ( Hamartiogonic@sopuli.xyz ) 
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          2 months ago

          That’s really odd, because I thought Fedora would have better drivers.

          Apparently, the settings would be the next place to look for answers. My settings are really boring and conservative.
          When laptop lid is closed: sleep
          Nothing special there, so I really don’t know what makes this hardware+software+settings combination unique. I have another computer I use for tinkering, and this one is specifically meant to be the boring one, hence Debian. Turns out, that somehow resulted in amazing stand by time, and I don’t even know how.

  • parsimon ( parsimon@programming.dev ) 
    link
    fedilink
    arrow-up
    13
    ·
    2 months ago

    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.

  • JasonDJ ( JasonDJ@lemmy.zip ) 
    link
    fedilink
    English
    arrow-up
    11
    ·
    2 months ago

    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.