Automatically change power modes>

Still reasonably new to Fedora/Linux so apologies if this is an easy fix or I’ve missed something.

After distro hopping on my desktop pc for the past 6 months have settled with fedora and decided to install it on my laptop as well. All going fine but am having some trouble with power modes/power management profiles on the laptop. I’ve turned on automatic power saver for when battery power is low and that’s working as expected. I believe the battery threshold for this is in etc/upower/upower.conf and have that set to 15%?

However, if I switch to AC or charge the laptop for a period the power profile doesn’t automatically switch back to the previous profile and I have to change it manually. Is that expected behaviour or is there a way to set it so that if I’m on AC power or the battery reaches a certain threshold it swaps to the performance or balanced profile?

Ideally I was hoping to set so its something along the the lines of the performance profile by default when on AC and then balanced when on battery and greater then 15% battery life but not sure if that sort of fine tuning is possible?

I’m using an older Dell XPS model and have some battery saving settings turned on in bios so not sure if that’s causing problems either? Have had a look around the forum and can see there have been some issues with not being able to change power states but that doesn’t seem to be the problem here as I can change them manually.

I use TLP and it does what you want. You can tweaks everything with it. TLP is well-known to customize you profiles, automatically switching profiles. It is way better than ppd or tuned-ppd. If you want to try it, first learn more of it to not conflict with your system. Believe me or not, you will understand, not only does it control your cpu governor like ppd, it controls every single hardware, switches between AC and BAT easily. But you need to remove other tools like ppd or tuned-ppt not to conflict with tlp
Here is my config, tlp-stat:

--- TLP 1.6.1 --------------------------------------------

+++ Configured Settings:
defaults.conf L0006: TLP_ENABLE="1"
defaults.conf L0007: TLP_WARN_LEVEL="3"
defaults.conf L0008: TLP_PERSISTENT_DEFAULT="0"
defaults.conf L0009: DISK_IDLE_SECS_ON_AC="0"
defaults.conf L0010: DISK_IDLE_SECS_ON_BAT="2"
defaults.conf L0011: MAX_LOST_WORK_SECS_ON_AC="15"
defaults.conf L0012: MAX_LOST_WORK_SECS_ON_BAT="60"
/etc/tlp.conf L0135: CPU_ENERGY_PERF_POLICY_ON_AC="balance_performance"
/etc/tlp.conf L0136: CPU_ENERGY_PERF_POLICY_ON_BAT="power"
defaults.conf L0015: NMI_WATCHDOG="0"
defaults.conf L0016: DISK_DEVICES="nvme0n1 sda"
defaults.conf L0017: DISK_APM_LEVEL_ON_AC="254 254"
defaults.conf L0018: DISK_APM_LEVEL_ON_BAT="128 128"
defaults.conf L0019: DISK_APM_CLASS_DENYLIST="usb ieee1394"
defaults.conf L0020: DISK_IOSCHED="keep keep"
defaults.conf L0021: SATA_LINKPWR_ON_AC="med_power_with_dipm"
defaults.conf L0022: SATA_LINKPWR_ON_BAT="med_power_with_dipm"
defaults.conf L0023: AHCI_RUNTIME_PM_ON_AC="on"
defaults.conf L0024: AHCI_RUNTIME_PM_ON_BAT="auto"
defaults.conf L0025: AHCI_RUNTIME_PM_TIMEOUT="15"
defaults.conf L0026: PCIE_ASPM_ON_AC="default"
defaults.conf L0027: PCIE_ASPM_ON_BAT="default"
/etc/tlp.conf L0322: RADEON_DPM_PERF_LEVEL_ON_AC="auto"
/etc/tlp.conf L0323: RADEON_DPM_PERF_LEVEL_ON_BAT="low"
defaults.conf L0030: RADEON_POWER_PROFILE_ON_AC="default"
defaults.conf L0031: RADEON_POWER_PROFILE_ON_BAT="default"
defaults.conf L0032: WIFI_PWR_ON_AC="off"
defaults.conf L0033: WIFI_PWR_ON_BAT="on"
defaults.conf L0034: WOL_DISABLE="Y"
defaults.conf L0035: SOUND_POWER_SAVE_ON_AC="1"
defaults.conf L0036: SOUND_POWER_SAVE_ON_BAT="1"
defaults.conf L0037: SOUND_POWER_SAVE_CONTROLLER="Y"
defaults.conf L0038: BAY_POWEROFF_ON_AC="0"
defaults.conf L0039: BAY_POWEROFF_ON_BAT="0"
defaults.conf L0040: BAY_DEVICE="sr0"
defaults.conf L0041: RUNTIME_PM_ON_AC="on"
defaults.conf L0042: RUNTIME_PM_ON_BAT="auto"
defaults.conf L0043: RUNTIME_PM_DRIVER_DENYLIST="mei_me nouveau radeon"
defaults.conf L0044: USB_AUTOSUSPEND="1"
defaults.conf L0045: USB_EXCLUDE_AUDIO="1"
defaults.conf L0046: USB_EXCLUDE_BTUSB="0"
defaults.conf L0047: USB_EXCLUDE_PHONE="0"
defaults.conf L0048: USB_EXCLUDE_PRINTER="1"
defaults.conf L0049: USB_EXCLUDE_WWAN="0"
defaults.conf L0050: RESTORE_DEVICE_STATE_ON_STARTUP="0"
defaults.conf L0051: RESTORE_THRESHOLDS_ON_BAT="0"
defaults.conf L0052: NATACPI_ENABLE="1"
defaults.conf L0053: TPACPI_ENABLE="1"
defaults.conf L0054: TPSMAPI_ENABLE="1"
/etc/tlp.conf L0156: CPU_BOOST_ON_AC="1"
/etc/tlp.conf L0157: CPU_BOOST_ON_BAT="0"
/etc/tlp.conf L0169: CPU_HWP_DYN_BOOST_ON_AC="1"
/etc/tlp.conf L0170: CPU_HWP_DYN_BOOST_ON_BAT="0"
/etc/tlp.conf L0186: PLATFORM_PROFILE_ON_AC="performance"
/etc/tlp.conf L0187: PLATFORM_PROFILE_ON_BAT="low-power"

