Bug#1110770: power-profiles-daemon: PPD users might benefit from an entry in /etc/default

debian user bwtnguy at yahoo.com
Mon Aug 11 00:09:59 BST 2025


Package: power-profiles-daemon
Severity: wishlist
Tags: upstream

Dear Maintainer,

I have not used this pkg on bookworm, it had nothing to offer amd cpu.

I did come up with a quick and dirty script awhile back, and since trying trixie, and seeing that 
power-profiles-daemon is still pretty much braindead... I mean it works, but no control at all.

I'll share my script and opinion that users of this pkg would benefit from a default profile in 
/etc/default/power-profiles-daemon

Thanks,
bw

-- System Information:
Debian Release: 12.11
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.33+deb12-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages power-profiles-daemon depends on:
ii  libc6                  2.36-9+deb12u10
ii  libglib2.0-0           2.74.6-2+deb12u6
ii  libgudev-1.0-0         237-2
ii  libpolkit-gobject-1-0  122-3

power-profiles-daemon recommends no packages.

power-profiles-daemon suggests no packages.
-------------- next part --------------
#!/bin/sh
# amdepp4.sh cleaned up script, shellcheck, help
# v3 added LOW, BAL, FULL profiles to set command
# v2 add support for amd_pstate_lowest_nonlinear_freq, boost. remove passive/acpi-cpufreq governors

# defaults, uncomment one GOV and one PREF
#ACTIVE_GOV=performance
ACTIVE_GOV=powersave

#ACTIVE_PREF=performance
ACTIVE_PREF=balance_performance
#ACTIVE_PREF=balance_power
#ACTIVE_PREF=power

# set min freq to amd_pstate_lowest_nonlinear_freq?
ACTIVE_APLNF=false
#ACTIVE_APLNF=true

# set boost on?
#ACTIVE_APBOOST=off
ACTIVE_APBOOST=on

#---------------------------------------------------------------
#we set all cpu threads at once, but only read cpu0 for reference
#TEEPATH="/sys/devices/system/cpu/cpu*/cpufreq" shellcheck SC2086 (info)
READPATH=/sys/devices/system/cpu/cpufreq/policy0

if [ ! -d /sys/devices/system/cpu/amd_pstate ] ; then
        echo not amd_pstate compatible cpu
        exit 1
fi

read -r DRIVER_NAME <$READPATH/scaling_driver || exit 2
read -r APLNF <$READPATH/amd_pstate_lowest_nonlinear_freq || exit 2
read -r APBOOST <$READPATH/boost || exit 2
read -r APMINFREQ <$READPATH/cpuinfo_min_freq || exit 2

case "$1" in
        set)
                case "$2" in
                        LOW|low)    PROFILE="LOW"
                                ACTIVE_GOV=powersave
                                ACTIVE_PREF=power
                                ACTIVE_APLNF=false
                                ACTIVE_APBOOST=off
                        ;;
                        BAL|bal)    PROFILE="BAL"
                                ACTIVE_GOV=powersave
                                ACTIVE_PREF=balance_power
                                ACTIVE_APLNF=true
                                ACTIVE_APBOOST=on
                        ;;
                        FULL|full)   PROFILE="FULL"
                                ACTIVE_GOV=performance
                                ACTIVE_PREF=performance
                                ACTIVE_APLNF=true
                                ACTIVE_APBOOST=on
                        ;;
			*)	PROFILE="DEFAULT"
                esac

	case $DRIVER_NAME in
		amd-pstate-epp)
		echo "Profile: $PROFILE"
		echo $ACTIVE_GOV | /usr/bin/tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
		echo $ACTIVE_PREF | /usr/bin/tee /sys/devices/system/cpu/cpu*/cpufreq/energy_performance_preference
		printf "set scaling min freq: "
		[ $ACTIVE_APLNF = "true" ] && echo "$APLNF" | /usr/bin/tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq
		[ $ACTIVE_APLNF = "false" ] && echo "$APMINFREQ" | /usr/bin/tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq
		printf "set scaling boost: "
		[ $ACTIVE_APBOOST = "on" ] && echo 1 | /usr/bin/tee /sys/devices/system/cpu/cpu*/cpufreq/boost
		[ $ACTIVE_APBOOST = "off" ] && echo 0 | /usr/bin/tee /sys/devices/system/cpu/cpu*/cpufreq/boost
		;;
		*) echo "amd_pstate not in active mode"
	esac
	;;

	-h|--help)
		printf "Usage:\tamdepp <get>\n\tamdepp set\n\tamdepp set [LOW|BAL|FULL]\n\tamdepp -h, --help\n"
	;;

	get|*)
	# default info only
	echo driver: "$DRIVER_NAME"
	read -r DRIVER_MODE </sys/devices/system/cpu/amd_pstate/status || exit 2
	echo mode: "$DRIVER_MODE"
#	read -r AV_GOV <$READPATH/scaling_available_governors || exit 2
#	echo available governors: $AV_GOV
	read -r CURR_GOV <$READPATH/scaling_governor || exit 2
	echo governor: "$CURR_GOV"
#	read -r AV_EPP <$READPATH/energy_performance_available_preferences
#	echo epp: $AV_EPP
	read -r CURR_EPP <$READPATH/energy_performance_preference || exit 3
	echo current epp: "$CURR_EPP"

	read -r GOV_MIN <$READPATH/scaling_min_freq
	read -r GOV_MAX <$READPATH/scaling_max_freq
	echo min-max freq: "$GOV_MIN"-"$GOV_MAX"

	echo lowest nonlinear freq: "$APLNF"
#	[ $ACTIVE_APLNF = "false" ] && echo " -NLF is" $ACTIVE_APLNF
	echo boost: "$APBOOST"
#	[ $ACTIVE_APBOOST = "on" ] && echo " -BOOST is" $ACTIVE_APBOOST

esac
exit 0

# Enable on bootup with /etc/systemd/system/amdepp.service
#[Unit]
#Description=Set AMD CPU Scaling Governor and Energy Performance Preference
#
#[Service]
#Type=oneshot
#ExecStart=-/usr/local/sbin/amdepp.sh set
#
#[Install]
#WantedBy=multi-user.target


More information about the Pkg-freedesktop-maintainers mailing list