AMD CPU limited to min frequency
Closed this issue · 4 comments
[x] I've read and accepted the Bug Reporting Howto
[x] I've provided all required tlp-stat
outputs via Gist (see below)
Describe the bug
CPU max scaling bug that defaults CPU to do its maximum speed to its min frequency speed.
latest 1.7
A clear and concise description of what the bug is.
Expected behavior
If I touched it to min 0 and max 1800 it should do 1.8ghz max not more or less.
A clear and concise description of what you expected to happen.
"Works fine" is not enough to analyze the problem!
To Reproduce
Touching CPU Max Scalling defaults the current cpu policy to be within 400 and 400.
Steps to reproduce the unexpected behavior:
- Does the problem occur on battery or AC or both? I tried battery well for AC not yet.
- Actions to reproduce the behaviour.
- Shell commands entered and their output including error message(s) systemctl status tlp shows no error whatsoever
- Full output of
tlp-stat
via https://gist.github.com/ for all
matching cases of 1 (not as file attachment, no screenshots)
`╰─$ sudo tlp-stat
--- TLP 1.7.0 --------------------------------------------
+++ Configured Settings:
/etc/tlp.conf L0035: TLP_ENABLE="1"
defaults.conf L0007: TLP_WARN_LEVEL="3"
defaults.conf L0008: TLP_MSG_COLORS="91 93 1 92"
defaults.conf L0009: TLP_PERSISTENT_DEFAULT="0"
/etc/tlp.conf L0082: DISK_IDLE_SECS_ON_AC="0"
/etc/tlp.conf L0083: DISK_IDLE_SECS_ON_BAT="2"
/etc/tlp.conf L0088: MAX_LOST_WORK_SECS_ON_AC="15"
/etc/tlp.conf L0089: MAX_LOST_WORK_SECS_ON_BAT="60"
/etc/tlp.conf L0146: CPU_ENERGY_PERF_POLICY_ON_AC="performance"
/etc/tlp.conf L0147: CPU_ENERGY_PERF_POLICY_ON_BAT="power"
/etc/tlp.conf L0185: NMI_WATCHDOG="0"
defaults.conf L0017: DISK_DEVICES="nvme0n1 sda"
defaults.conf L0018: DISK_APM_LEVEL_ON_AC="254 254"
defaults.conf L0019: DISK_APM_LEVEL_ON_BAT="128 128"
defaults.conf L0020: DISK_APM_CLASS_DENYLIST="usb ieee1394"
defaults.conf L0021: DISK_IOSCHED="keep keep"
defaults.conf L0022: SATA_LINKPWR_ON_AC="med_power_with_dipm"
/etc/tlp.conf L0273: SATA_LINKPWR_ON_BAT="min_power"
defaults.conf L0024: AHCI_RUNTIME_PM_ON_AC="on"
/etc/tlp.conf L0292: AHCI_RUNTIME_PM_ON_BAT="auto"
defaults.conf L0026: AHCI_RUNTIME_PM_TIMEOUT="15"
defaults.conf L0027: PCIE_ASPM_ON_AC="default"
/etc/tlp.conf L0392: PCIE_ASPM_ON_BAT="powersupersave"
/etc/tlp.conf L0331: RADEON_DPM_PERF_LEVEL_ON_AC="high"
/etc/tlp.conf L0332: RADEON_DPM_PERF_LEVEL_ON_BAT="low"
/etc/tlp.conf L0346: RADEON_POWER_PROFILE_ON_AC="high"
/etc/tlp.conf L0347: RADEON_POWER_PROFILE_ON_BAT="low"
defaults.conf L0033: AMDGPU_ABM_LEVEL_ON_AC="0"
defaults.conf L0034: AMDGPU_ABM_LEVEL_ON_BAT="1"
/etc/tlp.conf L0363: WIFI_PWR_ON_AC="off"
/etc/tlp.conf L0364: WIFI_PWR_ON_BAT="on"
defaults.conf L0037: WOL_DISABLE="Y"
defaults.conf L0038: SOUND_POWER_SAVE_ON_AC="1"
/etc/tlp.conf L0378: SOUND_POWER_SAVE_ON_BAT="10"
defaults.conf L0040: SOUND_POWER_SAVE_CONTROLLER="Y"
defaults.conf L0041: BAY_POWEROFF_ON_AC="0"
/etc/tlp.conf L0307: BAY_POWEROFF_ON_BAT="1"
defaults.conf L0043: BAY_DEVICE="sr0"
defaults.conf L0044: RUNTIME_PM_ON_AC="on"
defaults.conf L0045: RUNTIME_PM_ON_BAT="auto"
defaults.conf L0046: RUNTIME_PM_DRIVER_DENYLIST="mei_me nouveau radeon xhci_hcd"
defaults.conf L0047: USB_AUTOSUSPEND="1"
defaults.conf L0048: USB_EXCLUDE_AUDIO="1"
defaults.conf L0049: USB_EXCLUDE_BTUSB="0"
defaults.conf L0050: USB_EXCLUDE_PHONE="0"
defaults.conf L0051: USB_EXCLUDE_PRINTER="1"
defaults.conf L0052: USB_EXCLUDE_WWAN="0"
defaults.conf L0053: RESTORE_DEVICE_STATE_ON_STARTUP="0"
defaults.conf L0054: RESTORE_THRESHOLDS_ON_BAT="0"
defaults.conf L0055: NATACPI_ENABLE="1"
defaults.conf L0056: TPSMAPI_ENABLE="1"
/etc/tlp.conf L0097: CPU_DRIVER_OPMODE_ON_AC="active"
/etc/tlp.conf L0098: CPU_DRIVER_OPMODE_ON_BAT="active"
/etc/tlp.conf L0116: CPU_SCALING_GOVERNOR_ON_AC="performance"
/etc/tlp.conf L0117: CPU_SCALING_GOVERNOR_ON_BAT="powersave"
/etc/tlp.conf L0130: CPU_SCALING_MIN_FREQ_ON_BAT="0"
/etc/tlp.conf L0131: CPU_SCALING_MAX_FREQ_ON_BAT="3000"
/etc/tlp.conf L0167: CPU_BOOST_ON_AC="1"
/etc/tlp.conf L0168: CPU_BOOST_ON_BAT="0"
/etc/tlp.conf L0195: PLATFORM_PROFILE_ON_AC="performance"
/etc/tlp.conf L0196: PLATFORM_PROFILE_ON_BAT="low-power"
/etc/tlp.conf L0338: RADEON_DPM_STATE_ON_AC="performance"
/etc/tlp.conf L0339: RADEON_DPM_STATE_ON_BAT="battery"
+++ System Info
System = LENOVO Lenovo Legion R9000P2021H 82Q0
BIOS = GKCN64WW
EC Firmware = 1.64
OS Release = Arch Linux
Kernel = 6.10.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 12 Sep 2024 17:21:02 +0000 x86_64
/proc/cmdline = BOOT_IMAGE=/vmlinuz-linux root=UUID=ec24a11e-26f4-463a-8999-664d1136fff0 rw zswap.enabled=0 rootfstype=ext4 loglevel=0 nowatchdog nvme_load=YES ibt=off
Init system = systemd
Boot mode = UEFI
Suspend mode = s2idle [deep]
+++ TLP Status
State = enabled
RDW state = not installed
Last run = 12:12:10 AM, 14 sec(s) ago
Mode = battery
Power source = battery
+++ Processor
CPU model = AMD Ryzen 7 5800H 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 = 400000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq = 400000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq = 400000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq = 4463000 [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/module/workqueue/parameters/power_efficient = Y
/proc/sys/kernel/nmi_watchdog = 0
+++ Platform Profile
/sys/firmware/acpi/platform_profile = (not available)
/sys/firmware/acpi/platform_profile_choices = (not available)
+++ Temperatures
CPU temp = (not available)
Fan speed = (not available)
+++ File System
/proc/sys/vm/laptop_mode = 2
/proc/sys/vm/dirty_writeback_centisecs = 6000
/proc/sys/vm/dirty_expire_centisecs = 6000
/proc/sys/vm/dirty_ratio = 20
/proc/sys/vm/dirty_background_ratio = 10
+++ Disks
Devices = nvme0n1 sda
/dev/nvme0n1:
Type = NVMe
Disk ID = nvme-KINGSTON_SA2000M81000G_****************
Model = KINGSTON SA2000M81000G
Firmware = S5Z42105
Temp = 30 °C
Scheduler = [none] mq-deadline kyber bfq (multi queue)
Runtime PM:
/sys/block/nvme0n1/device/power/control = auto, autosuspend_delay_ms = (not available)
SMART info:
Critical Warning: 0x00
Temperature: 30 Celsius
Available Spare: 100%
Available Spare Threshold: 10%
Percentage Used: 5%
Data Units Written: 97,700,369 [50.0 TB]
Power Cycles: 7,313
Power On Hours: 12,823
Unsafe Shutdowns: 1,081
Media and Data Integrity Errors: 0
/dev/sda: not present.
+++ AHCI Link Power Management (ALPM) :: SATA Links
/sys/bus/pci/devices/0000:07:00.0/ata1/host0/scsi_host/host0/link_power_management_policy = min_power
/sys/bus/pci/devices/0000:07:00.1/ata2/host1/scsi_host/host1/link_power_management_policy = min_power
+++ AHCI Port Runtime Power Management :: SATA/ATA Ports
/sys/bus/pci/devices/0000:07:00.0/ata1/power/control = auto
/sys/bus/pci/devices/0000:07:00.1/ata2/power/control = auto
+++ AMD Radeon Graphics
/sys/class/drm/card1/device/driver = amdgpu
/sys/class/drm/card1/device/power_dpm_force_performance_level = low
/sys/class/drm/card1/card1-eDP-1/amdgpu/panel_power_savings = 1
+++ Wireless
bluetooth = off (software)
nfc = none (no device)
wifi = on
wwan = none (no device)
hci0(btusb) : bluetooth, not connected
wlan0(iwlwifi) : wifi, connected, power management = on
+++ Audio
/sys/module/snd_hda_intel/parameters/power_save = 10
/sys/module/snd_hda_intel/parameters/power_save_controller = Y
+++ PCIe Active State Power Management
/sys/module/pcie_aspm/parameters/policy = default performance powersave [powersupersave]
+++ PCIe Runtime Power Management
Enable devices = (disabled)
Disable devices = (disabled)
Device denylist = (disabled)
Driver denylist = mei_me nouveau radeon xhci_hcd
/sys/bus/pci/devices/0000:00:00.0/power/control = auto (0x060000, Host bridge, no driver)
/sys/bus/pci/devices/0000:00:00.2/power/control = auto (0x080600, IOMMU, no driver)
/sys/bus/pci/devices/0000:00:01.0/power/control = auto (0x060000, Host bridge, no driver)
/sys/bus/pci/devices/0000:00:01.1/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:01.2/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:02.0/power/control = auto (0x060000, Host bridge, no driver)
/sys/bus/pci/devices/0000:00:02.1/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:02.2/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:02.4/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:08.0/power/control = auto (0x060000, Host bridge, no driver)
/sys/bus/pci/devices/0000:00:08.1/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:08.2/power/control = auto (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:14.0/power/control = auto (0x0c0500, SMBus, piix4_smbus)
/sys/bus/pci/devices/0000:00:14.3/power/control = auto (0x060100, ISA bridge, no driver)
/sys/bus/pci/devices/0000:00:18.0/power/control = auto (0x060000, Host bridge, no driver)
/sys/bus/pci/devices/0000:00:18.1/power/control = auto (0x060000, Host bridge, no driver)
/sys/bus/pci/devices/0000:00:18.2/power/control = auto (0x060000, Host bridge, no driver)
/sys/bus/pci/devices/0000:00:18.3/power/control = auto (0x060000, Host bridge, k10temp)
/sys/bus/pci/devices/0000:00:18.4/power/control = auto (0x060000, Host bridge, no driver)
/sys/bus/pci/devices/0000:00:18.5/power/control = auto (0x060000, Host bridge, no driver)
/sys/bus/pci/devices/0000:00:18.6/power/control = auto (0x060000, Host bridge, no driver)
/sys/bus/pci/devices/0000:00:18.7/power/control = auto (0x060000, Host bridge, no driver)
/sys/bus/pci/devices/0000:02:00.0/power/control = auto (0x010802, Non-Volatile memory controller, nvme)
/sys/bus/pci/devices/0000:03:00.0/power/control = auto (0x020000, Ethernet controller, r8169)
/sys/bus/pci/devices/0000:04:00.0/power/control = auto (0x028000, Network controller, iwlwifi)
/sys/bus/pci/devices/0000:05:00.0/power/control = auto (0x010802, Non-Volatile memory controller, nvme)
/sys/bus/pci/devices/0000:06:00.0/power/control = auto (0x030000, VGA compatible controller, amdgpu)
/sys/bus/pci/devices/0000:06:00.2/power/control = auto (0x108000, Encryption controller, ccp)
/sys/bus/pci/devices/0000:06:00.3/power/control = on (0x0c0330, USB controller, xhci_hcd)
/sys/bus/pci/devices/0000:06:00.4/power/control = on (0x0c0330, USB controller, xhci_hcd)
/sys/bus/pci/devices/0000:06:00.5/power/control = auto (0x048000, Multimedia controller, no driver)
/sys/bus/pci/devices/0000:06:00.6/power/control = auto (0x040300, Audio device, snd_hda_intel)
/sys/bus/pci/devices/0000:07:00.0/power/control = auto (0x010601, SATA controller, ahci)
/sys/bus/pci/devices/0000:07:00.1/power/control = auto (0x010601, SATA controller, ahci)
+++ USB
Autosuspend = enabled
Device allowlist = (not configured)
Device denylist = (not configured)
Exclude audio = enabled
Exclude bluetooth = disabled
Exclude phones = disabled
Exclude printers = enabled
Exclude WWAN = disabled
Bus 001 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 2.0 root hub (hub)
Bus 001 Device 002 ID 05e3:0610 control = auto, autosuspend_delay_ms = 0 -- Genesys Logic, Inc. Hub (hub)
Bus 001 Device 003 ID 048d:c101 control = on, autosuspend_delay_ms = 2000 -- Integrated Technology Express, Inc. ITE Device(8910) (usbhid)
Bus 002 Device 001 ID 1d6b:0003 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 3.0 root hub (hub)
Bus 002 Device 002 ID 05e3:0620 control = auto, autosuspend_delay_ms = 0 -- Genesys Logic, Inc. GL3523 Hub (hub)
Bus 003 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 2.0 root hub (hub)
Bus 003 Device 002 ID 8087:0032 control = auto, autosuspend_delay_ms = 2000 -- Intel Corp. AX210 Bluetooth (btusb)
Bus 004 Device 001 ID 1d6b:0003 control = auto, autosuspend_delay_ms = 0 -- Linux Foundation 3.0 root hub (hub)
+++ Battery Care
Plugin: lenovo
Supported features: charge threshold
Driver usage:
- vendor (ideapad_laptop) = active (charge threshold)
Parameter value range: - STOP_CHARGE_THRESH_BAT0: 0(off), 1(on) -- battery conservation mode
/sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode = 0 (off)
+++ Battery Status: BAT0
/sys/class/power_supply/BAT0/manufacturer = Sunwoda
/sys/class/power_supply/BAT0/model_name = L20D4PC1
/sys/class/power_supply/BAT0/cycle_count = 207
/sys/class/power_supply/BAT0/energy_full_design = 80000 [mWh]
/sys/class/power_supply/BAT0/energy_full = 70610 [mWh]
/sys/class/power_supply/BAT0/energy_now = 4950 [mWh]
/sys/class/power_supply/BAT0/power_now = 8231 [mW]
/sys/class/power_supply/BAT0/status = Discharging
Charge = 7.0 [%]
Capacity = 88.3 [%]`
Additional context
Add any other context about the problem here.
╰─$ cpupower frequency-info
analyzing CPU 12:
driver: amd-pstate-epp
CPUs which run at the same hardware frequency: 12
CPUs which need to have their frequency coordinated by software: 12
maximum transition latency: Cannot determine or is not supported.
hardware limits: 400 MHz - 4.46 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 400 MHz and 400 MHz.
The governor "powersave" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 399 MHz (asserted by call to kernel)
boost state support:
Supported: yes
Active: yes
AMD PSTATE Highest Performance: 166. Maximum Frequency: 4.46 GHz.
AMD PSTATE Nominal Performance: 119. Nominal Frequency: 3.20 GHz.
AMD PSTATE Lowest Non-linear Performance: 41. Lowest Non-linear Frequency: 1.10 GHz.
AMD PSTATE Lowest Performance: 15. Lowest Frequency: 400 MHz.
As you can see the current policy's frequency are set to be between 400 MHz and 400 MHz.
if i set the mim cpu scalling to 400 and max at 3000 it still dont work
Hi,
what you observe is the designed behaviour of the kernel driver amd-pstate-epp with the settings you specified. TLP is not responsible for this.
I suggest you use a less agressive EPP setting than
/etc/tlp.conf L0147: CPU_ENERGY_PERF_POLICY_ON_BAT="power"
By the way, amd-pstate-epp ignores all frequency settings. It doesn't matter what you set there. This is explained in the docs https://linrunner.de/tlp/settings/processor.html#cpu-driver-opmode-on-ac-bat
In active mode, the processor selects the operating frequencies autonomously within the limits imposed by the hardware, including turbo boost. The powersave governor can also lead to max frequency. Configuring the min and max frequency (as shown below) is not supported.
Please ask further questions about which settings to choose and the amd_pstate driver in the forum of your distribution (or in another Linux forum of your choice). The issue tracker is reserved for TLP bug reports. Thanks for your understanding.
if i set iCPU_DRIVER_OPMODE_ON_BAT="guided" or "passive", it does not work regardless having PU_ENERGY_PERF_POLICY_ON_BAT on any settings. I will try to seek out arch linux forums thankyou!