From b0a8f86da278bee326ddfd9d9b341792a76f5b7f4b25a8038e04511554582ebe Mon Sep 17 00:00:00 2001 From: R N Date: Sat, 23 Nov 2024 00:02:43 +0000 Subject: [PATCH] - Added prime-run binary that just links process to the nvidia libraries OBS-URL: https://build.opensuse.org/package/show/hardware/supergfxctl?expand=0&rev=18 --- prime-run.sh | 3 +++ supergfxctl.changes | 6 ++++++ supergfxctl.spec | 10 +++++++--- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 prime-run.sh diff --git a/prime-run.sh b/prime-run.sh new file mode 100644 index 0000000..162f343 --- /dev/null +++ b/prime-run.sh @@ -0,0 +1,3 @@ +#!/bin/bash +__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia "$@" + diff --git a/supergfxctl.changes b/supergfxctl.changes index bd9d7ea..d583390 100644 --- a/supergfxctl.changes +++ b/supergfxctl.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Nov 22 23:36:28 UTC 2024 - RN + +- Added prime-run binary that just links process to the nvidia + libraries + ------------------------------------------------------------------- Mon Nov 18 16:44:53 UTC 2024 - RN diff --git a/supergfxctl.spec b/supergfxctl.spec index 36d102c..1e475b4 100644 --- a/supergfxctl.spec +++ b/supergfxctl.spec @@ -27,20 +27,21 @@ URL: https://gitlab.com/asus-linux/supergfxctl Source0: %{name}-%{version}.tar.gz Source1: vendor.tar.zst Source2: %{name}-user.conf +Source3: prime-run.sh Group: System/Daemons ## Patch for user-groups -Patch1: user-group.patch +Patch1: user-group.patch ## Upstream GPU detection patch -Patch2: GPUDetection.patch +Patch2: GPUDetection.patch BuildRequires: cargo-packaging BuildRequires: pkgconfig +BuildRequires: sysuser-tools BuildRequires: pkgconfig(dbus-1) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(systemd) -BuildRequires: sysuser-tools Requires: systemd Conflicts: bbswitch @@ -77,6 +78,8 @@ install -D -m 0644 README.md %{buildroot}%{_datadir}/doc/%{name}/README.md install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}-user.conf +install -D -m 0755 %{SOURCE3} %{buildroot}%{_bindir}/prime-run + %pre -f %{name}.pre %service_add_pre supergfxd.service @@ -100,6 +103,7 @@ fi %license LICENSE %{_bindir}/supergfxd %{_bindir}/supergfxctl +%{_bindir}/prime-run %{_unitdir}/supergfxd.service %{_presetdir}/99-supergfxd.preset %{_udevrulesdir}/90-supergfxd-nvidia-pm.rules