Ubuntu:
There is now an official guide for Optimizing Ubuntu Battery Life on the Framework Knowledgebase written by Linux Support Lead @Matt_Hartley! If you are using Ubuntu, that is the recommended course of action.
For other distros:
There are many threads on linux battery life. I think we should probably have a wiki page with the relevant information. I’ve dug out some relevant bits from various threads.
Tuning idle power usage
The idle power usage can be tuned down to 2.5W by
$ sudo powertop --auto-tune
This can be enabled as a one-shot on some distributions via systemd service file (via @IPGentlemann)
$ sudo systemctl enable powertop
It is also necessary to configure /etc/tlp.conf with these settings:
PCIE_ASPM_ON_BAT=powersupersave
After setting these two items, on the lowest brightness idle you will see the CPU hit C8 states on the second tab of powertop and the overall usage be roughly 2.5W if you have a single DIMM. Without ASPM enabled, the power usage will be between 3-4W.
Note for Fedora users: Fedora workstation comes with
power-profiles-daemon
by default. While simpler than tlp, it is less powerful, and directly conflicts with it. It is anecdotally recommended you disable PPD by runningtlp start
to see it’s recommendations for disabling. tlp vs. power-profiles-daemon - Reddit
From @Michael_Wu
Stock, the CPU should be able to reach C8 state, with PSR off. With PSR on the CPU should reach C9/C10. (PSR works when the image on the screen is static, so not when a video is playing on screen, flashing notifications, etc.). Battery Life? - #63 by Brett_Kosinski
From @technical27 ([TRACKING] Linux battery life tuning - #156 by technical27)
I was having trouble hitting PC10, but then I found out it works after a reboot/fresh boot but not after suspending. It always works during suspend, but after the first suspend, it no longer worked in normal use until the next power cycle. The fix, add
nvme.noacpi=1
to your kernel parameters.
Suspend power usage
There are three major paths to improving suspend battery life:
- Enable hibernation, which requires some involved setup, but results in behavior similar to Windows.
- Use “deep” sleep instead of “s2idle”, which reduces suspend power draw at the tradeoff of longer time required to resume.
- Set
nvme.noacpi=1
in your grub kernel parameters, which results in s2idle suspend battery life that is similar to “deep” on recent kernels without taking the resume time tradeoff. See here for instructions on changing kernel parameters.
Panel self-refresh (WIP)
On kernel >= 5.14 (such as Fedora 35), the PSR disablement is no longer necessary. The enabled PSR helps to save battery life.
If PSR is enabled on pre-5.14 kernels, there may be stuttering. To remove PSR see Periodic stuttering on fresh gnome.40 wayland install on Arch Linux - #6 by William_Light
More references:
- Improving Linux battery life, enabling PSR by default, testers wanted - Hans' hacking log — LiveJournal
- Fedora Linux 35 (Fedora 35) on the Framework Laptop
Tuning disk usage (WIP)
- Set fstab options for disks to be noatime or relatime [From @Brett_Kosinski ]
Audio usage (WIP)
I’ve unscientifically noticed that pipewire appears to use less power than pulseaudio. The following 3 daemons need to be running for a drop-in replacement for pulseaudio.
pipewire
pipewire-pulse
pipewire-media-session
Expansion Card Power Usage (WIP)
HDMI and SD Card expansions appear to be using 1W whether or not they are in use. There appears to be a fix with autosuspend or perhaps with a newer bios?
DRAM
Note that larger quantities and higher speeds (e.g. 3200 instead of 2666) of memory will result in higher active, idle, and suspend power consumption. There is a detailed study on this here: [Battery Life] Impact of RAM / memory configuration + extra data
Wifi (WIP)
AX210
Note that the vPro version of AX210 (or other Intel WiFi modules) may have power management issues in Linux.
Ath9k
Power management needs to be enabled as a kernel option. Old reports indicate that wifi power saving may cause drops on connectivity, but not sure if they still apply. This seems to save between 1.0-1.5W. The part number that was tested is Atheros QCNFA222 AR5BWB222 on Framework 13 Intel i5 i5-1135G7.
# Note that a reboot may be required to reload with the new kernel opt
$ cat /etc/modules.d/ath9k.conf
options ath9k ps_enable=1
$ cat /sys/module/ath9k/parameters/ps_enable
1
$ sudo iw dev wlp170s0 set power_save on
$ sudo iw dev wlp170s0 get power_save
Power save: on
Kernel version
5.13 uses less power than 5.12 (approximately 0.5W)
Video playback tuning (WIP)
Full disk encryption (WIP)
I’ve unscientifically noticed that it is 3W rather than 2.5W idle.
GPU rendering with Firefox and Chrome
- Install
intel-media-driver
andintel-gpu-tools
FOR FIREFOX
-
Type in
about:config
in the address bar and hit enter. -
Set
media.rdd-ffmpeg.enabled,
media.ffmpeg.vaapi.enabled
andmedia.navigator.mediadatadecoder_vpx_enabled
to true.
FOR CHROME/IUM
- Enable these Flags under chrome://flags
Temporarily unexpire M90 flags, override software rendering list, GPU rasterization, Hardware-accelerated video decode & Zero-copy rasterizer
- Go to your
~/.config directory
and make achrome-flags.conf
orchromium-flags.conf
(whichever you use) file. - Paste the following and save.
REFER TO THIS ARCH THREAD ON THE CURRENT FLAGS NEEDED FOR CHROME / CHROMIUM.
FOR VERIFYING GPU USAGE
- Run the command
sudo intel_gpu_top
, play a 4k video and check whether theVideo
section is above 0.00%
More references:
- Archwiki - Firefox
- Archwiki - Chromium
- Updated Guide on how to get hardware acceleration working on Chrome and chromium based browsers.
Battery charge threshold
Available in BIOS