Ubuntu – Battery life limitation with Ubuntu 20.04 and AMD

20.04amd-graphicsamdgpubatterypower-management

I had previously asked this question for 18.04, I upgraded to 20.04 hoping it would give some boost. Yet I still have the same high power consumption issue.

Roughly my laptop runs for around 3 hours, and I can hear my CPU fan speed when there is nothing runs.

Powertop status

The battery reports a discharge rate of 351 mW
The power consumed was 7.07 J
The estimated remaining time is 29 hours, 54 minutes

Summary: 1142.5 wakeups/second,  0.0 GPU ops/seconds, 0.0 VFS ops/sec and 12.0% CPU use

Power est.              Usage       Events/s    Category       Description
  890 mW     19.7 ms/s     195.4        Process        [PID 2540] /usr/lib/xorg/Xorg vt2 -displayfd
  790 mW      1.2 ms/s     199.6        kWork          dbs_work_handler
  529 mW      6.3 ms/s     119.3        Process        [PID 5179] /usr/lib/firefox/firefox -new-wind
  443 mW      1.1 ms/s     111.6        Timer          tick_sched_timer
  271 mW     16.6 ms/s      55.4        Process        [PID 2730] /usr/bin/gnome-shell
  250 mW      8.3 ms/s      58.0        Process        [PID 12800] /usr/libexec/gnome-terminal-serve
  207 mW      1.0 ms/s      51.9        Process        [PID 743] [sdma0]
  172 mW      3.7 ms/s      42.0        Interrupt      [68] amdgpu
  161 mW      4.1 ms/s      39.2        Timer          hrtimer_wakeup
  148 mW      2.6 ms/s      27.6        Process        [PID 2579] /usr/lib/xorg/Xorg vt2 -displayfd
  130 mW     93.9 µs/s      32.8        kWork          flush_to_ldisc
  122 mW     19.3 ms/s      23.2        Process        [PID 5326] /usr/lib/firefox/firefox -contentp
  119 mW      5.1 ms/s      28.0        Process        [PID 7877] /home/sachith/tsetup.2.3.2/Telegra
 84.7 mW      4.8 ms/s      19.6        Process        [PID 12655] /usr/lib/firefox/firefox -content
 84.1 mW      1.0 ms/s      20.9        Process        [PID 5204] /usr/lib/firefox/firefox -new-wind
 49.9 mW    205.9 µs/s      12.6        Process        [PID 1] /sbin/init splash
 40.3 mW    149.0 µs/s      10.1        kWork          psi_avgs_work

TLP config :

TLP_ENABLE=1
CPU_SCALING_GOVERNOR_ON_BAT=powersave
CPU_SCALING_MAX_FREQ_ON_AC=0
CPU_SCALING_MIN_FREQ_ON_BAT=0
SCHED_POWERSAVE_ON_BAT=1
RADEON_POWER_PROFILE_ON_BAT=auto
RADEON_DPM_STATE_ON_BAT=battery
RESTORE_THRESHOLDS_ON_BAT="1"

My hardware spec :

AMD Ryzen 7 PRO 2700U APU Integrated Radeon Vega Graphics

Kernel : 5.4.25-050425-generic

I have not installed any AMD-Grapics as they are not officially supported, and tried with 18.04 and they were not working.

No bluetooth connections and WiFi.

Edit: As sancho suggested, I feel this is related to Ubuntu Kernel or firmware for AMD.

Best Answer

It may be the case there is nothing wrong, but you are expecting a battery life based on a very optimistic specification by the manufacturer, and/or an inadequate comparison Windows vs. Linux. As per description below, I would not be worried about any misconfiguration, but otherwise check the list of recommendations to save battery life. This is not a conclusive answer, but perhaps the correct one.

On the specified battery life: Various reported battery lives (see (4) below; usually tested in Windows) are not uniform and thus conclusive on this point, but suggest the specification may be too optimistic.

On Windows vs. Linux: Testing the same PC under Windows, suggests a shorter battery life under Ubuntu. Nevertheless, this might not indicate a problem with your Ubuntu installation, but that this simply what you can get. There are quite a few reports of Ubuntu or other Linux flavors consuming more battery than Windows, even though this is not uniform across the board, see (1) below. So you could try a few actions to optimize your battery usage in Linux, see (2) below. This probably depends a lot on which devices and drivers you have.

1. Power consumption Windows vs. Ubuntu/Linux:

  1. Why do I have less battery life than I did on Windows/Mac OS?
  2. Why does Ubuntu eat more power than Windows?
  3. Linux mint consumes more battery energy than windows 10
  4. Power consumption vs. Windows 10
  5. "Compared with a linux distro, Windows has longer battery life" is is true or is it a myth?
  6. Very high power demand after upgrading to 18.04
  7. Benchmarked: The Most Power-Efficient Ubuntu 19.04 Flavor Will Surprise You

2. Optimizing power uasge in Linux

  1. How to Monitor and Optimize Power Usage on Linux
  2. Use less power and improve battery life
  3. https://bugs.launchpad.net/ubuntu/+source/nvidia-prime/+bug/1765363

3. "Analysis" of the output of powertop:

  1. The "discharge rate" of 351 mW is lower than some of the individual values below, and (eyeballing the numbers) it appears much higher that the weighted sum of the individual values.
  2. The "estimated remaining time" is 29 hours, 54 minutes, much larger than actual life, by whichever measure. It is worth finding an explanation for what this figure means.
  3. Taking dr=351 mW as an average power consumption, and ert=30 hours, the remaining stored energy is about dr*ert=10.5Wh, much less than the spec (3-cell, 45 Wh Li-ion polymer). What was the remaining battery percentage when you executed powertop? If you don't know, or even if you do, you could repeat these calculations at various remaining battery lives.

Revision of the meaning of these figures, plus comparison of what you may similarly get from Win 10, would perhaps help.

4. HP Probook 445 G6 specification:

  1. https://www.reddit.com/r/Amd/comments/dvrz3x/hp_probook_445r_g6_small_review/
  2. https://www.notebookcheck.net/HP-ProBook-455R-G6-Laptop-Review-Better-battery-life-thanks-to-Zen.435188.0.html
  3. https://www.notebookcheck.net/HP-ProBook-445-G6-Ryzen-5-2500U-RX-Vega-8-SSD-FHD-Laptop-Review.419778.0.html
  4. https://www.amazon.com/gp/customer-reviews/R38ZBC9EEC7BHK/ref=cm_cr_arp_d_rvw_ttl?ie=UTF8&ASIN=B07RWVY9QG
Related Question