Battery life issues ( >3100 wakeups/second)

Hello there,

I am having a very bad battery life using garuda on my Thinkpad T14 (gen 1).
I am looking at the overview of powertop and I am having 3100 wakeups per second!! And a discharge reate of ~10 W.

I have tlp configured and everything should work fine without AC but I am getting a max of 3 hours usage with a 90% charge...

Is there a way to fix this ?

garuda-inxi's output :

System:
  Kernel: 5.18.9-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=0c9822eb-18ec-4e24-9d9b-7685031e8127 rw rootflags=subvol=@
    amd_iommu=on iommu=pt quiet splash rd.udev.log_priority=3
    vt.global_cursor_default=0 systemd.unified_cgroup_hierarchy=1 loglevel=3
  Desktop: i3 v: 4.16.1-191-gb521c18c info: i3bar vt: 7 dm: LightDM
    v: 1.30.0 Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 20UDCTO1WW v: ThinkPad T14 Gen 1
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: LENOVO model: 20UDCTO1WW v: SDK0R32862 WIN
    serial: <superuser required> UEFI: LENOVO v: R1BET71W(1.40 )
    date: 04/05/2022
Battery:
  ID-1: BAT0 charge: 42.9 Wh (83.3%) condition: 51.5/50.5 Wh (101.9%)
    volts: 12.4 min: 11.6 model: LGC 5B10W139 type: Li-poly serial: <filter>
    status: discharging cycles: 278
