-
Notifications
You must be signed in to change notification settings - Fork 147
Add power-saver (SAV) option to RADEON_DPM_PERF*, RADEON_DPM_STATE* settings #851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Your commit looks good to me. However, you need to add the new parameters to tlp.conf: I'm still wondering which parameter values you are actually using for all the profiles. Maybe you could just show |
|
This is my configuration > tlp-stat -c | grep RADEON
defaults.conf L0034: RADEON_DPM_PERF_LEVEL_ON_AC="auto"
/etc/tlp.conf L0387: RADEON_DPM_PERF_LEVEL_ON_BAT="auto"
/etc/tlp.conf L0388: RADEON_DPM_PERF_LEVEL_ON_SAV="low"
/etc/tlp.conf L0394: RADEON_DPM_STATE_ON_AC="performance"
/etc/tlp.conf L0395: RADEON_DPM_STATE_ON_BAT="battery"
/etc/tlp.conf L0396: RADEON_DPM_STATE_ON_SAV="battery" |
|
@SkajpCZ Now merged to main (commit messages edited). |
|
@SkajpCZ What I noticed only afterwards: the kernel docs for the amdgpu driver call the sysfile power_dpm_state behind RADEON_DPM_STATE_ON_ "a legacy interface and is only provided for backwards compatibility". TLP doesn't write anything in there anymore. The parameter can be removed entirely, right? Please show: |
|
Yea, sorry fro the wait - here it is. > sudo tlp-stat -s -g
--- TLP 1.9.0 --------------------------------------------
+++ System Info
System = LENOVO Legion 5 15ACH6H 82JU
BIOS = GKCN65WW LENOVO
EC Firmware = 1.65
OS Release = Arch Linux
Kernel = 6.18.2-zen2-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Thu, 18 Dec 2025 18:00:58 +0000 x86_64
/proc/cmdline = BOOT_IMAGE=/vmlinuz-linux-zen root=UUID=e35af2d2-4e97-46d1-87c4-74bedef62c79 rw rootflags=subvol=@ loglevel=3 text bgrt_disable rd.luks.options=discard rd.luks.name=aeb4bd90-c7c8-40e5-b2bb-2cf58e2820a1=cryptdev root=/dev/mapper/cryptdev rootflags=subvol=/@ nvidia_drm.modeset=1 amdgpu.freesync_video=1 rtc_cmos.use_acpi_alarm=1
Init system = systemd 259
Boot mode = UEFI
Suspend mode = s2idle [deep]
+++ TLP Status
tlp = enabled, last run: 17:23:38, 22 sec(s) ago
tlp-rdw = enabled
tlp-pd = enabled, running
Power profile = balanced/BAT
Power source = AC
+++ Nvidia Graphics
/sys/class/drm/card0/device/driver = nvidia
+++ AMD Radeon Graphics
/sys/class/drm/card1/device/driver = amdgpu
/sys/class/drm/card1/device/power_dpm_force_performance_level = auto
/sys/class/drm/card1/card1-eDP-1/amdgpu/panel_power_savings = 0Tbh I didn't really look what the DPM_STATE does, but like it said it is legacy so somebody with older hardware could find it helpful, because when I tried to read it kept saying "performance", once I have changed to my power saver it still said performance. > cat /sys/class/drm/card1/device/power_dpm_force_performance_level
auto
> cat /sys/class/drm/card1/device/power_dpm_state
performance
> cat /sys/class/drm/card1/device/power_dpm_force_performance_level
low
> cat /sys/class/drm/card1/device/power_dpm_state
performance |
That was to be expected, because (as I wrote above) TLP does not write anything into power_dpm_state when the amdgpu driver is used. I am concerned with the radeon driver. Since the oldest hardware supported by amdgpu is from 2013, TLP's code for radeon – which still writes to power_dpm_state – can probably be removed together with the parameter. |
This is the code that i used as PoC for the power-saver setting for
RADEON_DPM_PERF*andRADEON_DPM_STATE*.It works the way I expected. When I have my laptop plugged in with power-saver - its set to power-saver. When i put balanced or performance it respects the _AC setting, also the same applies from battery.