summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasiliy Stelmachenok2021-10-12 21:57:16 +0300
committerVasiliy Stelmachenok2021-10-12 21:57:16 +0300
commit7a1349cdde5cddf4410f1064483dcaa24c68b5bf (patch)
tree3e1e494b6095974130ac2e26c42b8b20648e2b0f
parent317d6eb5c084fc01ab1022e5d4516139b4eefffb (diff)
downloadaur-7a1349cdde5cddf4410f1064483dcaa24c68b5bf.tar.gz
Fix Brightness Control
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD19
2 files changed, 11 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d673cec2f98a..5eb0c93868f2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = nvidia-dkms-performance
pkgver = 470.74
- pkgrel = 8
+ pkgrel = 9
url = https://www.nvidia.com/
arch = x86_64
arch = aarch64
diff --git a/PKGBUILD b/PKGBUILD
index 02fd8ee3f6e0..1ec73550bf6a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -64,7 +64,7 @@ else
pkgname=(nvidia-dkms-performance nvidia-settings-performance nvidia-utils-performance opencl-nvidia-performance)
fi
pkgver=470.74
-pkgrel=8
+pkgrel=9
arch=('x86_64' 'aarch64')
url='https://www.nvidia.com/'
license=('custom')
@@ -153,17 +153,16 @@ prepare() {
fi
fi
- registrydwords='"EnableBrightnessControl=1'
if [ ! -z $_powermizer_scheme ] && [ -z $_override_max_perf ]; then
echo "You have selected the powermizer scheme: $_powermizer_scheme"
echo "If you don't like it in time you can change it with the Xorg "RegistryDwords" option (in the bit value)"
echo "or rebuild it with the new value."
if [ "$_powermizer_scheme" = "1" ]; then
- registrydwords+=';PowerMizerEnable=0x1;PerfLevelSrc=0x2222;PowerMizerDefault=0x3;PowerMizerDefaultAC=0x1'
+ registrydwords='"PowerMizerEnable=0x1;PerfLevelSrc=0x2222;PowerMizerDefault=0x3;PowerMizerDefaultAC=0x1"'
elif [ "$_powermizer_scheme" = "2" ]; then
- registrydwords+=';PowerMizerEnable=0x1;PerfLevelSrc=0x2233;PowerMizerDefault=0x3'
+ registrydwords='"PowerMizerEnable=0x1;PerfLevelSrc=0x2233;PowerMizerDefault=0x3"'
elif [ "$_powermizer_scheme" = "3" ]; then
- registrydwords+=';PowerMizerEnable=0x1;PerfLevelSrc=0x2233;PowerMizerDefault=0x3'
+ registrydwords='"PowerMizerEnable=0x1;PerfLevelSrc=0x2233;PowerMizerDefault=0x3"'
else
echo "You have selected the wrong powermizer scheme, please reread the option description in PKGBUILD."
fi
@@ -174,16 +173,18 @@ prepare() {
echo "If you don't like it in time you can change it with the Xorg "OverrideMaxPerf" option (in the bit value)"
echo "or rebuild it with the new value."
if [ "$_override_max_perf" = "1" ]; then
- registrydwords+=';OverrideMaxPerf=0x2'
+ registrydwords='"OverrideMaxPerf=0x2"'
elif [ "$_override_max_perf" = "2" ]; then
- registrydwords+=';OverrideMaxPerf=0x3'
+ registrydwords='"OverrideMaxPerf=0x3"'
else
echo "You selected the wrong value for the performance level forcing. Please reread the option description in PKGBUILD."
fi
fi
- sed -i "s/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, ${registrydwords}\"/" \
- kernel/nvidia/nv-reg.h
+ if [[ ! -z $registrydwords ]]; then
+ sed -i "s/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, ${registrydwords}\"/" \
+ kernel/nvidia/nv-reg.h
+ fi
# workaround for dkms+clang
if [[ ! -z $_force_clang_usage ]]; then