summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-07-03 00:52:43 -0400
committerIonen Wolkens <ionen@gentoo.org>2022-07-03 00:52:43 -0400
commit48bb1143ed2356c7a9a916592d6a8a3aeaa699ec (patch)
treeef67b12fa33af3df15e53430a8ce7b43123647e7 /x11-drivers/nvidia-drivers
parentx11-drivers/nvidia-drivers: add 515.49.06:0/vulkan, del 515.49.05-r1 (diff)
downloadgentoo-48bb1143ed2356c7a9a916592d6a8a3aeaa699ec.tar.gz
gentoo-48bb1143ed2356c7a9a916592d6a8a3aeaa699ec.tar.bz2
gentoo-48bb1143ed2356c7a9a916592d6a8a3aeaa699ec.zip
x11-drivers/nvidia-drivers: drop 515.48.07-r1
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'x11-drivers/nvidia-drivers')
-rw-r--r--x11-drivers/nvidia-drivers/Manifest3
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-515.48.07-r1.ebuild505
2 files changed, 0 insertions, 508 deletions
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
index c6b978c61ee5..9b2a67fca493 100644
--- a/x11-drivers/nvidia-drivers/Manifest
+++ b/x11-drivers/nvidia-drivers/Manifest
@@ -1,14 +1,11 @@
DIST NVIDIA-Linux-aarch64-510.73.05.run 211202539 BLAKE2B 0841e4a6fe09d2f0720b25eee545d15d09edb9689ea886fcf86394d09472cda1119488c58325b7bdc20a13af8bcf577056b44987a5a276d2914935fc223285a1 SHA512 bf46b4b8116819ef58fe3aeafe823627d797dd42e936cdc10f93a4acbfe2d7a53614f3d3ce1e43a1027c7d4c6ed5cceb66bd7ebba98471ecbe660b711e0b62de
-DIST NVIDIA-Linux-aarch64-515.48.07.run 217966782 BLAKE2B 17c8cc56370a25edc27fe9788d076cc8ad303834a9ae82de6729400f11b3339033834ea0ecba7f114288c62a7efaece62c783819cf86835d526be93c9095787e SHA512 6676ada7c2597ce0c5108aaa2b99a06ca4306b5afde33b4c9d2f7a6a720b6aa7555f9ac219726d06ec6b770b54a36f5590a1dbd5cb247290f9f1103d92378c45
DIST NVIDIA-Linux-aarch64-515.57.run 220881279 BLAKE2B a0ecf7f18644da11ef813ffe27c900f43d6ef6f7f6cde8626e0884aab9003c5dc026a43e0708409f07518f6d313dfa84f976834d10f872c9e5fda372c8990e69 SHA512 e863fea28fd8b47c21c8832b41eee17ede3c15a0b281c7a8bb143b7d4f07f477e5b30757477f16b3fd4a096b53f25da165f6db641ea3d3dd17893813df3d2a53
DIST NVIDIA-Linux-x86-390.151.run 50757681 BLAKE2B 48821fd918b858167f4f6bda123b132898baea1c41fe7a9273bd67c54d664fce949c9557a7978766661c23e6bc61cb12d1ff6d376c050cdb4cecad117eae7001 SHA512 4e60a5886a8d25b86efed62c01a4ad3aae43c515c8be18ada3f3a20b47c9c6e1d4ca5f268b00932d52ef4330d84c4324e574e6847fef871ddfaa9a0e9dc9751b
DIST NVIDIA-Linux-x86_64-390.151.run 86025677 BLAKE2B 8f78ee00d15ffac9f371e8302541eee8b033670953850dd770c6615eb674fcda2adcea52582284c59a9d7e32943a445d65515b1cacd6f8e5fcbe6c9e94080fb0 SHA512 aad962e4132c8ab031b5f72e47fbd4b5c49824bc175f13fd2c6fb3e539d41ff9829835ce4928bbfa56aba2ffa43fbe3d8049e9246e29b19abcea0ac89bdae5d4
DIST NVIDIA-Linux-x86_64-470.129.06.run 272145574 BLAKE2B 9eb75456f3aa6cea13a66b9e161677e06ab3a3e12d960df3973adfa7ded4aefc5336761398f92e91a304786e48c1cc0a34675ad18d416297a177d677668ec4a2 SHA512 6f61f01b3840e30b3cd195ecb81826c37200e27b79d555808c873d5381fd55868bddf16a53f15cb51646af067705a6ce289c4cef514908b1b4b2d2e765907252
DIST NVIDIA-Linux-x86_64-510.73.05.run 329250752 BLAKE2B dd79ad5a7c94cd50a832a224a5dcab7cb24368453417962ac63cb7dca6f7d9bfe0a41460df90f9793b9c8c2e42d1e3666c940cf9f869e18b201df385a66c7dd8 SHA512 c2ce41ee8112ad5450d6aa18f910da0870ac08a1ad0ab0d82a256b191c7826057afb3477e7a842244034c9eb9de37c6af919b0dd055bb90dd2a32d7e97a8c72c
-DIST NVIDIA-Linux-x86_64-515.48.07.run 360459673 BLAKE2B 5f998024070a73f8dae4b5525c651055b311217c0d1d9e40a11e10ba0932b13b4902c47a5a444a461dd3cc1c99de7b21654c9e3bc4195bade22f94794e41d58a SHA512 a8129334ce02e5decccc6b1c336723b58e0883f58ca1cef56288144278af996594dfa141882613453452cc8a0ed7d76839d6d1ecd30d11c73eacf21450524286
DIST NVIDIA-Linux-x86_64-515.49.06.run 363184836 BLAKE2B 2b6c5bb54e63eb5b5fb9cfa57461cb9e919a6deadd0fab27db766cc15b0a51c01a8228a2326e98b1f769b534a8f534ba7fe14278da43159a1e8c23486f14af77 SHA512 2292d042206e4cab06125b719c832d95565e11b2da5636ccbb9371c3c1e12b98d3ba7267de6012622f58424d27f6cb3e364609e505f9c257acd677551474bf5d
DIST NVIDIA-Linux-x86_64-515.57.run 363365091 BLAKE2B 13bd4d4cbfbfe99a9841d82e6ae86600ba93a5db1a87d8a3372fde2fb86b104adf31e345ec7ffd6bc076cda962521f64213bbc5ebe46077c6d457c2676b5f8c4 SHA512 6c6ff830dfdf9fb7d127cddc1d72b54e78dc14aeb07596413e82ffa62e065272781d2c487ffd25d153bdbeedb9b26d6fd80380304f736a47fa628aded0e817d6
-DIST NVIDIA-kernel-module-source-515.48.07.tar.xz 7496780 BLAKE2B 681bd8dd416763826e2d227fedf67a54613f8ab0feaa1d5be4c5d864cd52aaaa98b6fe8f301d0cf1d1334fd8fc3acb312949f46acdabcd141fd15df21789b165 SHA512 5535703d8de781149ea9175785fc04ba9b2ea1c39a524dcf7937941d951489edfb94e72b2bde70044ed682a209b8923e14fa5314e12c46a1fb9621ee8a2e3269
DIST nvidia-installer-390.151.tar.bz2 150160 BLAKE2B 373c0f26ca258d6e274891ec49f8ae768b3ba50cc1079b697e310c52fac7710b221591074497803b3e65a8fc9c2f49a493126de0907a117d6af1101d190b2b38 SHA512 027676209d1ba5fa3bf63d716562beb308c28b083f9411461112493f006afa69bcad7c95c479724a841f2790548924a3cf4b11ae95b70e33854ce0b2eff4b8f8
DIST nvidia-installer-470.129.06.tar.bz2 146297 BLAKE2B d09351edc3b90bb401ced3cf883c18dfbd83b9a1f2d4b5595adc8a593357e848ad7d588ef2283ab11ee520860ba8786684e177d84156d75f78c8f312848255c4 SHA512 b49963d7c4fde2354f64e77373d0e1c9fdd71927b43101b5663be31d3b36bd3c652ae983286dc406b080fce6f2f2ff0151254ee833a39c81b44524d0b79090b6
DIST nvidia-installer-510.73.05.tar.bz2 144478 BLAKE2B 183ae9dd744905b2171226b4552ab88e85fb70b941db246f5e9a6cc01f17dbb30aa91738cce9ef9294326aff9aa2dfd121358c1374e94524ba00e20de338c72d SHA512 83deb6bca2c448f319c1a0065f5dea8d754e5b8e812b0342a4c85ef2c7bb2efeb2b3ebde3234e823c9029ef575a4cfe38e48acde3b2639b21d123e361d56c767
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-515.48.07-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-515.48.07-r1.ebuild
deleted file mode 100644
index 2a68ea99fdb1..000000000000
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-515.48.07-r1.ebuild
+++ /dev/null
@@ -1,505 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MODULES_OPTIONAL_USE="driver"
-inherit desktop flag-o-matic linux-mod multilib readme.gentoo-r1 \
- systemd toolchain-funcs unpacker user-info
-
-NV_KERNEL_MAX="5.18"
-NV_URI="https://download.nvidia.com/XFree86/"
-
-DESCRIPTION="NVIDIA Accelerated Graphics Driver"
-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}{,})
- ${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}"
-
-LICENSE="NVIDIA-r2 BSD BSD-2 GPL-2 MIT ZLIB curl openssl"
-SLOT="0/${PV%%.*}"
-KEYWORDS="-* ~amd64 ~arm64"
-IUSE="+X abi_x86_32 abi_x86_64 +driver kernel-open persistenced +static-libs +tools wayland"
-REQUIRED_USE="kernel-open? ( driver )"
-
-COMMON_DEPEND="
- acct-group/video
- sys-libs/glibc
- X? ( x11-libs/libpciaccess )
- persistenced? (
- acct-user/nvpd
- net-libs/libtirpc:=
- )
- tools? (
- dev-libs/atk
- dev-libs/glib:2
- dev-libs/jansson:=
- media-libs/harfbuzz:=
- x11-libs/cairo
- x11-libs/gdk-pixbuf:2
- x11-libs/gtk+:3
- x11-libs/libX11
- x11-libs/libXext
- x11-libs/libXxf86vm
- x11-libs/pango
- )"
-RDEPEND="
- ${COMMON_DEPEND}
- X? (
- media-libs/libglvnd[X,abi_x86_32(-)?]
- x11-libs/libX11[abi_x86_32(-)?]
- x11-libs/libXext[abi_x86_32(-)?]
- )
- wayland? (
- gui-libs/egl-gbm
- =gui-libs/egl-wayland-1.1.9*
- media-libs/libglvnd
- )"
-DEPEND="
- ${COMMON_DEPEND}
- static-libs? (
- x11-libs/libX11
- x11-libs/libXext
- )
- tools? (
- media-libs/libglvnd
- sys-apps/dbus
- x11-base/xorg-proto
- x11-libs/libXrandr
- x11-libs/libXv
- x11-libs/libvdpau
- )"
-BDEPEND="
- sys-devel/m4
- virtual/pkgconfig"
-
-QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*"
-
-PATCHES=(
- "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch
- "${FILESDIR}"/nvidia-settings-390.144-desktop.patch
- "${FILESDIR}"/nvidia-settings-390.144-no-gtk2.patch
- "${FILESDIR}"/nvidia-settings-390.144-raw-ldflags.patch
-)
-
-pkg_setup() {
- use driver || return
-
- local CONFIG_CHECK="
- PROC_FS
- ~DRM_KMS_HELPER
- ~SYSVIPC
- ~!LOCKDEP
- ~!SLUB_DEBUG_ON
- ~!X86_KERNEL_IBT
- !DEBUG_MUTEXES"
- local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection
- of drivers (no custom config), and for wayland / nvidia-drm.modeset=1.
- Cannot be directly selected in the kernel's menuconfig, and may need
- selection of a DRM device even if unused, e.g. CONFIG_DRM_AMDGPU=m or
- DRM_I915=y, DRM_NOUVEAU=m also acceptable if a module and not built-in."
- local ERROR_X86_KERNEL_IBT="X86_KERNEL_IBT: is set, be warned the modules may not load with it.
- If run into problems, either unset or pass ibt=off to the kernel."
-
- use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
-
- use kernel-open && CONFIG_CHECK+=" MMU_NOTIFIER" #843827
- local ERROR_MMU_NOTIFIER="CONFIG_MMU_NOTIFIER: is not set but needed to build with USE=kernel-open.
- Cannot be directly selected in the kernel's menuconfig, and may need
- selection of another option that requires it such as CONFIG_KVM."
-
- MODULE_NAMES="
- nvidia(video:kernel)
- nvidia-drm(video:kernel)
- nvidia-modeset(video:kernel)
- nvidia-peermem(video:kernel)
- nvidia-uvm(video:kernel)"
- use kernel-open &&
- MODULE_NAMES=${MODULE_NAMES//:kernel/:kernel-module-source:kernel-module-source/kernel-open}
-
- linux-mod_pkg_setup
-
- [[ ${MERGE_TYPE} == binary ]] && return
-
- BUILD_PARAMS='NV_VERBOSE=1 IGNORE_CC_MISMATCH=yes SYSSRC="${KV_DIR}" SYSOUT="${KV_OUT_DIR}"'
- BUILD_TARGETS="modules"
-
- if linux_chkconfig_present CC_IS_CLANG; then
- ewarn "Warning: building ${PN} with a clang-built kernel is experimental"
-
- BUILD_PARAMS+=' CC=${CHOST}-clang'
- if linux_chkconfig_present LD_IS_LLD; then
- BUILD_PARAMS+=' LD=ld.lld'
- if linux_chkconfig_present LTO_CLANG_THIN; then
- # kernel enables cache by default leading to sandbox violations
- BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir='
- fi
- fi
- fi
-
- if kernel_is -gt ${NV_KERNEL_MAX/./ }; then
- ewarn "Kernel ${KV_MAJOR}.${KV_MINOR} is either known to break this version of ${PN}"
- ewarn "or was not tested with it. It is recommended to use one of:"
- ewarn " <=sys-kernel/gentoo-kernel-${NV_KERNEL_MAX}.x"
- ewarn " <=sys-kernel/gentoo-sources-${NV_KERNEL_MAX}.x"
- ewarn "You are free to try or use /etc/portage/patches, but support will"
- ewarn "not be given and issues wait until NVIDIA releases a fixed version"
- ewarn "(Gentoo will not accept patches for this)."
- ewarn
- ewarn "Do _not_ file a bug report if run into issues."
- ewarn
- fi
-}
-
-src_prepare() {
- # make patches usable across versions
- rm nvidia-modprobe && mv nvidia-modprobe{-${PV},} || die
- 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{,-module-source/kernel-open}/conftest.sh || die
-
- # adjust service files
- sed 's/__USER__/nvpd/' \
- nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \
- > "${T}"/nvidia-persistenced.service || die
- use !amd64 || sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die
-
- # enable nvidia-drm.modeset=1 by default with USE=wayland
- cp "${FILESDIR}"/nvidia-470.conf "${T}"/nvidia.conf || die
- use !wayland || sed -i '/^#.*modeset=1$/s/^#//' "${T}"/nvidia.conf || die
-
- # 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() {
- tc-export AR CC CXX LD OBJCOPY OBJDUMP
-
- NV_ARGS=(
- PREFIX="${EPREFIX}"/usr
- HOST_CC="$(tc-getBUILD_CC)"
- HOST_LD="$(tc-getBUILD_LD)"
- NV_USE_BUNDLED_LIBJANSSON=0
- NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out
- WAYLAND_AVAILABLE=$(usex wayland 1 0)
- XNVCTRL_CFLAGS=-fPIC #840389
- )
-
- if use driver; then
- if linux_chkconfig_present GCC_PLUGINS; then
- mkdir "${T}"/plugin-test || die
- echo "obj-m += test.o" > "${T}"/plugin-test/Kbuild || die
- > "${T}"/plugin-test/test.c || die
- if [[ $(LC_ALL=C make -C "${KV_OUT_DIR}" ARCH="$(tc-arch-kernel)" \
- HOSTCC="$(tc-getBUILD_CC)" M="${T}"/plugin-test 2>&1) \
- =~ "error: incompatible gcc/plugin version" ]]; then
- ewarn "Warning: detected kernel was built with different gcc/plugin versions,"
- ewarn "you may need to 'make clean' and rebuild your kernel with the current"
- ewarn "gcc version (or re-emerge for distribution kernels, including kernel-bin)."
- fi
- fi
-
- linux-mod_src_compile
- fi
-
- emake "${NV_ARGS[@]}" -C nvidia-modprobe
- use persistenced && emake "${NV_ARGS[@]}" -C nvidia-persistenced
- use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig
-
- if use tools; then
- # cflags: avoid noisy logs, only use here and set first to let override
- # ldflags: abi currently needed if LD=ld.lld
- CFLAGS="-Wno-deprecated-declarations ${CFLAGS}" \
- RAW_LDFLAGS="$(get_abi_LDFLAGS) $(raw-ldflags)" \
- emake "${NV_ARGS[@]}" -C nvidia-settings
- elif use static-libs; then
- emake "${NV_ARGS[@]}" -C nvidia-settings/src out/libXNVCtrl.a
- fi
-}
-
-src_install() {
- local libdir=$(get_libdir) libdir32=$(ABI=x86 get_libdir)
-
- NV_ARGS+=( DESTDIR="${D}" LIBDIR="${ED}"/usr/${libdir} )
-
- local -A paths=(
- [APPLICATION_PROFILE]=/usr/share/nvidia
- [CUDA_ICD]=/etc/OpenCL/vendors
- [EGL_EXTERNAL_PLATFORM_JSON]=/usr/share/egl/egl_external_platform.d
- [FIRMWARE]=/lib/firmware/nvidia/${PV}
- [GBM_BACKEND_LIB_SYMLINK]=/usr/${libdir}/gbm
- [GLVND_EGL_ICD_JSON]=/usr/share/glvnd/egl_vendor.d
- [VULKAN_ICD_JSON]=/usr/share/vulkan
- [WINE_LIB]=/usr/${libdir}/nvidia/wine
- [XORG_OUTPUTCLASS_CONFIG]=/usr/share/X11/xorg.conf.d
-
- [GLX_MODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules/extensions
- [GLX_MODULE_SYMLINK]=/usr/${libdir}/xorg/modules
- [XMODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules
- )
-
- local skip_files=(
- # nvidia_icd/layers(vulkan): skip with -X too as it uses libGLX_nvidia
- $(usev !X "
- libGLX_nvidia libglxserver_nvidia
- nvidia_icd.json nvidia_layers.json")
- $(usev !wayland libnvidia-vulkan-producer)
- libGLX_indirect # non-glvnd unused fallback
- libnvidia-{gtk,wayland-client} nvidia-{settings,xconfig} # from source
- libnvidia-egl-gbm 15_nvidia_gbm # gui-libs/egl-gbm
- libnvidia-egl-wayland 10_nvidia_wayland # gui-libs/egl-wayland
- )
- local skip_modules=(
- $(usev !X "nvfbc vdpau xdriver")
- $(usev !driver gsp)
- installer nvpd # handled separately / built from source
- )
- local skip_types=(
- GLVND_LIB GLVND_SYMLINK EGL_CLIENT.\* GLX_CLIENT.\* # media-libs/libglvnd
- OPENCL_WRAPPER.\* # virtual/opencl
- DOCUMENTATION DOT_DESKTOP .\*_SRC DKMS_CONF SYSTEMD_UNIT # handled separately / unused
- )
-
- local DOCS=(
- README.txt NVIDIA_Changelog supported-gpus/supported-gpus.json
- nvidia-settings/doc/{FRAMELOCK,NV-CONTROL-API}.txt
- )
- local HTML_DOCS=( html/. )
- einstalldocs
-
- local DISABLE_AUTOFORMATTING=yes
- local DOC_CONTENTS="\
-Trusted users should be in the 'video' group to use NVIDIA devices.
-You can add yourself by using: gpasswd -a my-user video\
-$(usev driver "
-
-Like all out-of-tree kernel modules, it is necessary to rebuild
-${PN} after upgrading or rebuilding the Linux kernel
-by for example running \`emerge @module-rebuild\`. Alternatively,
-if using a distribution kernel (sys-kernel/gentoo-kernel{,-bin}),
-this can be automated by setting USE=dist-kernel globally.
-
-Loaded kernel modules also must not mismatch with the installed
-${PN} version (excluding -r revision), meaning should
-ensure \`eselect kernel list\` points to the kernel that will be
-booted before building and preferably reboot after upgrading
-${PN} (the ebuild will emit a warning if mismatching).
-
-See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.")\
-$(use amd64 && usev !abi_x86_32 "
-
-Note that without USE=abi_x86_32 on ${PN}, 32bit applications
-(typically using wine / steam) will not be able to use GPU acceleration.")
-
-For general information on using ${PN}, please see:
-https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
- readme.gentoo_create_doc
-
- if use driver; then
- linux-mod_src_install
-
- insinto /etc/modprobe.d
- doins "${T}"/nvidia.conf
-
- # used for gpu verification with binpkgs (not kept, see pkg_preinst)
- insinto /usr/share/nvidia
- doins supported-gpus/supported-gpus.json
- fi
-
- emake "${NV_ARGS[@]}" -C nvidia-modprobe install
- fowners :video /usr/bin/nvidia-modprobe #505092
- fperms 4710 /usr/bin/nvidia-modprobe
-
- if use persistenced; then
- emake "${NV_ARGS[@]}" -C nvidia-persistenced install
- newconfd "${FILESDIR}"/nvidia-persistenced.confd nvidia-persistenced
- newinitd "${FILESDIR}"/nvidia-persistenced.initd nvidia-persistenced
- systemd_dounit "${T}"/nvidia-persistenced.service
- fi
-
- if use tools; then
- emake "${NV_ARGS[@]}" -C nvidia-settings install
-
- doicon nvidia-settings/doc/nvidia-settings.png
- domenu nvidia-settings/doc/nvidia-settings.desktop
-
- exeinto /etc/X11/xinit/xinitrc.d
- newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
- fi
-
- if use static-libs; then
- dolib.a nvidia-settings/src/out/libXNVCtrl.a
-
- insinto /usr/include/NVCtrl
- doins nvidia-settings/src/libXNVCtrl/NVCtrl{Lib,}.h
- fi
-
- use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig install
-
- # mimic nvidia-installer by reading .manifest to install files
- # 0:file 1:perms 2:type 3+:subtype/arguments -:module
- local m into
- while IFS=' ' read -ra m; do
- ! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] ||
- [[ " ${m[0]##*/}" =~ ^(\ ${skip_files[*]/%/.*|\\} )$ ]] ||
- [[ " ${m[2]}" =~ ^(\ ${skip_types[*]/%/|\\} )$ ]] ||
- has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue
-
- case ${m[2]} in
- MANPAGE)
- gzip -dc ${m[0]} | newman - ${m[0]%.gz}; assert
- continue
- ;;
- GBM_BACKEND_LIB_SYMLINK) m[4]=../${m[4]};; # missing ../
- VDPAU_SYMLINK) m[4]=vdpau/; m[5]=${m[5]#vdpau/};; # .so to vdpau/
- esac
-
- if [[ -v paths[${m[2]}] ]]; then
- into=${paths[${m[2]}]}
- elif [[ ${m[2]} =~ _BINARY$ ]]; then
- into=/opt/bin
- elif [[ ${m[3]} == COMPAT32 ]]; then
- use abi_x86_32 || continue
- into=/usr/${libdir32}
- elif [[ ${m[2]} =~ _LIB$|_SYMLINK$ ]]; then
- into=/usr/${libdir}
- else
- die "No known installation path for ${m[0]}"
- fi
- [[ ${m[3]: -2} == ?/ ]] && into+=/${m[3]%/}
- [[ ${m[4]: -2} == ?/ ]] && into+=/${m[4]%/}
-
- if [[ ${m[2]} =~ _SYMLINK$ ]]; then
- [[ ${m[4]: -1} == / ]] && m[4]=${m[5]}
- dosym ${m[4]} ${into}/${m[0]}
- continue
- fi
- [[ ${m[0]} =~ ^libnvidia-ngx.so|^libnvidia-egl-gbm.so ]] &&
- dosym ${m[0]} ${into}/${m[0]%.so*}.so.1 # soname not in .manifest
-
- printf -v m[1] %o $((m[1] | 0200)) # 444->644
- insopts -m${m[1]}
- insinto ${into}
- doins ${m[0]}
- done < .manifest || die
-
- # MODULE:installer non-skipped extras
- exeinto /lib/systemd/system-sleep
- doexe systemd/system-sleep/nvidia
- dobin systemd/nvidia-sleep.sh
- systemd_dounit systemd/system/nvidia-{hibernate,resume,suspend}.service
-
- dobin nvidia-bug-report.sh
-
- # MODULE:powerd extras
- if use amd64; then
- systemd_dounit systemd/system/nvidia-powerd.service
- dodoc 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() {
- has_version "${CATEGORY}/${PN}[wayland]" && NV_HAD_WAYLAND=
-
- use driver || return
- linux-mod_pkg_preinst
-
- # set video group id based on live system (bug #491414)
- local g=$(egetent group video | cut -d: -f3)
- [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')"
- sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die
-
- # try to find driver mismatches using temporary supported-gpus.json
- for g in $(grep -l 0x10de /sys/bus/pci/devices/*/vendor 2>/dev/null); do
- g=$(grep -io "\"devid\":\"$(<${g%vendor}device)\"[^}]*branch\":\"[0-9]*" \
- "${ED}"/usr/share/nvidia/supported-gpus.json 2>/dev/null)
- if [[ ${g} ]]; then
- g=$((${g##*\"}+1))
- if ver_test -ge ${g}; then
- NV_LEGACY_MASK=">=${CATEGORY}/${PN}-${g}"
- break
- fi
- fi
- done
- rm "${ED}"/usr/share/nvidia/supported-gpus.json || die
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- readme.gentoo_print_elog
-
- if [[ -r /proc/driver/nvidia/version &&
- $(</proc/driver/nvidia/version) != *" ${PV} "* ]]; then
- ewarn "Currently loaded NVIDIA modules do not match the newly installed"
- ewarn "libraries and may prevent launching GPU-accelerated applications."
- use driver && ewarn "The easiest way to fix this is usually to reboot."
- fi
-
- if [[ $(</proc/cmdline) == *slub_debug=[!-]* ]]; then
- ewarn "Detected that the current kernel command line is using 'slub_debug=',"
- ewarn "this may lead to system instability/freezes with this version of"
- ewarn "${PN}. Bug: https://bugs.gentoo.org/796329"
- fi
-
- if [[ -v NV_LEGACY_MASK ]]; then
- ewarn
- ewarn "***WARNING***"
- ewarn
- ewarn "You are installing a version of ${PN} known not to work"
- ewarn "with a GPU of the current system. If unwanted, add the mask:"
- if [[ -d ${EROOT}/etc/portage/package.mask ]]; then
- ewarn " echo '${NV_LEGACY_MASK}' > ${EROOT}/etc/portage/package.mask/${PN}"
- else
- ewarn " echo '${NV_LEGACY_MASK}' >> ${EROOT}/etc/portage/package.mask"
- fi
- ewarn "...then downgrade to a legacy branch if possible. For details, see:"
- ewarn "https://www.nvidia.com/object/IO_32667.html"
- fi
-
- if use kernel-open; then
- ewarn
- ewarn "Open source variant of ${PN} was selected, be warned it is experimental"
- ewarn "and only usable with Turing / Ampere and later GPUs, aka GTX 1650+."
- ewarn "Please also see: ${EROOT}/usr/share/doc/${PF}/html/kernel_open.html"
- ewarn
- ewarn "Many features are not yet implemented in the drivers and limitations are"
- ewarn "to be expected. Please do not report non-build/packaging bugs to Gentoo."
- ewarn "Switch back to USE=-kernel-open to restore functionality if needed for now."
- fi
-
- if use wayland && use driver && [[ ! -v NV_HAD_WAYLAND ]]; then
- elog
- elog "With USE=wayland, this version of ${PN} sets nvidia-drm.modeset=1"
- elog "in '${EROOT}/etc/modprobe.d/nvidia.conf'. This feature is considered"
- elog "experimental but is required for wayland."
- elog
- elog "If you experience issues, either disable wayland or edit nvidia.conf."
- elog "Of note, may possibly cause issues with SLI and Reverse PRIME."
- fi
-}