summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorQue Quotion2022-02-20 04:36:50 +0900
committerQue Quotion2022-02-20 04:36:50 +0900
commitded4bdf7f398a1d65bc733d9e235848327dcf2d7 (patch)
treebce3363548e0061407ff91c93e6ee25cebaab89b
parent9b2e7d0738e6805387f5d7dafc4b903de4d1a085 (diff)
downloadaur-ded4bdf7f398a1d65bc733d9e235848327dcf2d7.tar.gz
Get NVPM working again
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rwxr-xr-xthrottlectl6
3 files changed, 7 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 32b874b540ee..43226c3206f7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = throttlectl
pkgdesc = Command-line user discretion power managment utility
- pkgver = 4
+ pkgver = 5
pkgrel = 1
url = https://bbs.archlinux.org/viewtopic.php?id=180762
arch = any
@@ -17,7 +17,7 @@ pkgbase = throttlectl
source = throttle-cut.service
source = powersave
source = performance
- sha512sums = a116c2c66099086eb8d8f42bdb1f8db7c093ca824d510f13a91ee406d13da55264f810a119590f44e774430e2bd9aba81d03ab531d147e227a1db0f71459c8ce
+ sha512sums = 067bcb38ded98a571ce5005c7f755761e437df7d3a8cf777605f11b497b7ae11c3b4e2470ce0f322412b1571962d061b404e4b670715baa2f1134af404aca6d9
sha512sums = 6254e73446a91ea7945b9e4db1a1047eb2055d93aee315006857711ab21cba140da3badcf5834d2628e4799494a069647d11aa378a9bac67691df8d8b3adc12f
sha512sums = 926f7c787aea8c1027f331fe2e9417ba8e4f15a79f51610baafeed5d0de86d8f41da92f4460c29a5ce251e7cc110e26c2c344931af91949dc529595cc18c0f0e
sha512sums = 0d90ae4c0b9600f50ffd3e2c1a03b49d2fbdb9a2d14c8211e86463787549ada156498f68989d851952fe34660daaacc11242f5ee9e9e318f3d2a3eba0971eb53
diff --git a/PKGBUILD b/PKGBUILD
index 3d34730e1876..044c9906d341 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Que Quotion <quequotion@mailinator.com>
pkgname=throttlectl
-pkgver=4
+pkgver=5
pkgrel=1
pkgdesc="Command-line user discretion power managment utility"
arch=('any')
@@ -14,7 +14,7 @@ source=('throttlectl'
'throttle-cut.service'
'powersave'
'performance')
-sha512sums=('a116c2c66099086eb8d8f42bdb1f8db7c093ca824d510f13a91ee406d13da55264f810a119590f44e774430e2bd9aba81d03ab531d147e227a1db0f71459c8ce'
+sha512sums=('067bcb38ded98a571ce5005c7f755761e437df7d3a8cf777605f11b497b7ae11c3b4e2470ce0f322412b1571962d061b404e4b670715baa2f1134af404aca6d9'
'6254e73446a91ea7945b9e4db1a1047eb2055d93aee315006857711ab21cba140da3badcf5834d2628e4799494a069647d11aa378a9bac67691df8d8b3adc12f'
'926f7c787aea8c1027f331fe2e9417ba8e4f15a79f51610baafeed5d0de86d8f41da92f4460c29a5ce251e7cc110e26c2c344931af91949dc529595cc18c0f0e'
'0d90ae4c0b9600f50ffd3e2c1a03b49d2fbdb9a2d14c8211e86463787549ada156498f68989d851952fe34660daaacc11242f5ee9e9e318f3d2a3eba0971eb53')
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
;;