Hi there!

I need some help with my framework laptop and fedora. I want to switch to linux more permanently, but fedora does not enter hibernation properly when closing the lid. I dont care 10-20sec of wakeup time when opening it again. (even windows is more efficient?!) The relatively bad performance on battery life is OK for me, I already installed TLP instead of the default power management. But when closing the lid, the battery drains about 80% over night (10h?) which seems to be more than what other people reported.

I could not find a guide on this, which i understood (still a massive noob to afraid to mess up my carefully crafted linux partition :D).

If you have any advice I appreciate it! Thanks a lot! :)

  • Papamousse
    arrow-up
    0
    arrow-down
    0
    ·
    10 months ago
    link
    fedilink

    Hibernation or suspend? 2 different things. For hibernation you need a swap space at least the size of your RAM, and then the laptop is powered off after this.

    For suspend, in your dmesg, see if you have:

    ACPI: PM: (supports S0 S3 S4 S5)

    if you have S3 your laptop should lost only a few percent.

    do a:

    cat /sys/power/mem_sleep

    what does it says?

    New CPU/BIOS/PC/Laptop only support something called “s0 idle” meaning it is like a cellphone, everything is running, and each drivers/components/os should enter low power themselves, if they do not, well, your battery is draining.

    S3 means “suspend to RAM, only RAM is powered and everything else is off, your laptop can stay like this for days. I don’t know who decided that this is bad and your laptop should be like your cellphone, always running?!?

  • nitrolife
    arrow-up
    0
    arrow-down
    0
    ·
    10 months ago
    link
    fedilink

    In first you need understand what type of suspend you use:

    Suspend to RAM (aka suspend, aka sleep) The S3 sleeping state as defined by ACPI. Works by cutting off power to most parts of the machine aside from the RAM, which is required to restore the machine’s state. Because of the large power savings, it is advisable for laptops to automatically enter this mode when the computer is running on batteries and the lid is closed (or the user is inactive for some time). Suspend to disk (aka hibernate) The S4 sleeping state as defined by ACPI. Saves the machine’s state into swap space and completely powers off the machine. When the machine is powered on, the state is restored. Until then, there is zero power consumption. Hybrid suspend (aka hybrid sleep) A hybrid of suspending and hibernating, sometimes called suspend to both. Saves the machine’s state into swap space, but does not power off the machine. Instead, it invokes the default suspend. Therefore, if the battery is not depleted, the system can resume instantly. If the battery is depleted, the system can be resumed from disk, which is much slower than resuming from RAM, but the machine’s state has not been lost.

    I think you use Hybrid suspend. Hybrid suspend store memory to disk (20 seconds lag) and then lost battery for memory renew. Need you Suspend to RAM maybe? 20 Seconds lag will fixed with that.

    Then check

    cat /sys/power/mem_sleep
    

    If you see

    [s2idle] shallow deep
    

    check first if your UEFI advertises some settings for it, generally under Power or Sleep state or similar wording, with options named Windows 10, Windows and Linux or S3/Modern standby support for S0ix, and Legacy, Linux, Linux S3 or S3 enabled for S3 sleep.

    If you don’t see anything you can swap sleep mode to Suspend to disk. That slow but don’t use any power. Or try fix sleep status.

    More information you can find here: https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate

    • WbrJrOPEnglish
      arrow-up
      0
      arrow-down
      0
      ·
      10 months ago
      link
      fedilink

      Thank you for your reply. It says: [s2idle] deep I don’t think i have the swap partition, I will try to create that. Thanks!

  • hottari
    arrow-up
    0
    arrow-down
    0
    ·
    10 months ago
    link
    fedilink

    Am on Arch and hibernation is currently broken with systemd 255 in my case. They introduced a lot of breaking changes for it. It works after enabling some workarounds for dracut 059 but it completely does a full power cycle. Your best bet is sticking with suspend until systemd unfucks hibernation.

  • Vincent
    arrow-up
    0
    arrow-down
    0
    ·
    10 months ago
    link
    fedilink

    I’m assuming you’ve already found it, but just in case you didn’t: Framework has setup guides for Fedora, which presumably should make everything work as intended. Find your device on this page, then click “Fedora 39 Setup Guide” on the right-hand side: https://frame.work/linux