Optimizing Fedora Battery Life
September 27 2024 5:34pm • Est. Read Time: 7 MINIn this article, we'll look at what is the safest, easiest way to get the most battery life out of your Framework laptop.The instructions here will address best practices and how to set up tools like PPD or tuneD to optimize your battery power consumption.
Expansion card (Applies to 11th and 12th Gen Intel Core - should not be needed with 13th Gen Intel Core)
One of the absolutely simplest things you can do right now to conserve battery power for your Framework is to simply remove unused expansion cards. Anytime you're not connected to AC power, removing HDMI and DisplayPort cards for example will save you noticeable battery consumption throughout your session on your Framework laptop. It may seem odd, but removing those cards mean you do not have anything drawing power from those expansion bays.
The best recommendation is to keep only expansion cards you need while on battery. For most people, this is going to be 2x USB-C expansion cards or 1 USB-C and 1 USB-A cards so you can connect to devices periodically.
External Displays
If you're connecting to external displays, then please plug into AC power. Running from battery and using external displays is going to run your battery down faster. Your displays are connected to AC power already, it's recommended to have your Framework also connected to AC power in this scenario.
Bluetooth, Keyboard Backlights and Display Brightness Settings
Bluetooth should be off unless it's being used anyway - that's just a good security practice. If you need it, then please do turn it on. Keyboard backlights are best turned off when in a well lit room. Simply pressing Fn and Space keys will allow you to toggle this off. And finally, the brightness settings for your backlit display.
The general recommendation is to turn it down far enough as to not make the display difficult to read. The lower the setting, the more battery life you will get.
dGPU on Framework Laptop 16
Out of the box on Fedora, you will find the natural state of the dGPU is to be in a deep power save mode, until it's has been awakened for an immediate need. This means you will be running your UMA graphics and not getting power drain from the dGPU unless it's been brought out of its power saving state.
Now, there are exceptions to this behavior. Tools like NVTOP will bring the power state as active. And even Steam, will wake it for a brief moment, only to put it into a deep power saving state again. For Steam users, we have instructions how to get your games using the dGPU only when you choose to.
Have concerns when the dGPU is being brought out of the deep power save state? We recommend installing Mission Center.
Fedora 40:
flatpak install missioncenter
Power profiles and stress testing
When stress testing, you need to make sure are using performance settings. TRying to stress test outside of performance is going to lead to leveled off frequencies in some instances.
If you are not totally sure this is working, something you can do to check on AMD/Intel using PPD or tuneD is this:
cat /sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference
You should see "performance" across the board.
Firefox hardware acceleration
Firefox hardware acceleration can help battery life in Linux in a few ways:
- Offloading tasks to the GPU: Hardware acceleration allows Firefox to utilize the computer's graphics processing unit (GPU) for specific tasks like rendering web pages, decoding videos, and playing animations. GPUs are often more efficient at handling these tasks than the main processor (CPU). This offloading reduces the overall workload on the CPU, which may lead to lower power consumption and improved battery life.
- Improved rendering efficiency: Modern GPUs are specifically designed to optimize graphics-intensive tasks. Hardware acceleration enables Firefox to leverage these optimizations, leading to faster and smoother rendering of web content. Efficient rendering may require less computational power from both the CPU and the GPU, potentially improving battery life.
- Dedicated video decoding: GPUs often include specialized hardware for decoding video content, which can be significantly more power-efficient than software-based decoding on the CPU. By utilizing hardware acceleration, Firefox can offload video decoding to the GPU, potentially improving battery life during video playback.
Follow this guide to set up Firefox hardware acceleration.
PPD (power-profiles-daemon) (****AMD****)
For Framework Laptop 13/16 AMD Ryzen™ 7040 Series configurations, you will absolutely want to use power-profiles-daemon for the absolute best experience. Do NOT use TLP. Without getting too detailed, there are things happening behind the scenes that require PPD for the best experience for our Linux customers.
PPD (power-profiles-daemon) (****Intel****)
For Framework Laptop 13 laptops using Intel chips, you may absolutely use the PPD defaults. The Power Saver, Balanced and Performance settings work well. If however, you would prefer more granular control, I suggest using tuneD.
tuneD (****Intel ONLY****)
Fedora: Simply visit this page, run the installer. Please follow the directions. If you follow the steps exactly, everything will work flawlessly. If it does not, you need to make sure you are using bash, did not skip or alter any steps.
Manual instructions for those who do not want the GUI:
- Install tuneD (and Intel profiles only).
- sudo systemctl enable --now tuned
- tuned-adm list (to see the available profiles)
- tuned-adm profile (profile name)
What are the available tuneD profiles and what do they do?
1. accelerator-performance
- Best for: Systems with hardware accelerators.
- Description: Optimize performance for systems with hardware accelerators.
2. atomic-guest
- Best for: Atomic Host guests.
- Description: Optimizes performance for Atomic Host guests.
3. atomic-host
- Best for: Atomic Host systems.
- Description: Optimizes performance for Atomic Host systems.
4. aws
- Best for: AWS EC2 instances.
- Description: Added AWS profile for AWS EC2 instances.
5. balanced-battery
- Best for: Systems focusing on balanced performance and battery life.
- Description: Balances performance and power savings for battery-operated systems.
6. balanced
- Best for: General-purpose usage.
- Description: A compromise between performance and power saving. Suitable for most workloads.
7. cpu-partitioning-powersave
- Best for: Systems with CPU partitioning needing power saving.
- Description: Optimize CPU partitioning with an emphasis on power savings.
8. cpu-partitioning
- Best for: Systems with CPU partitioning.
- Description: Optimizes for CPU partitioning, improving performance isolation.
9. default
- Best for: General-purpose usage.
- Description: Default profile with balanced settings.
10. desktop-powersave
- Best for: Desktop systems where power saving is a priority.
- Description: Balances performance and power savings for desktop systems.
11. desktop
- Best for: Desktop environments.
- Description: Tweaks settings to improve the performance of desktop applications.
12. enterprise-storage
- Best for: Enterprise storage systems.
- Description: Optimizes settings for storage performance in enterprise environments.
13. hpc-compute
- Best for: High-performance computing.
- Description: Optimizes for high-performance computing environments.
14. intel-sst
- Best for: Systems with Intel Speed Select Technology.
- Description: Optimizes settings for Intel Speed Select Technology.
15. laptop-ac-powersave
- Best for: Laptops connected to AC power with a focus on power saving.
- Description: Optimizes power settings for laptops on AC power to save energy.
16. laptop-battery-powersave
- Best for: Laptops on battery power.
- Description: Optimizes power settings for maximum battery life.
17. latency-performance
- Best for: Low-latency applications.
- Description: Prioritizes reducing latency over power consumption.
18. mssql
- Best for: Microsoft SQL Server workloads.
- Description: Tailored settings for running Microsoft SQL Server, optimizing database performance.
19. network-latency
- Best for: Network latency-sensitive applications.
- Description: Specifically targets network latency, making adjustments to minimize delays.
20. network-throughput
- Best for: High network throughput.
- Description: Enhances network throughput, ideal for applications requiring high data transfer rates.
21. openshift-control-plane
- Best for: OpenShift control plane.
- Description: Optimizes settings for OpenShift control plane components.
22. openshift-node
- Best for: OpenShift nodes.
- Description: Adds OpenShift profiles to optimize nodes.
23. openshift
- Best for: OpenShift environments.
- Description: Optimizes settings for OpenShift deployments.
24. optimize-serial-console
- Best for: Systems with serial console requirements.
- Description: Optimizes settings for serial console performance.
25. oracle
- Best for: Oracle databases.
- Description: Optimizes settings for running Oracle databases.
26. postgresql
- Best for: PostgreSQL databases.
- Description: Tailored settings for PostgreSQL database workloads.
27. powersave
- Best for: Power saving environments.
- Description: Reduces power consumption by making conservative changes to system settings.
28. realtime-virtual-guest
- Best for: Real-time virtualized guest environments.
- Description: Optimizes settings for real-time workloads within virtual machines.
29. realtime-virtual-host
- Best for: Real-time virtualization hosts.
- Description: Enhances performance for hosting real-time virtual machines.
30. realtime
- Best for: Real-time applications.
- Description: Optimizes system settings to achieve predictable and low latency.
31. sap-hana-kvm-guest
- Best for: SAP HANA running in KVM guests.
- Description: Optimizes settings for SAP HANA in KVM virtualized environments.
32. sap-hana
- Best for: SAP HANA workloads.
- Description: Provides tuning recommendations for SAP HANA environments.
33. sap-netweaver
- Best for: SAP NetWeaver applications.
- Description: Optimizes settings for SAP NetWeaver, focusing on improving performance.
34. server-powersave
- Best for: Server environments with a focus on power saving.
- Description: Reduces power consumption in server environments.
35. spectrumscale-ece
- Best for: IBM Spectrum Scale environments.
- Description: Optimizes settings for IBM Spectrum Scale performance.
36. spindown-disk
- Best for: Power saving on systems with spinning disks.
- Description: Focuses on saving power by spinning down idle disks.
37. throughput-performance
- Best for: High throughput applications.
- Description: Optimizes system settings for high throughput, typically at the expense of increased power consumption.
38. virtual-guest
- Best for: Virtualized guest environments.
- Description: Optimizes settings for virtual machines, focusing on performance within a virtualized context.
39. virtual-host
- Best for: Virtualization hosts.
- Description: Enhances performance for virtualization hosts by tweaking settings to better support multiple virtual machines.
How much longer will your battery last?
Now the big question here is how long will your battery last throughout the day while in use? The answer is that it depends on a multitude of factors too long to list here. But here are some common factors.
- Video or video meetings - battery vampires. While PPD and tuneD will help, you will see your battery drop from use here.
- Some IDEs running on Electron. Anything on Electron is likely to draw a bit more power than you might like. But they should generally not be worse than running an additional browser instance.
- Lights, Camera, Battery Usage. Webcam usage, backlighting on your keyboard and your display backlighting were touched on previously. Just a reminder these remain factors Adjust them accordingly to best meet your needs, bur remember these do affect battery life.
Other Changes and Settings Framework users have recommended
Community members have made a number of additional recommendations ranging from hardware acceleration for your daily desktop use to disabling Turbo Boost in the BIOS. None of these things will hurt to try, however, these things would need to be community supported on the Framework Forums. Point being, you're welcome to try suggestions from the community, but your experiences may vary.
- Hardware acceleration: Community supported, not officially supported.
- Disabling Turbo Boost in BIOS: Community supported, not officially supported.