- 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
This commit is contained in:
R N 2024-11-23 00:02:43 +00:00 committed by Git OBS Bridge
parent 0e929b5bff
commit b0a8f86da2
3 changed files with 16 additions and 3 deletions

3
prime-run.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia "$@"

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Nov 22 23:36:28 UTC 2024 - RN <R_Nik_C@proton.me>
- Added prime-run binary that just links process to the nvidia
libraries
-------------------------------------------------------------------
Mon Nov 18 16:44:53 UTC 2024 - RN <R_Nik_C@proton.me>

View File

@ -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