Github messages for voidlinux
 help / color / mirror / Atom feed
From: ericonr <ericonr@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] nvidia: add prime-run script
Date: Sun, 24 May 2020 06:22:04 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-22249@inbox.vuxu.org> (raw)

[-- 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"

             reply	other threads:[~2020-05-24  4:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-24  4:22 ericonr [this message]
2020-05-24  4:27 ` [PR PATCH] [Updated] " ericonr
2020-05-24 16:32 ` st3r4g
2020-05-24 20:21 ` ericonr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-22249@inbox.vuxu.org \
    --to=ericonr@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).