+++ System Info
System         = HP  HP Laptop 15-ef2xxx
BIOS           = F.35
EC Firmware    = 59.25
OS Release     = Fedora Linux 41 (KDE Plasma)
Kernel         = 6.12.8-200.fc41.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan  2 19:26:03 UTC 2025 x86_64
/proc/cmdline  = BOOT_IMAGE=(hd0,gpt5)/vmlinuz-6.12.8-200.fc41.x86_64 root=UUID=b8bf06c9-a29e-4741-bef4-0b4e38244cca ro rootflags=subvol=root rhgb quiet amd_iommu=on iommu=pt lockdown=integrity
Init system    = systemd 
Boot mode      = UEFI
Suspend mode   = [s2idle]
SELinux status = enabled (enforcing)

+++ TLP Status
State          = enabled
RDW state      = enabled
Last run       = 09:13:11 AM, 11 sec(s) ago
Mode           = battery
Power source   = battery

+++ Processor
CPU model      = AMD Ryzen 5 5500U 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  =  2100000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq  =   400000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq  =  2100000 [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..cpu11: 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/devices/system/cpu/cpufreq/boost                  = 0
/sys/module/workqueue/parameters/power_efficient       = N
/proc/sys/kernel/nmi_watchdog                          = 0

+++ Platform Profile
/sys/firmware/acpi/platform_profile                    = (not available)
/sys/firmware/acpi/platform_profile_choices            = (not available)

+++ Temperatures
Fan speed (fan1)       =     0 [/min]
Fan speed (fan2)       =     0 [/min]

+++ 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-KBG40ZNV256G_KIOXIA_91JPHGQOQW82
  Model      = KBG40ZNV256G KIOXIA                     
  Firmware   = HP00AE00
  Temp       = 25 °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:                        26 Celsius
    Available Spare:                    100%
    Available Spare Threshold:          5%
    Percentage Used:                    17%
    Data Units Written:                 57,642,102 [29.5 TB]
    Power Cycles:                       82,587
    Power On Hours:                     3,024
    Unsafe Shutdowns:                   214
    Media and Data Integrity Errors:    0

/dev/sda: not present.

+++ AMD Radeon Graphics
/sys/class/drm/card1/device/driver                                = amdgpu

/sys/class/drm/card1/device/power_dpm_force_performance_level     = low

+++ Wireless
bluetooth = off (software)
nfc       = none (no device)
wifi      = on
wwan      = none (no device)

hci0(btusb)                   : bluetooth, not connected
wlo1(rtw_8821ce)              : wifi, connected, power management = on

+++ Audio
/sys/module/snd_hda_intel/parameters/power_save            = 1
/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 (using BIOS preferences)

+++ PCIe Runtime Power Management
Enable devices    = (disabled)
Disable devices   = (disabled)
Device denylist   = (disabled)
Driver denylist   = mei_me nouveau radeon

/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:02.0/power/control = auto (0x060000, Host bridge, no driver)
/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: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:01:00.0/power/control = auto (0x028000, Network controller, rtw_8821ce)
/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 (0x030000, VGA compatible controller, amdgpu)
/sys/bus/pci/devices/0000:03:00.1/power/control = auto (0x040300, Audio device, snd_hda_intel)
/sys/bus/pci/devices/0000:03:00.2/power/control = auto (0x108000, Encryption controller, ccp)
/sys/bus/pci/devices/0000:03:00.3/power/control = auto (0x0c0330, USB controller, xhci_hcd)
/sys/bus/pci/devices/0000:03:00.4/power/control = auto (0x0c0330, USB controller, xhci_hcd)
/sys/bus/pci/devices/0000:03:00.5/power/control = auto (0x048000, Multimedia controller, snd_rn_pci_acp3x)
/sys/bus/pci/devices/0000:03:00.6/power/control = auto (0x040300, Audio device, snd_hda_intel)

+++ 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 0408:5365 control = auto, autosuspend_delay_ms = 2000 -- Quanta Computer, Inc. HP TrueVision HD Camera (uvcvideo)
Bus 001 Device 003 ID 0bda:b00e control = auto, autosuspend_delay_ms = 2000 -- Realtek Semiconductor Corp. Bluetooth Radio (btusb)
Bus 002 Device 001 ID 1d6b:0003 control = auto, autosuspend_delay_ms =    0 -- Linux Foundation 3.0 root hub (hub)
Bus 003 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms =    0 -- Linux Foundation 2.0 root hub (hub)
Bus 004 Device 001 ID 1d6b:0003 control = auto, autosuspend_delay_ms =    0 -- Linux Foundation 3.0 root hub (hub)

+++ Battery Care
Plugin: generic
Supported features: none available

+++ Battery Status: BAT0
/sys/class/power_supply/BAT0/manufacturer                   = HP
/sys/class/power_supply/BAT0/model_name                     = Primary
/sys/class/power_supply/BAT0/cycle_count                    =      0 (or not supported)
/sys/class/power_supply/BAT0/energy_full_design             =  32330 [mWh]
/sys/class/power_supply/BAT0/energy_full                    =  32330 [mWh]
/sys/class/power_supply/BAT0/energy_now                     =  24811 [mWh]
/sys/class/power_supply/BAT0/power_now                      =   3923 [mW]
/sys/class/power_supply/BAT0/status                         = Discharging

/sys/class/power_supply/BAT0/charge_control_start_threshold = (not available) 
/sys/class/power_supply/BAT0/charge_control_end_threshold   = (not available) 

Charge                                                      =   76.7 [%]
Capacity                                                    =  100.0 [%]

1 Like