summaryrefslogtreecommitdiff
path: root/x11-drivers/nvidia-drivers
diff options
context:
space:
mode:
Diffstat (limited to 'x11-drivers/nvidia-drivers')
-rw-r--r--x11-drivers/nvidia-drivers/Manifest6
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-550.135.ebuild609
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-550.142.ebuild4
3 files changed, 3 insertions, 616 deletions
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
index cbbc029a6dac..c5d76165e140 100644
--- a/x11-drivers/nvidia-drivers/Manifest
+++ b/x11-drivers/nvidia-drivers/Manifest
@@ -21,19 +21,16 @@ AUX nvidia-settings-390.144-raw-ldflags.patch 468 BLAKE2B bf4c00a76351e6c3d1587b
AUX nvidia-settings-530.30.02-desktop.patch 406 BLAKE2B 63f645d5c9f76349b405c61327bc4f6d44e0716b4ec4c2f1aa012505638be0a329bc9589812d1f164641e4725dd15ac652eed0992161e767325b1310d9cd0718 SHA512 ff0fed69d7d36b2f67f9382055490a031ef8e834119bb18b0f71d1265afe92fad44cb11d6fabc5e3750a434c51e4660cfaa3347d062036d975fd341967187494
AUX system-sleep.elogind 177 BLAKE2B 207d06f14e507dbaad58b94d7500ef415bf2ed842124edb149b42bacff7192d575aabb4b4576d2e84575a3039c9864b427625d748dcd051764f00ab8050d6520 SHA512 e727e5957ef719ca3f3a72f260f5bbcd2f95c5c8e1a3ae158afc95e6c043fa7a597ce33dde03cc0d55d6f9e9254c6d0798b51419d8df22137795a4f3d9b28cda
DIST NVIDIA-Linux-aarch64-535.216.01.run 269827921 BLAKE2B 37e76e90411e883d0f911edc1a3883fba9db6a5e281e5bba265fab6b892382b202aa0ffb44a0d3b4a181c6855e2b9ffe54874049f331fea50a3429d8c2b298af SHA512 f68794249bf18ba626c6a665880721c8cc0dada6c7c1d8b15bf17174a4cac35ca2ab534fff2410c8bc0326c48f6ab913b6d9a92630505eeb768e02610a7772d9
-DIST NVIDIA-Linux-aarch64-550.135.run 236446786 BLAKE2B c1f3afb1f28555389ebb4d4263509801102818900be287c5547a050f7b0f535058e052f28a68172cde9e42f4cada45acf109c2a87631284578b82e6904663a2c SHA512 62871e26d0eca725ec381561c8086a107b536225aa689b6760f126f8125a6c969a3362133c527cbe18198650973133ad80388082370918499cd74513b0a3305d
DIST NVIDIA-Linux-aarch64-550.142.run 236424737 BLAKE2B bd2a43b6db8b228b871896eda3046161f6e3525b24adf322e5b27b0af5ab1be1af12de29c99aa5f86488f69d7ae0821e8925821a83aa5f354fec56d0daa80e8f SHA512 9ab19a145bb8f9ebad3981ae6bc1ad8900b8598230a7283fa58e594ce42d889a5d963ebd965ce737d1f56f9b273d1a9dad90644312f59ebc0f43ee7c626d7e73
DIST NVIDIA-Linux-aarch64-565.77.run 253994527 BLAKE2B 3fb41a7958c58742817eaf3c7bab9dc5620cdaea7244918d963cc54b0708572ae22de30866671d77474c2c61413797865efa1a6ef4e53e4fbdcd283e0324a4b5 SHA512 89be8b0b1fd645fe2ae1ea5d1af787b21e665a7f0b0d911acb749b545ccc70770bc42f8842f2c0cf1b965a980e4260fe025e2aa8a678de2036c3aeef49b7f336
DIST NVIDIA-Linux-x86-390.157.run 49417041 BLAKE2B 435b5e0e60468cc74b41cc5d9b5bb0105d29c11a2d408457835212a96519c9334ecf19278b36749d3ff7f498f5b0ae45a2efae2d428703dac21245c62f1efebe SHA512 dae9ac2c12f9ad90f7441e00e01a984147c577892421911d7f67f6a31e616ac1cb7d434bc9c7f58fbd9b8ae909521b5bece607a63c79588c0bb9d99c6bad5fb0
DIST NVIDIA-Linux-x86_64-390.157.run 85835541 BLAKE2B 44b855cd11f3b2f231f9fb90492ae2e67a67ea3ea83c413e7c90956d38c9730a8bd0321281ae03c6afce633d102f5b499aed25622b9bfd31bdd2c98f0717e95b SHA512 4780503a4cff0180b1b1f37d20a6ba3438dd78b51fa7f69b98d35521835e5d61099129746929d51d63afa2d47b672b3e145e1e1897584dc3799e7f822c5b3a0a
DIST NVIDIA-Linux-x86_64-470.256.02.run 272850014 BLAKE2B 0fdc867f92b82b2a60810c3b43751cad7ac2c39928c92c6c343c0c6044f4d7d923d93b8599db3f7c999c0ee7d16940e65d991a61cbb30e1d9e49c5639ac6bdc8 SHA512 a837946dd24d7945c1962a695f1f31965f3ceb6927f52cd08fd51b8db138b7a888bbeab69243f5c8468a7bd7ccd47f5dbdb48a1ca81264866c1ebb7d88628f88
DIST NVIDIA-Linux-x86_64-535.216.01.run 341874992 BLAKE2B 65fc3674982ecbf122f565af70121ca6c022a4df8f352e259e6b0e8892b9112b182c32ed615edae737f3354808e37b54051bed0cdd2f661c4082692f9e0477dd SHA512 3b4ae3584368fcc5f81a680dd8588d8b9e48f43dafe2490f5414ed258fa8c9799ebd40d2fd115e20bd02648eeb3e5c6dff39562d89353580fa679d011cebf6f8
-DIST NVIDIA-Linux-x86_64-550.135.run 307349369 BLAKE2B fb6bb69781c0c1bb635c897ee39cfdb46bdda35525e3bf1c0bfff6e8170aa3a07c7444563ec686ab766178a4846e68588efb7961c78c51a582b0b9b60d387565 SHA512 1e93424a527023bd28d9349e1a5afd2053b8c9f20ef8ecd5d185b661bccaec972ffca604b67b0e7fe596a2d1de9d57256f2ec3f1afd1571ac155d06ae7d87f0a
DIST NVIDIA-Linux-x86_64-550.142.run 307296728 BLAKE2B c11b3483d2ab895cd7f7eeea2661d21b7c8db04af14d72f55a86b6291f398ed111366d10886ac98670060dcd05f63a34a0c44e2596ef3ec3be6405ea45a6c305 SHA512 7b33d8f335c735e196a5de85998981ef4a11a2b14f791a60a820a7e5cc7bf0ddcc96e57169687d4eb9768d0c669a4a5887a40673807ba0eead825bb19bcd287c
DIST NVIDIA-Linux-x86_64-550.40.82.run 312434148 BLAKE2B a63292fe92b78b9bb7fa62eb80718bba02af2f539606db44c73033a6dcedd262e4d340b5f612c9a6c587a787f8e7982d8eb3c8c750de180eea3cca3bb9922dac SHA512 69c40883b017d285de662b60d3bb4367e2ba3edfe20082c05942ef68d1e42c581b4913a5a7d4b1b2cbd8d63ae15b451861f1262896915bde09136e0b4025fce1
DIST NVIDIA-Linux-x86_64-565.77.run 339246825 BLAKE2B 6c3c57048b6ac25f08a4d493123816c534ed310197aef532ebfbe7f9327897020506fa892b80bb150e6edb953a74ad8d649d743ce7d33d2117850d3308470a0a SHA512 62a85223b1cbc00b65113235642a4a39eb8e78e085845e4c7d12abf916ea2c1d86030849040bba118ba6af56a1d0da073d4a96791674fc18d7154e55a3587b63
DIST NVIDIA-kernel-module-source-535.216.01.tar.xz 12517044 BLAKE2B f305acd878b6a8e715607d1ef330b6f60492f9291183a139520b011fe77d344556708df811eabd5f47d1e509d2ce179e243eecee8629dc480ca5a1ac4ca57529 SHA512 b5127fe5c29c476decea81f4c9916d2670a048f3e65ef898b1055fa1aa87c0936415c33fb271bc30d03f28fa9d3a5c2247e5f3ac67e12f93454e3da2706ff9a5
-DIST NVIDIA-kernel-module-source-550.135.tar.xz 13523028 BLAKE2B d989d0f902b0d1712fc65313efddc625f2e2167516f22cfe37b5481a4271b9237518dd111592c06782b02d2dc7e4b15e5b1e43b6437818e944a18fdc840a8092 SHA512 927c93227407027610e68d49aeac9cb35f44ba929b40392ca6bcfd93094f2dbaaf34f54572776095ff720a710e6712525968a4d1e696e3629c3e06b72253eaf5
DIST NVIDIA-kernel-module-source-550.142.tar.xz 13547504 BLAKE2B a10553e780b2517fbcb72263c32d3c1d67bcbeba1afd0edf816ef452eed488a5ff935affe96f2fe5aeee9e5fcfbb1667b7dbadfa2a97b86dfe290f4f23e19e75 SHA512 bf1def2d605bde8d304340759bf596f51005b98f1dabb7c2d1d87c6042425987662029a766009f98137fae8d5252e71e5de94423f55ed30d20b0eca26fe7b3b0
DIST NVIDIA-kernel-module-source-565.77.tar.xz 15374480 BLAKE2B 0ca329dd09db37e283c8066722718182e43beee77fc5f3f3e2a06f74a8a6d481beb4ad90260afd3b93a45b1dc462dadcec6e11919c535cdbc4af950836e5af3f SHA512 dcc5d7a53e1c67d42dc0d4bff8ac8181fac15bb05ccd0990e50d4675c94a54a3ed5d56c60cc7f65a958b0d9f2075620a79add51c5ba443869eb47c9c414da586
DIST nvidia-installer-390.157.tar.bz2 150323 BLAKE2B 8058ca87a6dea956d564af9f7eab9b1fc82b1f2382bd5cb2f6d97cbe2e19292533522d5f8f2eacbeb16520372715fcb72f8f9b0998962af5d4e75522c8d74524 SHA512 93a7ece648602157496c8e27a88864ede341a100f5328a4c1a25faf8f0b94d252060e5e2f71d0c302fd0566c10773c30b76b3b5f431d8039b71c90a7969f7d7e
@@ -70,8 +67,7 @@ DIST open-gpu-kernel-modules-550.40.82.tar.gz 13813356 BLAKE2B 6c972499ce44f5168
EBUILD nvidia-drivers-390.157.ebuild 15171 BLAKE2B 3ca881fb215472a69802c859059724166da46d994c7e34f75633d33b2ce600d9992faee4a7976177a7cf0f224a25cf652ceef8d357e0a47ad0ae805f23300b2a SHA512 8468a6ef9a04434540b9f14892a01075c438851ac7e2aa6f98ebec8479f5af51b9cd1a1362c4ef2fbfb2b386929e84ffc95855f89dc9c814945ddb5a942a94b3
EBUILD nvidia-drivers-470.256.02-r2.ebuild 18820 BLAKE2B c87b3f9d791b1b8076cc9342a62443db7005b112dd9d2d6a60619ac585fb6cbfecb3e57d085168feb5393e57a4bb1f1cd52321857bfb26a4061d8e99d1108755 SHA512 0c38b2f789f36b2cdb37dc0af5adc3ca566e2bcf2f13089cd754e32c7cd358559ee6f77e31b748db175322f6e56247e20a582366abab3fcc052d530d4e60c498
EBUILD nvidia-drivers-535.216.01-r1.ebuild 22097 BLAKE2B d47f58ed9086dc7b8b9810cc2421a883aba867d910cd3512cefacd9c4ce949e770d1e3c2829d33d2efbf4450888ab5731408d4dc295fa66bbad5acee7c4ee987 SHA512 2ddfd6bca2160d88807dda08eb28edb494d7eb04b5e87e9deb3f76fe69f0ec07fb931cd5eaef092195254ffabf08a25c91162fcc16f97e381cb89b6df286aad1
-EBUILD nvidia-drivers-550.135.ebuild 21965 BLAKE2B 88a2171fed5b4b06b3eb8efa12b92143990e5f6220c4d6d60fe0619e0bea257871c784daff31fa4696eb21c79c0691fca0f56d24cb8b52523c3a48ee63361605 SHA512 47ea0f560b0d4b1753c86416b13e25399f17aa571cb9b7bcf03b06d54731d5cf7e29028f4eb95cc21f0c34e005bb6c9ce1079469a370fa00e3317785d145ba7e
-EBUILD nvidia-drivers-550.142.ebuild 22132 BLAKE2B bf802aabff86ce2c9e07a67a29c3be8c699dbcfdddd2b322b0f7ec71fe1176009861ad26fdd0394a90c27b76f77e8cd21b999eddb784b76bba755711ceec690f SHA512 36856924efdb59630727735d1c7e712c511c807fe6b2a2a21e437926e2d6c97e55d8b2c56d6a9d78b98952061a1e7abb5174d807da74a0804dc70936caae1219
+EBUILD nvidia-drivers-550.142.ebuild 22131 BLAKE2B 30dc4b384b674b950c61fd7388fae651d1c9959d046708be3eb070a344a630a18d2e754d0bfbd161317271832a83be7d5a7462a8a24c05fc853badd42836fee2 SHA512 4c8be5b7c55a4eb10cc94f5cc60e232da336ecdf0f2b95b6ab6833d552d9692e2c9f9a3557e23dda06060c4f99fcceb65794cd814b500b67a3aa719234e996b5
EBUILD nvidia-drivers-550.40.82.ebuild 21861 BLAKE2B 81fbc903a37e24b066d9b467e17f2cc3ee98736de911a84d2887a1a1eb530d2816452f09731539a47223db77389caba6a3c0c8f7153769272f7a03ff2bdae592 SHA512 4857775e1ebc28453b0a4a686bdbe7ba822a152636e84f0c0782f16e15e5d04c396d1c3ec12b73ab8048a639cdcabff3d19b88a6e2f467b9970c39ae4654b74d
EBUILD nvidia-drivers-565.77.ebuild 23062 BLAKE2B 1841b64550d5aefda2297af545ffcd190dbb6ecfbf8885c1bf36a11d83d0bbe5a053872f97a162aa8087a97a0d8d87f6c495b9d30b7cd1454c130ed89695d8fb SHA512 083c38548e9f1d6b3c1b0914a06d8912e3f731da1cf0b28833ef04c909bee19b58df1339c2c63285b971479277bdb5673e17548e76e22fc479aabd145ae165ce
MISC metadata.xml 1457 BLAKE2B 10fccbffe28ab58e012aae439123f947acea95eb3bdc4d0e2eb1ec14a92ad24fc2e3e0c248dcce87d9fdec54a65b8e040b2ed048d9ef11054f762f295c24ce39 SHA512 8469884c614a0275f438a0f8d583f2823d1159905ee27402e859c824cc458ac31daf69f2b7960533daaf86e1ca203be745c03e4e67ff12e9bbb2c08b91c667a0
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-550.135.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-550.135.ebuild
deleted file mode 100644
index da413e81b3df..000000000000
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-550.135.ebuild
+++ /dev/null
@@ -1,609 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MODULES_OPTIONAL_IUSE=+modules
-inherit desktop eapi9-pipestatus flag-o-matic linux-mod-r1 readme.gentoo-r1
-inherit systemd toolchain-funcs unpacker user-info
-
-MODULES_KERNEL_MAX=6.12
-NV_URI="https://download.nvidia.com/XFree86/"
-
-DESCRIPTION="NVIDIA Accelerated Graphics Driver"
-HOMEPAGE="https://www.nvidia.com/"
-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 Apache-2.0 BSD BSD-2 GPL-2 MIT ZLIB curl openssl"
-SLOT="0/${PV%%.*}"
-KEYWORDS="-* amd64 ~arm64"
-IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced powerd +static-libs +tools wayland"
-REQUIRED_USE="kernel-open? ( modules )"
-
-COMMON_DEPEND="
- acct-group/video
- X? ( x11-libs/libpciaccess )
- persistenced? (
- acct-user/nvpd
- net-libs/libtirpc:=
- )
- tools? (
- >=app-accessibility/at-spi2-core-2.46:2
- dev-libs/glib:2
- dev-libs/jansson:=
- media-libs/harfbuzz:=
- x11-libs/cairo
- x11-libs/gdk-pixbuf:2
- x11-libs/gtk+:3[X]
- x11-libs/libX11
- x11-libs/libXext
- x11-libs/libXxf86vm
- x11-libs/pango
- )
-"
-RDEPEND="
- ${COMMON_DEPEND}
- dev-libs/openssl:0/3
- sys-libs/glibc
- X? (
- media-libs/libglvnd[X,abi_x86_32(-)?]
- x11-libs/libX11[abi_x86_32(-)?]
- x11-libs/libXext[abi_x86_32(-)?]
- )
- powerd? ( sys-apps/dbus[abi_x86_32(-)?] )
- wayland? (
- gui-libs/egl-gbm
- >=gui-libs/egl-wayland-1.1.10
- )
-"
-DEPEND="
- ${COMMON_DEPEND}
- static-libs? (
- x11-base/xorg-proto
- 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-530.30.02-desktop.patch
-)
-
-pkg_setup() {
- use modules && [[ ${MERGE_TYPE} != binary ]] || return
-
- # do early before linux-mod-r1 so can use chkconfig to setup CONFIG_CHECK
- get_version
- require_configured_kernel
-
- local CONFIG_CHECK="
- PROC_FS
- ~DRM_KMS_HELPER
- ~SYSVIPC
- ~!LOCKDEP
- ~!PREEMPT_RT
- ~!SLUB_DEBUG_ON
- !DEBUG_MUTEXES
- $(usev powerd '~CPU_FREQ')
- "
-
- kernel_is -ge 6 11 && linux_chkconfig_present DRM_FBDEV_EMULATION &&
- CONFIG_CHECK+=" DRM_TTM_HELPER"
-
- use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
-
- use kernel-open && CONFIG_CHECK+=" MMU_NOTIFIER" #843827
-
- local drm_helper_msg="Cannot be directly selected in the kernel's config menus, and may need
- selection of a DRM device even if unused, e.g. CONFIG_DRM_QXL=m or
- DRM_AMDGPU=m (among others, consult the kernel config's help), can
- also use DRM_NOUVEAU=m as long as built as module *not* built-in."
- 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.
- ${drm_helper_msg}"
- local ERROR_DRM_TTM_HELPER="CONFIG_DRM_TTM_HELPER: is not set but is needed to compile when using
- kernel version 6.11.x or newer while DRM_FBDEV_EMULATION is set.
- ${drm_helper_msg}"
- 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."
- local ERROR_PREEMPT_RT="CONFIG_PREEMPT_RT: is set but is unsupported by NVIDIA upstream and
- will fail to build unless the env var IGNORE_PREEMPT_RT_PRESENCE=1 is
- set. Please do not report issues if run into e.g. kernel panics while
- ignoring this."
-
- linux-mod-r1_pkg_setup
-}
-
-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
- sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die
-
- # use alternative vulkan icd option if USE=-X (bug #909181)
- use X || sed -i 's/"libGLX/"libEGL/' nvidia_{layers,icd}.json || die
-
- # enable nvidia-drm.modeset=1 by default with USE=wayland
- cp "${FILESDIR}"/nvidia-545.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
-}
-
-src_compile() {
- tc-export AR CC CXX LD OBJCOPY OBJDUMP PKG_CONFIG
-
- local xnvflags=-fPIC #840389
- # lto static libraries tend to cause problems without fat objects
- tc-is-lto && xnvflags+=" $(test-flags-CC -ffat-lto-objects)"
-
- NV_ARGS=(
- PREFIX="${EPREFIX}"/usr
- HOST_CC="$(tc-getBUILD_CC)"
- HOST_LD="$(tc-getBUILD_LD)"
- BUILD_GTK2LIB=
- NV_USE_BUNDLED_LIBJANSSON=0
- NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out
- WAYLAND_AVAILABLE=$(usex wayland 1 0)
- XNVCTRL_CFLAGS="${xnvflags}"
- )
-
- if use modules; then
- local o_cflags=${CFLAGS} o_cxxflags=${CXXFLAGS} o_ldflags=${LDFLAGS}
-
- # conftest.sh is broken with c23 due to func() changing meaning,
- # and then fails later due to ealier misdetections
- # TODO: try without now and then + drop modargs' CC= (bug #944092)
- KERNEL_CC+=" -std=gnu17"
-
- local modlistargs=video:kernel
- if use kernel-open; then
- modlistargs+=-module-source:kernel-module-source/kernel-open
-
- # environment flags are normally unused for modules, but nvidia
- # uses it for building the "blob" and it is a bit fragile
- filter-flags -fno-plt #912949
- filter-lto
- CC=${KERNEL_CC} CXX=${KERNEL_CXX} strip-unsupported-flags
- fi
-
- local modlist=( nvidia{,-drm,-modeset,-peermem,-uvm}=${modlistargs} )
- local modargs=(
- CC="${KERNEL_CC}" # needed for above gnu17 workaround
- IGNORE_CC_MISMATCH=yes NV_VERBOSE=1
- SYSOUT="${KV_OUT_DIR}" SYSSRC="${KV_DIR}"
-
- # kernel takes "x86" and "x86_64" as meaning the same, but nvidia
- # makes the distinction (since 550.135) and is not happy with "x86"
- # TODO?: it should be ok/better for tc-arch-kernel to do x86_64
- $(usev amd64 ARCH=x86_64)
- )
-
- # temporary workaround for bug #914468
- CPP="${KERNEL_CC} -E" tc-is-clang && addpredict "${KV_OUT_DIR}"
-
- linux-mod-r1_src_compile
- CFLAGS=${o_cflags} CXXFLAGS=${o_cxxflags} LDFLAGS=${o_ldflags}
- 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
- # avoid noisy *very* noisy logs with deprecation warnings
- CFLAGS="-Wno-deprecated-declarations ${CFLAGS}" \
- emake "${NV_ARGS[@]}" -C nvidia-settings
- elif use static-libs; then
- # pretend GTK+3 is available, not actually used (bug #880879)
- emake "${NV_ARGS[@]}" BUILD_GTK3LIB=1 \
- -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
- [OPENGL_DATA]=/usr/share/nvidia
- [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=(
- $(usev !X "libGLX_nvidia libglxserver_nvidia")
- 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
- libnvidia-pkcs11.so # using the openssl3 version instead
- )
- local skip_modules=(
- $(usev !X "nvfbc vdpau xdriver")
- $(usev !modules gsp)
- $(usev !powerd powerd)
- 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 modules "
-
-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 additional information or for troubleshooting issues, please see
-https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers and NVIDIA's own
-documentation that is installed alongside this README."
- readme.gentoo_create_doc
-
- if use modules; then
- linux-mod-r1_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}
- pipestatus || die
- 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]} == EXPLICIT_PATH ]]; then
- into=${m[3]}
- 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
- insopts -m0644 # reset
-
- # MODULE:installer non-skipped extras
- : "$(systemd_get_sleepdir)"
- exeinto "${_#"${EPREFIX}"}"
- 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 powerd; then
- newinitd "${FILESDIR}"/nvidia-powerd.initd nvidia-powerd #923117
- systemd_dounit systemd/system/nvidia-powerd.service
-
- insinto /usr/share/dbus-1/system.d
- doins nvidia-dbus.conf
- fi
-
- # enabling is needed for sleep to work properly and little reason not to do
- # it unconditionally for a better user experience
- : "$(systemd_get_systemunitdir)"
- local unitdir=${_#"${EPREFIX}"}
- # not using relative symlinks to match systemd's own links
- dosym {"${unitdir}",/etc/systemd/system/systemd-hibernate.service.wants}/nvidia-hibernate.service
- dosym {"${unitdir}",/etc/systemd/system/systemd-hibernate.service.wants}/nvidia-resume.service
- dosym {"${unitdir}",/etc/systemd/system/systemd-suspend.service.wants}/nvidia-suspend.service
- dosym {"${unitdir}",/etc/systemd/system/systemd-suspend.service.wants}/nvidia-resume.service
- # also add a custom elogind hook to do the equivalent of the above
- exeinto /usr/lib/elogind/system-sleep
- newexe "${FILESDIR}"/system-sleep.elogind nvidia
- # <elogind-255.5 used a different path (bug #939216), keep a compat symlink
- # TODO: cleanup after 255.5 been stable for a few months
- dosym {/usr/lib,/"${libdir}"}/elogind/system-sleep/nvidia
-
- # needed with >=systemd-256 or may fail to resume with some setups
- # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1072722
- insinto "${unitdir}"/systemd-homed.service.d
- newins - 10-nvidia.conf <<-EOF
- [Service]
- Environment=SYSTEMD_HOME_LOCK_FREEZE_SESSION=false
- EOF
- insinto "${unitdir}"/systemd-suspend.service.d
- newins - 10-nvidia.conf <<-EOF
- [Service]
- Environment=SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false
- EOF
- dosym -r "${unitdir}"/systemd-{suspend,hibernate}.service.d/10-nvidia.conf
- dosym -r "${unitdir}"/systemd-{suspend,hybrid-sleep}.service.d/10-nvidia.conf
- dosym -r "${unitdir}"/systemd-{suspend,suspend-then-hibernate}.service.d/10-nvidia.conf
-
- # symlink non-versioned so nvidia-settings can use it even if misdetected
- dosym nvidia-application-profiles-${PV}-key-documentation \
- ${paths[APPLICATION_PROFILE]}/nvidia-application-profiles-key-documentation
-
- # don't attempt to strip firmware files (silences errors)
- dostrip -x ${paths[FIRMWARE]}
-
- # sandbox issues with /dev/nvidiactl and others (bug #904292,#921578)
- # are widespread and sometime affect revdeps of packages built with
- # USE=opencl/cuda making it hard to manage in ebuilds (minimal set,
- # ebuilds should handle manually if need others or addwrite)
- insinto /etc/sandbox.d
- newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-caps:/dev/char"'
-
- # dracut does not use /etc/modprobe.d if hostonly=no, but want to make sure
- # our settings are used for bug 932781#c8 and nouveau blacklist if either
- # modules are included (however, just best-effort without initramfs regen)
- if use modules; then
- echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
- "${ED}"/usr/lib/dracut/dracut.conf.d/10-${PN}.conf || die
- fi
-}
-
-pkg_preinst() {
- has_version "${CATEGORY}/${PN}[kernel-open]" && NV_HAD_KERNEL_OPEN=
- has_version "${CATEGORY}/${PN}[wayland]" && NV_HAD_WAYLAND=
-
- use modules || return
-
- # 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-r1_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."
- if use modules; then
- ewarn "Easiest way to fix this is normally to reboot. If still run into issues"
- ewarn "(e.g. API mismatch messages in the \`dmesg\` output), please verify"
- ewarn "that the running kernel is ${KV_FULL} and that (if used) the"
- ewarn "initramfs does not include NVIDIA modules (or at least, not old ones)."
- fi
- 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[1] branch if possible (not all old versions"
- ewarn "are available or fully functional, may need to consider nouveau[2])."
- ewarn "[1] https://www.nvidia.com/object/IO_32667.html"
- ewarn "[2] https://wiki.gentoo.org/wiki/Nouveau"
- fi
-
- if use kernel-open && [[ ! -v NV_HAD_KERNEL_OPEN ]]; then
- ewarn
- ewarn "Open source variant of ${PN} was selected, be warned it is experimental"
- ewarn "and only for modern GPUs (e.g. GTX 1650+). Try to disable if run into issues."
- ewarn "Please also see: ${EROOT}/usr/share/doc/${PF}/html/kernel_open.html"
- fi
-
- if use wayland && use modules && [[ ! -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
-
- # these can be removed after some time, only to help the transition
- # given users are unlikely to do further custom solutions if it works
- # (see also https://github.com/elogind/elogind/issues/272)
- if grep -riq "^[^#]*HandleNvidiaSleep=yes" "${EROOT}"/etc/elogind/sleep.conf.d/ 2>/dev/null
- then
- ewarn
- ewarn "!!! WARNING !!!"
- ewarn "Detected HandleNvidiaSleep=yes in ${EROOT}/etc/elogind/sleep.conf.d/."
- ewarn "This 'could' cause issues if used in combination with the new hook"
- ewarn "installed by the ebuild to handle sleep using the official upstream"
- ewarn "script. It is recommended to disable the option."
- fi
- if [[ $(realpath "${EROOT}"{/etc,{/usr,}/lib*}/elogind/system-sleep 2>/dev/null | \
- sort | uniq | xargs -d'\n' grep -Ril nvidia 2>/dev/null | wc -l) -gt 2 ]]
- then
- ewarn
- ewarn "!!! WARNING !!!"
- ewarn "Detected a custom script at ${EROOT}{/etc,{/usr,}/lib*}/elogind/system-sleep"
- ewarn "referencing NVIDIA. This version of ${PN} has installed its own"
- ewarn "hook at ${EROOT}/usr/lib/elogind/system-sleep/nvidia and it is recommended"
- ewarn "to remove the custom one to avoid potential issues."
- ewarn
- ewarn "Feel free to ignore this warning if you know the other NVIDIA-related"
- ewarn "scripts can be used together. The warning will be removed in the future."
- fi
- if [[ ${REPLACING_VERSIONS##* } ]] &&
- ver_test ${REPLACING_VERSIONS##* } -lt 550.107.02-r1 # may get repeated
- then
- elog
- elog "For suspend/sleep, 'NVreg_PreserveVideoMemoryAllocations=1' is now default"
- elog "with this version of ${PN}. This is recommended (or required) by"
- elog "major DEs especially with wayland but, *if* experience regressions with"
- elog "suspend, try reverting to =0 in '${EROOT}/etc/modprobe.d/nvidia.conf'."
- elog
- elog "May notably be an issue when using neither systemd nor elogind to suspend."
- elog
- elog "Also, the systemd suspend/hibernate/resume services are now enabled by"
- elog "default, and for openrc+elogind a similar hook has been installed."
- fi
-}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-550.142.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-550.142.ebuild
index 988a80f8b725..d15b13d4ddbb 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-550.142.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-550.142.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -27,7 +27,7 @@ S=${WORKDIR}
LICENSE="NVIDIA-r2 Apache-2.0 BSD BSD-2 GPL-2 MIT ZLIB curl openssl"
SLOT="0/${PV%%.*}"
-KEYWORDS="-* ~amd64 ~arm64"
+KEYWORDS="-* amd64 ~arm64"
IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced powerd +static-libs +tools wayland"
REQUIRED_USE="kernel-open? ( modules )"