diff --git a/scripts/tdp b/scripts/tdp index 98c66ad..cb8db60 100755 --- a/scripts/tdp +++ b/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 )" gui_name="GPD TDP Manager" gui_options="" +tdp_min=5 +tdp_max=35 # Set up help text help_text="${command_name}: GDP Win 3 TDP management script @@ -198,9 +200,9 @@ set_tdp () { exit fi - if [ $1 -lt 5 ] || [ $1 -gt 30 ]; then - echo "TDP too high or low, should be between 5W and 30W" - echo "This is a sanity limit to prevent you from throttling to a near unusable state" + if [ $1 -lt $tdp_min ] || [ $1 -gt $tdp_max ]; then + echo "TDP too high or low, should be between ${tdp_min}W and ${tdp_max}W" + echo "This is mostly a sanity limit to prevent you from throttling to a near unusable state" else #PL1 local watts=$1 @@ -254,10 +256,11 @@ gui_handler() { 12 "`printf "\n 12W (Low power)\n "`" \ 15 "`printf "\n 15W (Balanced)\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 - gui_msg "$(tdp set $gui_tdp --detail)" + gui_msg "$(tdp set $gui_tdp --detail --same)" fi ;;