Package Details: nvidia-settings-performance 470.74-1

Git Clone URL: https://aur.archlinux.org/nvidia-dkms-performance.git (read-only, click to copy)
Package Base: nvidia-dkms-performance
Description: Tool for configuring the NVIDIA graphics driver
Upstream URL: https://www.nvidia.com/
Keywords: dkms driver nvidia performance
Licenses: custom
Conflicts: nvidia-settings
Provides: nvidia-settings=470.74, nvidia-settings-performance=470.74
Submitter: Cabopust
Maintainer: Cabopust
Last Packager: Cabopust
Votes: 12
Popularity: 2.74
First Submitted: 2021-01-22 18:42
Last Updated: 2021-09-21 14:04

Required by (12)

Sources (9)

Pinned Comments

Cabopust commented on 2021-05-04 21:11

So. I have now rebased this package and done some work to fix and improve it. Among the major changes:

  • The package now has its own duplicates of nvidia-utils, opencl-nvidia, lib32-nvidia-utils, and lib32-opencl-nvidia. This gets rid of the dependencies from the extra Arch Linux repository. It also fixes the not-so-good dependency situation that was there before. However, this change now requires the user to enable the Multilib repository because of the lib32-nvidia-utils-performance and lib32-opencl-nvidia-performance packages, although you can ignore installing them :)

