[TRACKING] Linux battery life tuning

WDC PC SN730 SDBPNTY-512G (11140000)

I’m pretty sure nvme.noacpi=1 made a huge difference for me.

Oh thanks! That’s what I used before. I don’t know how I missed it still exists. One draw-back is in the “rate” tab it’s rather difficult to see the actual discharge rate over suspended periods.

1 Like

Guys, if you want to know your BIOS firmware version, you will find the way at BIOS guide - #118 by Simon_Brand .

@junaruga I think there’s a little misunderstanding here: Nirav most probably meant the SSD firmware version, not the BIOS firmware version.

1 Like

Oh I didn’t know that the SSD has the firmware. Thanks for explaining it to me.

My experiment last night showed a significant difference despite having the newer SN750 firmware…

s2idle without the “nvme.noacpi=1” parameter: 4%/hour

s2idle with the “nvme.noacpi=1” parameter: 2.7%/hour

deep sleep: 2.7%/hour

The s2idle tests were running the Linux 5.17.9 kernel, and I had three USB-A cards and one USB-C card installed. The deep sleep test was running the Linux 5.14.10 kernel.

I can get it with “inxi -Da | grep rev” on my system.

I had to run this as root using sudo.

@nrp
SK Hynix P31

inxi - Da output:
Drives:

model: SHGP31-500GM-2

serial: CJ09N90041050A*** (user redacted)
rev: 41060C20

I assume rev is the firmware revision, but I don’t know for sure.

I did not take awesome metrics with and without nvme.acpi, but I believe having this on cuts s2idle standby drain by 60-80%. I’ll try to get to doing some more specific metrics.

On Slackware Linux here with powertop (i5 11th gen, 32GB RAM). I have 2 USB-C and 2 USB-A currently installed, and 4.5 hrs to 7.5 hrs (I am yet to test the full 10 hours 20 minutes that it shows me).

However I only see a marginal/negligble increase in battery life on stand by with “nvme.noacpi=1”.

model: WDS100T1X0E-00AFY0
rev: 614900WD

I’m using “Vitals” Gnome extension, resuming from s2idle I can briefly see the drain rate during that time (above the dropdown box in the panel) but I calculate it from the total “Energy (now)” before sleep and after.

2 Likes

SSD: SN850 1TB
SSD firmware version: 614900WD
Framework laptop BIOS version: 3.07
OS: Ubuntu 22.04 LTS
Kernel version: 5.15.0-35-generic
Kernel command line: quiet splash nvme.noacpi=1
Sleep / suspend method: systemctl suspend
Sleep / suspend duration: 8 hours
Battery charge lost / drained: 33%

1 Like

@A_Fan - that drain seems high. What modules do you have installed, and what sleep mode (s2idle / deep) do you have set?

For reference, I’m running manjaro, sk hynix gold p31 ssd, kernel 5.17.9-1 ,4x usb-c, and I am losing under 10% overnight.

Cards removed to limit the variables.

Sleep mode, whatever is OOTB with the Ubuntu 22.04 LTS. No change there.

Mind you, I seem to see two different drain rates on my system…even with no hardware changes, nor software configuration changes. The only thing that changed is how many times the system has been placed into suspend since it first powered up.

On the first suspend, it was draining maybe 1-1.5% an hour… However, on subsequent suspend, it was draining like 4% an hour.

I would guess that it is s2idle. If you already know the following, skip it. If not, you can check what you currently have in place by running cat /sys/power/mem_sleep. If you want to set it to deep, add “mem_sleep_default=deep” to the grub config and update grub.

Thanks for pointing this out. I’ll take another look after my sleep test.

I feel that someone might want to write a script that collects and shows what/which battery related optimization is active / inactive. Something like what the Get-SpeculationControlSettings cmdlet (on Windows) would do…to summarize a system’s spectre fixes.

1 Like

SSD: WD_BLACK SN750
Firmware version: 111130WD

Isn’t that what the acpi_osi='!Windows 2020' kernel command line option helps for? Mind you: some quoting is required to protect the ! and some tools rely on quotes in the grub configuration as well. For instance, Fedora uses /etc/default/grub where GRUB_CMDLINE_LINUX_DEFAULT has its value delimited by "...". A tool like “grub-customizer” messes up the quotes. I think the '...' delimiters are valid too, but I’m happy to be corrected.

1 Like

To clarify, with that firmware, are you seeing differences between having nvme.noacpi=1 enabled or not?

1 Like

Yes, huge difference. It lasts much longer on standby.

I’ve tried auto-cpufreq for the past 3 weeks and I seem to be getting better battery life, about 1 - 2 hours more. I don’t have time for now to do a thorough test, but I am pretty sure that using only auto-cpufreq is better than using tlp. I hope someone can confirm this through testing.

1 Like