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.

  • @AllHailTheSheep@sh.itjust.works
    link
    fedilink
    English
    09 months ago

    ACPI is weird and sometimes hardware dependent, so it’s really hard to support it on every device. that’s my current understanding at least.

  • Midnight Wolf
    link
    fedilink
    English
    09 months ago

    Re the windows waking up, it’s likely a network card/chip to blame. You can disable the ability to wake inside Device Manager. Every time I had a system wake unexpectedly, networking was to blame.

  • @athairmor@lemmy.world
    link
    fedilink
    English
    09 months 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.

    • @fuckwit_mcbumcrumble@lemmy.dbzer0.com
      link
      fedilink
      English
      09 months 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
        09 months 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.

    • TVA
      link
      fedilink
      09 months 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.

    • d00phy
      link
      fedilink
      English
      09 months 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.

    • miguel
      link
      fedilink
      09 months 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.

  • @SheeEttin@lemmy.zip
    link
    fedilink
    English
    09 months 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.

  • @infinitevalence@discuss.online
    link
    fedilink
    English
    09 months ago

    Sleep on my minisfourm v3 is awesome with Linux. It correctly detects the keyboard cover, auto rotates based on the accelerometer and can be unlocked using the fingerprint sensor.

  • piefood
    link
    fedilink
    English
    09 months ago

    I haven’t used sleep on any of my laptops for >20 years because it’s been so unreliable. Rather than getting frustrated, I gave up pretending it would ever work, and adjusted accordingly.

  • notabot
    link
    fedilink
    English
    0
    edit-2
    9 months ago

    It’s been quite a while since I’ve used sleep on a laptop, but it worked well on my Dell (latitude I think, as I said, it’s been a while). It did take a little experimenting with sleep levels to get it reliable, but once it was it worked for years.

    ETA: I realise that saying “it worked for me” is probably intensely annoying, my appologies for that, but I thought a counterpoint might be a useful extra data point.

  • hendrik
    link
    fedilink
    English
    0
    edit-2
    9 months ago

    Maybe that’s more an issue with modern standby? Or the hardware has some quirks. The last two laptops I had were a Thinkpad and now a Dell Latitude. And they both sleep very well. I close the lid and they’ll drain a few battery percent over the day, I open the lid, the display lights up and I can resume work… Rarely any issues with Linux.

    • @arin@lemmy.world
      link
      fedilink
      English
      09 months ago

      Yes modern standby has burned my laptop in my backpack after the windows implementation… Insane

  • @diffusive@lemmy.world
    link
    fedilink
    English
    09 months 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
      09 months 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
        09 months 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
          09 months 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

  • @illusionist@lemmy.zip
    link
    fedilink
    English
    0
    edit-2
    9 months 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).

    • @cevn@lemmy.world
      link
      fedilink
      English
      09 months ago

      My system76 wont even go to sleep anymore. It just pretends, then if i put it in a backpack for a bit it is burning hot.

        • @cevn@lemmy.world
          link
          fedilink
          English
          09 months ago

          Possibly, tbh I spent a few hours on it and gave up, the laptop is due for a replacement anyways. It has other problems too, the touchpad connector is very flaky. Not sure I would go with them again…

          • @illusionist@lemmy.zip
            link
            fedilink
            English
            09 months ago

            Good to know, so far their on my buy list. Maybe not anymore :D My laptop is old but still works very good

            • @cevn@lemmy.world
              link
              fedilink
              English
              08 months ago

              Turns out that the touch pad was waking it up, once I fixed that sleep worked normally again. The only last issue is that the USB c port does not really work for charging so you have to lug their power adapter everywhere like a portable desktop. But if you could do USB to barrel power it would be completely fixed. Sometimes I have to apply strong downward pressure tl the touch pad but nbd.

              Spent 30 or so hours fixing all the issues with the laptop but now its great! Not for the faint of heart lol.

  • kadu
    link
    fedilink
    English
    09 months ago

    Because x86_64 and most BIOSes suck ass

  • @AlfalFaFail@lemmy.ml
    link
    fedilink
    English
    09 months ago

    On the Windows one, consider hibernating it. Its a longer wake up time, but it doesn’t wake up randomly.

  • @iopq@lemmy.world
    link
    fedilink
    English
    0
    edit-2
    9 months 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