This change also expands the ability to add new patches.

  • Added two new binary patches, this nvidia-patch integration (https://github.com/keylase/nvidia-patch) in this package. Which removes some restrictions from NVENC/NvFBC. You can optionally apply them via the _nvidia_patch parameter in PKGBUILD.

  • The _pref_max_performance parameter has now been replaced by the _powermizer_scheme parameter, giving more control over the power management of the NVIDIA driver through the PowerMizer setup. You can read more information in PKGBUILD.

  • Added the ability to customize the nvidia-settings icon (https://github.com/NVIDIA/nvidia-settings/pull/56).

  • The previously mandatory egl-wayland dependency is now taken out as an optional dependency.

Let me remind you that you can suggest your own patches and I will try to add them to this package.

Latest Comments

1 2 3 4 5 6 Next › Last »

Cabopust commented on 2021-08-27 08:11

@solonovamax Again, sorry for the delay. They are now merged.

Cabopust commented on 2021-08-22 08:01

@solonovamax Ok, thanks! I will merge your new create_links() function as soon as I am at my workstation. You can also submit this change to the nvidia-dkms maintainers in the repositories via the package bug report.

solonovamax commented on 2021-08-22 02:35

@Cabopust

Yes, I know that I have to just create that symlink, the only problem is that the entire build will fail without the changes I made to the PKGBUILD.

I don't know if you read the full comment I sent, but I provided a patch for the PKGBUILD that will fix this issue for all future scenarios, as well as cleaning up some less than idea code in the create_links() function.

Cabopust commented on 2021-08-21 07:42

@solonovamax Hi, sorry for the delay. Yes, it's an interesting bug. But the solution is quite simple, we just need to create symbolic links right after the install command of this library, as here:


diff --git a/PKGBUILD b/PKGBUILD
index 0dcbc94..646e077 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -285,6 +285,8 @@ package_nvidia-utils-performance() {
     install -D -m644 nvidia_icd.json -t "${pkgdir}/usr/share/vulkan/icd.d"
     install -D -m644 nvidia_layers.json -t "${pkgdir}/usr/share/vulkan/implicit_layer.d"
     install -D -m755 "libnvidia-vulkan-producer.so.${pkgver}" -t "${pkgdir}/usr/lib"
+    ln -s "libnvidia-vulkan-producer.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-vulkan-producer.so.so.1"
+    ln -s "libnvidia-vulkan-producer.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-vulkan-producer.so.so"

     # VDPAU
     install -D -m755 "libvdpau_nvidia.so.${pkgver}" -t "${pkgdir}/usr/lib/vdpau"

Unfortunately, I am away at the moment and cannot accept these changes, so accept them yourself.

solonovamax commented on 2021-08-18 22:14

Package can fail to build if the following conditions are met:

  1. Your username starts with so
  2. The readelf -d command on the .so does not contain a Library soname entry

This is due to the sed regex using the wildcard character, ., instead of the escaped dot character, \.. This only occurs when the .so file doesn't print a Library soname entry.

I modified the create_links() function to print out all the variables, and got the following:

_base   = /home.so
_soname = /home/solonovamax/.cache/yay/nvidia-dkms-performance/pkg/nvidia-utils-performance/usr/lib/
_lib    = /home/solonovamax/.cache/yay/nvidia-dkms-performance/pkg/nvidia-utils-performance/usr/lib/libnvidia-vulkan-producer.so.470.63.01
ln: failed to create symbolic link '/home.so': Permission denied
==> ERROR: A failure occurred in package_nvidia-utils-performance().
    Aborting...

As you can see, it is attempting to create /home.so, which it is obviously denied permission to do so, and thus fails the entire build.

Additionally, here is the output of readelf -d:

Dynamic section at offset 0x3e20 contains 24 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libEGL_nvidia.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libEGL.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libnvidia-egl-wayland.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x0000000000000010 (SYMBOLIC)           0x0
 0x000000000000000c (INIT)               0x14b8
 0x000000000000000d (FINI)               0x2854
 0x0000000000000004 (HASH)               0x1f0
 0x0000000000000005 (STRTAB)             0xb38
 0x0000000000000006 (SYMTAB)             0x430
 0x000000000000000a (STRSZ)              1451 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x204000
 0x0000000000000002 (PLTRELSZ)           336 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x1368
 0x0000000000000007 (RELA)               0x11a0
 0x0000000000000008 (RELASZ)             456 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x1180
 0x000000006fffffff (VERNEEDNUM)         1
 0x000000006ffffff0 (VERSYM)             0x10e4
 0x000000006ffffff9 (RELACOUNT)          15
 0x0000000000000000 (NULL)               0x0

There is no Library soname entry, which causes grep to return nothing.

I've taken this opportunity to modify the PKGBUILD to make the create_links() function more robust.

Here is a diff for you:

--- PKGBUILD.old    2021-08-18 17:57:55.048523097 -0400
+++ PKGBUILD    2021-08-18 18:07:08.754221631 -0400
@@ -98,9 +98,25 @@
 create_links() {
+    _orig_dir="$(pwd)"
+
     # create soname links
     for _lib in $(find "${pkgdir}" -name '*.so*' | grep -v 'xorg/'); do
-        _soname=$(dirname "${_lib}")/$(readelf -d "${_lib}" | grep -Po 'SONAME.*: \[\K[^]]*' || true)
-        _base=$(echo ${_soname} | sed -r 's/(.*).so.*/\1.so/')
-        [[ -e "${_soname}" ]] || ln -s $(basename "${_lib}") "${_soname}"
-        [[ -e "${_base}" ]] || ln -s $(basename "${_soname}") "${_base}"
+        _dirname="$(dirname "${_lib}")"
+        _original="$(basename "${_lib}")"
+        _soname="$(readelf -d "${_lib}" | grep -Po 'SONAME.*: \[\K[^]]*' || true)"
+        _base="$(echo ${_soname} | sed -r 's/(.*)\.so.*/\1.so/')"
+
+        cd "${_dirname}"
+
+        if ! [[ -z "${_soname}" ]]; then # if not empty
+            if ! [[ -e "./${_soname}" ]]; then
+                ln -s $(basename "${_lib}") "./${_soname}"
+            fi
+        fi
+        if ! [[ -z "${_base}" ]]; then # if not empty (if _soname is empty, _base should be too)
+            if ! [[ -e "./${_base}" ]]; then
+                ln -s "./${_soname}" "./${_base}"
+            fi
+        fi
     done
+    cd "${_orig_dir}"
 }

marcBarbier commented on 2021-08-10 21:27

here is a diff for the update 470.63.01 apply it with patch PKGBUILD diff.patch

72c72
< pkgver=470.57.02
---
> pkgver=470.63.01
88c88
< sha256sums=('55d7ae104827faa79e975321fe2b60f9dd42fbff65642053443c0e56fdb4c47d'
---
> sha256sums=('6f1a44cc4a2ce27dce749ccd1e403c1db0f4791e2d22c05ec966842101d3ed14'

as3ii commented on 2021-07-25 14:42

@Cabopust thank you! Now it works

Cabopust commented on 2021-07-24 16:24

@as3ii I tried to compile the rt kernel with this ugly patch to bypass GPL restrictions and my package and nvidia-dkms from the repositories installed correctly.

diff --git a/kernel/locking/mutex-debug.c b/kernel/locking/mutex-debug.c
index fa61e6b24513..e529735f0d63 100644
--- a/kernel/locking/mutex-debug.c
+++ b/kernel/locking/mutex-debug.c
@@ -101,4 +101,4 @@ void _mutex_t_destroy(_mutex_t *lock)
    DEBUG_LOCKS_WARN_ON(_mutex_t_is_locked(lock));
    lock->magic = NULL;
 }
-EXPORT_SYMBOL_GPL(_mutex_t_destroy);
+EXPORT_SYMBOL(_mutex_t_destroy);
diff --git a/kernel/locking/rtmutex_api.c b/kernel/locking/rtmutex_api.c
index e4eed067873c..676f01af40ae 100644
--- a/kernel/locking/rtmutex_api.c
+++ b/kernel/locking/rtmutex_api.c
@@ -44,7 +44,7 @@ void __sched rt_mutex_lock_nested(struct rt_mutex *lock, unsigned int subclass)
 {
    __rt_mutex_lock_common(lock, TASK_UNINTERRUPTIBLE, subclass);
 }
-EXPORT_SYMBOL_GPL(rt_mutex_lock_nested);
+EXPORT_SYMBOL(rt_mutex_lock_nested);

 #else /* !CONFIG_DEBUG_LOCK_ALLOC */

@@ -57,7 +57,7 @@ void __sched rt_mutex_lock(struct rt_mutex *lock)
 {
    __rt_mutex_lock_common(lock, TASK_UNINTERRUPTIBLE, 0);
 }
-EXPORT_SYMBOL_GPL(rt_mutex_lock);
+EXPORT_SYMBOL(rt_mutex_lock);
 #endif

 /**
@@ -73,7 +73,7 @@ int __sched rt_mutex_lock_interruptible(struct rt_mutex *lock)
 {
    return __rt_mutex_lock_common(lock, TASK_INTERRUPTIBLE, 0);
 }
-EXPORT_SYMBOL_GPL(rt_mutex_lock_interruptible);
+EXPORT_SYMBOL(rt_mutex_lock_interruptible);

 /**
  * rt_mutex_trylock - try to lock a rt_mutex
@@ -100,7 +100,7 @@ int __sched rt_mutex_trylock(struct rt_mutex *lock)

    return ret;
 }
-EXPORT_SYMBOL_GPL(rt_mutex_trylock);
+EXPORT_SYMBOL(rt_mutex_trylock);

 /**
  * rt_mutex_unlock - unlock a rt_mutex
@@ -112,7 +112,7 @@ void __sched rt_mutex_unlock(struct rt_mutex *lock)
    mutex_release(&lock->dep_map, _RET_IP_);
    __rt_mutex_unlock(lock);
 }
-EXPORT_SYMBOL_GPL(rt_mutex_unlock);
+EXPORT_SYMBOL(rt_mutex_unlock);

 /*
  * Futex variants, must not use fastpath.
@@ -190,7 +190,7 @@ void __sched __rt_mutex_init(struct rt_mutex *lock, const char *name,

    __rt_mutex_basic_init(lock);
 }
-EXPORT_SYMBOL_GPL(__rt_mutex_init);
+EXPORT_SYMBOL(__rt_mutex_init);

 /**
  * rt_mutex_init_proxy_locked - initialize and lock a rt_mutex on behalf of a
@@ -557,28 +557,28 @@ void __sched mutex_lock_nested(struct mutex *lock, unsigned int subclass)
 {
    __mutex_lock_common(lock, TASK_UNINTERRUPTIBLE, subclass, NULL, _RET_IP_);
 }
-EXPORT_SYMBOL_GPL(mutex_lock_nested);
+EXPORT_SYMBOL(mutex_lock_nested);

 void __sched _mutex_lock_nest_lock(struct mutex *lock,
                   struct lockdep_map *nest_lock)
 {
    __mutex_lock_common(lock, TASK_UNINTERRUPTIBLE, 0, nest_lock, _RET_IP_);
 }
-EXPORT_SYMBOL_GPL(_mutex_lock_nest_lock);
+EXPORT_SYMBOL(_mutex_lock_nest_lock);

 int __sched mutex_lock_interruptible_nested(struct mutex *lock,
                        unsigned int subclass)
 {
    return __mutex_lock_common(lock, TASK_INTERRUPTIBLE, subclass, NULL, _RET_IP_);
 }
-EXPORT_SYMBOL_GPL(mutex_lock_interruptible_nested);
+EXPORT_SYMBOL(mutex_lock_interruptible_nested);

 int __sched mutex_lock_killable_nested(struct mutex *lock,
                        unsigned int subclass)
 {
    return __mutex_lock_common(lock, TASK_KILLABLE, subclass, NULL, _RET_IP_);
 }
-EXPORT_SYMBOL_GPL(mutex_lock_killable_nested);
+EXPORT_SYMBOL(mutex_lock_killable_nested);

 void __sched mutex_lock_io_nested(struct mutex *lock, unsigned int subclass)
 {
@@ -590,7 +590,7 @@ void __sched mutex_lock_io_nested(struct mutex *lock, unsigned int subclass)
    __mutex_lock_common(lock, TASK_UNINTERRUPTIBLE, subclass, NULL, _RET_IP_);
    io_schedule_finish(token);
 }
-EXPORT_SYMBOL_GPL(mutex_lock_io_nested);
+EXPORT_SYMBOL(mutex_lock_io_nested);

 #else /* CONFIG_DEBUG_LOCK_ALLOC */

For the linux-rt package, you just have to put this patch into the list of source files in PKGBUILD, and the patch will be applied without further manipulation.


diff --git a/PKGBUILD b/PKGBUILD
index 84b2cfe..9f06b4c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,11 +13,14 @@ makedepends=('bc' 'git' 'graphviz' 'imagemagick' 'kmod' 'libelf' 'pahole'
 options=('!strip')
 source=(
   "git+https://gitlab.archlinux.org/dvzrv/linux-rt#tag=v${pkgver}?signed"
+  "nvidia-gpl-fix.patch"
   config
 )
 sha512sums=('SKIP'
+            'SKIP'
             '51a29df70783d038720744c68bf4832f3e291a3dd5113f29b1f766af38906ed318947daa1ac81407a476c5f64b01cf338f65c68b3b3dbb5bdfef6a7ee887fff6')
 b2sums=('SKIP'
+        'SKIP'
         '0941986bdc95cc3b0cf4f71d4e4a6f79f8f20120650568ef2b68e424a44611cd83481a05a7d58d36d32fc603f31f73cb74df7e3040c4ded1f4173c68cd4d736f')
 validpgpkeys=(
   '647F28654894E3BD457199BE38DBBDC86092693E'  # Greg Kroah-Hartman <gregkh@kernel.org>

Unfortunately, these restrictions are dictated by the kernel, and the only way to fix this on my part would be to change the driver license to the GPL, but that would be a violation of the NVIDIA license, and I can't do that.

as3ii commented on 2021-07-23 23:34

@Cabopust I can't disable the "Kernel Debugging" option because it's forced enabled by the "expert" options, which is needed to select "fully preemptible kernel" as preemption model. In my config, most of the options for debugging the kernel are disabled. Linux-xanmod customized in a really similar way has no problem with nvidia-dkms and nvidia-dkms-performance

Cabopust commented on 2021-07-23 17:11

@as3ii Strange, try disabling all debugging options in the kernel (i.e. [Kernel hacking -> Kernel Debugging] in menuconfig). If this does not help, I will think about how to fix it.