summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO77
-rw-r--r--0001-nvidia-dkms-conf.patch2
-rw-r--r--0004-NVreg-Improvements-v2.patch (renamed from 0004-NVreg-Improvements.patch)52
-rw-r--r--60-nvidia.rules14
-rw-r--r--PKGBUILD179
5 files changed, 230 insertions, 94 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e0efad8b000d..cd2b8074d78c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,31 +1,57 @@
pkgbase = nvidia-dkms-performance
pkgver = 470.74
- pkgrel = 1
+ pkgrel = 2
url = https://www.nvidia.com/
arch = x86_64
+ arch = aarch64
license = custom
options = !strip
- source = https://us.download.nvidia.com/XFree86/Linux-x86_64/470.74/NVIDIA-Linux-x86_64-470.74.run
- source = nvidia-drm-outputclass.conf
- source = nvidia-utils.sysusers
- source = nvidia.hook
- source = 0001-nvidia-dkms-conf.patch
- source = 0002-linux-rt.patch
- source = 0003-nvidia-drm-modeset.patch
- source = 0004-NVreg-Improvements.patch
- source = 0005-nvidia-settings-paths.patch
- sha256sums = 33e513dee329f2a9b106882979f1747eccb64eb698952c12cd030987cecadf6a
- sha256sums = ae1fee1238da7aeb0e2d3e3d3fe4478dfe3a2bcbbab529586ac8f3bb55aa47ae
- sha256sums = d8d1caa5d72c71c6430c2a0d9ce1a674787e9272ccce28b9d5898ca24e60a167
- sha256sums = 717920f48b4d7ec50b83d2d096bab36449b30f1b5d144f0fe586627025367293
- sha256sums = a885c208a4cda620797eae6ffca412c7a3c44fa11624fa1fee5b04c29fcf9cc4
- sha256sums = 6ef8cde2a5c1a5eadaefc0b4fb9005ab433ac10b0452a015b9d93e345156665e
- sha256sums = 7d9392f36374ab609417abe4b5493bbb9d868a2ee29cdb877d4be8b098eb527b
- sha256sums = 898fe80847fb2974e1d16b380c16569ddb3ab24c6974bbeb72d68e8e13902311
- sha256sums = 6bb5456f14435ad329d750147c749d7c50fb8ae11778c7fcc9e6e3cd256c4017
+ options = !lto
+ source_x86_64 = https://us.download.nvidia.com/XFree86/Linux-x86_64/470.74/NVIDIA-Linux-x86_64-470.74.run
+ source_x86_64 = nvidia-drm-outputclass.conf
+ source_x86_64 = nvidia-utils.sysusers
+ source_x86_64 = nvidia.hook
+ source_x86_64 = 60-nvidia.rules
+ source_x86_64 = 0001-nvidia-dkms-conf.patch
+ source_x86_64 = 0002-linux-rt.patch
+ source_x86_64 = 0003-nvidia-drm-modeset.patch
+ source_x86_64 = 0004-NVreg-Improvements-v2.patch
+ source_x86_64 = 0005-nvidia-settings-paths.patch
+ sha256sums_x86_64 = 33e513dee329f2a9b106882979f1747eccb64eb698952c12cd030987cecadf6a
+ sha256sums_x86_64 = ae1fee1238da7aeb0e2d3e3d3fe4478dfe3a2bcbbab529586ac8f3bb55aa47ae
+ sha256sums_x86_64 = d8d1caa5d72c71c6430c2a0d9ce1a674787e9272ccce28b9d5898ca24e60a167
+ sha256sums_x86_64 = 717920f48b4d7ec50b83d2d096bab36449b30f1b5d144f0fe586627025367293
+ sha256sums_x86_64 = 60237cc4b1fc7d3c7ca59155a3079af1923ba2490995c0208597b959ba168cfd
+ sha256sums_x86_64 = c18d3511c4169e7a20ad8b792161956fbd28fad9b3a15f7fb6846e37d74cbb24
+ sha256sums_x86_64 = 6ef8cde2a5c1a5eadaefc0b4fb9005ab433ac10b0452a015b9d93e345156665e
+ sha256sums_x86_64 = 7d9392f36374ab609417abe4b5493bbb9d868a2ee29cdb877d4be8b098eb527b
+ sha256sums_x86_64 = 0c551b9358703e0ce7e1ce8bd47673ed5f964a6e4e200636c558ce73f2f3b792
+ sha256sums_x86_64 = 6bb5456f14435ad329d750147c749d7c50fb8ae11778c7fcc9e6e3cd256c4017
+ source_aarch64 = https://us.download.nvidia.com/XFree86/x86_64/470.74/NVIDIA-Linux-x86_64-470.74.run
+ source_aarch64 = nvidia-drm-outputclass.conf
+ source_aarch64 = nvidia-utils.sysusers
+ source_aarch64 = nvidia.hook
+ source_aarch64 = 60-nvidia.rules
+ source_aarch64 = 0001-nvidia-dkms-conf.patch
+ source_aarch64 = 0002-linux-rt.patch
+ source_aarch64 = 0003-nvidia-drm-modeset.patch
+ source_aarch64 = 0004-NVreg-Improvements-v2.patch
+ source_aarch64 = 0005-nvidia-settings-paths.patch
+ sha256sums_aarch64 = d5bb2101574aeb0937f5039ff2297241684a9069e51ee54b0f0839fdef542226
+ sha256sums_aarch64 = ae1fee1238da7aeb0e2d3e3d3fe4478dfe3a2bcbbab529586ac8f3bb55aa47ae
+ sha256sums_aarch64 = d8d1caa5d72c71c6430c2a0d9ce1a674787e9272ccce28b9d5898ca24e60a167
+ sha256sums_aarch64 = 717920f48b4d7ec50b83d2d096bab36449b30f1b5d144f0fe586627025367293
+ sha256sums_aarch64 = 60237cc4b1fc7d3c7ca59155a3079af1923ba2490995c0208597b959ba168cfd
+ sha256sums_aarch64 = c18d3511c4169e7a20ad8b792161956fbd28fad9b3a15f7fb6846e37d74cbb24
+ sha256sums_aarch64 = 6ef8cde2a5c1a5eadaefc0b4fb9005ab433ac10b0452a015b9d93e345156665e
+ sha256sums_aarch64 = 7d9392f36374ab609417abe4b5493bbb9d868a2ee29cdb877d4be8b098eb527b
+ sha256sums_aarch64 = 0c551b9358703e0ce7e1ce8bd47673ed5f964a6e4e200636c558ce73f2f3b792
+ sha256sums_aarch64 = 6bb5456f14435ad329d750147c749d7c50fb8ae11778c7fcc9e6e3cd256c4017
pkgname = nvidia-dkms-performance
pkgdesc = NVIDIA driver sources for linux with some optimizations
+ arch = x86_64
+ arch = aarch64
depends = dkms
depends = nvidia-utils-performance=470.74
depends = libglvnd
@@ -38,8 +64,10 @@ pkgname = nvidia-dkms-performance
pkgname = nvidia-settings-performance
pkgdesc = Tool for configuring the NVIDIA graphics driver
+ arch = x86_64
+ arch = aarch64
depends = nvidia-utils-performance>=470.74
- depends = gtk3
+ depends = gtk2
provides = nvidia-settings=470.74
provides = nvidia-settings-performance=470.74
conflicts = nvidia-settings
@@ -47,11 +75,14 @@ pkgname = nvidia-settings-performance
pkgname = nvidia-utils-performance
pkgdesc = NVIDIA drivers utilities and libraries
install = nvidia-utils-performance.install
+ arch = x86_64
+ arch = aarch64
depends = xorg-server
depends = libglvnd
optdepends = nvidia-settings-performance: configuration tool
optdepends = xorg-server-devel: for nvidia-xconfig
optdepends = egl-wayland: for Wayland support
+ optdepends = prime-run: abbreviation for environment variables
optdepends = opencl-nvidia-performance: for OpenCL support
provides = nvidia-utils=470.74
provides = vulkan-driver
@@ -64,6 +95,8 @@ pkgname = nvidia-utils-performance
pkgname = opencl-nvidia-performance
pkgdesc = OpenCL implemention for NVIDIA
+ arch = x86_64
+ arch = aarch64
depends = zlib
depends = nvidia-utils-performance>=470.74
optdepends = opencl-headers: headers necessary for OpenCL development
@@ -72,7 +105,7 @@ pkgname = opencl-nvidia-performance
conflicts = opencl-nvidia
pkgname = lib32-nvidia-utils-performance
- pkgdesc = NVIDIA drivers utilities and libraries
+ pkgdesc = NVIDIA drivers utilities and libraries (32 bit)
depends = lib32-zlib
depends = lib32-gcc-libs
depends = lib32-libglvnd
@@ -88,7 +121,7 @@ pkgname = lib32-nvidia-utils-performance
replaces = lib32-nvidia-libgl
pkgname = lib32-opencl-nvidia-performance
- pkgdesc = OpenCL implemention for NVIDIA (Multilib)
+ pkgdesc = OpenCL implemention for NVIDIA (32 bit)
depends = lib32-zlib
depends = lib32-gcc-libs
depends = lib32-nvidia-utils-performance>=470.74
diff --git a/0001-nvidia-dkms-conf.patch b/0001-nvidia-dkms-conf.patch
index b976e2ad7329..a37db0cd5457 100644
--- a/0001-nvidia-dkms-conf.patch
+++ b/0001-nvidia-dkms-conf.patch
@@ -14,7 +14,7 @@ index 4e23d59..ec3f1ea 100644
@@ -1,12 +1,22 @@
PACKAGE_NAME="nvidia"
-PACKAGE_VERSION="__VERSION_STRING"
-+PACKAGE_VERSION="470.63.01"
++PACKAGE_VERSION="470.74"
AUTOINSTALL="yes"
# By default, DKMS will add KERNELRELEASE to the make command line; however,
diff --git a/0004-NVreg-Improvements.patch b/0004-NVreg-Improvements-v2.patch
index dbb76b13bd65..f5d622c0c90f 100644
--- a/0004-NVreg-Improvements.patch
+++ b/0004-NVreg-Improvements-v2.patch
@@ -1,7 +1,7 @@
-From becb71f3e815df0df1d2895bd3ad300269a695a4 Mon Sep 17 00:00:00 2001
+From a9888e2dca89f6fa8b01287e4503a68f29f65e92 Mon Sep 17 00:00:00 2001
From: Vasiliy Stelmachenok <cabopust@yandex.ru>
-Date: Tue, 4 May 2021 14:56:48 +0300
-Subject: [PATCH] NVreg Improvements
+Date: Sun, 3 Oct 2021 11:41:14 +0300
+Subject: [PATCH] NVreg Improvements v2
This patch edits the default values of the NVIDIA kernel module
parameters, and makes the following changes:
@@ -27,17 +27,41 @@ Note: It is possible to use more video memory (?)
NVreg_EnableStreamMemOPs=1 (Default 0) - Activates the support for
CUDA Stream Memory Operations in user-mode applications.
+NVreg_PreserveVideoMemoryAllocations=1 (Default 0) - Prompts the NVIDIA kernel module to save
+and restore all video memory allocations during all system power management cycles,
+i.e. suspend/resume and hibernate/resume.
+This helps prevent applications from freezing or rendering errors after resume.
+
+NVreg_DynamicPowerManagement=Ox02 (Default 0x03) - Enables dynamic power management
+where the NVIDIA GPU can completely shut down when it is not assigned tasks,
+resulting in better power savings.
+This feature works only on laptops with Turing or higher, Intel Coffeelake processors, and Linux 4.18+ kernel.
+In other cases this option has no effect.
+You can check if your hardware supports this feature with the following command:
+
+$ cat /proc/driver/nvidia/gpus/0000:01:00.0/power
+
+Read more about it: https://download.nvidia.com/XFree86/Linux-x86_64/470.74/README/dynamicpowermanagement.html
+
+NVreg_EnableS0ixPowerManagement=1 (Default 0) - Enables putting the GPU video memory into self-updating mode
+during s2idle system suspend. This feature is only supported on platforms with S0ix-based power management,
+which can be verified via the following command:
+
+$ grep 'Video Memory Self Refresh' /proc/driver/nvidia/gpus/0000\:01\:00.0/power
+
+
If you want to learn more about the NVIDIA driver module parameters,
you can go to the Gentoo Wiki page or view the source code of the nv-reg.h file.
+
---
- kernel/nvidia/nv-reg.h | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
+ kernel/nvidia/nv-reg.h | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/kernel/nvidia/nv-reg.h b/kernel/nvidia/nv-reg.h
-index 1ee7473..7ea5acf 100644
+index 1ee7473..4482519 100644
--- a/kernel/nvidia/nv-reg.h
+++ b/kernel/nvidia/nv-reg.h
-@@ -774,13 +774,13 @@ NV_DEFINE_REG_ENTRY_GLOBAL(__NV_MODIFY_DEVICE_FILES, 1);
+@@ -774,20 +774,20 @@ NV_DEFINE_REG_ENTRY_GLOBAL(__NV_MODIFY_DEVICE_FILES, 1);
NV_DEFINE_REG_ENTRY(__NV_DEVICE_FILE_UID, 0);
NV_DEFINE_REG_ENTRY(__NV_DEVICE_FILE_GID, 0);
NV_DEFINE_REG_ENTRY(__NV_DEVICE_FILE_MODE, 0666);
@@ -53,8 +77,18 @@ index 1ee7473..7ea5acf 100644
-NV_DEFINE_REG_ENTRY(__NV_ENABLE_STREAM_MEMOPS, 0);
+NV_DEFINE_REG_ENTRY(__NV_ENABLE_STREAM_MEMOPS, 1);
NV_DEFINE_REG_ENTRY(__NV_RM_PROFILING_ADMIN_ONLY_PARAMETER, 1);
- NV_DEFINE_REG_ENTRY(__NV_PRESERVE_VIDEO_MEMORY_ALLOCATIONS, 0);
+-NV_DEFINE_REG_ENTRY(__NV_PRESERVE_VIDEO_MEMORY_ALLOCATIONS, 0);
++NV_DEFINE_REG_ENTRY(__NV_PRESERVE_VIDEO_MEMORY_ALLOCATIONS, 1);
+
+-NV_DEFINE_REG_ENTRY(__NV_ENABLE_S0IX_POWER_MANAGEMENT, 0);
++NV_DEFINE_REG_ENTRY(__NV_ENABLE_S0IX_POWER_MANAGEMENT, 1);
+ NV_DEFINE_REG_ENTRY(__NV_S0IX_POWER_MANAGEMENT_VIDEO_MEMORY_THRESHOLD, 256);
+
+-NV_DEFINE_REG_ENTRY(__NV_DYNAMIC_POWER_MANAGEMENT, 3);
++NV_DEFINE_REG_ENTRY(__NV_DYNAMIC_POWER_MANAGEMENT, 2);
+ NV_DEFINE_REG_ENTRY(__NV_DYNAMIC_POWER_MANAGEMENT_VIDEO_MEMORY_THRESHOLD, 200);
+ NV_DEFINE_REG_ENTRY(__NV_ENABLE_GPU_FIRMWARE, NV_REG_ENABLE_GPU_FIRMWARE_DEFAULT_VALUE);
--
-2.31.1
+2.33.0
diff --git a/60-nvidia.rules b/60-nvidia.rules
new file mode 100644
index 000000000000..a95d1027a72e
--- /dev/null
+++ b/60-nvidia.rules
@@ -0,0 +1,14 @@
+# Make sure device nodes are present even when the DDX is not started for the Wayland/EGLStream case
+KERNEL=="nvidia", RUN+="/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidiactl c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 255'"
+KERNEL=="nvidia", RUN+="/usr/bin/bash -c 'for i in $$(cat /proc/driver/nvidia/gpus/*/information | grep Minor | cut -d \ -f 4); do /usr/bin/mknod -Z -m 666 /dev/nvidia$${i} c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) $${i}; done'"
+KERNEL=="nvidia_modeset", RUN+="/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidia-modeset c $$(grep nvidia-frontend /proc/devices | cut -d \ -f 1) 254'"
+KERNEL=="nvidia_uvm", RUN+="/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidia-uvm c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 0'"
+KERNEL=="nvidia_uvm", RUN+="/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidia-uvm-tools c $$(grep nvidia-uvm /proc/devices | cut -d \ -f 1) 1'"
+
+# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
+ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto"
+ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto"
+
+# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind
+ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on"
+ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="on"
diff --git a/PKGBUILD b/PKGBUILD
index 6e3320126cf4..2aae6f73a542 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -68,33 +68,45 @@ _powermizer_scheme=
_override_max_perf=
pkgbase=nvidia-dkms-performance
-pkgname=(nvidia-dkms-performance nvidia-settings-performance nvidia-utils-performance opencl-nvidia-performance
- lib32-nvidia-utils-performance lib32-opencl-nvidia-performance)
+if [ $CARCH != 'aarch64' ]; then
+ pkgname=(nvidia-dkms-performance nvidia-settings-performance nvidia-utils-performance opencl-nvidia-performance
+ lib32-nvidia-utils-performance lib32-opencl-nvidia-performance)
+else
+ pkgname=(nvidia-dkms-performance nvidia-settings-performance nvidia-utils-performance opencl-nvidia-performance)
+fi
pkgver=470.74
-pkgrel=1
-arch=('x86_64')
+pkgrel=2
+arch=('x86_64' 'aarch64')
url='https://www.nvidia.com/'
license=('custom')
-options=(!strip)
+options=(!strip !lto)
_pkg="NVIDIA-Linux-${CARCH}-${pkgver}"
-source=("https://us.download.nvidia.com/XFree86/Linux-${CARCH}/${pkgver}/${_pkg}.run"
- 'nvidia-drm-outputclass.conf'
- 'nvidia-utils.sysusers'
- 'nvidia.hook'
- '0001-nvidia-dkms-conf.patch'
- '0002-linux-rt.patch'
- '0003-nvidia-drm-modeset.patch'
- '0004-NVreg-Improvements.patch'
- '0005-nvidia-settings-paths.patch')
-sha256sums=('33e513dee329f2a9b106882979f1747eccb64eb698952c12cd030987cecadf6a'
- 'ae1fee1238da7aeb0e2d3e3d3fe4478dfe3a2bcbbab529586ac8f3bb55aa47ae'
- 'd8d1caa5d72c71c6430c2a0d9ce1a674787e9272ccce28b9d5898ca24e60a167'
- '717920f48b4d7ec50b83d2d096bab36449b30f1b5d144f0fe586627025367293'
- 'a885c208a4cda620797eae6ffca412c7a3c44fa11624fa1fee5b04c29fcf9cc4'
- '6ef8cde2a5c1a5eadaefc0b4fb9005ab433ac10b0452a015b9d93e345156665e'
- '7d9392f36374ab609417abe4b5493bbb9d868a2ee29cdb877d4be8b098eb527b'
- '898fe80847fb2974e1d16b380c16569ddb3ab24c6974bbeb72d68e8e13902311'
- '6bb5456f14435ad329d750147c749d7c50fb8ae11778c7fcc9e6e3cd256c4017')
+_sources=('nvidia-drm-outputclass.conf'
+ 'nvidia-utils.sysusers'
+ 'nvidia.hook'
+ '60-nvidia.rules'
+ '0001-nvidia-dkms-conf.patch'
+ '0002-linux-rt.patch'
+ '0003-nvidia-drm-modeset.patch'
+ '0004-NVreg-Improvements-v2.patch'
+ '0005-nvidia-settings-paths.patch')
+_sources_sums=('ae1fee1238da7aeb0e2d3e3d3fe4478dfe3a2bcbbab529586ac8f3bb55aa47ae'
+ 'd8d1caa5d72c71c6430c2a0d9ce1a674787e9272ccce28b9d5898ca24e60a167'
+ '717920f48b4d7ec50b83d2d096bab36449b30f1b5d144f0fe586627025367293'
+ '60237cc4b1fc7d3c7ca59155a3079af1923ba2490995c0208597b959ba168cfd'
+ 'c18d3511c4169e7a20ad8b792161956fbd28fad9b3a15f7fb6846e37d74cbb24'
+ '6ef8cde2a5c1a5eadaefc0b4fb9005ab433ac10b0452a015b9d93e345156665e'
+ '7d9392f36374ab609417abe4b5493bbb9d868a2ee29cdb877d4be8b098eb527b'
+ '0c551b9358703e0ce7e1ce8bd47673ed5f964a6e4e200636c558ce73f2f3b792'
+ '6bb5456f14435ad329d750147c749d7c50fb8ae11778c7fcc9e6e3cd256c4017')
+source_x86_64=("https://us.download.nvidia.com/XFree86/Linux-${CARCH}/${pkgver}/${_pkg}.run"
+ ${_sources[@]})
+source_aarch64=("https://us.download.nvidia.com/XFree86/${CARCH}/${pkgver}/${_pkg}.run"
+ ${_sources[@]})
+sha256sums_x86_64=('33e513dee329f2a9b106882979f1747eccb64eb698952c12cd030987cecadf6a'
+ ${_sources_sums[@]})
+sha256sums_aarch64=('d5bb2101574aeb0937f5039ff2297241684a9069e51ee54b0f0839fdef542226'
+ ${_sources_sums[@]})
create_links() {
_orig_dir="$(pwd)"
@@ -133,7 +145,7 @@ prepare() {
# Patching kernel modules
local src
- for src in "${source[@]}"; do
+ for src in "${_sources[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
@@ -141,52 +153,69 @@ prepare() {
patch -Np1 < "../$src"
done
- if [ ! -z $_nvidia_patch ]; then
- # NVENC
- sed -i 's/\xe8\xc5\x20\xff\xff\x85\xc0\x41\x89\xc4/\xe8\xc5\x20\xff\xff\x29\xc0\x41\x89\xc4/g' \
- "${srcdir}/${_pkg}/libnvidia-encode.so.${pkgver}"
- # NvFBC
- sed -i 's/\x83\xfe\x01\x73\x08\x48/\x83\xfe\x00\x72\x08\x48/' \
- "${srcdir}/${_pkg}/libnvidia-fbc.so.${pkgver}"
+ if [[ $CARCH != 'aarch64' ]]; then
+ if [ ! -z $_nvidia_patch ]; then
+ # NVENC
+ sed -i 's/\xe8\xc5\x20\xff\xff\x85\xc0\x41\x89\xc4/\xe8\xc5\x20\xff\xff\x29\xc0\x41\x89\xc4/g' \
+ "${srcdir}/${_pkg}/libnvidia-encode.so.${pkgver}"
+ # NvFBC
+ sed -i 's/\x83\xfe\x01\x73\x08\x48/\x83\xfe\x00\x72\x08\x48/' \
+ "${srcdir}/${_pkg}/libnvidia-fbc.so.${pkgver}"
+ fi
fi
if [ ! -z $_powermizer_scheme ] && [ -z $_override_max_perf ]; then
- echo "You have chosen a PowerMizer scheme: $_powermizer_scheme"
+ 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
- sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "PowerMizerEnable=0x1;PerfLevelSrc=0x3322;PowerMizerDefault0x3;PowerMizerDefaultAC=0x1"/' kernel/nvidia/nv-reg.h
+ sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "PowerMizerEnable=0x1;PerfLevelSrc=0x3322;PowerMizerDefault0x3;PowerMizerDefaultAC=0x1"/' \
+ kernel/nvidia/nv-reg.h
elif [ "$_powermizer_scheme" = "2" ]; then
- sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "PowerMizerEnable=0x1;PerfLevelSrc=0x2222;PowerMizerDefault0x3;PowerMizerDefaultAC=0x1"/' kernel/nvidia/nv-reg.h
+ sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "PowerMizerEnable=0x1;PerfLevelSrc=0x2222;PowerMizerDefault0x3;PowerMizerDefaultAC=0x1"/' \
+ kernel/nvidia/nv-reg.h
elif [ "$_powermizer_scheme" = "3" ]; then
- sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "PowerMizerEnable=0x1;PerfLevelSrc=0x3322;PowerMizerDefaultAC=0x1"/' kernel/nvidia/nv-reg.h
+ sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "PowerMizerEnable=0x1;PerfLevelSrc=0x3322;PowerMizerDefaultAC=0x1"/' \
+ kernel/nvidia/nv-reg.h
elif [ "$_powermizer_scheme" = "4" ]; then
- sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "PowerMizerEnable=0x1;PerfLevelSrc=0x2233;PowerMizerDefault0x3;PowerMizerDefault0x3;PowerMizerDefaultAC=0x1"/' kernel/nvidia/nv-reg.h
+ sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "PowerMizerEnable=0x1;PerfLevelSrc=0x2233;PowerMizerDefault0x3;PowerMizerDefault0x3;PowerMizerDefaultAC=0x1"/' \
+ kernel/nvidia/nv-reg.h
elif [ "$_powermizer_scheme" = "5" ]; then
- sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "PowerMizerEnable=0x1;PerfLevelSrc=0x3333;PowerMizerDefault0x3;PowerMizerDefault0x3;PowerMizerDefaultAC=0x1"/' kernel/nvidia/nv-reg.h
+ sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "PowerMizerEnable=0x1;PerfLevelSrc=0x3333;PowerMizerDefault0x3;PowerMizerDefault0x3;PowerMizerDefaultAC=0x1"/' \
+ kernel/nvidia/nv-reg.h
elif [ "$_powermizer_scheme" = "6" ]; then
- sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "PowerMizerEnable=0x1;PerfLevelSrc=0x2233;PowerMizerDefault=0x1"/' kernel/nvidia/nv-reg.h
+ sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "PowerMizerEnable=0x1;PerfLevelSrc=0x2233;PowerMizerDefault=0x1"/' \
+ kernel/nvidia/nv-reg.h
elif [ "$_powermizer_scheme" = "7" ]; then
- sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "PowerMizerEnable=0x1;PerfLevelSrc=0x3322"/' kernel/nvidia/nv-reg.h
+ sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "PowerMizerEnable=0x1;PerfLevelSrc=0x3322"/' \
+ kernel/nvidia/nv-reg.h
else
- echo "An incorrect PowerMizer scheme has been selected."
+ echo "You have selected the wrong powermizer scheme, please reread the option description in PKGBUILD."
fi
fi
if [ ! -z $_override_max_perf ] && [ -z $_powermizer_scheme ]; then
- echo "You have chosen a Override Max Perf level: $_override_max_perf"
+ echo "You have selected the forced performance level: $_override_max_perf"
+ 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
- sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "OverrideMaxPerf=0x1"/' kernel/nvidia/nv-reg.h
+ sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "OverrideMaxPerf=0x1"/' \
+ kernel/nvidia/nv-reg.h
elif [ "$_override_max_perf" = "2" ]; then
- sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "OverrideMaxPerf=0x2"/' kernel/nvidia/nv-reg.h
+ sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "OverrideMaxPerf=0x2"/' \
+ kernel/nvidia/nv-reg.h
elif [ "$_override_max_perf" = "3" ]; then
- sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "OverrideMaxPerf=0x3"/' kernel/nvidia/nv-reg.h
+ sed -i 's/__NV_REGISTRY_DWORDS, NULL/__NV_REGISTRY_DWORDS, "OverrideMaxPerf=0x3"/' \
+ kernel/nvidia/nv-reg.h
else
- echo "An incorrect Override Max Perf level has been selected."
+ echo "You selected the wrong value for the performance level forcing. Please reread the option description in PKGBUILD."
fi
fi
}
package_nvidia-dkms-performance() {
pkgdesc='NVIDIA driver sources for linux with some optimizations'
+ arch=('x86_64' 'aarch64')
depends=('dkms' "nvidia-utils-performance=${pkgver}" 'libglvnd')
provides=("nvidia=${pkgver}" "nvidia-dkms=${pkgver}"
"nvidia-dkms-performance=${pkgver}" 'NVIDIA-MODULE')
@@ -215,7 +244,12 @@ package_nvidia-dkms-performance() {
package_nvidia-settings-performance() {
pkgdesc='Tool for configuring the NVIDIA graphics driver'
- depends=("nvidia-utils-performance>=${pkgver}" 'gtk3')
+ arch=('x86_64' 'aarch64')
+ if [ $CARCH != 'aarch64' ]; then
+ depends=("nvidia-utils-performance>=${pkgver}" 'gtk3')
+ else
+ depends=("nvidia-utils-performance>=${pkgver}" 'gtk2')
+ fi
provides=("nvidia-settings=${pkgver}" "nvidia-settings-performance=${pkgver}")
conflicts=('nvidia-settings')
cd "${_pkg}"
@@ -225,8 +259,12 @@ package_nvidia-settings-performance() {
install -D -m644 nvidia-settings.png -t "${pkgdir}/usr/share/pixmaps"
install -D -m644 nvidia-settings.desktop -t "${pkgdir}/usr/share/applications"
- # GTK 3 interface. GTK 2 has been removed and will not be supported.
- install -D -m755 "libnvidia-gtk3.so.${pkgver}" -t "${pkgdir}/usr/lib"
+ if [ $CARCH != 'aarch64' ]; then
+ # GTK 3 interface. GTK 2 has been removed and will not be supported.
+ install -D -m755 "libnvidia-gtk3.so.${pkgver}" -t "${pkgdir}/usr/lib"
+ else
+ install -D -m755 "libnvidia-gtk2.so.${pkgver}" -t "${pkgdir}/usr/lib"
+ fi
# LICENSE
install -D -m644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
@@ -234,6 +272,7 @@ package_nvidia-settings-performance() {
package_opencl-nvidia-performance() {
pkgdesc='OpenCL implemention for NVIDIA'
+ arch=('x86_64' 'aarch64')
depends=('zlib' "nvidia-utils-performance>=${pkgver}")
optdepends=('opencl-headers: headers necessary for OpenCL development')
provides=("opencl-nvidia=${pkgver}" 'opencl-driver')
@@ -242,7 +281,10 @@ package_opencl-nvidia-performance() {
# OpenCL
install -D -m644 nvidia.icd "${pkgdir}/etc/OpenCL/vendors/nvidia.icd"
- install -D -m755 "libnvidia-compiler.so.${pkgver}" -t "${pkgdir}/usr/lib"
+ # The NVIDIA driver for ARM does not support some libraries.
+ if [ $CARCH != 'aarch64' ]; then
+ install -D -m755 "libnvidia-compiler.so.${pkgver}" -t "${pkgdir}/usr/lib"
+ fi
install -D -m755 "libnvidia-opencl.so.${pkgver}" -t "${pkgdir}/usr/lib"
create_links
@@ -253,10 +295,12 @@ package_opencl-nvidia-performance() {
package_nvidia-utils-performance() {
pkgdesc='NVIDIA drivers utilities and libraries'
+ arch=('x86_64' 'aarch64')
depends=('xorg-server' 'libglvnd')
optdepends=('nvidia-settings-performance: configuration tool'
'xorg-server-devel: for nvidia-xconfig'
'egl-wayland: for Wayland support'
+ 'prime-run: abbreviation for environment variables'
'opencl-nvidia-performance: for OpenCL support')
provides=("nvidia-utils=${pkgver}" 'vulkan-driver' 'opengl-driver' "nvidia-libgl=${pkgver}"
"nvidia-libgl-performance=${pkgver}")
@@ -268,8 +312,10 @@ package_nvidia-utils-performance() {
# X driver
install -D -m755 nvidia_drv.so -t "${pkgdir}/usr/lib/xorg/modules/drivers"
- # firmware
- install -D -m644 firmware/gsp.bin -t "${pkgdir}/usr/lib/firmware/nvidia/${pkgver}"
+ if [ $CARCH != 'aarch64' ]; then
+ # firmware
+ install -D -m644 firmware/gsp.bin -t "${pkgdir}/usr/lib/firmware/nvidia/${pkgver}"
+ fi
# GLX extension module for X
install -D -m755 "libglxserver_nvidia.so.${pkgver}" -t "${pkgdir}/usr/lib/nvidia/xorg"
@@ -291,8 +337,10 @@ package_nvidia-utils-performance() {
install -D -m755 "libnvidia-glsi.so.${pkgver}" -t "${pkgdir}/usr/lib"
# misc
- install -D -m755 "libnvidia-ifr.so.${pkgver}" -t "${pkgdir}/usr/lib"
- install -D -m755 "libnvidia-fbc.so.${pkgver}" -t "${pkgdir}/usr/lib"
+ if [ $CARCH != 'aarch64' ]; then
+ install -D -m755 "libnvidia-ifr.so.${pkgver}" -t "${pkgdir}/usr/lib"
+ install -D -m755 "libnvidia-fbc.so.${pkgver}" -t "${pkgdir}/usr/lib"
+ fi
install -D -m755 "libnvidia-encode.so.${pkgver}" -t "${pkgdir}/usr/lib"
install -D -m755 "libnvidia-cfg.so.${pkgver}" -t "${pkgdir}/usr/lib"
install -D -m755 "libnvidia-ml.so.${pkgver}" -t "${pkgdir}/usr/lib"
@@ -324,15 +372,18 @@ package_nvidia-utils-performance() {
# Optical flow
install -D -m755 "libnvidia-opticalflow.so.${pkgver}" -t "${pkgdir}/usr/lib"
- # NGX
- install -D -m755 "libnvidia-ngx.so.${pkgver}" -t "${pkgdir}/usr/lib"
+ if [ $CARCH != 'aarch64' ]; then
+ # NGX
+ install -D -m755 "libnvidia-ngx.so.${pkgver}" -t "${pkgdir}/usr/lib"
+ install -D -m755 nvidia-ngx-updater -t "${pkgdir}/usr/bin"
- # wine nvngx lib
- install -D -m755 "_nvngx.dll" -t "${pkgdir}/usr/lib/nvidia/wine"
- install -D -m755 "nvngx.dll" -t "${pkgdir}/usr/lib/nvidia/wine"
+ # wine nvngx lib
+ install -D -m755 "_nvngx.dll" -t "${pkgdir}/usr/lib/nvidia/wine"
+ install -D -m755 "nvngx.dll" -t "${pkgdir}/usr/lib/nvidia/wine"
+ fi
- # nvvm
- install -D -m755 "libnvidia-nvvm.so.4.0.0" -t "${pkgdir}/usr/lib"
+ # NVVM Compiler (JIT link-time-optimization for CUDA)
+ install -D -m755 libnvidia-nvvm.so.*.*.* -t "${pkgdir}/usr/lib"
# DEBUG
install -D -m755 nvidia-debugdump -t "${pkgdir}/usr/bin"
@@ -384,12 +435,16 @@ package_nvidia-utils-performance() {
install -D -m644 "${srcdir}/nvidia-drm-outputclass.conf" "${pkgdir}/usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf"
install -D -m644 "${srcdir}/nvidia-utils.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
+
+ # udev rules for node presence and runtime PM
+ # Fixes https://github.com/HansKristian-Work/vkd3d-proton/issues/711
+ install -D -m644 "${srcdir}"/60-nvidia.rules "${pkgdir}/usr/lib/udev/rules.d/60-nvidia.rules"
create_links
}
package_lib32-opencl-nvidia-performance() {
- pkgdesc='OpenCL implemention for NVIDIA (Multilib)'
+ pkgdesc='OpenCL implemention for NVIDIA (32 bit)'
depends=('lib32-zlib' 'lib32-gcc-libs' "lib32-nvidia-utils-performance>=${pkgver}")
optdepends=('opencl-headers: headers necessary for OpenCL development')
provides=("lib32-opencl-nvidia=${pkgver}" 'lib32-opencl-driver')
@@ -407,7 +462,7 @@ package_lib32-opencl-nvidia-performance() {
}
package_lib32-nvidia-utils-performance() {
- pkgdesc='NVIDIA drivers utilities and libraries'
+ pkgdesc='NVIDIA drivers utilities and libraries (32 bit)'
depends=('lib32-zlib' 'lib32-gcc-libs' 'lib32-libglvnd' "nvidia-utils-performance>=${pkgver}")
optdepends=('lib32-opencl-nvidia-performance: for OpenCL support')
provides=("lib32-nvidia-utils=${pkgver}" 'lib32-vulkan-driver' 'lib32-opengl-driver'