From d628c1f8493d09e3deb5d19971cd21691d8758e4 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 1 Mar 2025 19:28:40 +0000 Subject: gentoo auto-resync : 01:03:2025 - 19:28:40 --- x11-drivers/nvidia-drivers/Manifest | 7 +- ...idia-drivers-550.107.02-kernel-6.11-fbdev.patch | 134 ----- .../nvidia-drivers/nvidia-drivers-550.40.85.ebuild | 566 ------------------- .../nvidia-drivers-570.123.01.ebuild | 602 +++++++++++++++++++++ 4 files changed, 605 insertions(+), 704 deletions(-) delete mode 100644 x11-drivers/nvidia-drivers/files/nvidia-drivers-550.107.02-kernel-6.11-fbdev.patch delete mode 100644 x11-drivers/nvidia-drivers/nvidia-drivers-550.40.85.ebuild create mode 100644 x11-drivers/nvidia-drivers/nvidia-drivers-570.123.01.ebuild (limited to 'x11-drivers/nvidia-drivers') diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest index 81bf7711202b..76a26feab342 100644 --- a/x11-drivers/nvidia-drivers/Manifest +++ b/x11-drivers/nvidia-drivers/Manifest @@ -6,7 +6,6 @@ AUX nvidia-570.conf 2035 BLAKE2B 98c7fbcb6cad34cf44ba1fb27a476468d477b30521088bf AUX nvidia-drivers-390.154-clang15-x86.patch 1085 BLAKE2B 5bb221407b280f2dde69ef2b37317606bec1c108dbc56653898cfa9318de6e47df21e5b38943212caf13bc6412f2427fad7c534491d868d03399091e2146daaa SHA512 1349c1c715b2f09e64a5e91412aceabc80041d070a6bbacfdf7038872f1f4a798bbc63277d47a25d1a5b28b573b3d5bd6295dadbbdbf245f5cfb0241879a3bc4 AUX nvidia-drivers-390.154-clang15.patch 2915 BLAKE2B e9799aee3c6b814ecdc40e83d2e495acad046f18c88fe8c1b5fead1c9cd0fab3d0a0a2924730dadec5eb8ea1e2d2132c495298d6ab108c015721bab911a4da79 SHA512 6e1c99ae8efb06aa4fc3accb4cee55f43a6498f94fca064fd4b9b007a3555913a5cef042d4e74b6f24a3eb6f14988f810d0c848d34ae81835fbae8ec32cf0cf0 AUX nvidia-drivers-470.141.03-clang15.patch 3757 BLAKE2B 9cec15b57c82c8e24f89a025a73bf78e3d7ea5df681cf803888ca4ad8b96976b433717d01c9fdad5036cb06376345bef64dd05287791ed0ce7dc2a06c8a79aab SHA512 10ed0fa6b1fdf24fbc18432a9b94b1c1b9d7d6003926272d3c924d72a298c1d3a8875b43a42472d701864fe9dda35d75f9cf7c51ca841d20b989ed46ed994311 -AUX nvidia-drivers-550.107.02-kernel-6.11-fbdev.patch 5055 BLAKE2B 2ad807c720c41d1981e3807fd6c44387a997fce244f0e9b88ca20dcd8dedf1a67a5057c2bdf0cc854eeb781c69021fdb2422a30d6ce6fd62d46509e76f2a918a SHA512 971e8a780b3c078ded47508e76d28cda3b5ed0032cde08b1b6bf84d8ad7876cf4b9de1736bbe6e57fbf550ac01d233131f95597bf013bf457734474394d3fa34 AUX nvidia-drm-outputclass-390.conf 179 BLAKE2B 2a7d3bb2bb131db6ddf24c9fa157a1044e72a3229088654f4768f76eb871cdaacdee58e82be5504c1c0af928c343448b4d03f23d289a4479b64218d57fbd7a16 SHA512 8e5dfe54b9cf261d28c206ca1594183cba4945ed633a13ab4b1801b2ad4614ca10038ab7f0cf35dbf4eaa7b2de6e747c3be13ecb11d05740b22654626f09d774 AUX nvidia-kernel-module-source-515.86.01-raw-ldflags.patch 628 BLAKE2B da490e4af1c898958df0ef656914e8bba3f7236fb1d2f94420a42d895d7f47ddc9cc173ef3b4b29f80ac880266767d54e76613dfc3defb1d4fe3f2b48377a71b SHA512 0a972c4efd219ddc8e814753c7c2bdea8fd0f0f3d2255bd0f9a4baab2a96319c8238cc027f602e399be9521467e110cffb1e0ee6b90f38867df49cd4c3b11c5d AUX nvidia-modprobe-390.141-uvm-perms.patch 563 BLAKE2B 9befd708ad2193e507583e066f306e11d55e82912f456e738d850b804d35331df2ca5de3a35e8ab551188c1103af762941098639fa9581b4437bc5e68595ddd6 SHA512 0546d51a86554985cd7cc036e7b8f65b457cd1a1c0549ef496422fa422d2757354a47b83247b100597f908c2653314878c721b3918ebc529cae4282824d4eada @@ -28,7 +27,7 @@ DIST NVIDIA-Linux-x86_64-390.157.run 85835541 BLAKE2B 44b855cd11f3b2f231f9fb9049 DIST NVIDIA-Linux-x86_64-470.256.02.run 272850014 BLAKE2B 0fdc867f92b82b2a60810c3b43751cad7ac2c39928c92c6c343c0c6044f4d7d923d93b8599db3f7c999c0ee7d16940e65d991a61cbb30e1d9e49c5639ac6bdc8 SHA512 a837946dd24d7945c1962a695f1f31965f3ceb6927f52cd08fd51b8db138b7a888bbeab69243f5c8468a7bd7ccd47f5dbdb48a1ca81264866c1ebb7d88628f88 DIST NVIDIA-Linux-x86_64-535.230.02.run 341903243 BLAKE2B 954ad0d390aa786a0a95298bd0c98a3b909074e5c7bc5d40a6a4fcea41d423ad1f429f175968c98f5e14c07cdf68d3340420f97269a36a0df41ace6ac8224cb5 SHA512 2154e28682fe1663dc64b18569c67839995d496a6c1b353fcdc17fc4520420c8d629d441312a6cedc054d6322a267d6f275d1daef210d2f24a179d931a4c99b8 DIST NVIDIA-Linux-x86_64-550.144.03.run 307272669 BLAKE2B 6d1daf41eb3f65071b42dc9bc5b8e0cf48170b03f3418c938f956ddb843f5a1e0f3d968b8825207e3237fa0490f0c29e3ffc4403b4558ef557dadf4fcf5ad17c SHA512 b7c4638695ef3e75043fd1726f0153ff0c140475f965d88c21f46d2909e68d023ebe6aa1e758ed81ab58440ba9a789e00b9b84200c03f00d429e11938a2bed65 -DIST NVIDIA-Linux-x86_64-550.40.85.run 312478355 BLAKE2B 3c964d0ef54085af19faea7100a5b9c4f33dc85d9b6ab790559aa1d85a8657b9d4e8a48661ab492a3e886258e7d3bf9b671673bddd3a99d3e77b54bc8a3c34c0 SHA512 4eed26067290412ca8fb58aa50eeb1726a45c4a9e4ea9428f192e5787366d6b7d3743509036981a074964b7bf4095aa044efb1a5819ca8757a3ee16cd6f7ee29 +DIST NVIDIA-Linux-x86_64-570.123.01.run 375775046 BLAKE2B bd7f1521c740b1bb83d866457ef83c808ee2fd4d433a53a92c5002111a13600dea85e7de781000560e024aec8612ea05e09171696ecc7b8ddc0fd03e9e669b6b SHA512 1c6762d4c8e6e13ab7af74736e4ea47e44b77bc1bd81b3153c8abc2b35a0ede6796f42b776eb062bf448596583e4ca7414d5b60562e4a0f55ab4dafb19998c35 DIST NVIDIA-Linux-x86_64-570.124.04.run 375582187 BLAKE2B e0cd5103403e773bf79282592735bbfc5a6cbd2e6b062df16b463104f42de1abdf97d68695b73b052444bab0f5e16af5f8cc9be77fb0035aff17aaa11299fd32 SHA512 35fb1938a08586d902eb290aee04c5c6b570cc647354e49880e3c8715654ac1ab8c8cbe08e5b3c542fd9b2c36f7683454221b11625754980a6138a58c6363b40 DIST NVIDIA-Linux-x86_64-570.86.16.run 375504315 BLAKE2B 3fc5d4b9f8b64323399f201d4d9d896ff47593108d675e5d77a45255e7ca9354e6876e5b4dee1f59c6c933493fbbf9d35606016f83430c43c5fc54c82685f3f8 SHA512 415adf4609f093e8703dd6f2c03bc5cbd84270c694e67bb0ee72897ac18dddb0d8aaf8baaf47e8624a79c54a1f794126a3ddb10fae91784f05f1f32ba063b985 DIST NVIDIA-kernel-module-source-535.230.02.tar.xz 12527212 BLAKE2B fd641d03cf7b417f1300b39dc271b08c920d11861491c510ceb713aaf69f1b4d373a1b0417993a0483dc6b2cb1d3e2d176d9c23edf9586f129df13bef495ce0b SHA512 d9080f257312b6760140a7dad3bb8e1d6f5982e7b25b3e623a74c519a7c296b1a12eece07335fc79f2d209b790a8239df81948cdb4031852d6225c4768ae42c3 @@ -65,12 +64,12 @@ DIST nvidia-xconfig-535.230.02.tar.bz2 111060 BLAKE2B a29389a0d73f66b47131ce420a DIST nvidia-xconfig-550.144.03.tar.bz2 111209 BLAKE2B 733058b0960b04212ad058616a93e79fbc1d18b51d7bf8b2cf9a5227fe1f5fbc2af1accd4043b71137a9c12ef534c454db9a8b46c1c707bc22fbf618d76c0dd2 SHA512 98c637a243bfd0a7f3154994b05400701d3b1ddfe8a38cf7782c237baa33f11cbc5be305b9bce8ac98813af1d37143cf96c13b3e6d3357c30d3f89a9be8bee0d DIST nvidia-xconfig-570.124.04.tar.bz2 111194 BLAKE2B 9c98c38d99e7d7c1f929f9e5cb815be32a76c2015ff44eb7a2df403c2993ea110b84958077b67cc3cf775bc8b22b025a28b3190662b5e03ee3bc6681a5cbfc43 SHA512 6a9b702d38a8ab360aa85e77d4333b3e9111fa30cb3e674438ea2c3b0704b52caef0b47e8ceaa8339300f4c80b42067af092d0289a21cfe34349b415d124994d DIST nvidia-xconfig-570.86.16.tar.bz2 111239 BLAKE2B 490638802c16634c6d21e22d81991327d7b4d45a918ad64b05e1191a99143a57bfc84beae2fb900149686b0adff94ede06c16711fb4f4d43a374c270d851d668 SHA512 0c1834a979e8771a6fe29a7e25640f1bb414b2f3db6529ad359079fb5b0db0681c67ab38490c0df9fcbf754a7a6ddcffc8dd7fb4f969214aa81f067a43cfd83f -DIST open-gpu-kernel-modules-550.40.85.tar.gz 13813204 BLAKE2B 651bcfe33c0956b62cd6d1da392407502358500c0e443296d71a654da8faa1064c6037d449d596c825c7fd949fe66f2f34334cab1c17c3abf79fd92d17b08d0d SHA512 fe66e51930fff737671cb81222856696ef3cb3e57d6c38e93f29284782124ea2e5eb1ac0e31ab95e211c662b7d12566f0346319ddca7f15efa3fc2e833feed20 +DIST open-gpu-kernel-modules-570.123.01.tar.gz 18662517 BLAKE2B c1371b9b5c200d95d727baf347fed0a9a60656ab9d0d87e3aec505f1bd20c07c94aa92ecf8afd5aab3297716545db70f1a33269f16063b98677982e5415984fe SHA512 ae85098900a431fa2bed76fc36d370d81ecbb2bbb9b13ee66f296e4dfed62b08dd3f213530d5fc55a11df753040b8236e3f5f36504854237826ad84fac620fba EBUILD nvidia-drivers-390.157.ebuild 15203 BLAKE2B de1fbac98315e8fbcb869b396a4e2beeb07172c1d8fcdd37480b67e265eff6a6f05ff93aaea015cbc5f6b5447645948ebb5c12f907a6d3bced0f6087c754baf4 SHA512 4b9e1e9fd35cfa9bf5b2eff10ca6a60d9277f7278185c724292690773423c6b711abe64703021ccc388c52089e34b7357a5b00b3a28ea78f6268fce4cfb515f1 EBUILD nvidia-drivers-470.256.02-r2.ebuild 16833 BLAKE2B 7ab81f00a13a55b3d521cc3e7063d56739b2cc5f576dda20155ab85b4a38a586be8e9acad8e71edf08d392b07b75560ae85fd85a74bfa0ba718a2ad740bb5acc SHA512 09fc55e8763c236d11222826198a036be06a4d9b020844261e9810f86c570ba1e1e6eacd817cf5799aac427ed8bb78d39f12c2f25ac1e48cc9d945dc3fcc58fe EBUILD nvidia-drivers-535.230.02.ebuild 20137 BLAKE2B 82329bfb7439669299500fc3c869533b49863a9b228d461862ae3ce20fb9b16de8301720cf4472da49b4ccf91274f47146d26b9d01003926259524fb35437453 SHA512 13b7195d5d267f726c99b10cee179a2c9aa6ce258c84c00919f7f0d83d6d7574df92ef81d09d32634fc6d8eb2c08092f19abd4546217c2fa1a3fb43a815ff390 EBUILD nvidia-drivers-550.144.03.ebuild 19879 BLAKE2B 7fdc0c7dae747250e9969d726a9d13ae794d15ebb8dd8494b95a30a7c290f053466e944b3035b78e13148cbf50e1cb02a4cf37236f1b8a628719f1c59a7bd58c SHA512 68fe0a9813890b2ba8164969f3b5470ab9bafdc0b544302d8e4f5ede44a9591bc6ac6ab1bf8a6cc99e3bad7edf38056c3ca3c6b5e1dd24bd561cbbf9d114e5f0 -EBUILD nvidia-drivers-550.40.85.ebuild 19779 BLAKE2B f29ef9e130cc0a2f2be131bc61161c9a43ad5cbda722171f7791a51a4388b94a7a2df179dc69097476c87a8247e18a30336199852229c465d9ea3402d48de20c SHA512 374a2dd648d6b6c90a054dc37c63bfe543f0a030992881e3ea369ee30d524b749baf0ef19fcdabe9918b0c42cdedb28c9888aeb66aff5f5a9f3532760bc2ba95 +EBUILD nvidia-drivers-570.123.01.ebuild 21612 BLAKE2B 860d3d8a694258a584976803e5a8f513a69187e9a9863590ec8e341509229568c14728f480726c7c2817a464ae3e11f551717b855acf6c163ef480b6dc9fe4ee SHA512 fb3bc220f7b06afdcb9fd296b7025527dbf60f5b0245b903374341e3db235d92b8a4fd4784f1529c046c83d01b9e636bcf516b3aa548758e397068d50a5401a8 EBUILD nvidia-drivers-570.124.04.ebuild 21583 BLAKE2B 987b544e6ee4d1d5afb7a728762717821e4fbe7cc0a1c421a9806efa062b0140d61601cbda75210602333a049744d8c747e21e4a93ffe74768f67a964610f88b SHA512 2403dae108fd760c44de4ea2094d2df9cafad99dc3f3cef5bd197a3ee9d6efc3806edf1140097292c42291a4704fb5191e16dfb587fd1d1a96b7b8191456a748 EBUILD nvidia-drivers-570.86.16-r1.ebuild 21583 BLAKE2B 987b544e6ee4d1d5afb7a728762717821e4fbe7cc0a1c421a9806efa062b0140d61601cbda75210602333a049744d8c747e21e4a93ffe74768f67a964610f88b SHA512 2403dae108fd760c44de4ea2094d2df9cafad99dc3f3cef5bd197a3ee9d6efc3806edf1140097292c42291a4704fb5191e16dfb587fd1d1a96b7b8191456a748 MISC metadata.xml 1508 BLAKE2B b2cbb75ef3a4571f994ba5aaa5120a1e9e8bcac2405a48138346a10109a60e0ebbfd9e6b17e349268c669cc64988dc72edaed6fd2f0672e6dd4d090c454b8939 SHA512 378c7dbc14f63a6ebcea931f80aa6534762e0d9efa3d6c1e336872342139a191f63fea61d85b5d8dc0e4287326f3078a25a53d0bad532bd668014c4a21cae224 diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-550.107.02-kernel-6.11-fbdev.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-550.107.02-kernel-6.11-fbdev.patch deleted file mode 100644 index 01f7e2aa1660..000000000000 --- a/x11-drivers/nvidia-drivers/files/nvidia-drivers-550.107.02-kernel-6.11-fbdev.patch +++ /dev/null @@ -1,134 +0,0 @@ -At a glance this should(?) only be affecting fbdev=1 (default-off and -marked experimental in nvidia.conf). Compiles fine either way given -the test would've failed resulting in usage being skipped. - -NVIDIA is already aware[1] and this should be unnecessary next bumps. -[1] https://github.com/NVIDIA/open-gpu-kernel-modules/pull/692 ---- a/kernel/conftest.sh -+++ b/kernel/conftest.sh -@@ -6612,2 +6612,21 @@ - -+ drm_fbdev_ttm_setup) -+ # -+ # Determine whether drm_fbdev_ttm_setup is present. -+ # -+ # Added by commit 9060d7f49376 ("drm/fb-helper: Finish the -+ # generic fbdev emulation") in v4.19. -+ # -+ CODE=" -+ #include -+ #if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT) -+ #include -+ #endif -+ void conftest_drm_fbdev_ttm_setup(void) { -+ drm_fbdev_ttm_setup(); -+ }" -+ -+ compile_check_conftest "$CODE" "NV_DRM_FBDEV_TTM_SETUP_PRESENT" "" "functions" -+ ;; -+ - drm_aperture_remove_conflicting_pci_framebuffers) ---- a/kernel/header-presence-tests.mk -+++ b/kernel/header-presence-tests.mk -@@ -17,2 +17,3 @@ - drm/drm_fbdev_generic.h \ -+ drm/drm_fbdev_ttm.h \ - drm/drm_framebuffer.h \ ---- a/kernel/nvidia-drm/nvidia-drm-drv.c -+++ b/kernel/nvidia-drm/nvidia-drm-drv.c -@@ -75,2 +75,6 @@ - -+#if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT) -+#include -+#endif -+ - #include -@@ -1853,3 +1857,7 @@ - } -+#if defined(NV_DRM_FBDEV_TTM_AVAILABLE) -+ drm_fbdev_ttm_setup(dev, 32); -+#else - drm_fbdev_generic_setup(dev, 32); -+#endif - } ---- a/kernel/nvidia-drm/nvidia-drm-os-interface.h -+++ b/kernel/nvidia-drm/nvidia-drm-os-interface.h -@@ -60,4 +60,7 @@ - --#if defined(NV_DRM_FBDEV_GENERIC_SETUP_PRESENT) && defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT) -+#if (defined(NV_DRM_FBDEV_GENERIC_SETUP_PRESENT) || defined(NV_DRM_FBDEV_TTM_SETUP_PRESENT)) && defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT) - #define NV_DRM_FBDEV_GENERIC_AVAILABLE -+#if defined(NV_DRM_FBDEV_TTM_SETUP_PRESENT) -+#define NV_DRM_FBDEV_TTM_AVAILABLE -+#endif - #endif ---- a/kernel/nvidia-drm/nvidia-drm-sources.mk -+++ b/kernel/nvidia-drm/nvidia-drm-sources.mk -@@ -69,2 +69,3 @@ - NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_generic_setup -+NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_ttm_setup - NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_connector_attach_hdr_output_metadata_property ---- a/kernel-module-source/kernel-open/conftest.sh -+++ b/kernel-module-source/kernel-open/conftest.sh -@@ -6612,2 +6612,21 @@ - -+ drm_fbdev_ttm_setup) -+ # -+ # Determine whether drm_fbdev_ttm_setup is present. -+ # -+ # Added by commit 9060d7f49376 ("drm/fb-helper: Finish the -+ # generic fbdev emulation") in v4.19. -+ # -+ CODE=" -+ #include -+ #if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT) -+ #include -+ #endif -+ void conftest_drm_fbdev_ttm_setup(void) { -+ drm_fbdev_ttm_setup(); -+ }" -+ -+ compile_check_conftest "$CODE" "NV_DRM_FBDEV_TTM_SETUP_PRESENT" "" "functions" -+ ;; -+ - drm_aperture_remove_conflicting_pci_framebuffers) ---- a/kernel-module-source/kernel-open/header-presence-tests.mk -+++ b/kernel-module-source/kernel-open/header-presence-tests.mk -@@ -17,2 +17,3 @@ - drm/drm_fbdev_generic.h \ -+ drm/drm_fbdev_ttm.h \ - drm/drm_framebuffer.h \ ---- a/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-drv.c -+++ b/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-drv.c -@@ -75,2 +75,6 @@ - -+#if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT) -+#include -+#endif -+ - #include -@@ -1853,3 +1857,7 @@ - } -+#if defined(NV_DRM_FBDEV_TTM_AVAILABLE) -+ drm_fbdev_ttm_setup(dev, 32); -+#else - drm_fbdev_generic_setup(dev, 32); -+#endif - } ---- a/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-os-interface.h -+++ b/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-os-interface.h -@@ -60,4 +60,7 @@ - --#if defined(NV_DRM_FBDEV_GENERIC_SETUP_PRESENT) && defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT) -+#if (defined(NV_DRM_FBDEV_GENERIC_SETUP_PRESENT) || defined(NV_DRM_FBDEV_TTM_SETUP_PRESENT)) && defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT) - #define NV_DRM_FBDEV_GENERIC_AVAILABLE -+#if defined(NV_DRM_FBDEV_TTM_SETUP_PRESENT) -+#define NV_DRM_FBDEV_TTM_AVAILABLE -+#endif - #endif ---- a/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-sources.mk -+++ b/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-sources.mk -@@ -69,2 +69,3 @@ - NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_generic_setup -+NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_ttm_setup - NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_connector_attach_hdr_output_metadata_property diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.85.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.85.ebuild deleted file mode 100644 index afcf7d8e116f..000000000000 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-550.40.85.ebuild +++ /dev/null @@ -1,566 +0,0 @@ -# Copyright 1999-2025 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_PIN=550.144.03 - -DESCRIPTION="NVIDIA Accelerated Graphics Driver" -HOMEPAGE="https://developer.nvidia.com/vulkan-driver" -SRC_URI=" - https://developer.nvidia.com/downloads/vulkan-beta-${PV//.}-linux - -> NVIDIA-Linux-x86_64-${PV}.run - $(printf "https://download.nvidia.com/XFree86/%s/%s-${NV_PIN}.tar.bz2 " \ - nvidia-{installer,modprobe,persistenced,settings,xconfig}{,}) - https://github.com/NVIDIA/open-gpu-kernel-modules/archive/refs/tags/${PV}.tar.gz - -> open-gpu-kernel-modules-${PV}.tar.gz -" -# 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/vulkan" -KEYWORDS="-* ~amd64" -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 -" - -# there is some non-prebuilt exceptions but rather not maintain a list -QA_PREBUILT="lib/firmware/* usr/bin/* usr/lib*" - -PATCHES=( - "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch - "${FILESDIR}"/nvidia-settings-530.30.02-desktop.patch - "${FILESDIR}"/nvidia-drivers-550.107.02-kernel-6.11-fbdev.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{-${NV_PIN},} || die - rm nvidia-persistenced && mv nvidia-persistenced{-${NV_PIN},} || die - rm nvidia-settings && mv nvidia-settings{-${NV_PIN},} || die - rm nvidia-xconfig && mv nvidia-xconfig{-${NV_PIN},} || die - mv open-gpu-kernel-modules-${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 - - sed 's/__USER__/nvpd/' \ - nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ - > "${T}"/nvidia-persistenced.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}" - ) - - # temporary workaround for bug #914468 - 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 - [VULKANSC_ICD_JSON]=/usr/share/vulkansc - [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=/usr/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 - # =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 && - $( ${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 -} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-570.123.01.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-570.123.01.ebuild new file mode 100644 index 000000000000..669f8aa5d9e4 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-570.123.01.ebuild @@ -0,0 +1,602 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MODULES_OPTIONAL_IUSE=+modules +inherit desktop eapi9-pipestatus eapi9-ver flag-o-matic linux-mod-r1 +inherit readme.gentoo-r1 systemd toolchain-funcs unpacker user-info + +MODULES_KERNEL_MAX=6.13 +NV_PIN=570.124.04 + +DESCRIPTION="NVIDIA Accelerated Graphics Driver" +HOMEPAGE="https://developer.nvidia.com/vulkan-driver" +SRC_URI=" + https://developer.nvidia.com/downloads/vulkan-beta-${PV//.}-linux + -> NVIDIA-Linux-x86_64-${PV}.run + $(printf "https://download.nvidia.com/XFree86/%s/%s-${NV_PIN}.tar.bz2 " \ + nvidia-{installer,modprobe,persistenced,settings,xconfig}{,}) + https://github.com/NVIDIA/open-gpu-kernel-modules/archive/refs/tags/${PV}.tar.gz + -> open-gpu-kernel-modules-${PV}.tar.gz +" +# 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/vulkan" +KEYWORDS="-* ~amd64" +# note: kernel-open is an upstream default in >=560 if all GPUs on the system +# support it but, since no automagic here, keeping it off for the wider support +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-1.1.1-r2[abi_x86_32(-)?] + >=gui-libs/egl-wayland-1.1.13.1[abi_x86_32(-)?] + X? ( gui-libs/egl-x11[abi_x86_32(-)?] ) + ) +" +DEPEND=" + ${COMMON_DEPEND} + static-libs? ( + x11-base/xorg-proto + x11-libs/libX11 + x11-libs/libXext + ) + tools? ( + dev-util/vulkan-headers + 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 +" + +# there is some non-prebuilt exceptions but rather not maintain a list +QA_PREBUILT="lib/firmware/* usr/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 + ~DRM_FBDEV_EMULATION + ~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_DRM_FBDEV_EMULATION="CONFIG_DRM_FBDEV_EMULATION: is not set but is needed for + nvidia-drm.fbdev=1 support, currently off-by-default and it could + be ignored, but note that is due to change in the future." + 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{-${NV_PIN},} || die + rm nvidia-persistenced && mv nvidia-persistenced{-${NV_PIN},} || die + rm nvidia-settings && mv nvidia-settings{-${NV_PIN},} || die + rm nvidia-xconfig && mv nvidia-xconfig{-${NV_PIN},} || die + mv open-gpu-kernel-modules-${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 + + sed 's/__USER__/nvpd/' \ + nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ + > "${T}"/nvidia-persistenced.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-570.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 + + LDFLAGS=$(raw-ldflags) + 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 + 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 + [VULKANSC_ICD_JSON]=/usr/share/vulkansc + [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-egl-xcb 20_nvidia_xcb.json # gui-libs/egl-x11 + libnvidia-egl-xlib 20_nvidia_xlib.json # gui-libs/egl-x11 + 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.") + +Be warned that USE=kernel-open may need to be either enabled or +disabled for certain cards to function: +- GTX 50xx (blackwell) and higher are known to require it to be enabled +- GTX 1650 and higher (pre-blackwell) should work either way +- Older cards require it to be disabled + +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=/usr/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 + # avoid portage warning due to missing soname links in manifest + [[ ${m[0]} =~ ^libnvidia-ngx.so ]] && + dosym ${m[0]} ${into}/${m[0]%.so*}.so.1 + + 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,suspend-then-hibernate}.service + + dobin nvidia-bug-report.sh + + insinto /usr/share/nvidia/files.d + doins sandboxutils-filelist.json + + # 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 + dosym {"${unitdir}",/etc/systemd/system/systemd-suspend-then-hibernate.service.wants}/nvidia-suspend-then-hibernate.service + dosym {"${unitdir}",/etc/systemd/system/systemd-suspend-then-hibernate.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 + # =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 + # TODO?: automatically check "kernelopen" bit for USE=kernel-open compat + 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 && + $( ${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, note that it requires" + ewarn "Turing/Ampere+ GPUs (aka GTX 1650+). Try disabling if run into issues." + ewarn "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 + + if use !kernel-open && ver_replacing -lt 555; then + elog + elog "If using a Turing/Ampere+ GPU (aka GTX 1650+), note that >=nvidia-drivers-555" + elog "enables the use of the GSP firmware by default. *If* experience regressions," + elog "please see '${EROOT}/etc/modprobe.d/nvidia.conf' to optionally disable." + fi +} -- cgit v1.2.3