From 64a4b70b5646294e5625fb4e3b0520dba9ff55d9 Mon Sep 17 00:00:00 2001 From: Wiktor Mowinski Date: Mon, 24 Mar 2025 21:01:40 +0100 Subject: [PATCH 1/3] src/variable_command.sh Signed-off-by: Wiktor Mowinski --- src/variable_command.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/variable_command.sh b/src/variable_command.sh index 6e8b7f8..6e61f04 100644 --- a/src/variable_command.sh +++ b/src/variable_command.sh @@ -15,7 +15,7 @@ LIST_SUPPORTED="${args[--list-supported]}" supported_variables=$(echo "LockBios NetworkBoot UsbDriverStack SmmBwp"\ "Ps2Controller BootManagerEnabled PCIeResizeableBarsEnabled"\ "EnableCamera EnableWifiBt SerialRedirection SerialRedirection2"\ - "MeMode FanCurveOption CpuThrottlingThreshold") + "MeMode FanCurveOption CpuThrottlingThreshold HybridGraphicsMode") typeof() { @@ -44,6 +44,9 @@ typeof() CpuThrottlingThreshold) echo "uint8" ;; + HybridGraphicsMode) + echo "enum_hybridgraphics" + ;; *) echo "unknown" ;; @@ -91,6 +94,16 @@ valueof() exit 18 fi ;; + enum_hybridgraphics) + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g dasharo -n $1 -t uint8)" + error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 + case $_result in + 0) echo "iGPU Only";; + 1) echo "NVIDIA Optimus";; + 2) echo "dGPU Only";; + *) echo "Error!"; exit 18;; + esac + ;; uint8) _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g dasharo -n $1 -t uint8)" error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 @@ -115,6 +128,9 @@ acceptedvaluesfor() enum_fancurve) echo "Silent / Performance" ;; + enum_hybridgraphics) + echo "iGPU Only / NVIDIA Optimus / dGPU Only" + ;; uint8) echo "0-255 (Actual supported values may vary)" ;; From 61f01a49b5329136f6e0f83e3bc9274a3bf7f3ea Mon Sep 17 00:00:00 2001 From: Wiktor Mowinski Date: Tue, 25 Mar 2025 13:10:18 +0100 Subject: [PATCH 2/3] src/variable_command.sh: correct variable Signed-off-by: Wiktor Mowinski --- src/variable_command.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/variable_command.sh b/src/variable_command.sh index 6e61f04..5a08dea 100644 --- a/src/variable_command.sh +++ b/src/variable_command.sh @@ -15,7 +15,7 @@ LIST_SUPPORTED="${args[--list-supported]}" supported_variables=$(echo "LockBios NetworkBoot UsbDriverStack SmmBwp"\ "Ps2Controller BootManagerEnabled PCIeResizeableBarsEnabled"\ "EnableCamera EnableWifiBt SerialRedirection SerialRedirection2"\ - "MeMode FanCurveOption CpuThrottlingThreshold HybridGraphicsMode") + "MeMode FanCurveOption CpuThrottlingThreshold DGPUEnabled") typeof() { @@ -44,8 +44,8 @@ typeof() CpuThrottlingThreshold) echo "uint8" ;; - HybridGraphicsMode) - echo "enum_hybridgraphics" + DGPUEnabled) + echo "enum_dgpuenabled" ;; *) echo "unknown" @@ -94,7 +94,7 @@ valueof() exit 18 fi ;; - enum_hybridgraphics) + enum_dgpuenabled) _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g dasharo -n $1 -t uint8)" error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 case $_result in @@ -128,7 +128,7 @@ acceptedvaluesfor() enum_fancurve) echo "Silent / Performance" ;; - enum_hybridgraphics) + enum_dgpuenabled) echo "iGPU Only / NVIDIA Optimus / dGPU Only" ;; uint8) @@ -203,6 +203,7 @@ list_variables() enum_bool \ |enum_memode \ |enum_fancurve \ + |enum_dgpuenabled \ |uint8) echo -e "$var\t$(valueof $var)\t$(acceptedvaluesfor $var)" ;; From dac1119e3c1de0cc74c6617f3bff157c39fba9b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wiktor=20M=C3=B3wi=C5=84ski?= Date: Tue, 25 Mar 2025 15:04:25 +0100 Subject: [PATCH 3/3] Update src/variable_command.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Michał Kopeć --- src/variable_command.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/variable_command.sh b/src/variable_command.sh index 5a08dea..2d491c2 100644 --- a/src/variable_command.sh +++ b/src/variable_command.sh @@ -94,7 +94,7 @@ valueof() exit 18 fi ;; - enum_dgpuenabled) + enum_dgpuenabled) _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g dasharo -n $1 -t uint8)" error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 case $_result in