You are not logged in.
Pages: 1
Hello,
I have an issue with my laptop battery lasting far less than I'd expect it to. I think this is an OS issue because I don't have the same issue when using Windows on the same laptop. I tested this by watching a Youtube video full screen with brightness set at 20% (no external monitor) on battery saver. On Windows after 1 hour I had 73% battery, on Arch Linux 50%. On top of that, I've set the battery saver TLP profile on Arch to what felt a lot more extreme than Windows' battery saver (everything feels a lot more sluggish on Arch).
My TLP battery saver profile:
$ sudo tlp-stat -p
--- TLP 1.6.1 --------------------------------------------
+++ Processor
CPU model = AMD Ryzen 7 6800HS with Radeon Graphics
/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver = amd-pstate-epp
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor = powersave
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq = 500000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq = 500000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq = 400000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq = 4785000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_preference = power [EPP]
/sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences = default performance balance_performance balance_power power
/sys/devices/system/cpu/cpu1..cpu15: omitted for clarity, use -v to show all
/sys/devices/system/cpu/amd_pstate/status = active
/sys/devices/system/cpu/amd_pstate/cppc_dynamic_boost = (not available)
/sys/module/workqueue/parameters/power_efficient = Y
/proc/sys/kernel/nmi_watchdog = 0
+++ Platform Profile
/sys/firmware/acpi/platform_profile = balanced
/sys/firmware/acpi/platform_profile_choices = quiet balanced performanceMy laptop is a ASUS ROG Zephyrus G14, 14" screen, AMD Ryzen 7 6800HS, 32 GB of RAM and (on top of the onboard GPU) has an AMD Radeon RX 6800S.
Any help is greatly appreciated!
Thanks,
satoshi
Last edited by satoshich (2024-09-17 15:14:14)
Offline
I have better battery life with power-profile-deamon: https://archlinux.org/packages/extra/x8 … es-daemon/ than TLP on AMD.
I'm using a Framework Laptop with Ryzen 7840U.
TLP profile looks okay, IMHO.
First of all, you need to log your power consumption. It could be the GPU or wifi driver, or something else. I'd first check whether your laptop is actually using iGPU for video rendering on battery.
Also check this for the GPU: https://wiki.archlinux.org/title/AMDGPU#Power_profiles
Offline
Are your graphics set to HYBRID in the BIOS?
How are you playing YouTube videos? In Firefox or Chrome? NOTE: Chrome based browsers don't have video HW decoding on Linux.
Did you install libva-mesa-driver?
Have you tried YouTube test using mpv e.g. mpv --hwdec https://www.youtube.com/watch?v=QAUzWtLMnU0
For Firefox, in about:config, have you set gfx.webrender.all and media.ffmpeg.vaapi.enabled to true?
In YouTube, have you turned off Ambient Mode (for some reason, this drains a lot of battery).
Is your dGPU powering down automatically in Linux (close all apps, then run: cat /sys/bus/pci/devices/0000\:01\:00.0/power/runtime_status)
Have you installed power-profiles-daemon? If so are you using Power Save, Balanced or Performance mode?
Your dGPU will be the main thing that draws a lot of power from the battery. You can monitor whether your dGPU is powered on or not by running this in a terminal:
watch -n1 -d -t cat /sys/bus/pci/devices/0000\:01\:00.0/power/runtime_statusEven when playing YouTube videos your dGPU should be suspended. If it's active, then make sure your graphics are set to HYBRID in the BIOS.
You can completely power down your dGPU if you don't need it - see here.
At idle, I'm guessing you should be able to get something around an 8W power draw.
You can check to see if video hardware decoding is working by running nvtop (install with: sudo pacman -S nvtop). Run it in a terminal, if you see DEC with a value greater than 0%, then hardware decoding is working. Note that running nvtop will probably power up your dGPU (if it automatically powers down).
Last edited by andyturfer (2024-09-16 19:40:04)
Offline
Thank you both for your help, it was indeed to do with the discrete GPU being used all the time.
I changed my xorg config to add this in /etc/X11/xorg.conf.d/20-amdgpu.conf:
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "IntegratedScreen"
Inactive "DiscreteGPU"
EndSection
Section "Device"
Identifier "IntegratedGPU"
Driver "amdgpu"
BusID "PCI:7:0:0" # Integrated GPU BusID
Option "TearFree" "true"
Option "DRI" "3"
Option "PrimaryGPU" "yes"
EndSection
Section "Screen"
Identifier "IntegratedScreen"
Device "IntegratedGPU"
EndSection
Section "Device"
Identifier "DiscreteGPU"
Driver "amdgpu"
BusID "PCI:3:0:0" # Discrete GPU BusID
Option "TearFree" "true"
Option "DRI" "3"
EndSection
Section "Screen"
Identifier "DiscreteScreen"
Device "DiscreteGPU"
EndSectionAlso set this in /etc/tlp.conf:
RADEON_DPM_PERF_LEVEL_ON_AC=high
RADEON_DPM_PERF_LEVEL_ON_BAT=lowAlso installed xf86-video-amdgpu (I had uninstalled because of a suggestion here but I no longer seem to suffer from that problem: https://bbs.archlinux.org/viewtopic.php?id=283171) and linux-firmware.
Now after 1 hour of watching youtube in full screen I still have 80% battery! I'm not entirely sure which of these fixes fixed it definitely but I hope it's useful to others. Thanks again
Offline
Pages: 1