diff options
author | Que Quotion | 2022-02-20 04:36:50 +0900 |
---|---|---|
committer | Que Quotion | 2022-02-20 04:36:50 +0900 |
commit | ded4bdf7f398a1d65bc733d9e235848327dcf2d7 (patch) | |
tree | bce3363548e0061407ff91c93e6ee25cebaab89b /throttlectl | |
parent | 9b2e7d0738e6805387f5d7dafc4b903de4d1a085 (diff) | |
download | aur-ded4bdf7f398a1d65bc733d9e235848327dcf2d7.tar.gz |
Get NVPM working again
Diffstat (limited to 'throttlectl')
-rwxr-xr-x | throttlectl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/throttlectl b/throttlectl index 3aa8461e197b..1bd613f8fdc8 100755 --- a/throttlectl +++ b/throttlectl @@ -77,7 +77,8 @@ check_backlight() { } throttle_nvpm() { - printf "nvidia-settings not found; only nvidia currently supported" || \ + [[ -z "$(command -v nvidia-settings)" ]] && \ + printf "nvidia-settings not found; only nvidia currently supported" || \ DISPLAY=":0.0" nvidia-settings -a [gpu:0]/GPUPowerMizerMode="${NVPM}" > /dev/null & } @@ -269,8 +270,7 @@ while (( "$#" )); do cut|off|powersave|start) NVPM="0"; SHIFT="2" ;; \ full|on|performance|stop) NVPM="1"; SHIFT="2" ;; \ check|status) check_nvpm; SHIFT="2" ;; esac - [[ -n "${NVPM}" ]] && [[ -z "$(command -v nvidia-settings)" ]] && \ - throttle_nvpm + [[ -n "${NVPM}" ]] && throttle_nvpm [[ -n "${SHIFT}" ]] && shift "${SHIFT}" || shift unset NVPM SHIFT ;; |