Increase max TDP and make presets set same PL2
This commit is contained in:
parent
34ab214c39
commit
24272a6450
13
scripts/tdp
13
scripts/tdp
|
@ -8,6 +8,8 @@ pl2_path="${rapl_path}/constraint_1_power_limit_uw"
|
||||||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
gui_name="GPD TDP Manager"
|
gui_name="GPD TDP Manager"
|
||||||
gui_options=""
|
gui_options=""
|
||||||
|
tdp_min=5
|
||||||
|
tdp_max=35
|
||||||
|
|
||||||
# Set up help text
|
# Set up help text
|
||||||
help_text="${command_name}: GDP Win 3 TDP management script
|
help_text="${command_name}: GDP Win 3 TDP management script
|
||||||
|
@ -198,9 +200,9 @@ set_tdp () {
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $1 -lt 5 ] || [ $1 -gt 30 ]; then
|
if [ $1 -lt $tdp_min ] || [ $1 -gt $tdp_max ]; then
|
||||||
echo "TDP too high or low, should be between 5W and 30W"
|
echo "TDP too high or low, should be between ${tdp_min}W and ${tdp_max}W"
|
||||||
echo "This is a sanity limit to prevent you from throttling to a near unusable state"
|
echo "This is mostly a sanity limit to prevent you from throttling to a near unusable state"
|
||||||
else
|
else
|
||||||
#PL1
|
#PL1
|
||||||
local watts=$1
|
local watts=$1
|
||||||
|
@ -254,10 +256,11 @@ gui_handler() {
|
||||||
12 "`printf "\n 12W (Low power)\n "`" \
|
12 "`printf "\n 12W (Low power)\n "`" \
|
||||||
15 "`printf "\n 15W (Balanced)\n "`" \
|
15 "`printf "\n 15W (Balanced)\n "`" \
|
||||||
20 "`printf "\n 20W (High power)\n "`" \
|
20 "`printf "\n 20W (High power)\n "`" \
|
||||||
28 "`printf "\n 28W (Max power / Docked)\n "`"
|
25 "`printf "\n 25W (Very-high power)\n "`" \
|
||||||
|
35 "`printf "\n 35W (Max power / Docked)\n "`"
|
||||||
)
|
)
|
||||||
if ! [ -z $gui_tdp ]; then
|
if ! [ -z $gui_tdp ]; then
|
||||||
gui_msg "$(tdp set $gui_tdp --detail)"
|
gui_msg "$(tdp set $gui_tdp --detail --same)"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue