Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] nvidia: add prime-run script
@ 2020-05-24  4:22 ericonr
  2020-05-24  4:27 ` [PR PATCH] [Updated] " ericonr
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ericonr @ 2020-05-24  4:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

There is a new pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages nvidia-prime
https://github.com/void-linux/void-packages/pull/22249

nvidia: add prime-run script
Also add some newlines between the subpackages.

@abenson 

A patch file from https://github.com/void-linux/void-packages/pull/22249.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-prime-22249.patch --]
[-- Type: text/x-diff, Size: 2199 bytes --]

From 0c6fa0196210155e77df3b35b273a62ae46fd421 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Sun, 24 May 2020 01:19:27 -0300
Subject: [PATCH] nvidia: add prime-run script

Also add some newlines between the subpackages.
---
 srcpkgs/nvidia/files/prime-run | 6 ++++++
 srcpkgs/nvidia/template        | 7 +++++++
 2 files changed, 13 insertions(+)
 create mode 100644 srcpkgs/nvidia/files/prime-run

diff --git a/srcpkgs/nvidia/files/prime-run b/srcpkgs/nvidia/files/prime-run
new file mode 100644
index 00000000000..581abffd4c0
--- /dev/null
+++ b/srcpkgs/nvidia/files/prime-run
@@ -0,0 +1,6 @@
+#!/bin/sh
+export __NV_PRIME_RENDER_OFFLOAD=1
+export __GLX_VENDOR_LIBRARY_NAME=nvidia
+export __VK_LAYER_NV_optimus=NVIDIA_only
+export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
+exec "$@"
diff --git a/srcpkgs/nvidia/template b/srcpkgs/nvidia/template
index 49941e93e30..19c659b6c63 100644
--- a/srcpkgs/nvidia/template
+++ b/srcpkgs/nvidia/template
@@ -211,10 +211,13 @@ do_install() {
 		-e 's/__MAKEJOBS/-j$(nproc)/g' \
 		-i ${DESTDIR}/usr/src/nvidia-${version}/dkms.conf
 
+	# Xorg conf for PRIME
 	vmkdir /usr/share/X11/xorg.conf.d/
 	vinstall ${FILESDIR}/nvidia-drm-outputclass.conf 644 \
 		/usr/share/X11/xorg.conf.d 10-nvidia-drm-outputclass.conf
 
+	vbin ${FILESDIR}/prime-run
+
 	# Blacklist nouveau
 	vmkdir usr/lib/modprobe.d
 	echo "blacklist nouveau" > ${DESTDIR}/usr/lib/modprobe.d/nvidia.conf
@@ -238,6 +241,7 @@ nvidia-gtklibs_package() {
 		vmove "usr/lib/lib*gtk*.so*"
 	}
 }
+
 nvidia-libs-32bit_package() {
 	short_desc="${_desc} - common libraries (32bit)"
 	# manually set 32bit depends for libglvnd
@@ -247,6 +251,7 @@ nvidia-libs-32bit_package() {
 		vmove usr/lib32
 	}
 }
+
 nvidia-libs_package() {
 	short_desc="${_desc} - common libraries"
 	depends="libglvnd"
@@ -254,6 +259,7 @@ nvidia-libs_package() {
 		vmove usr/lib
 	}
 }
+
 nvidia-dkms_package() {
 	short_desc="${_desc} - DKMS kernel module"
 	dkms_modules="nvidia ${version}"
@@ -263,6 +269,7 @@ nvidia-dkms_package() {
 		vmove usr/lib/modprobe.d
 	}
 }
+
 nvidia-opencl_package() {
 	short_desc="${_desc} - OpenCL implementation"
 	depends="libOpenCL"

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Updated] nvidia: add prime-run script
  2020-05-24  4:22 [PR PATCH] nvidia: add prime-run script ericonr
@ 2020-05-24  4:27 ` ericonr
  2020-05-24 16:32 ` st3r4g
  2020-05-24 20:21 ` ericonr
  2 siblings, 0 replies; 4+ messages in thread
From: ericonr @ 2020-05-24  4:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 383 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages nvidia-prime
https://github.com/void-linux/void-packages/pull/22249

nvidia: add prime-run script
Also add some newlines between the subpackages.

@abenson 

A patch file from https://github.com/void-linux/void-packages/pull/22249.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nvidia-prime-22249.patch --]
[-- Type: text/x-diff, Size: 2437 bytes --]

From 5c02cf8c6547b4cfe1ac24a66d4a4fb8d4a79c78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Sun, 24 May 2020 01:19:27 -0300
Subject: [PATCH] nvidia: add prime-run script

Also add some newlines between the subpackages.
---
 srcpkgs/nvidia/files/prime-run | 6 ++++++
 srcpkgs/nvidia/template        | 9 ++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/nvidia/files/prime-run

diff --git a/srcpkgs/nvidia/files/prime-run b/srcpkgs/nvidia/files/prime-run
new file mode 100644
index 00000000000..581abffd4c0
--- /dev/null
+++ b/srcpkgs/nvidia/files/prime-run
@@ -0,0 +1,6 @@
+#!/bin/sh
+export __NV_PRIME_RENDER_OFFLOAD=1
+export __GLX_VENDOR_LIBRARY_NAME=nvidia
+export __VK_LAYER_NV_optimus=NVIDIA_only
+export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json
+exec "$@"
diff --git a/srcpkgs/nvidia/template b/srcpkgs/nvidia/template
index 49941e93e30..39407d11acd 100644
--- a/srcpkgs/nvidia/template
+++ b/srcpkgs/nvidia/template
@@ -4,7 +4,7 @@ _desc="NVIDIA drivers for linux"
 
 pkgname=nvidia
 version=440.82
-revision=1
+revision=2
 maintainer="Juan RP <xtraeme@gmail.com>"
 license="custom:NVIDIA Proprietary"
 homepage="https://www.nvidia.com"
@@ -211,10 +211,13 @@ do_install() {
 		-e 's/__MAKEJOBS/-j$(nproc)/g' \
 		-i ${DESTDIR}/usr/src/nvidia-${version}/dkms.conf
 
+	# Xorg conf for PRIME
 	vmkdir /usr/share/X11/xorg.conf.d/
 	vinstall ${FILESDIR}/nvidia-drm-outputclass.conf 644 \
 		/usr/share/X11/xorg.conf.d 10-nvidia-drm-outputclass.conf
 
+	vbin ${FILESDIR}/prime-run
+
 	# Blacklist nouveau
 	vmkdir usr/lib/modprobe.d
 	echo "blacklist nouveau" > ${DESTDIR}/usr/lib/modprobe.d/nvidia.conf
@@ -238,6 +241,7 @@ nvidia-gtklibs_package() {
 		vmove "usr/lib/lib*gtk*.so*"
 	}
 }
+
 nvidia-libs-32bit_package() {
 	short_desc="${_desc} - common libraries (32bit)"
 	# manually set 32bit depends for libglvnd
@@ -247,6 +251,7 @@ nvidia-libs-32bit_package() {
 		vmove usr/lib32
 	}
 }
+
 nvidia-libs_package() {
 	short_desc="${_desc} - common libraries"
 	depends="libglvnd"
@@ -254,6 +259,7 @@ nvidia-libs_package() {
 		vmove usr/lib
 	}
 }
+
 nvidia-dkms_package() {
 	short_desc="${_desc} - DKMS kernel module"
 	dkms_modules="nvidia ${version}"
@@ -263,6 +269,7 @@ nvidia-dkms_package() {
 		vmove usr/lib/modprobe.d
 	}
 }
+
 nvidia-opencl_package() {
 	short_desc="${_desc} - OpenCL implementation"
 	depends="libOpenCL"

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: nvidia: add prime-run script
  2020-05-24  4:22 [PR PATCH] nvidia: add prime-run script ericonr
  2020-05-24  4:27 ` [PR PATCH] [Updated] " ericonr
@ 2020-05-24 16:32 ` st3r4g
  2020-05-24 20:21 ` ericonr
  2 siblings, 0 replies; 4+ messages in thread
From: st3r4g @ 2020-05-24 16:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

New comment by st3r4g on void-packages repository

https://github.com/void-linux/void-packages/pull/22249#issuecomment-633256606

Comment:
after this gets merged, can you modify https://docs.voidlinux.org/config/graphical-session/graphics-drivers/optimus.html#prime-render-offload mentioning that the script is already provided?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: nvidia: add prime-run script
  2020-05-24  4:22 [PR PATCH] nvidia: add prime-run script ericonr
  2020-05-24  4:27 ` [PR PATCH] [Updated] " ericonr
  2020-05-24 16:32 ` st3r4g
@ 2020-05-24 20:21 ` ericonr
  2 siblings, 0 replies; 4+ messages in thread
From: ericonr @ 2020-05-24 20:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 179 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/22249#issuecomment-633292415

Comment:
Definitely! Thanks for the suggestion.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-24 20:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-24  4:22 [PR PATCH] nvidia: add prime-run script ericonr
2020-05-24  4:27 ` [PR PATCH] [Updated] " ericonr
2020-05-24 16:32 ` st3r4g
2020-05-24 20:21 ` ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).