nixos-hardware icon indicating copy to clipboard operation
nixos-hardware copied to clipboard

Framework laptop battery drain

Open jackkav opened this issue 1 year ago • 4 comments

I have read that non-USB-C adapters can cause the drain, but also S0 sleep. I have attempted to use suspend-then-hibernate to some success but still seeing the battery taking a hit during sleep and potentially even shutdown. Wondeirng if anyone have gotten to the bottom of this and might form a useful contribution to this repo.

This is my current attempt.

services.logind = {
  lidSwitch = "suspend-then-hibernate";
  extraConfig = ''
    HandlePowerKey=suspend-then-hibernate
    IdleAction=suspend-then-hibernate
    IdleActionSec=2m
  '';
};
systemd.sleep.extraConfig = "HibernateDelaySec=2h";

jackkav avatar Jul 17 '23 07:07 jackkav

I also have an issue to suspend on my Framework, 11 Intel Gen using anything else but the LID (i.e. external keyboard buttons or systemctl suspend). The suspend works but than I cannot wake it up again. I wondering if this also happens here with the HandlePowerKey=suspend-then-hibernate line.

Mic92 avatar Jul 17 '23 13:07 Mic92

I'm not sure if this fix could help :

Adding the kernel parameter acpi_osi="!Windows 2020" fixes a regression in s2idle, making the keyboard backlight and power button correctly turn off when suspending, as well as decreasing battery drain in suspend to about 1%/hour[7].

If your system fails to wake up from suspend due to the SSD disconnecting, you can try putting nvme.noacpi=1 in your kernel parameters. This may also improve battery life in suspend, if your SSD has a bad ACPI implementation.

You'd need to also share your SSD model, perhaps.

Sourced from the Archwiki.

AkechiShiro avatar Sep 09 '23 15:09 AkechiShiro

A newer workaround was added to the ArchWiki for the AMD version.

Add this to the kernel parameters until kernel 6.8 releases with this commit:

rtc_cmos.use_acpi_alarm=1

Myned avatar Feb 26 '24 14:02 Myned

In the common intel config, it currently contains

# Fixes a regression in s2idle, making it more power efficient than deep sleep
"acpi_osi=\"!Windows 2020\""

But in the 12th gen intel config, we set "mem_sleep_default=deep".

These two settings seem to be in conflict with each other, so I'm not sure if s2idle actually gives better sleep battery life. Which one is correct?

huantianad avatar Mar 22 '24 19:03 huantianad