Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion src/variable_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 DGPUEnabled")

typeof()
{
Expand Down Expand Up @@ -44,6 +44,9 @@ typeof()
CpuThrottlingThreshold)
echo "uint8"
;;
DGPUEnabled)
echo "enum_dgpuenabled"
;;
*)
echo "unknown"
;;
Expand Down Expand Up @@ -91,6 +94,16 @@ valueof()
exit 18
fi
;;
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
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
Expand All @@ -115,6 +128,9 @@ acceptedvaluesfor()
enum_fancurve)
echo "Silent / Performance"
;;
enum_dgpuenabled)
echo "iGPU Only / NVIDIA Optimus / dGPU Only"
;;
uint8)
echo "0-255 (Actual supported values may vary)"
;;
Expand Down Expand Up @@ -187,6 +203,7 @@ list_variables()
enum_bool \
|enum_memode \
|enum_fancurve \
|enum_dgpuenabled \
|uint8)
echo -e "$var\t$(valueof $var)\t$(acceptedvaluesfor $var)"
;;
Expand Down