From 6fbed985865801fe1143460c5fab01af819b0d41 Mon Sep 17 00:00:00 2001 From: Quad Date: Fri, 21 May 2021 10:28:20 +0200 Subject: [PATCH] Add option for setting PL2=PL1 --- scripts/tdp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/tdp b/scripts/tdp index 082800f..b4225cf 100755 --- a/scripts/tdp +++ b/scripts/tdp @@ -42,6 +42,7 @@ Example: Arguments: --detail, -d Prints PL2 as well as PL1 + --match-pl2, -m PL2 will be set to the same as PL1 rather than 2W higher --help Prints this help text" print_help () { @@ -158,6 +159,9 @@ set_tdp () { #PL2 local watts2=$(expr $watts + 2) + if [[ "$@" == *"--match-pl2"* ]] || [[ "$@" == *"-m"* ]]; then + watts2=$watts + fi set_pl 2 $watts2