You are not logged in.

#1 2024-11-08 15:36:01

Werlon
Member
Registered: 2024-11-08
Posts: 4

[SOLVED] High laptop power usage (Legion slim 5 gen 9)

Hi, I am running arch linux on my legion slim 5 laptop (ryzen 7 8845HS and rtx 4060) and I am facing high power usage problems.
I have a tlp config to try and extend the battery life but it doesn't help, the conservation mode for battery does work tho.

Powertop reports:(
The battery reports a discharge rate of 27.9 W
The energy consumed was 562 J
The estimated remaining time is 2 hours, 26 minutes

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

Power est.              Usage       Events/s    Category       Description
  14.6 W     98.4%                      Device         Display backlight
  5.71 W      0.0 pkts/s                Device         Network interface: enp2s0 (r8169)
  2.55 W     16.8 ms/s     700.5        Timer          tick_nohz_handler
  1.39 W     36.0 ms/s     381.3        Process        [PID 5644] qemu-system-x86_64 -accel kvm -cp
  1.23 W    100.0%                      Device         USB device: ITE Device(8176) (ITE Tech. Inc.
  1.03 W      2.4 pkts/s                Device         Network interface: wlo1 (mt7921e)
  980 mW     36.7 ms/s     267.7        Process        [PID 1530] /usr/bin/kwin_wayland --wayland-f
  754 mW     11.0 ms/s     206.6        Timer          hrtimer_wakeup
  738 mW      5.8 ms/s     202.5        Interrupt      [10] AMDI0010:00
  729 mW     17.9 ms/s     199.4        Interrupt      [7] sched(softirq)
  422 mW     10.2 ms/s     115.5        Process        [PID 2123] /usr/lib/firefox/firefox --sm-cli
  311 mW      1.1 ms/s      85.4        Process        [PID 18] [rcu_preempt]
)

And kde energy information reports nearly the same power consumption, and the battery drains fast, every few minutes 1% is consumed. While running powertop i had docker desktop, easyeffects, firefox and kde running however even without them the power usage is still high. I am running the latest at the moment linux zen kernel with these boot parameters: "loglevel=3 quiet video=eDP-1:2560x1600@120 amd_pstate=active"

I would really appreciate any suggestions, because on windows the power usage is like ~12w and I really want to keep using linux

Last edited by Werlon (2024-11-13 12:55:44)

Offline

#2 2024-11-08 21:44:05

Werlon
Member
Registered: 2024-11-08
Posts: 4

Re: [SOLVED] High laptop power usage (Legion slim 5 gen 9)

UPDATE: It seems to happen after connecting and disconnecting charger, the consumption after booting without charger is like 14w, after unplugging charger around 25w

Offline

#3 2024-11-13 13:00:29

Werlon
Member
Registered: 2024-11-08
Posts: 4

Re: [SOLVED] High laptop power usage (Legion slim 5 gen 9)

SOLVED: So after trial and error after my update post, i figured that it may have something to do with the dGPU on my laptop turning on after plugging in the charger, which resulted in high battery power consumption in powertop after disconnecting.
Solution is to use acpi_call and this chapter in arch linux forum: https://wiki.archlinux.org/title/Hybrid … _acpi_call
While it may sound stupid why i didn't try this earlier, it was because of my assumption that using udev rules setup by envycontrol would be enough, which it apparently was not.

The only thing i have not tested is what happens when trying to run games or how to connect external display, but for now the issue about power consumption is solved.

Offline

#4 2024-11-14 15:13:54

Werlon
Member
Registered: 2024-11-08
Posts: 4

Re: [SOLVED] High laptop power usage (Legion slim 5 gen 9)

SOLVED UPDATE: Apparently it isn't that easy to just disable the gpu with acpi at boot, as then you may face long boot times and the nouveau module forcing itself to turn on (even when blacklisted)
Problem 1: Now you may try to blacklist nouveau through grub boot option, which is the only viable option to turn it off, but then the power consumption rises again.
Solution 1: Call the acpi to turn off gpu when starting your wayland/X11 session, in my case i use sddm as display manager. By looking in the man file of sddm.conf you can see where the configuration files are located, for me it was at '/usr/lib/sddm/sddm.conf.d/', after reading the configuration file we can see where the startup scripts are located for wayland/X11, in my case it was 'SessionCommand=/usr/share/sddm/scripts/wayland-session' and 'SessionCommand=/usr/share/sddm/scripts/Xsession'. I'm only using wayland so i only modified the wayland-session file, add the line 'echo "_SB.PCI0.GPP0.PG00._OFF" > /proc/acpi/call', replace _SB.PCI0.GPP0.PG00._OFF with the one that works for you when executing 'sudo /usr/share/acpi_call/examples/turn_off_gpu.sh'. For testing purposes you can also add the line 'echo "GPU turned off" > /tmp/testfilegpu' to see if your changes are actually being executed.

Problem 2: If you don't blacklist nouveau but turn off the gpu, there will be 2 devices in /sys/class/backlight, one of which works (amdgpu_bl2), and the other one which doesn't (acpi_video0). Brightnessctl correctly chooses amdgpu as backlight interface, but KDE does not, so changing the brightness in KDE does not do anything and requires manual brightness change in terminal.
Solution 2: Add the line 'acpi_backlight=native' to /etc/default/grub in GRUB_CMDLINE_LINUX_DEFAULT="<YOUR-BOOT-OPTIONS>", so it should look like this: 'GRUB_CMDLINE_LINUX_DEFAULT="<YOUR-BOOT-OPTIONS> acpi_backlight=native"' (ofc replace the <YOUR-BOOT-OPTIONS> with your existing boot options). After that remake the grub.cfg file with 'sudo grub-mkconfig -o /boot/YOURPATH/grub.cfg' replace the YOURPATH with the path to your grub config file, in my case it was '/boot/grub/grub.cfg'.

Then reboot

Offline

Board footer

Powered by FluxBB