summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-05-11 19:18:46 -0400
committerIonen Wolkens <ionen@gentoo.org>2022-05-11 19:50:21 -0400
commitff4f7290be98925de84cd773d3b9e546057bf4ef (patch)
treed728809068289839f831365f5d4ab3edcc45f13f /x11-drivers
parentdev-scheme/guile-json: correct license (GPL-3+) (diff)
downloadgentoo-ff4f7290be98925de84cd773d3b9e546057bf4ef.tar.gz
gentoo-ff4f7290be98925de84cd773d3b9e546057bf4ef.tar.bz2
gentoo-ff4f7290be98925de84cd773d3b9e546057bf4ef.zip
x11-drivers/nvidia-drivers: kernel-open improvements
- use full source rather than bundled kernel-open which comes with a prebuilt .o_binary similarly to closed source blob - enable NVreg_OpenRmEnableUnsupportedGpus=1 by default or else it's unlikely to work on the average GPUs - symlink application profile to help nvidia-settings start Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/nvidia-drivers/Manifest1
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-515.43.04.ebuild23
2 files changed, 20 insertions, 4 deletions
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
index 2dda492175eb..46ab3eb7cf50 100644
--- a/x11-drivers/nvidia-drivers/Manifest
+++ b/x11-drivers/nvidia-drivers/Manifest
@@ -6,6 +6,7 @@ DIST NVIDIA-Linux-x86_64-470.103.01.run 272484410 BLAKE2B 42a19ed990f49d4ceefc10
DIST NVIDIA-Linux-x86_64-470.62.29.run 271041614 BLAKE2B c49c1861e0ac1741e8e270d78327d75abd9c58fc06f23f4d8508976276afc69b9a83958ba855884767a82018b424bed9cf7b89c0514db56f55c2a3cff70d2d99 SHA512 bdd8dd25b2fa07c15a4e14bab9d7154f2be5c3d08960caf7d419247ff5d12c8366962346c2f38efee6daa935b020d8de09d9c145c08cdd0835a6fef0c2c3c76d
DIST NVIDIA-Linux-x86_64-510.68.02.run 329247384 BLAKE2B 44107d04df20533aa904146465d069ad30aa2aabc68c3588480d0c8e85e3e0eec7515d81bd411d63e02ee893343088e6805235386a8d3eb0f4cefb72083dc0ea SHA512 eb31ed729555075bcc307acc576cb6fdfdd7e397c9e47dd80fc2f55cac6902c3924b69bb91036e5ded1001e81d4b81082ba093dd63d6d97bc313fe78e510131b
DIST NVIDIA-Linux-x86_64-515.43.04.run 358747732 BLAKE2B 295284c951deee77905a386e7c960c5ba715358ce47afa5f9bd03dfc3f14cc5aeb37dacf2d42f35a15ef3a48b59cf1bdc8a36074d48b06aa98112b60496dcdce SHA512 07dfcfc297d8dc3072ddf5d719ab5fe3de0aaa2d9b2b7329d86a1cc167c79bd3854c0644cc0080689e2529b3e375dc3ffb370afc3904362722b338d2c1c2837a
+DIST NVIDIA-kernel-module-source-515.43.04.tar.xz 7600032 BLAKE2B 6da3cbc2d09b7c6c9a9d61df6adfb6cb50e268a1c367a6eda7f750cd27f54d188b713147051d884561a7440708ab8bb2e0f09cb66386101f955861de92346dde SHA512 ad919e6fbcf5c830ed6c2566372b2675731546a3ffc008b009cd172fb529ed34f6f9b436acd6d7ccab744296dd9da15c6aa8c2f7edb0355d5b2633ae92e79d69
DIST nvidia-installer-390.147.tar.bz2 150157 BLAKE2B 3bf5317aaa3bdb0e6dc3b3e21ad3dbacf6dc782a643b0fa9badf354361891ab25660b57dd408e346f219d469af317a4851937e1cb77ffe59a39e9d98a92f3a40 SHA512 24bd8a2959062551abf2ea039ac95eba224d58c175f59f1386a6d43459ad43b2bddf17f00b53c1c71c45eca3b7a2281dcf05cc65030f6f8bed16d0f0b9f9c282
DIST nvidia-installer-470.103.01.tar.bz2 146121 BLAKE2B 06da3693cf8edba849b802f2255dcf2086ba3846f83ef19a02cb813ea2c07a6904f8a49e263018fb8b40c9fece7ab4422d95a50d12030ae6815ec60a7edac055 SHA512 b080f32394a6163c34e152561b80cca9277a53e0b38c5225b91daddc2169403e2ff4cf63a30b488ee0c3a954b21d32065b5624fb9dd33e672313909b9096de02
DIST nvidia-installer-510.68.02.tar.gz 199720 BLAKE2B 69f6514e5eac74897158585d90d215d689edce720257819af5b245768029efc9a95338b3aa3de1a63c8b107658375f248a688c31ea08513224e443083a5f68ce SHA512 24831d20f79bdd5e5d6c828f02d59f9c75b30169a46ac789615be5ae014c831fc5bcf267c5f5afa8fc84208eb427a9972638db0aca68510393916c041368ff45
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-515.43.04.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-515.43.04.ebuild
index 6aa9c68dc6c0..e7a6a48de585 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-515.43.04.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-515.43.04.ebuild
@@ -15,8 +15,9 @@ HOMEPAGE="https://www.nvidia.com/download/index.aspx"
SRC_URI="
amd64? ( ${NV_URI}Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run )
arm64? ( ${NV_URI}Linux-aarch64/${PV}/NVIDIA-Linux-aarch64-${PV}.run )
- $(printf "${NV_URI}%s/%s-${PV}.tar.bz2 " \
- nvidia-{installer,modprobe,persistenced,settings,xconfig}{,})"
+ $(printf "${NV_URI}%s/%s-${PV}.tar.bz2 " \
+ nvidia-{installer,modprobe,persistenced,settings,xconfig}{,})
+ ${NV_URI}NVIDIA-kernel-module-source/NVIDIA-kernel-module-source-${PV}.tar.xz"
# nvidia-installer is unused but here for GPL-2's "distribute sources"
S="${WORKDIR}"
@@ -111,7 +112,8 @@ pkg_setup() {
nvidia-modeset(video:kernel)
nvidia-peermem(video:kernel)
nvidia-uvm(video:kernel)"
- use kernel-open && MODULE_NAMES=${MODULE_NAMES//:kernel/:kernel-open}
+ use kernel-open &&
+ MODULE_NAMES=${MODULE_NAMES//:kernel/:kernel-module-source:kernel-module-source/kernel-open}
linux-mod_pkg_setup
@@ -153,12 +155,13 @@ src_prepare() {
rm nvidia-persistenced && mv nvidia-persistenced{-${PV},} || die
rm nvidia-settings && mv nvidia-settings{-${PV},} || die
rm nvidia-xconfig && mv nvidia-xconfig{-${PV},} || die
+ mv NVIDIA-kernel-module-source-${PV} kernel-module-source || die
default
# prevent detection of incomplete kernel DRM support (bug #603818)
sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \
- -i kernel{,-open}/conftest.sh || die
+ -i kernel{,-module-source/kernel-open}/conftest.sh || die
# adjust service files
sed 's/__USER__/nvpd/' \
@@ -173,6 +176,13 @@ src_prepare() {
# makefile attempts to install wayland library even if not built
use wayland || sed -i 's/ WAYLAND_LIB_install$//' \
nvidia-settings/src/Makefile || die
+
+ # temporary option, nvidia will remove in the future
+ use !kernel-open ||
+ sed -i '/blacklist/a\
+\
+# Enable using kernel-open with workstation GPUs (experimental)\
+options nvidia NVreg_OpenRmEnableUnsupportedGpus=1' "${T}"/nvidia.conf || die
}
src_compile() {
@@ -386,6 +396,11 @@ https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
insinto /usr/share/dbus-1/system.d
doins nvidia-dbus.conf
fi
+
+ # symlink non-versioned profile for nvidia-settings in case
+ # fails to detect version (i.e. mismatch, or with kernel-open)
+ dosym nvidia-application-profiles-${PV}-key-documentation \
+ ${paths[APPLICATION_PROFILE]}/nvidia-application-profiles-key-documentation
}
pkg_preinst() {