• chaospatterns@lemmy.world
    link
    fedilink
    English
    arrow-up
    28
    ·
    2 days ago

    On Windows the system wakes up when connected or disconnected from an AC adapter. On Linux the system will momentarily wake up but immediately go back into suspend.

    I get why this could be a source of bugs, but if I unplug my laptop while its asleep why would I want it to turn on?

    • Scoopta@programming.dev
      link
      fedilink
      arrow-up
      24
      ·
      2 days ago

      Yeah I agree here. I’d expect my laptop to stay asleep if it was asleep to begin with. Also I find it kind of annoying that in order to fix bugs they have to change Linux to mimic windows, especially when it’s a situation like this where the change specifically results in a different behavior which is noticable to users.

    • klangcola@reddthat.com
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      On Windows the system wakes up when connected or disconnected from an AC adapter.

      Does it? I could sweat my work laptop (windows 10) doesn’t , and I’m pretty sure I’d notice cause I sleep and move it a lot during a working day.

      Is it a windows 11 thing? Or something to do with the so-called “hybrid sleep / hybrid boot”? (Pretty sure that’s disabled by corporate, and for friends and family I always disable that when their laptop goes in a boot crash loop). Does BitLocker matter ?

    • fuckwit_mcbumcrumble@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      4
      ·
      2 days ago

      This is kinda a quirk of modern/S0 standby.

      I assume this is mostly so the device can correctly change between which type of sleep it’s in (connected standby vs disconnected). My windows device seem to do a LOT in connected standby so making sure it properly switches to disconnected and doesn’t chew through the battery is very important.

    • Ryan J. Yoder@techhub.social
      link
      fedilink
      arrow-up
      1
      ·
      2 days ago

      @chaospatterns @neme yeah that does seen annoying but I’m guessing if you pull your laptop out of your backpack and plug it in, you’re sorta signaling the intent to use it. So it’ll be faster when you try to interact with it. If you don’t interact with the machine then it’ll spend again anyways. Just a guess on my part.

      • klangcola@reddthat.com
        link
        fedilink
        arrow-up
        1
        ·
        1 day ago

        What if you put your laptop to sleep cause youre done using it and intend to pack up. Then you unplug it and put it in your backpack?

  • fuckwit_mcbumcrumble@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    11
    ·
    2 days ago

    Besides changing the behavior, the other interesting aspect of this is /sys/power/suspend_stats/last_sleep_energy as a new file to expose the amount of energy that the battery consumed during the last sleep cycle. The “last_sleep_energy” is reported in mAh.

    I’m surprised this didn’t exist before. I use the report in windows all the time to figure out why my POS laptop died after 20 minutes of being in sleep.