summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCabopust2021-02-23 14:02:05 +0300
committerCabopust2021-02-23 14:02:05 +0300
commit3aaef6e640f97e70c893b5f0c2a0cdad771fe489 (patch)
treeb01c8dcf7648514742d7954d0d800a4bf4a11560
parent388c100ec5618f78221203e6fdf812f2d759fe51 (diff)
downloadaur-3aaef6e640f97e70c893b5f0c2a0cdad771fe489.tar.gz
Replacing nvidia-settings-performance with Powermizer-max-performance.patch
-rw-r--r--.SRCINFO15
-rw-r--r--0001-nvidia-dkms-conf.patch (renamed from nvidia-dkms-conf.patch)0
-rw-r--r--0002-linux-rt.patch (renamed from linux-rt.patch)0
-rw-r--r--0003-nvidia-drm-modeset.patch (renamed from nvidia-drm-modeset.patch)0
-rw-r--r--0004-NVreg.patch (renamed from NVreg.patch)0
-rw-r--r--0005-Powermizer-max-performance.patch25
-rw-r--r--PKGBUILD77
-rw-r--r--nvidia-settings-performance.desktop6
8 files changed, 75 insertions, 48 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a5433705f547..99b35e1cff2a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = nvidia-dkms-performance
pkgdesc = NVIDIA driver sources for linux with some optimizations
pkgver = 460.39
- pkgrel = 2
+ pkgrel = 4
url = https://www.nvidia.com/
arch = x86_64
license = custom
@@ -13,22 +13,21 @@ pkgbase = nvidia-dkms-performance
conflicts = nvidia-dkms
source = https://us.download.nvidia.com/XFree86/Linux-x86_64/460.39/NVIDIA-Linux-x86_64-460.39-no-compat32.run
source = nvidia.hook
- source = nvidia-settings-performance.desktop
- source = nvidia-dkms-conf.patch
- source = linux-rt.patch
- source = nvidia-drm-modeset.patch
- source = NVreg.patch
+ source = 0001-nvidia-dkms-conf.patch
+ source = 0002-linux-rt.patch
+ source = 0003-nvidia-drm-modeset.patch
+ source = 0004-NVreg.patch
+ source = 0005-Powermizer-max-performance.patch
sha256sums = 07042bd0c2f5c37b455a973f15561450f789590b8650a6ea573c819591d572a9
sha256sums = 717920f48b4d7ec50b83d2d096bab36449b30f1b5d144f0fe586627025367293
- sha256sums = 28635a9b0808beebff7e7905ee3e664d895fe23e149d462397c0b429c6f7d091
sha256sums = 1bd56d082093db9819b07f42c5414dffd1bcf92946d5f5dab706ed785933e169
sha256sums = cf4ee7cbc4200126ff25d649d11257eb1c7ade4aa0b313f31b56207f9fa73d4b
sha256sums = a9465149c336c8f0bded15a4d473f16156d6da3a9fe4965ebe8a9afba5519c9f
sha256sums = d24e341f9a0e38f03f4e425e5f59e407604463fc3daee36009ecbd0fefa8b801
+ sha256sums = 9140aa5ea1b7c0704a2606b27a61af42b0309eceebac496704a9e8db18815aa4
pkgname = nvidia-dkms-performance
depends = dkms
depends = nvidia-utils>=460.39
- depends = nvidia-settings
depends = libglvnd
diff --git a/nvidia-dkms-conf.patch b/0001-nvidia-dkms-conf.patch
index f5c3d8092168..f5c3d8092168 100644
--- a/nvidia-dkms-conf.patch
+++ b/0001-nvidia-dkms-conf.patch
diff --git a/linux-rt.patch b/0002-linux-rt.patch
index 34d7292a07f4..34d7292a07f4 100644
--- a/linux-rt.patch
+++ b/0002-linux-rt.patch
diff --git a/nvidia-drm-modeset.patch b/0003-nvidia-drm-modeset.patch
index 800ed1324dfe..800ed1324dfe 100644
--- a/nvidia-drm-modeset.patch
+++ b/0003-nvidia-drm-modeset.patch
diff --git a/NVreg.patch b/0004-NVreg.patch
index 501234d7a220..501234d7a220 100644
--- a/NVreg.patch
+++ b/0004-NVreg.patch
diff --git a/0005-Powermizer-max-performance.patch b/0005-Powermizer-max-performance.patch
new file mode 100644
index 000000000000..010665cd3c41
--- /dev/null
+++ b/0005-Powermizer-max-performance.patch
@@ -0,0 +1,25 @@
+From 9a444cf83fe301b5e25817004764c170f05de431 Mon Sep 17 00:00:00 2001
+From: Cabopust <cabopust@yandex.ru>
+Date: Tue, 26 Jan 2021 20:34:37 +0300
+Subject: [PATCH] NVIDIA PowerMizer Max Performance
+
+---
+ kernel/nvidia/nv-reg.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kernel/nvidia/nv-reg.h b/kernel/nvidia/nv-reg.h
+index 156ce69..b46bb1d 100644
+--- a/kernel/nvidia/nv-reg.h
++++ b/kernel/nvidia/nv-reg.h
+@@ -749,7 +749,7 @@ NV_DEFINE_REG_ENTRY_GLOBAL(__NV_ENABLE_PCIE_RELAXED_ORDERING_MODE, 0);
+ NV_DEFINE_REG_ENTRY_GLOBAL(__NV_REGISTER_PCI_DRIVER, 1);
+
+
+-NV_DEFINE_REG_STRING_ENTRY(__NV_REGISTRY_DWORDS, NULL);
++NV_DEFINE_REG_STRING_ENTRY(__NV_REGISTRY_DWORDS, "PowerMizerEnable=0x1;PerfLevelSrc=0x3333;PowerMizerDefaultAC=0x1");
+ NV_DEFINE_REG_STRING_ENTRY(__NV_REGISTRY_DWORDS_PER_DEVICE, NULL);
+ NV_DEFINE_REG_STRING_ENTRY(__NV_RM_MSG, NULL);
+ NV_DEFINE_REG_STRING_ENTRY(__NV_GPU_BLACKLIST, NULL);
+--
+2.30.0
+
diff --git a/PKGBUILD b/PKGBUILD
index d97cb7d4670f..f31623c0fe25 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,12 +1,13 @@
# Maintainer: Vasiliy Stelmachenok <cabopust@yandex.ru>
# Contributor: Pavel Priluckiy <gerallitluis2@gmail.com>
-# Sets the "Prefer Maximum Performance" mode in the NVIDIA Settings at system startup.
+# Includes application of the Powermizer-max-performance.patch
+# USE AT YOUR OWN RISK!
_pref_maximum_performance=
pkgname=nvidia-dkms-performance
pkgver=460.39
-pkgrel=2
+pkgrel=4
pkgdesc='NVIDIA driver sources for linux with some optimizations'
arch=('x86_64')
url='https://www.nvidia.com/'
@@ -17,18 +18,18 @@ conflicts=('nvidia' 'nvidia-dkms')
_pkg="NVIDIA-Linux-${CARCH}-${pkgver}-no-compat32"
source=("https://us.download.nvidia.com/XFree86/Linux-${CARCH}/${pkgver}/${_pkg}.run"
'nvidia.hook'
- 'nvidia-settings-performance.desktop'
- 'nvidia-dkms-conf.patch'
- 'linux-rt.patch'
- 'nvidia-drm-modeset.patch'
- 'NVreg.patch')
+ '0001-nvidia-dkms-conf.patch'
+ '0002-linux-rt.patch'
+ '0003-nvidia-drm-modeset.patch'
+ '0004-NVreg.patch'
+ '0005-Powermizer-max-performance.patch')
sha256sums=('07042bd0c2f5c37b455a973f15561450f789590b8650a6ea573c819591d572a9'
'717920f48b4d7ec50b83d2d096bab36449b30f1b5d144f0fe586627025367293'
- '28635a9b0808beebff7e7905ee3e664d895fe23e149d462397c0b429c6f7d091'
'1bd56d082093db9819b07f42c5414dffd1bcf92946d5f5dab706ed785933e169'
'cf4ee7cbc4200126ff25d649d11257eb1c7ade4aa0b313f31b56207f9fa73d4b'
'a9465149c336c8f0bded15a4d473f16156d6da3a9fe4965ebe8a9afba5519c9f'
- 'd24e341f9a0e38f03f4e425e5f59e407604463fc3daee36009ecbd0fefa8b801')
+ 'd24e341f9a0e38f03f4e425e5f59e407604463fc3daee36009ecbd0fefa8b801'
+ '9140aa5ea1b7c0704a2606b27a61af42b0309eceebac496704a9e8db18815aa4')
prepare() {
[ -d "$_pkg" ] && rm -rf "$_pkg"
@@ -36,40 +37,52 @@ prepare() {
sh "${_pkg}.run" --extract-only
cd "${_pkg}"
- patch -Np1 -i "${srcdir}/nvidia-dkms-conf.patch"
+ patch -Np1 -i "${srcdir}/0001-nvidia-dkms-conf.patch"
# Fixing compatibility with the RT (Real-Time) kernel
- patch -Np1 -i "${srcdir}/linux-rt.patch"
- # This patch edits the default values of the NVIDIA kernel module parameters,
- # and makes the following changes:
+ patch -Np1 -i "${srcdir}/0002-linux-rt.patch"
+ # Enable nvidia-drm.modeset=1 (DRM KMS) by default.
+ # This is necessary for NVIDIA PRIME to work correctly.
+ # Note: May cause problems with scaling in console mode.
+ patch -Np1 -i "${srcdir}/0003-nvidia-drm-modeset.patch"
+ # This patch edits the default values of the NVIDIA kernel module
+ # parameters, and makes the following changes:
#
- # NVreg_UsePageAttributeTable=1 (Default 0) - Activating the better memory management method (PAT).
- # The PAT method creates a partition type table at a specific address mapped inside the register
- # and utilizes the memory architecture and instruction set more efficiently and faster.
- # If your system can support this feature, it should improve CPU performance.
+ # NVreg_UsePageAttributeTable=1 (Default 0) - Activating the better
+ # memory management method (PAT). The PAT method creates a partition type table
+ # at a specific address mapped inside the register and utilizes the memory architecture
+ # and instruction set more efficiently and faster.
+ # If your system can support this feature, it should improve CPU performance.
#
- # NVreg_EnablePCIeGen3=1 (Default 0) - Enable PCIe Gen 3.x support.
+ # NVreg_EnablePCIeGen3=1 (Default 0) - Enable PCIe Gen 3.x support.
# If the system supports this 8GT high speed bus then enable it with this module option flag.
# By default the Nvidia driver is set to use PCIe Gen 2.x for compatibility reasons.
#
- # NVreg_InitializeSystemMemoryAllocations=0 (Default 1) - Disables clearing system memory allocation
- # before using it for the GPU. Potentially improves performance, but at the cost of increased security risks.
- # Write "options nvidia NVreg_InitializeSystemMemoryAllocations=1" in /etc/modprobe.d/nvidia.conf,
+ # NVreg_InitializeSystemMemoryAllocations=0 (Default 1) - Disables
+ # clearing system memory allocation before using it for the GPU.
+ # Potentially improves performance, but at the cost of increased security risks.
+ # Write "options nvidia NVreg_InitializeSystemMemoryAllocations=1" in /etc/modprobe.d/nvidia.conf,
# if you want to return the default value.
#
- # NVreg_EnableStreamMemOPs=1 (Default 0) - Activates the support for CUDA Stream Memory Operations in user-mode applications.
- # Note: May be disabled in future versions.
+ # NVreg_EnableStreamMemOPs=1 (Default 0) - Activates the support for
+ # CUDA Stream Memory Operations in user-mode applications.
#
- # If you want to learn more about the NVIDIA driver module parameters,
+ # If you want to learn more about the NVIDIA driver module parameters,
# you can go to the Gentoo Wiki or view the source code of the nv-reg.h file.
- patch -Np1 -i "${srcdir}/NVreg.patch"
- # Enable nvidia-drm.modeset=1 (DRM KMS) by default.
- # This is necessary for NVIDIA PRIME to work correctly.
- # Note: May cause problems with scaling in console mode.
- patch -Np1 -i "${srcdir}/nvidia-drm-modeset.patch"
+ patch -Np1 -i "${srcdir}/0004-NVreg.patch"
+ # Sets the default power plan in preference to maximum
+ # performance. This is similar to the power plan settings in nvidia-
+ # settings. The advantage of this method is that it controls the power
+ # plan for each power source, i.e. the driver will be set for maximum
+ # performance when running from the mains and for the battery it
+ # will be set for optimal power savings. It also does not require nvidia-
+ # settings as a dependency and does not use it in any way.
+ if [ -n "$_pref_maximum_performance" ]; then
+ patch -Np1 -i "${srcdir}/0005-Powermizer-max-performance.patch"
+ fi
}
package() {
- depends=('dkms' "nvidia-utils>=${pkgver}" 'nvidia-settings' 'libglvnd')
+ depends=('dkms' "nvidia-utils>=${pkgver}" 'libglvnd')
# Nvidia hook for update initramfs after an NVIDIA driver upgrade
install -D -m644 "${srcdir}/nvidia.hook" -t "${pkgdir}/usr/share/libalpm/hooks"
@@ -81,10 +94,6 @@ package() {
install -D -m644 <(printf '%s\n%s\n' 'blacklist nouveau' 'options nouveau modeset=0') \
"${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
- if [ -n "$_pref_maximum_performance" ]; then
- install -D -m644 "${srcdir}/nvidia-settings-performance.desktop" -t "${pkgdir}/etc/xdg/autostart"
- fi
-
# license
install -D -m644 "${_pkg}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
diff --git a/nvidia-settings-performance.desktop b/nvidia-settings-performance.desktop
deleted file mode 100644
index b286fbedfc1a..000000000000
--- a/nvidia-settings-performance.desktop
+++ /dev/null
@@ -1,6 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=NVIDIA Settings Performance Profile
-Comment=Pref Maximum performance for your NVIDIA GPU
-Exec=/usr/bin/nvidia-settings -a [gpu:0]/GpuPowerMizerMode=1
-Terminal=false \ No newline at end of file