pexels-photo-3183202

Tips & tricks on how to prolong your laptop battery life

The long battery life of a laptop is one of the essential aspects for every user because it provides more time to work without the need to use charging cables. Moreover, long battery life can be crucial for a person who works outside the house or has frequent power outage issues. Basically, the longer your laptop’s battery lasts, the better your work and overall experience with a computer are. In this regard, we prepared a list of useful battery tips to help you get the most out of your laptop battery. 

Note: the following tips & tricks were made with Ubuntu 22 OS and HP ProBook 450 G7 as the laptop. However, most of the principles apply to other laptops and operation systems.

1. Power Mode

Ubuntu 22 usually provides 3 power modes. Mainly they impact the CPU frequency range. Here is an example for the HP laptop:

Performance (may not be available for some laptops) – 2300-4400 MHz,

Balanced –  2300-3200 MHz,

Power Saver – 800-2300 MHz.

CPU frequency depends on many factors: BIOS configuration, cooling efficiency, CPU cores loading distribution, AC power adapter connection. You can check your current cores frequency using the command: watch -n.1 “grep \“^[c]pu MHz\” /proc/cpuinfo”

watch -n.1 “grep \“^[c]pu MHz\” /proc/cpuinfo”

Usually, Balanced mode provides a smooth working experience. The Power Saver provides an ultimate power saving but may give lags and freezes on high loading.

2. BIOS configuration

You should refer to your laptop BIOS manual, find available power-saving options and enable them. For HP laptop, power-saving options are listed in Advanced / Power Management and Advanced / System options sections of the BIOS setup:

Especially pay attention to the following options:

  • Max DC Power – allows Turbo-Boost when working from the battery, should be disabled;
  • Battery Health Manager – allows to prolong your battery life cycle by reducing its maximum charging level, it should be set to Maximize my battery duration.

IMPORTANT: the option “Maximize My Battery Health” can also come in handy, see “How to improve your powerbank energy usage efficiency

The battery capacity gets reduced during its lifetime. You can check the actual capacity by using the upower -i /org/freedesktop/UPower/devices/battery_BAT0 command. Check the capacity value or compare the energy-full and energy-full-design values, e.g. it can be 40 and 45 W*h respectively.

3. Switch to an integrated graphics card

If your laptop has both integrated (e. g. Intel UHD Graphics) and discrete (e. g. Nvidia GTX 1650) graphics cards you should use only the discrete to save the energy. For Nvidia @ Ubuntu you can do this from X Server Settings (Nvidia driver must be installed):

4. Unplug or disable unneeded devices

You should disable bluetooth and unplug any external devices: mouses, keyboards, drives, speakers, cameras, etc.

5. Close unneeded programs

You can use htop command to quickly find the most CPU-consuming processes, just click the CPU column header:

In my case, the most consuming processes are Slack and Chrome. So it’s better to keep Slack window closed when possible, just leaving its icon in the system tray. And of course, remember to close unnecessary Chrome tabs and disable unneeded browser extensions.

There is a small task manager in Chrome, it can be opened from Menu → More tools → Task manager. There you can find which extensions or tabs are loading your CPU.

6. Power saving in IDE

All JetBrains IDEs have the special Power Save Mode which according to the description “disables background code analysis and other background operations”. This makes the coding process less convenient but allows to save a notable amount of energy. 

7. Display brightness

Reduce the background lighting (if it is too bright) in your room – this setting will lower your display brightness and save some energy. Also, go to Settings → Power → Power Saving Options and enable Dim Screen and Screen Blank options:

Additionally, you may want to allow automatic suspending.

Conclusions

The presented tips help extend the battery life from one charge by using the optimized settings and most effective practices. Unfortunately, sometimes the integrated power-saving features are insufficient, and you might need to use more complex tricks. Check out our other articles and useful guides to help you be more productive as a developer. 

Related Articles

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments