And it’s crap across the OSes. On Linux laptops don’t wake up from sleep, on Windows they keep waking up when nobody asks for it.

In our home office room there’s three laptops. My private one running Fedora, my work PC that sadly runs Windows and my wife’s laptop also running Windows.

My work laptop and my wife’s laptop keep waking up wasting electricity, and my private laptop needs a hard reset to wake it up every second time.

That feature should be stupid simple, yet it doesn’t work across the board.

Rant over.

  • ter_maxima@jlai.lu
    link
    fedilink
    English
    arrow-up
    18
    arrow-down
    2
    ·
    7 days ago

    I have had no issues with sleep on macOS, so whatever they are doing we should try to copy !

    The same MacBook air, that used to last over a week with the lid closed on macOS, now needs to be charged every 3 days on Asahi NixOS.

    Linux is a much better operating system, even just for the sheer variety of software available, but power management isn’t quite there yet in my experience on this laptop.

  • Treczoks@lemmy.world
    link
    fedilink
    English
    arrow-up
    11
    arrow-down
    2
    ·
    edit-2
    6 days ago

    wakes up when nobody asks for it.

    Wrong. You might not have asked for it, but it is not your computer, it’s Windows’ computer. Microsoft decides when it wakes up.

  • GreenKnight23@lemmy.world
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    2
    ·
    edit-2
    7 days ago

    my guess is because the CPU power levels are fucking trashed because of all the patches they have to run at runtime. before Intel went all “wild west” with their security practices to improve performance, sleep worked just fine for me.

    keep in mind, this was before uefi too, so it might also have a hand in the problems.

  • illusionist@lemmy.zip
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    edit-2
    7 days ago

    Never had I problems with sleep. Neither with arch, suse, fedora nor ubuntu. Neither with Gnome nor with kde.

    Not even with windows.

    Must be the hardware (brand).

  • Wahots@pawb.social
    link
    fedilink
    English
    arrow-up
    5
    ·
    7 days ago

    It’s amazing how bad Linux and Windows are at sleeping on my laptops. My steam deck has a power drain issue too, even when fully powered off.

    • sunzu2@thebrainbin.org
      link
      fedilink
      arrow-up
      4
      ·
      7 days ago

      My steam deck has a power drain issue too, even when fully powered off.

      Noticed this too… Does not feel very off

      • Wahots@pawb.social
        link
        fedilink
        English
        arrow-up
        2
        ·
        5 days ago

        It feels like everything is running on a VM, and the hypervisor is running constantly. Or something odd like that.

  • Burnoutdv@feddit.org
    link
    fedilink
    English
    arrow-up
    4
    ·
    7 days ago

    This is purely anecdotally and pretty worthless as a guide or anything, but i got it working perfectly on my framework laptop running kde neon (basically Ubuntu with kde as de in rolling release mode) But its basically archeotech, past me followed a bunch of hints in the framework forum, did some unknown configuration and now it works reliable through all other updates since at least 20 month, battery holds around a week or so sleeping i think

  • curiousPJ@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 days ago

    My laptop refuses to stay asleep if fstab disks were disconnected prior to sleeping. It works perfectly fine for me now that I figured that out.

    Just one more weird behavior with fstab and kde or Linux or arch? I don’t know who to blame.

  • iopq@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    2
    ·
    edit-2
    6 days ago

    My laptop uses 0.07w sleeping, draining about 1.8% of the battery per hour. I would say that’s acceptable with 32GB RAM s2idle

    Framework 16 on NixOS

  • Daemon Silverstein@calckey.world
    link
    fedilink
    arrow-up
    0
    ·
    7 days ago

    @squaresinger@lemmy.world It’s probably because my kernel version is very old (5.14.11-arch1-1, haven’t updated since 2019, even though it’s Arch, a rolling-release distro) and my Acer laptop is old as well (Intel Core 7th gen), but I rarely have problems regarding laptop sleep. After I wake the laptop up, the video (including every VT#) may get frozen and I have to remotely SSH and request a reboot (and when this happens, sometimes the reboot gets stuck as well, so I have to do a hard power-off). But it’s very rare, as stated, and I daily put my laptop to sleep without issues, sometimes the system uptime stretches to weeks (currently, my system was booted almost four days ago).

    • squaresinger@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 days ago

      It does work fine too on my 2010 EEE PC running Antix running on a 5.10.x kernel. Seems to be more an issue with newer devices, since every single laptop I own that’s newer than maybe 2013 has these issues.

  • athairmor@lemmy.world
    link
    fedilink
    English
    arrow-up
    68
    ·
    7 days ago

    And it’s crap across the OSes.

    Never had these problems with MacBooks. It’s probably one advantage of the OS and hardware being made by the same company.

    • miguel@fedia.io
      link
      fedilink
      arrow-up
      22
      ·
      7 days ago

      I noticed the same. The old macbook that I restored to become my ‘writing’ machine can sit asleep for a week (as I found out by accident) and just pops right up when opened. My windows and linux laptops have so many sleep issues.

    • d00phy@lemmy.world
      link
      fedilink
      English
      arrow-up
      17
      ·
      7 days ago

      Agreed. For all the downsides people point out with Mac’s, they handle this and battery life quite well. My daily driver is a Mac, and everything I connect to runs some flavor of Linux. Then there’s the Windows 11 thing my work foists upon me.

    • TVA@thebrainbin.org
      link
      fedilink
      arrow-up
      13
      ·
      7 days ago

      Agreed, I disable sleep on all laptops other than my MacBook and my work laptop which manages to drain its battery and overheat itself on my bag semi frequently.

      The MB has never had negative issues with sleep.

    • fuckwit_mcbumcrumble@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      2
      ·
      7 days ago

      Macs aren’t immune to S0 sleep options. The Apple silicon CPUs are just so efficient that when it fails to fall to sleep it doesn’t matter. Intel ones it sucks balls when it fails.

      • ChokingHazard@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        7 days ago

        Even my Intel MacBook Pro slept like a champ. They aren’t 100% immune but 99.95% I didn’t have an issue compared to my work windows laptop which was like 25% sleep worked and woke up correctly.

  • SheeEttin@lemmy.zip
    link
    fedilink
    English
    arrow-up
    45
    ·
    7 days ago

    The problem is it’s not stupid simple, it’s actually fairly complicated. Each piece of hardware and its driver must be suspended. The GPU is a particularly tricky one. Its processor must be suspended, and the state saved. In the kernel, the driver must suspend its execution, and likewise save its state. Then on resume, each half has to reload and begin execution again. And if there’s any mismatch in the resumed states, the GPU and/or driver crash and probably take the kernel with it.

    Now do that for the Wi-Fi, Bluetooth, sound card, USB, disk controller, and every other device.

  • diffusive@lemmy.world
    link
    fedilink
    English
    arrow-up
    21
    arrow-down
    2
    ·
    7 days ago

    I researched this in (checking notes) 2009 or so… things may have slightly changed since (and my memory is fading away)

    At the time there was a standard for sleeping. Microsoft was part of the standard… and then they decided to implement in a different way (classic Microsoft, of course).

    Hardware producers then adjusted to windows because… well… we were dozens of us using Linux on laptops.

    This created issues in Linux because there were some purist developers that wanted to follow the standards, others that were more pragmatic and wanted to implement the windows way. In the end nothing worked.

    Fast forward to today, windows waking up constantly I guess it’s broken as expected because it wants to allow background processes to do stuff. Linux not waking up sounds still the issue from 2009: there are multiple levels of sleep and the deepest was the most problematic. If I have to guess your laptop wakes up just fine if the battery is full and you left closed for few minutes… while it doesn’t when the battery is low-ish and/or you left sleeping for a longer period

    • glimse@lemmy.world
      link
      fedilink
      English
      arrow-up
      9
      arrow-down
      1
      ·
      7 days ago

      It’s waking up because another device on the network (probably router) is pinging it

      Disable “Wake on Magic Packet” and the Windows sleep issue goes away

      • diffusive@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 days ago

        This kind of stuff must happen at hardware level… wake on lan is in hardware.

        Ethernet cards keep in getting packets (arp at very least) even if they are not directed for them. If the OS needs to check all packages it would be always on

        That said… wake on lan is also a waste of energy if you don’t need (why powering the Ethernet cards?)

        • glimse@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          7 days ago

          The setting I am suggesting gets disabled keeps the card powered during sleep so Wake on LAN can work on a hardware level.

          The OS isn’t checking the packets. The NIC gets a packet and wakes up the OS.

          I am not defending it, just explaining how to stop it from happening. A lot of people who know what Wake On LAN is don’t know about Wake On Magic Packet

      • chunkystyles@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 days ago

        Yeah, but classic Windows move: it’ll work for a while and then it will randomly stop working.

        This was one of the big things that pushed me to Linux. Not feeling like I was the one in control of my PC.

  • floo@retrolemmy.com
    link
    fedilink
    English
    arrow-up
    18
    ·
    7 days ago

    Sleep function works pretty flawlessly on macOS. Always has. The hibernation function is pretty great, too.

      • floo@retrolemmy.com
        link
        fedilink
        English
        arrow-up
        9
        ·
        7 days ago

        I remember that. It was so cool.

        I really miss when Apple made devices that had those awesome little touches. I still think Apple devices are pretty great, but they used to be better.