CPU:
  Info: model: AMD Ryzen 7 PRO 4750U with Radeon Graphics bits: 64
    type: MT MCP arch: Zen 2 gen: 3 built: 2020-22 process: TSMC n7 (7nm)
    family: 0x17 (23) model-id: 0x60 (96) stepping: 1 microcode: 0x8600106
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB
    L3: 8 MiB desc: 2x4 MiB
  Speed (MHz): avg: 1396 high: 1398 min/max: 1400/1700 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 1397 2: 1395
    3: 1397 4: 1397 5: 1397 6: 1396 7: 1397 8: 1393 9: 1396 10: 1397 11: 1397
    12: 1396 13: 1397 14: 1397 15: 1398 16: 1397 bogomips: 54301
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Renoir vendor: Lenovo driver: amdgpu v: kernel arch: GCN 5.1
    process: TSMC n7 (7nm) built: 2018-21 pcie: gen: 4 speed: 16 GT/s lanes: 16
    ports: active: HDMI-A-1 off: eDP-1 empty: DP-1,DP-2 bus-ID: 07:00.0
    chip-ID: 1002:1636 class-ID: 0300
  Device-2: Chicony Integrated Camera type: USB driver: uvcvideo
    bus-ID: 2-2:2 chip-ID: 04f2:b6d0 class-ID: fe01 serial: <filter>
  Display: x11 server: X.Org v: 21.1.3 compositor: Picom v: git-cd505
    driver: X: loaded: amdgpu unloaded: modesetting alternate: fbdev,vesa
    gpu: amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 2560x1440 s-dpi: 96 s-size: 675x380mm (26.57x14.96")
    s-diag: 775mm (30.5")
  Monitor-1: HDMI-A-1 mapped: HDMI-A-0 pos: primary model: Samsung LC27G5xT
    serial: <filter> built: 2021 res: 2560x1440 hz: 144 dpi: 109 gamma: 1.2
    size: 597x336mm (23.5x13.23") diag: 685mm (27") ratio: 16:9 modes:
    max: 2560x1440 min: 720x400
  Monitor-2: eDP-1 mapped: eDP note: disabled pos: primary
    model: AU Optronics 0x573d built: 2018 res: 2560x1440 dpi: 158 gamma: 1.2
    size: 309x174mm (12.17x6.85") diag: 355mm (14") ratio: 16:9 modes:
    max: 1920x1080 min: 640x480
  Message: Unable to show GL data. Required tool glxinfo missing.
Audio:
  Device-1: AMD Renoir Radeon High Definition Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 07:00.1 chip-ID: 1002:1637 class-ID: 0403
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor vendor: Lenovo
    driver: snd_rn_pci_acp3x v: kernel
    alternate: snd_pci_acp3x,snd_pci_acp5x,snd_pci_acp6x,snd_acp_pci,snd_sof_amd_renoir
    pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 07:00.5 chip-ID: 1022:15e2
    class-ID: 0480
  Device-3: AMD Family 17h/19h HD Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 07:00.6 chip-ID: 1022:15e3 class-ID: 0403
  Sound Server-1: ALSA v: k5.18.9-zen1-1-zen running: yes
  Sound Server-2: JACK v: 1.9.21 running: no
  Sound Server-3: PulseAudio v: 16.1 running: yes
  Sound Server-4: PipeWire v: 0.3.54 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: 3400 bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp2s0f0 state: down mac: <filter>
  Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel pcie: gen: 2
    speed: 5 GT/s lanes: 1 bus-ID: 03:00.0 chip-ID: 8086:2723 class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
  Device-3: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: speed: Unknown lanes: 63
    link-max: gen: 6 speed: 64 GT/s port: 2000 bus-ID: 05:00.0
    chip-ID: 10ec:8168 class-ID: 0200
  IF: enp5s0 state: down mac: <filter>
  IF-ID-1: br10 state: down mac: <filter>
  IF-ID-2: virbr0 state: down mac: <filter>
  IF-ID-3: virbr1 state: down mac: <filter>
  IF-ID-4: virbr2 state: down mac: <filter>
Bluetooth:
  Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8
    bus-ID: 6-4:4 chip-ID: 8087:0029 class-ID: e001
  Report: bt-adapter ID: hci0 rfk-id: 5 state: up address: <filter>
Drives:
  Local Storage: total: 1.05 TiB used: 172.97 GiB (16.1%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/mmcblk0 maj-min: 179:0 model: ED2S5 size: 119.38 GiB
    block-size: physical: 512 B logical: 512 B type: SSD serial: <filter>
    scheme: MBR
  ID-2: /dev/nvme0n1 maj-min: 259:0 vendor: SK Hynix
    model: HFS001TD9TNI-L2B0B size: 953.87 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 11720C10 temp: 40.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 293.57 GiB size: 293.57 GiB (100.00%)
    used: 153.41 GiB (52.3%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%)
    used: 32.1 MiB (12.5%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 293.57 GiB size: 293.57 GiB (100.00%)
    used: 153.41 GiB (52.3%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-4: /var/log raw-size: 293.57 GiB size: 293.57 GiB (100.00%)
    used: 153.41 GiB (52.3%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
  ID-5: /var/tmp raw-size: 293.57 GiB size: 293.57 GiB (100.00%)
    used: 153.41 GiB (52.3%) fs: btrfs dev: /dev/nvme0n1p5 maj-min: 259:5
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 30.58 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 43.0 C mobo: N/A gpu: amdgpu temp: 42.0 C
  Fan Speeds (RPM): fan-1: 2900 fan-2: 2900
Info:
  Processes: 450 Uptime: 1d 5h 18m wakeups: 13 Memory: 30.58 GiB
  used: 10.67 GiB (34.9%) Init: systemd v: 251 default: graphical
  tool: systemctl Compilers: gcc: 12.1.0 clang: 14.0.6 Packages: 1736
  pacman: 1715 lib: 394 flatpak: 17 snap: 4 Shell: Zsh v: 5.9
  running-in: kitty inxi: 3.3.19
e[1;34mGaruda (2.6.4-2):e[0m
e[1;34m  System install date:e[0m     2021-12-14
e[1;34m  Last full system update:e[0m 2022-07-12 e[1;31m↻
e[1;34m  Is partially upgraded:  e[0m No
e[1;34m  Relevant software:      e[0m tlp NetworkManager
e[1;34m  Windows dual boot:      e[0m Probably (Run as root to verify)
e[1;34m  Snapshots:              e[0m Snapper
e[1;34m  Failed units:           e[0m samba.service vboxautostart-service.service vboxballoonctrl-service.service vboxdrv.service vboxweb-service.service 

That battery should provide 5 hours battery life at 10W per hour.

What is causing wakeups?

What other processes are running?

Have you calibrated the battery recently? Some batteries will lose accuracy when not charged fully and therefore the capacity/charge level will seemingly randomly drop at some point during discharge.

2 Likes

Disable all performance enchancements from Garuda Assistant and enable all powersave optins.

1 Like

Oh, also have a look at How to use AMD P-State in Linux 5.17 - Kernel & Hardware - EndeavourOS , this can help a lot with lowering the idle state frequency.

1 Like

(I am dual booting) on windows I do get around >5 of battery time.

A lot of processes are running, google chrome has most of them

/opt/google/chrome/chrome --type=renderer --enable-crashpad --crashpad-

tick_sched_timer

amdgpu

I have not calibrated the battery, will look into doing that

If you look at top or htop then you can see which ones are using CPU time.

Also don’t forget to answer my other questions so we get a good picture of what your system is doing.

If you get 5 hours in Windows, then 10Wh discharge rate in Linux is about right - there’s possibly not much more optimisation that can be done here. Browsing pages and watching videos in Chrome will take battery life.

1 Like

I just did and I am still getting >3000 wakeups/second.

I do get

target not found: intel-undervolt

Should I download that and enable it ?

from htop I can see chrome as top cpu heavy, htop itself and xorg

1 Like

since the time I posted this topic, the battery has dropped more than 63%

Was that a smooth reduction over time, or was there a sharp drop at some point?

If there was a sharp drop then the battery needs to be calibrated.

1 Like

it was a smooth reduction over time

and what are you doing in Chrome?

1 Like

Nothing too special. I have 10 tabs open. one of which web whatsapp and 2 youtube.

Right, which I pointed out before, watching videos on YouTube can take a significant amount of CPU time and therefore battery power.

This will also maintain a background connection for notifications, keeping your wifi connection alive and again using more power.

Try reducing your browser footprint and see how CPU and battery life changes.

1 Like

Just closed whatsapp, that was apparently using 0.4 GB of RAM and the 2 youtube ones were using 0.6 GB :melting_face:

I still do have a lot of wakeups/second

And 60% CPU use, probably because of Chrome.