summaryrefslogtreecommitdiff
path: root/x11-drivers/nvidia-drivers
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /x11-drivers/nvidia-drivers
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'x11-drivers/nvidia-drivers')
-rw-r--r--x11-drivers/nvidia-drivers/Manifest80
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-470.conf3
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-390.151.ebuild (renamed from x11-drivers/nvidia-drivers/nvidia-drivers-390.147.ebuild)67
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-470.129.06.ebuild (renamed from x11-drivers/nvidia-drivers/nvidia-drivers-470.103.01.ebuild)60
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-510.73.05-r1.ebuild (renamed from x11-drivers/nvidia-drivers/nvidia-drivers-510.68.02.ebuild)57
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-515.48.07-r1.ebuild (renamed from x11-drivers/nvidia-drivers/nvidia-drivers-515.43.04.ebuild)51
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-515.49.05-r1.ebuild (renamed from x11-drivers/nvidia-drivers/nvidia-drivers-470.62.29.ebuild)106
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-515.57.ebuild506
8 files changed, 778 insertions, 152 deletions
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
index 26a0ce13ecef..1baa67ccef2b 100644
--- a/x11-drivers/nvidia-drivers/Manifest
+++ b/x11-drivers/nvidia-drivers/Manifest
@@ -1,6 +1,6 @@
AUX 95-nvidia-settings-r1 54 BLAKE2B 598067babb48bd0f5680300cf3cbb37ac804edb3131c47510d3350511b918cd47fcf44f1ccd4746e4a41f2f8aa36511f20c2c6f313010e89a79b7869771b9ee6 SHA512 de9edf678c64ca3d10c912397800b2cb651ef9108b33ece97a4cc1e86dad0a9e81986cca6b96cfe80740d9cb433de7ef93f29be45178db714ee408c7f6570ac7
AUX nvidia-390.conf 797 BLAKE2B 7cb7dc58841d2e7cf28f677939031a20ff820e2d46f799177c6004d94e73c308d2a9ee81fca476ff7ab4846a275cce996f68a53a7a9f819c3d57b5dace1d40e2 SHA512 17cabfcaa4b7323c635d1491e46710624d13396c019591499993662a20df39c8e3fa843387594aeb66d70cf38ab9fde7bee85dd1ab37eaa637a315fd52328222
-AUX nvidia-470.conf 1200 BLAKE2B 75ad02c7fea824de6b365a1932b4f1586b0668a38b6685defd28f492e5e62cc34dc66386829658bd6d87e2b426e84066cb704c91ec34267c16cece80f8c4e81e SHA512 77281a9832dc8d3ce27cda46c506f6873dfca5babad365e31bd6116f46ecdc18fd9d67981a957adee45f2944ded18a7d4cde31112c213a909635476b3c4435e5
+AUX nvidia-470.conf 1272 BLAKE2B 842aff5a34a6f6e62a914ac42a5e11c9f620e580303c470057cec261f0804f2a9254a3d4928c2dbd1ae992e71d30c0880a5bcf3e89e725ae918738ebe001911f SHA512 615b42ffdaf070ac191b9dcd4b17ca261aef1eb1ed45514a5bdfae1d900202ae6b7218f0dc037800bb51eb6a3b96aecaa4aaecc1c349b3439fdec3640a3586fa
AUX nvidia-drm-outputclass-390.conf 179 BLAKE2B 2a7d3bb2bb131db6ddf24c9fa157a1044e72a3229088654f4768f76eb871cdaacdee58e82be5504c1c0af928c343448b4d03f23d289a4479b64218d57fbd7a16 SHA512 8e5dfe54b9cf261d28c206ca1594183cba4945ed633a13ab4b1801b2ad4614ca10038ab7f0cf35dbf4eaa7b2de6e747c3be13ecb11d05740b22654626f09d774
AUX nvidia-modprobe-390.141-uvm-perms.patch 563 BLAKE2B 9befd708ad2193e507583e066f306e11d55e82912f456e738d850b804d35331df2ca5de3a35e8ab551188c1103af762941098639fa9581b4437bc5e68595ddd6 SHA512 0546d51a86554985cd7cc036e7b8f65b457cd1a1c0549ef496422fa422d2757354a47b83247b100597f908c2653314878c721b3918ebc529cae4282824d4eada
AUX nvidia-persistenced.confd 213 BLAKE2B dd57e63944a97a77e83a8373dd34ef2f56824dcfadcfbbb54cdf6eeac17066d78753bd1b21a9bad8f0437c279c95492319205c15b84b7f96e0515415dfddbc26 SHA512 a311b73bb47448538e5261ba658d42e923890c909c335eeac3cc90ad0ffd3fd5fb983df8e91077f3098eaa13b07f27b23dc24a4579b1df411ae272976ef089b3
@@ -9,38 +9,48 @@ AUX nvidia-settings-390.141-fno-common.patch 478 BLAKE2B 2b222b26049aeb669235061
AUX nvidia-settings-390.144-desktop.patch 433 BLAKE2B 5f2eacf1cb1d8ad1ba2cd7163f967df3141a75cbeeab967eacd1459f61ac597c5123570d68e8c51fff324b23a81df52386815a7156ec77ae8886e86ac70974ea SHA512 96411bc1a752f10514e81996cfe077e479b19a41ea857b4a3d51a8675ce051bc366fc8b071eaf25f335a45ea2a5eddaa49309a946a70610de871e9ef2ae6cc75
AUX nvidia-settings-390.144-no-gtk2.patch 367 BLAKE2B 59a60b103df6b187009417dca22caaf45292b94005d92df9e513804e5137959ffeda1d9abd5506cbb5c7be604023d2c59f0841190b03502542ad0c2d3f084a10 SHA512 421558442a2228f6ffdb82b2bd6862cbc286b8ba259c4970f54dcc445a988575864404f2c3933d2436d8d40de1bf0e34ee7ed855742c5d677094c260e32a1e66
AUX nvidia-settings-390.144-raw-ldflags.patch 468 BLAKE2B bf4c00a76351e6c3d1587b4f71be61fac8cc516fa22da0a47538fede92b619eb77b1cc09222cd403175a2015eb2ca745e8cdca90c9dca1b938ca13a2e59810ba SHA512 1fc568bfd1faba1f7af4f4b07715912b7f1d8103626ec0c9fcbb465ded606059ca264f386fe415105ab9f95c4ab173bf4b784ea7380bf17ab6979f56fbd01757
-DIST NVIDIA-Linux-aarch64-510.68.02.run 211263873 BLAKE2B 755a9e463af7eebce095d592fdb039a7178075aed9ff0d79658934f9269bb502185d7091a803dd0b0827c5d8a3e8d46e8a3e50646e39fedfa2b3ab9d580af6ed SHA512 b075e20b8457a1fe16a0ac1f34ff9a94d739673858a9a973c361856e07ab25a56e9ff2856a828866fea00407c5e4a4394d3c7aa6728a9a31bad0905e1d60f002
-DIST NVIDIA-Linux-aarch64-515.43.04.run 215715685 BLAKE2B 323b2c4bc5a40a3120af83397f675addd74a44d13179e7d3d080e278db2e9508e384f3e25203238bf833a670d9b08f41bec98bb43ad5fc5161c0edc826f06af0 SHA512 68a2018c1649558388a0e9dbef698cbd4ceb12fc651f618774d26c7cf1c2733450538c0b11fca0ca7c59a74089dab02a9cfb35e87b7b078cb8411f8835b7b1c2
-DIST NVIDIA-Linux-x86-390.147.run 49303088 BLAKE2B 5a3a02b88af1ee8699b0c6c3fa222d9176338f10437a88c874126c7bacf64ddc44d03d8a44542cba989129af6336e46cae775713458a16d78ea75e4e004dfffb SHA512 c5d47e2a8c034e158093feeefa2455ec49d676fbd1700118aedba0c3b84be4e2060402d0e27e50d1a674de10f369f8e5ca2da8c61f1d0560d2105d33d7238359
-DIST NVIDIA-Linux-x86_64-390.147.run 85930997 BLAKE2B a8085c9abc1c31251788a8f5abdc2090c9085b3028e364184244bbf24d822dc3266877c88b30f403507fa2dd511c68ec67e1f188d6b0f1f4d7d792881d5253fc SHA512 0d8bda32e916d71da2ea74bc12a4f3cb0a0c2ddda27511cf3c89bbf4aeb28db68f6b7261639d88dd1c0180b91213c09de930d233158268c5d9ab3b223510e964
-DIST NVIDIA-Linux-x86_64-470.103.01.run 272484410 BLAKE2B 42a19ed990f49d4ceefc1006f3e6e4b69135ad2aaf497c648b9afe7941a81aba3a51296cb14bc419352cdf70f850484d2a55784184fdb820186193501422d742 SHA512 3dc19774a6fef5e6ec0cb9451df4268f77cb31b0a9ede253bf9cf805a048ad457a7bfec852aaeab3e3e297b3353840a3d6c9c7ddc75d57b2b000ab4e0b15530b
-DIST NVIDIA-Linux-x86_64-470.62.29.run 271041614 BLAKE2B c49c1861e0ac1741e8e270d78327d75abd9c58fc06f23f4d8508976276afc69b9a83958ba855884767a82018b424bed9cf7b89c0514db56f55c2a3cff70d2d99 SHA512 bdd8dd25b2fa07c15a4e14bab9d7154f2be5c3d08960caf7d419247ff5d12c8366962346c2f38efee6daa935b020d8de09d9c145c08cdd0835a6fef0c2c3c76d
-DIST NVIDIA-Linux-x86_64-510.68.02.run 329247384 BLAKE2B 44107d04df20533aa904146465d069ad30aa2aabc68c3588480d0c8e85e3e0eec7515d81bd411d63e02ee893343088e6805235386a8d3eb0f4cefb72083dc0ea SHA512 eb31ed729555075bcc307acc576cb6fdfdd7e397c9e47dd80fc2f55cac6902c3924b69bb91036e5ded1001e81d4b81082ba093dd63d6d97bc313fe78e510131b
-DIST NVIDIA-Linux-x86_64-515.43.04.run 358747732 BLAKE2B 295284c951deee77905a386e7c960c5ba715358ce47afa5f9bd03dfc3f14cc5aeb37dacf2d42f35a15ef3a48b59cf1bdc8a36074d48b06aa98112b60496dcdce SHA512 07dfcfc297d8dc3072ddf5d719ab5fe3de0aaa2d9b2b7329d86a1cc167c79bd3854c0644cc0080689e2529b3e375dc3ffb370afc3904362722b338d2c1c2837a
-DIST NVIDIA-kernel-module-source-515.43.04.tar.xz 7600032 BLAKE2B 6da3cbc2d09b7c6c9a9d61df6adfb6cb50e268a1c367a6eda7f750cd27f54d188b713147051d884561a7440708ab8bb2e0f09cb66386101f955861de92346dde SHA512 ad919e6fbcf5c830ed6c2566372b2675731546a3ffc008b009cd172fb529ed34f6f9b436acd6d7ccab744296dd9da15c6aa8c2f7edb0355d5b2633ae92e79d69
-DIST nvidia-installer-390.147.tar.bz2 150157 BLAKE2B 3bf5317aaa3bdb0e6dc3b3e21ad3dbacf6dc782a643b0fa9badf354361891ab25660b57dd408e346f219d469af317a4851937e1cb77ffe59a39e9d98a92f3a40 SHA512 24bd8a2959062551abf2ea039ac95eba224d58c175f59f1386a6d43459ad43b2bddf17f00b53c1c71c45eca3b7a2281dcf05cc65030f6f8bed16d0f0b9f9c282
-DIST nvidia-installer-470.103.01.tar.bz2 146121 BLAKE2B 06da3693cf8edba849b802f2255dcf2086ba3846f83ef19a02cb813ea2c07a6904f8a49e263018fb8b40c9fece7ab4422d95a50d12030ae6815ec60a7edac055 SHA512 b080f32394a6163c34e152561b80cca9277a53e0b38c5225b91daddc2169403e2ff4cf63a30b488ee0c3a954b21d32065b5624fb9dd33e672313909b9096de02
-DIST nvidia-installer-510.68.02.tar.gz 199720 BLAKE2B 69f6514e5eac74897158585d90d215d689edce720257819af5b245768029efc9a95338b3aa3de1a63c8b107658375f248a688c31ea08513224e443083a5f68ce SHA512 24831d20f79bdd5e5d6c828f02d59f9c75b30169a46ac789615be5ae014c831fc5bcf267c5f5afa8fc84208eb427a9972638db0aca68510393916c041368ff45
-DIST nvidia-installer-515.43.04.tar.bz2 144712 BLAKE2B c83838cbd939c69859125306a20b6e05ba5f4db1e11e425a5a91ff28eb0aeaa5a6490b8927024c001e75efe59f0e0ac60b863fde76311afadd06335a466258e3 SHA512 3b0fff23b91e25ba1abf4be17affaf4e3c6e1da5420a73ccf8bfd38e01194ffbb22918a200d613217c1407c43460e9f9439697a70c2758b291a029a9a63d9bf9
-DIST nvidia-modprobe-390.147.tar.bz2 35340 BLAKE2B acb49dea0c5d9d802b7c2f9f8127106bd6f9e2aaa7875941ca94c1d81377411e8d9c53357e7f9aa0170c87e349f6379a45391965e7897d0158951a4c0056a835 SHA512 a731fc990557f40fdd0fba45bcfeb99c315d0579a2d2f49bf6f84c55c91f52a9e65c358bc5a3882483ab8e9d66b546de31adcaba46a494bfc0836a0690c3d0db
-DIST nvidia-modprobe-470.103.01.tar.bz2 38347 BLAKE2B bd86b8f76d040ea9bad06312b24d839413515c24867e88174d40e9dd0d9006d42fa57f8e789a8a0e8859dd1c1122ef6e57ea25fdda08eedcba10d9291181245c SHA512 ea86b083dd82ff7d8926d337f2aeccbd73cd614a85579cfcbb4ad7225565aa54f151e6d2b5d35b96eb413c3673158025348416193db5045809d743cc98d65281
-DIST nvidia-modprobe-510.68.02.tar.gz 44311 BLAKE2B 83a50ba8d9f95864875548f1b0262065ca0a9b23eb1e9d3a5a0b7b1646efc7b12ca688874aad7cf61c291055d5e7a04894b91d27c246fa9e77946d110712575a SHA512 c2621d7125cc481b6850295c123ca354c9a37662c2611c1a52d6ee675a12bea619f64d7f3e12b52a7f36a4b8aa732b7e896734803ccbe9ecad3351df1d9768d8
-DIST nvidia-modprobe-515.43.04.tar.bz2 39098 BLAKE2B e4949e032da22e64e219d247b45c63d2d02c5f91bc2ebffe5d211d3cac30a7b638ff00a6dc0a60a097ef8a3eab8004f1146aabc4a355622baba5e288e0b02406 SHA512 6c0f7c342eff2c6012ec7f808e1524a516aa193c0ad35b4267358d31c38479a0b35abaf9824bb2ba2159e8dcd04f8d16e8483e48d54f0853d045291462d4f4f3
-DIST nvidia-persistenced-390.147.tar.bz2 48712 BLAKE2B d8b2587c8b4374dcff198d8aae1468d30197d9b097badddbec34f0c41e3c4ab4f27b568f152a4c7a4416b3ee15194ae07442c45c50d086a6f4e7e69a5c54f42d SHA512 5877f7b0a40d54b1ca746b2fa1f1270d1ff605068dcf944e078d4cb547bc6f79c08ea9d4fbe3e94e8cd528b9721a89147d43ac849df71b2dc1d903fe1439c4a5
-DIST nvidia-persistenced-470.103.01.tar.bz2 46549 BLAKE2B ad25193ba3abe1a5a30233aedb1596822a4af1aa74e6862c4449567408bd84ab40526301f600bfeae938c443f26dfdabd7f912888cfd2e307fc7867d7750180e SHA512 00ab77bb84b90bfeced488353db674334796b10bbd9c8da9ed682d668db800aa7bbcba20033d21bbee6663f0659dd17daf3298cb1384f41a89409a5f3a162de6
-DIST nvidia-persistenced-510.68.02.tar.gz 54673 BLAKE2B 2a19eb1f410f75e726d36996e757f4f99c57633aec6758390319a084da9fc86a831cfe914286f16a20a0feaa9a29466877573f99c4b850ed0631b2335d2a3761 SHA512 ce990370e29bfe762a23a1dc6a0133a1ad4015405980d82f234e94a27cd4ea4c9fa46d52d5db4463dd617babda4069595c1963a0a10b0f019209095f5bb9015b
-DIST nvidia-persistenced-515.43.04.tar.bz2 47165 BLAKE2B 5cf6de13a6bd238d664b73d389ff0c1fb1e732996564449a4875821f10a777839fd42672e012b04cdb5916aace53b6712c8a4174575a412dd989d6772adc75a2 SHA512 b3e0d18d81f437e4fa7f464bd76fadc6af753acdd36ba9f20407dd9d35f7807d3ff64c74e5a5fb353779251e8c47205ff69097e7a432140aa91b26ab01aff9da
-DIST nvidia-settings-390.147.tar.bz2 1109104 BLAKE2B b0a2e0c832901db65f41e54d66d61abd9afbc528d1e8095e314d7ce5c1bf73c7bc8cc1857d909d9eab2e3b9ee97831c15c52f2725a8c9f84e00416c4e3db23d1 SHA512 67c30df042b9a9b923f05a26bd2e0bd85487fab0fe2c730ac48025561d652ff0f7455a56cc7951ed8ba2a300e019fa0e52fcd912b644d0d88fd2ac0e63de2327
-DIST nvidia-settings-470.103.01.tar.bz2 1062124 BLAKE2B a9b95174a2309668951bb090812c9d2098d7bdefa210b396523eb59887fb3ea62f517398ab63cc9cfb395f90e6535c308fd43fb0ac406afba17713e01e98b19d SHA512 62be59eae75965762b5caf6bfb71ca993ee23cc0d12d385a7e67e62c8f9180555078dfae736cc6d6bc0b52525780e32e0b76152c5e4a1be669c6dd181c0f2465
-DIST nvidia-settings-510.68.02.tar.gz 1248292 BLAKE2B c46b045e31749b5641dfc732f94d36ae89c7e5b0826bba4c9372fdc52a4fac3731b7d7767b5bafb66e2a5129889587b1a2468255270ca3f0cb16c19ea79878a3 SHA512 a0f89220b8b45d05de28509b4d758db1b8318a8d222f6948d45a60ead7cc917274b9ffcda1a7a11cb7740215b439c248fa6096f3011e7a74bde91cd3f093aecd
-DIST nvidia-settings-515.43.04.tar.bz2 1079278 BLAKE2B f19272358c75c2f5538966f848e4a1b9a558deda63da65f43ee410e3fa43c5e5534a42893cbc6127242ec1af90a149ffc27455d24c62d34135f8b1c04517b89e SHA512 e7a3bfff40ddb340b571613d75b9eb5819ac4a8df605fe3a805e25c5ec138d44ad129f83cd7e69bc8e9a96c5147b6ebc804624383bf4d069067ca06b5a8ee838
-DIST nvidia-xconfig-390.147.tar.bz2 107426 BLAKE2B c7004dab351581176a4e00fc099a12374cb29f3306769724c874a17600d6c11e79ac807fe218022d72ccf83ed33789d2378b0cdba35e5f94458e30631d725384 SHA512 a530c649ff7e75706ba37072ee58d64d4758348a45b953396a0e9d2608e1d7c3d299298cb50b1e8ee0bf2f6f8817bca64637b77e18aab0685a4edd630f18fb9a
-DIST nvidia-xconfig-470.103.01.tar.bz2 108687 BLAKE2B 2e5de637f9ba7bb516fd1a6801f8ee5be2934f99503bd20a62eaf87c0105d7624ef8de993614b1316ea8d203f9b7a6be07d3c9d5005d8a6306b7fc89cc0bb443 SHA512 abbabb3bf650395237759cbfaa39565893156ae87d07855bc96bfa0f46e10f34fd9efb628ef184f4dd525f80c63c62938b9661c9a4f3f5e1e5420ae1fdf26f0e
-DIST nvidia-xconfig-510.68.02.tar.gz 144010 BLAKE2B 11c8e91229839be57aee59b8bf5fd325636cf2c8de7cc1c42e79ee3e6abd884d4ec29d3acefc8bd294a8cce7b9a17c253323136b439ff410f38dbf9d90889018 SHA512 40bb5dff12477cc7e69ced0bd9ffb8fc1c6ac2f2591b652867165896d7749126afcd250c1f78056725243b5c3f0350748d4d68df0be639e7173a5abc1614b25e
-DIST nvidia-xconfig-515.43.04.tar.bz2 109791 BLAKE2B d85d5f59be3e9cd919f0c89f2553186499e632bb77a46286ac1b3ef6a8adf2cd2ac1bc09dfa3dd4dc2f4017f9d3dd8d3d3f76f617d3a52e4e777a85218bbd525 SHA512 0eac9cda62fe1a9c5a5be11bffd5e6b06796626ed57ed602285bfd33422cc5f978a33664f39db8a94e46741ce89fa18d2c183945f42cc6bd1e52b6e1c54d9cc1
-EBUILD nvidia-drivers-390.147.ebuild 13733 BLAKE2B d80e2ffcb4df114f1ef73d0c534bc866ba43a02dad5511937cc513aea763e54d4a91289a4def2b845eada24443137a9a2b31eb9107079d39ed281e2c7209260f SHA512 111d3363212b86fbe1abf3ff7087c95babd2eba4c315c67e480f881ffe6a42c6b0a17942f195e5a1e1f6e1591a3a0191e1cb5331bf896f40c2e2a7a674b734ab
-EBUILD nvidia-drivers-470.103.01.ebuild 14325 BLAKE2B dc95641e36da9fffde43878ee687808db16d5290e3ab455945cd2a0237b8bb338ae8a34b786979aa76a045435052f9c00dd6d58db7b50f1a0305370df7bfd9a2 SHA512 3642505a66e174e87669c44a0774f596ba44f08aacb49108eafc2c53ee6aaa1e2231ad596f0d3c9b609b27fdb61e7d132869511f06217e90bb7ab392db3cef94
-EBUILD nvidia-drivers-470.62.29.ebuild 14358 BLAKE2B d6d3e096f18895b46e06d75f78cee40ce329f9fcb93b6ef1321c4812b734ab211011b0f43fd44ad707542b0c487e700eb6b0f5a603db738d92a9c98237a33032 SHA512 1e93e4d62494d12adb1d8a342ddff6c0d32df779f86b13b9a667fdbfa68b2e0a94c0656b9510f2031251e063b045b574fb5d4457b89535cf506698e27a2b0d8f
-EBUILD nvidia-drivers-510.68.02.ebuild 14813 BLAKE2B e5030ac6c5abd8e5915adc3f94abd8772c371552bd32302b740c9c348dec6c567cfa0404ab217a04824a632971548bce6af943b20da96cfab319f6d00bcd823f SHA512 355eb6f8bfde41ce0a45beed24ffb739a54153d9be5cfd17e3a79f71a77dc636f30777c978c496ce7582a78e1775a71ce9f572d05c98ae055622768587cfc71d
-EBUILD nvidia-drivers-515.43.04.ebuild 16450 BLAKE2B e27f986d1ea7f47582599cd779440da0f316a1710ebc396bd434e6e5c2161a407f669e84fe194945639514b07c666f594727cc472f91f8cf2f193e30bd384900 SHA512 c6efe8506898377d07102fe26bcd038b61de9a8fbcc4c5ecac25f8113ab7e05ea5b7ea54d5baefb31e431cecfd522d00b46b71c1270f4f6a0e6044d168d895c8
+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.05.run 361416064 BLAKE2B 7f2d9c9d418cb16fb154ff7130533c252a736bad92abe3f993212e837beb14db1882c56b539c81d170f0ea1e89a3cea3bd1f4dea6bddf5abd17687d011baf1bc SHA512 a9f184699b40bad8bc3a98a8abdf609fcfeea9f477e4731dfd792dee84a0122eae247479c2b97b3bcf9628fed51802774ff81ba594fe8614c92b339c44bbac21
+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
+DIST nvidia-installer-515.48.07.tar.bz2 144506 BLAKE2B 6d1cc61e5ea20e94f467eeac873cfd5a2f56b2ac2be680284872c0f078d4e1d3aceabec395c9581273ac333fcc9642bbe346a228c4b691b5a4bc3a00494167b5 SHA512 219ca1cdd4b31779e0b7a0180b20e067d9f52bb5f54cfb38ec3e4559f13cd854caa7378d23ec2f171b54d9a8c0ddaabd7579f4f041c2b973df1d13a17466943b
+DIST nvidia-installer-515.57.tar.gz 199931 BLAKE2B 6e3ceb3f3e3e042c7409eba282381a11f2ad593b831e1e07cbf07e218f7025b983ab6f4162e12bbaedb6f210963112d619f75f94ec3b9c24b9b925b71f2e9958 SHA512 6d0fb7503e61ff70a69ba8bcd063cb62b26b73f3941f5a5c4963b877c72358a7854e980f7bfbfb8b38d2e14d796f59bebf81e5e4f8d33f0a6571c965d7683bb4
+DIST nvidia-modprobe-390.151.tar.bz2 35327 BLAKE2B 0bfc5057082b68df6e8d1431257ec2b95445dea2401d4d64af475a1b416f647bf04e64c484d27f0a52255216fad7c6d02659dea8d5bdaa7d3eba1eac8b3565da SHA512 257bd82139f7e598b47d3dea620aea2662332c69a19b3e6c2f02bf2705f204c10c8a2c7bdcde24ed044d4738c8d8a5f28fee78d6e87071d4b7a6c62687239bb1
+DIST nvidia-modprobe-470.129.06.tar.bz2 38371 BLAKE2B 85bc02ea735cc6bf37e00b0c1d91110c58e67a0456598790758e5007bf097289b3910aaff27e7f7796b5ed3c6aed1f6f076f39808b7c77622f6adc650cd0445b SHA512 e37aa5ce6e471ed62aafd5854990bb145b5ffc64226ab8a91be877b89f4951b0f381d933d0463b30920485d7fc60a2271f4e2042ac9f347bea8785cf402a0465
+DIST nvidia-modprobe-510.73.05.tar.bz2 39043 BLAKE2B 8601827f688c321ca98563b3eb35bf88e617997edad71522ac832d5fc1eeb1e7563d0d753b52519007bc3fc2347d09b3c5b9e2eb544d2868fc3a95990886e195 SHA512 cf6fad9d4a3873ec9e7142aa276782cdb5419ff4e55354d1cb6ca9baadaadabb7536e68c76084b34eeb241d005e5018f0d4da7b1044c5ff553d2c59b8215e75f
+DIST nvidia-modprobe-515.48.07.tar.bz2 39099 BLAKE2B 771902fe989516324210b0b3db9e927c5ce13a8caf790bbcd4da76ecf60ffd4ada66faf7e3e0296569c774f1ad2044f879d2902178966e3de9c56cba730dc63c SHA512 3df1ea30f8a0c520ab02c05b0f805437e7abc0479402ad725b4d98ac0ff56ce10b797227b19157f51fdc18530cc772e6cf0bd66130a2387782658a5e9fd732a1
+DIST nvidia-modprobe-515.57.tar.gz 44361 BLAKE2B 08bc65b03f61c7fadeed22ec040e051a607ef48b4c2db5508393f6d9e31ca7e00fa1785ad532e5a9e1d8a4dee7ec7ea9fdde1bb1382a25f12de52f0b6abad3c5 SHA512 d12d93d46519f0a5d4272da85a9fec26de56c54c2d858f56e3baa0d1165c475b160f9025ef14d70c0874618863a1e4b8942abb55ffefe832ec1c6f48709d2851
+DIST nvidia-persistenced-390.151.tar.bz2 48701 BLAKE2B adc54b184777ffdf00111f2635d4ae55778588d4f986db26591c60ca0137f66cf092b1d89e6bd54a88260251f7f71854bf144f1f64818c34d418c88ec9fbefa2 SHA512 24983016f4ad57e6baf5c89b58215501ca01d5685ac42c0067986f82601acd8e4ef72ac156ad153d65f07714a1cae426ef1629983e23b776067f67658462e8a0
+DIST nvidia-persistenced-470.129.06.tar.bz2 46549 BLAKE2B 4e120e7a3022f43a57356bddde55140b3702b13faa1bde44da724443c695208246507f8c4d596e54a9ce44e4127d23e4edea07120e587b2278c1797bdd5fcd60 SHA512 f1a55427d48ab540e2b7c4cfd834a063a9281337c4d2af4e8fd975508ee67b226bac78d3247eca7ed5138665178f25fa48459a56ac4a8eb815502e40dd5a9b06
+DIST nvidia-persistenced-510.73.05.tar.bz2 47104 BLAKE2B 3013a5b10c85524da63fff23a4c0ebeea98335a698b0dc15977760f71bc9372af333fb1187f262c91b572d3e114a59b2075414f6f1ea8d2167ac45e09c4dcf12 SHA512 e3a6218ac6b68e586abcb0ecc591e101b82753f8e70ac3316c181706a2ba7250125e4a8a09ebac96768d2dfe862ed9bf8c466b760f749a45cca06539213321bb
+DIST nvidia-persistenced-515.48.07.tar.bz2 47155 BLAKE2B 9465e8f86e22f623d3fd242636ae64da944ea302e82a877e453a406767254c9c210b6f8d1069e08e6010d8f182c09825c2748b68cd6d2403d05f8422a811f8f7 SHA512 4a00d4c0a5f7044b9258bcd1970112256f4ddd2a4a7440714f97dc65e9624f68713eb41ade24bc2dffcfca3e9d30652af528c939c1991370572db8384a43fa88
+DIST nvidia-persistenced-515.57.tar.gz 54737 BLAKE2B 6cb9e11da910df5d4e46bc1bccc4a92faa10f1d6c8b78f73ed9b82ab57f2de9b376b7647d0b94b25ad56459b0b47585cfd576faaea0362ea0bf1eb0c4b716e4b SHA512 03421335c9a929bf25b4ebc0ea8274251ae89dc67e123ea29bbd81fa2b3c0b73a711a5b1f5c89a189c87676a9d8009e01bf23f3d626880f610e235dc2f4fd238
+DIST nvidia-settings-390.151.tar.bz2 1109138 BLAKE2B 07e94cf595c00b2b238cc81a99bab2862e4a41b83a3d3f24a9a28ec24ab0a1bd273551f541f685dd548334f4d19c93a3e2a7f2fb05cee653488a1a29988c0bb1 SHA512 00db210471402173c44007760a47905e52a04158ffb0ee09142ad53b2fa4f091e70825191151e2d80ddec2fdbcd722fe922a52efbcfd2c5a2b896e542f0cbbda
+DIST nvidia-settings-470.129.06.tar.bz2 1062306 BLAKE2B 7a61a069df021f39cb2b0ff54e77e5375848f4357aa7cdeeed200e75b902be8ad5b521c218a7461c17e131775a33bca44de416e76873ee568be5e5abd4c67828 SHA512 e54e873388b915b628e66ccb328feed640c619ca6633129db3d58ffd06818f0b2176590753cfcf1f2456fa4837d924d82cdf8cd06e8c84e37d6782086135b2c3
+DIST nvidia-settings-510.73.05.tar.bz2 1075626 BLAKE2B 776713f21faf3eb8101169a11b47d6e9ee0d57884f63277032f50433bc9ddd13e74cedbd31837a73e518df79bd05816c2c58bfd7ae8433705c00c6427902589e SHA512 b8c9bb01d85644f0a64189e54de282f21f5fe6c6ead80e97b8af8bbe5e2e0b64f9d187e75edc1b3ff466293783ec545746a89d8617d327497e637e56a3ab88d0
+DIST nvidia-settings-515.48.07.tar.bz2 1079544 BLAKE2B 76da1e83cdcc052a820cb6bd196848291339ae7f8baf794673b3eb349476a39964e1dc1bd2dce40ebf2308033e729753cbef8ea03dd8f6a9d04fa512f2e0a479 SHA512 3eba90714ebb2b56c269db7ad0bd60b9ff58680767edf137742b31f78ee75b54468b61dba4c9f0727f267aeeb3bbd48de5c933226035f415cbf95b368fe69aa5
+DIST nvidia-settings-515.57.tar.gz 1253956 BLAKE2B b7a9d2443471037f91a1e1f88cfc82e1e575a92100543f1e891615334eb9b511b56c33ace2d1544fff388dbc07ba838c3819a9312e32a7db1f64143bc10511c5 SHA512 e40b66db06e563c4ee3749874137ceab9a10e0562da2c511a3d494467b097479ccc4a3427dbd2955b530111d42d8b14bd6a3ade0644fc772d5856d713140ecc7
+DIST nvidia-xconfig-390.151.tar.bz2 107177 BLAKE2B 47b7b28f70c148c49149d44d20e3e2396c3c78143c687654f90350620a057edc912e1616f930a4212b921cf76e75cfc3ef4155adfd1819141a0ef3185891daef SHA512 9bbabb35a8ea26b0714a4387d8503434681e35297d6c6ff3ee562f18086369fab75caff78f9122da7e11100367fcd62a05a18b0bef797ba7b5c97cd8887c1dcb
+DIST nvidia-xconfig-470.129.06.tar.bz2 108704 BLAKE2B 71ead889bca8503e987bc00c71531a4fd1a779ba6e679da5bee7636bfb4c46ff2984fc3b7feadd296ec45b58730fee52c55e1eedc0b24a4ff0976357eed79b3c SHA512 26955fbcd17e5d2caaadd0ff818cbdf93934d6cec5f29bb43fbc98bf300c9bc745f9e3dd977be1209a5f5a7f812d3fb9b2b33140ffc4b86789477661bb8c49c3
+DIST nvidia-xconfig-510.73.05.tar.bz2 109809 BLAKE2B 4554555b543073281f7b2e3f2d3463f7b4e8a7c8a734663af0d6a3110d432dd8f9e14e4e0efbd93902ae1e8cd1afefd35838f0bf70a5a619b05119acef25aa1a SHA512 bc992cd75e9e757f2e3edf35b38106362de0900085dec059b3b609bca3bc02fcac4a39a1481a7c9ca0e704fe0355e8f9620a1e8cc867e1c341d2b0df2cf47bf0
+DIST nvidia-xconfig-515.48.07.tar.bz2 110220 BLAKE2B 54283c809f4d50337279727c70bed11e98b1422751663a1c77afb250917c28f269cecf6d75c1458051ed09bd826d9fdc7329b332d8e2118e6b3529f6a4e34bc1 SHA512 417bcb829fe578ccecea713780e5d3cbe79798d974ef66741c2b0fe3a87c6a236c719e369af44b297f0c42d82b33af76a61a0e205ad939684b56d258a0d37b0b
+DIST nvidia-xconfig-515.57.tar.gz 144062 BLAKE2B 5f927b1fbbcfc5b5c9d8c166eaed6baeef24c432b5a8d5c1e1033bb92371ecb298cce66a8374eee59fbfdeaef4c0330a6f866735b54066fefed69ed839c7b549 SHA512 380cffbb63a926f9fc23c5924faef9cd026adc162fc6c645854da2a5525ef68fad6a7cdef82f504d413c042e9020e970f37aa9c59d9baf3feddfeddcd4e5761b
+DIST open-gpu-kernel-modules-515.49.05.tar.gz 7408161 BLAKE2B 6fbabbb06f8ebd7605b4d2ab51301236cb3df0a3d301ba3d8b2f8d96a56ca6f88882cc451ea0cd95b9e5d110bc53c409ad7311f788a29861e7cd5b58a33d493f SHA512 daa24d51b9986057c622b15d74185c21b2370a0169cef768a82e9f1a68387b85e547b8695f05c8da9559be0fdd398deadf7fe56c23955b365212091c3db180f9
+DIST open-gpu-kernel-modules-515.57.tar.gz 7408095 BLAKE2B c78130eb8a53ddb7bd7817619a17fe250dc8dd12c084e72c22181b54f1f7ef361d9d2080cd888bcdb05deda818b1bf665adda0d22c2a6bcd85b32682c6b94f49 SHA512 93d59bf0bb1eede40036dd65c8ef956c7b9a79f3a2fe6e87b6f4f16413e52b3c8cdb47aacbcd4c087bd77081a2d35fc1981db93019e352b8a8f85083a9221461
+EBUILD nvidia-drivers-390.151.ebuild 14396 BLAKE2B 9b876bf62df7b01b490d34f44b4f269ec357608e6894938dcfe0dc3ad0780d6c99e5d800cb83b9a82f678712b02b006a5e2ce0cfafdcd992d279522cdf37ffdf SHA512 caec7ddeb0caf1837725b234660818494bf068cd6f756c065082f1e044ddc9d4805ac18b23dd98be1706fee1ff8d9183e5ee7a94d8d2acf3936b88cff571ad80
+EBUILD nvidia-drivers-470.129.06.ebuild 14989 BLAKE2B d2e5e3e33c1a0dc8c0383704bac9cdf1fa7bb553374dee878973452cb524aa2e2271a5cdc3a9bc856141942c32343935f20960be9357b4c86ee0dd75215dd733 SHA512 e11b2b59def6332eedf266d52788dcde5b00472bd2860aafe0bfec8aa77256f70906e9db901533c4ac24ac2d52b7e3b880b50743dde4ad5d9868b2084fe5e99c
+EBUILD nvidia-drivers-510.73.05-r1.ebuild 15394 BLAKE2B 7666157f1fdb6feda74afb97198a7cd1fc0e7564bd4cbb926a09acf45e0a8feb0920f4305a77c52a88efe49f3696ea388988383b5f2e855a2eb3b1df28d8b53e SHA512 932f221b15366e29960916f39f9667460796a95d00cd6d5c00ce0ec3a6025192a3681023ef5ab98db0964edd5e9862e1ac64e8349968a7e305647a6e518a900d
+EBUILD nvidia-drivers-515.48.07-r1.ebuild 17073 BLAKE2B 2fde9341618b2606f951bd16e0fcc901a5c0d753600186218103e45526d001b9a5c81783f474e5082b4ceaaa32edd11478472a96f24b45615d43d8252f646026 SHA512 13d92512ccb60c2c2c9261870713a0f3997c7f06ca4a8280f4b9729ba5931fbc6e15885d30803ee1b1b09a6a17547f3ec13fecd28182ca42dd3257b12e74da7f
+EBUILD nvidia-drivers-515.49.05-r1.ebuild 17072 BLAKE2B f8f7cfb31366ba57ce5da0c815c8a58517e87d76aa3c8c26c64cf95a0e282dde88993105d49a30ce825c89c104108c4ba8eb4692e04da2ca4adaf813c4219b92 SHA512 f72230673163ef4378123b1dd55587da754bb9ab7bbc89028eae05fe50e4da82b4950b908485a73f9c7b0da712f24265a2368fa2239663590c2002d1b6ebb111
+EBUILD nvidia-drivers-515.57.ebuild 17161 BLAKE2B 7ff83ebb61168366d1a18c725d331cc839a1e3aa42d060b0e5da063b8394e0fa1b2b12b5b65f7216a8b0665acd250a945b70a981272783ad14baebf42e51ab40 SHA512 efb64fb1ff59adc6535fddc6338ccc3ba8bc5252b4e7e36af37361b807d14baa04837e7a24b27919be71ab76b4af1829bf052327b2e070986843e871490ea544
MISC metadata.xml 1320 BLAKE2B f8aa8f9a39d6da284b60afb50087acf75744057628e79b77a95e6bebb1e386e9d1a819f41e73d3e94b8ab74322ec8e8b077ad6d2af0804a5c6f20b4dd5f2897d SHA512 9fb939f8c8892ce43afc4f577181474c88a0aae3cc58af57987000b82f6c52f3f7b40fc538fa8eae0d5dbaf1fe3734d84f72fda2106853edd945149b3f2d2747
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-470.conf b/x11-drivers/nvidia-drivers/files/nvidia-470.conf
index 977ef8034929..912eb1392855 100644
--- a/x11-drivers/nvidia-drivers/files/nvidia-470.conf
+++ b/x11-drivers/nvidia-drivers/files/nvidia-470.conf
@@ -10,7 +10,8 @@ blacklist nouveau
#options nvidia-drm modeset=1
# Suspend options. Allocations=0 recommended over =1 unless enable nvidia's
-# systemd sleep services (nvidia-hibernate, nvidia-resume, nvidia-suspend).
+# systemd sleep services (nvidia-hibernate, nvidia-resume, nvidia-suspend),
+# but even then may lead to issues on some setups (keep 0 if in doubt).
options nvidia \
NVreg_PreserveVideoMemoryAllocations=0 \
NVreg_TemporaryFilePath=/var/tmp
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-390.147.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-390.151.ebuild
index 70758e3edab6..9a035a3042b7 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-390.147.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-390.151.ebuild
@@ -1,13 +1,13 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+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.15"
+NV_KERNEL_MAX="5.17"
NV_URI="https://download.nvidia.com/XFree86/"
DESCRIPTION="NVIDIA Accelerated Graphics Driver"
@@ -89,6 +89,7 @@ pkg_setup() {
~SYSVIPC
~!AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT
~!LOCKDEP
+ ~!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 optional nvidia-drm.modeset=1.
@@ -96,6 +97,8 @@ pkg_setup() {
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."
kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
@@ -103,7 +106,7 @@ pkg_setup() {
nvidia(video:kernel)
nvidia-drm(video:kernel)
nvidia-modeset(video:kernel)
- $(usex x86 '' 'nvidia-uvm(video:kernel)')"
+ $(usev !x86 "nvidia-uvm(video:kernel)")"
linux-mod_pkg_setup
@@ -167,7 +170,7 @@ src_prepare() {
}
src_compile() {
- tc-export AR CC LD OBJCOPY
+ tc-export AR CC CXX LD OBJCOPY OBJDUMP
NV_ARGS=(
PREFIX="${EPREFIX}"/usr
@@ -177,7 +180,22 @@ src_compile() {
NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out
)
- use driver && linux-mod_src_compile
+ 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
if use persistenced; then
# 390.xx persistenced does not auto-detect libtirpc
@@ -221,16 +239,16 @@ src_install() {
local skip_files=(
# nvidia_icd(vulkan): skip with -X too as it uses libGLX_nvidia
- $(usex X '' '
+ $(usev !X "
libGLX_nvidia libglx
libnvidia-ifr
- nvidia_icd.json')
+ nvidia_icd.json")
libGLX_indirect # non-glvnd unused fallback
libnvidia-gtk nvidia-{settings,xconfig} # built from source
libnvidia-egl-wayland 10_nvidia_wayland # gui-libs/egl-wayland
)
local skip_modules=(
- $(usex X '' 'nvfbc vdpau xdriver')
+ $(usev !X "nvfbc vdpau xdriver")
installer nvpd # handled separately / built from source
)
local skip_types=(
@@ -252,7 +270,7 @@ src_install() {
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\
-$(usex driver "
+$(usev driver "
Like all out-of-tree kernel modules, it is necessary to rebuild
${PN} after upgrading or rebuilding the Linux kernel
@@ -266,23 +284,23 @@ 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 && usex abi_x86_32 '' "
+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.")\
-$(usex X "
+$(usev X "
390.xx libglvnd support is partial and requires different Xorg modules
for working OpenGL/GLX. If using the default Xorg configuration these
should be used automatically, otherwise manually add the ModulePath
-from: '${EPREFIX}/${paths[XORG_OUTPUTCLASS_CONFIG]#/}/nvidia-drm-outputclass.conf'" '')\
-$(usex x86 '
+from: '${EPREFIX}/${paths[XORG_OUTPUTCLASS_CONFIG]#/}/nvidia-drm-outputclass.conf'")\
+$(usev x86 "
Note that NVIDIA is no longer offering support for the unified memory
module (nvidia-uvm) on x86 (32bit), as such the module is missing.
This means OpenCL/CUDA (and related, like nvenc) cannot be used.
-Other functions, like OpenGL, will continue to work.' '')
+Other functions, like OpenGL, will continue to work.")
Support from NVIDIA for 390.xx will end in December 2022, how long
Gentoo will be able to reasonably support it beyond that is unknown.
@@ -336,8 +354,8 @@ https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
local m into
while IFS=' ' read -ra m; do
! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] ||
- eval '[[ " ${m[0]##*/}" =~ ^(\ '${skip_files[*]/%/.*|\\}' )$ ]]' ||
- eval '[[ " ${m[2]}" =~ ^(\ '${skip_types[*]/%/|\\}' )$ ]]' ||
+ [[ " ${m[0]##*/}" =~ ^(\ ${skip_files[*]/%/.*|\\} )$ ]] ||
+ [[ " ${m[2]}" =~ ^(\ ${skip_types[*]/%/|\\} )$ ]] ||
has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue
case ${m[2]} in
@@ -389,11 +407,13 @@ https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
dosym libnvidia-cfg.so.${PV} /usr/${libdir}/libnvidia-cfg.so
dobin nvidia-bug-report.sh
+
+ # 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
}
pkg_preinst() {
- has_version "${CATEGORY}/${PN}[abi_x86_32]" && NV_HAD_ABI32=
-
use driver || return
linux-mod_pkg_preinst
@@ -404,7 +424,7 @@ pkg_preinst() {
}
pkg_postinst() {
- use driver && linux-mod_pkg_postinst
+ linux-mod_pkg_postinst
readme.gentoo_print_elog
@@ -414,11 +434,4 @@ pkg_postinst() {
ewarn "libraries and may prevent launching GPU-accelerated applications."
use driver && ewarn "The easiest way to fix this is usually to reboot."
fi
-
- if use !abi_x86_32 && [[ -v NV_HAD_ABI32 ]]; then
- elog
- elog "USE=abi_x86_32 is disabled, 32bit applications will not be able to"
- elog "use nvidia-drivers for acceleration without it (e.g. commonly used"
- elog "with app-emulation/wine-* or steam). Re-enable if needed."
- fi
}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.103.01.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-470.129.06.ebuild
index 6cf1485d9a3b..f799d6fa3f55 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.103.01.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.129.06.ebuild
@@ -1,13 +1,13 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+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.17"
+NV_KERNEL_MAX="5.18"
NV_URI="https://download.nvidia.com/XFree86/"
DESCRIPTION="NVIDIA Accelerated Graphics Driver"
@@ -91,12 +91,15 @@ pkg_setup() {
~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
@@ -164,7 +167,7 @@ src_prepare() {
}
src_compile() {
- tc-export AR CC LD OBJCOPY
+ tc-export AR CC CXX LD OBJCOPY OBJDUMP
NV_ARGS=(
PREFIX="${EPREFIX}"/usr
@@ -175,7 +178,22 @@ src_compile() {
XNVCTRL_CFLAGS=-fPIC #840389
)
- use driver && linux-mod_src_compile
+ 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
@@ -214,18 +232,18 @@ src_install() {
local skip_files=(
# nvidia_icd/layers(vulkan): skip with -X too as it uses libGLX_nvidia
- $(usex X '' '
+ $(usev !X "
libGLX_nvidia libglxserver_nvidia
libnvidia-ifr
- nvidia_icd.json nvidia_layers.json')
- $(usex wayland '' 'libnvidia-vulkan-producer')
+ nvidia_icd.json nvidia_layers.json")
+ $(usev !wayland libnvidia-vulkan-producer)
libGLX_indirect # non-glvnd unused fallback
libnvidia-gtk nvidia-{settings,xconfig} # built from source
libnvidia-egl-wayland 10_nvidia_wayland # gui-libs/egl-wayland
)
local skip_modules=(
- $(usex X '' 'nvfbc vdpau xdriver')
- $(usex driver '' 'gsp')
+ $(usev !X "nvfbc vdpau xdriver")
+ $(usev !driver gsp)
installer nvpd # handled separately / built from source
)
local skip_types=(
@@ -245,7 +263,7 @@ src_install() {
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\
-$(usex driver "
+$(usev driver "
Like all out-of-tree kernel modules, it is necessary to rebuild
${PN} after upgrading or rebuilding the Linux kernel
@@ -259,8 +277,8 @@ 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 && usex abi_x86_32 '' "
+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.")
@@ -315,8 +333,8 @@ https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
local m into
while IFS=' ' read -ra m; do
! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] ||
- eval '[[ " ${m[0]##*/}" =~ ^(\ '${skip_files[*]/%/.*|\\}' )$ ]]' ||
- eval '[[ " ${m[2]}" =~ ^(\ '${skip_types[*]/%/|\\}' )$ ]]' ||
+ [[ " ${m[0]##*/}" =~ ^(\ ${skip_files[*]/%/.*|\\} )$ ]] ||
+ [[ " ${m[2]}" =~ ^(\ ${skip_types[*]/%/|\\} )$ ]] ||
has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue
case ${m[2]} in
@@ -363,10 +381,13 @@ https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
systemd_dounit systemd/system/nvidia-{hibernate,resume,suspend}.service
dobin nvidia-bug-report.sh
+
+ # 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
}
pkg_preinst() {
- has_version "${CATEGORY}/${PN}[abi_x86_32]" && NV_HAD_ABI32=
has_version "${CATEGORY}/${PN}[wayland]" && NV_HAD_WAYLAND=
use driver || return
@@ -393,7 +414,7 @@ pkg_preinst() {
}
pkg_postinst() {
- use driver && linux-mod_pkg_postinst
+ linux-mod_pkg_postinst
readme.gentoo_print_elog
@@ -425,13 +446,6 @@ pkg_postinst() {
ewarn "https://www.nvidia.com/object/IO_32667.html"
fi
- if use !abi_x86_32 && [[ -v NV_HAD_ABI32 ]]; then
- elog
- elog "USE=abi_x86_32 is disabled, 32bit applications will not be able to"
- elog "use nvidia-drivers for acceleration without it (e.g. commonly used"
- elog "with app-emulation/wine-* or steam). Re-enable if needed."
- 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"
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-510.68.02.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-510.73.05-r1.ebuild
index e888f6de08a4..cba5ee54b035 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-510.68.02.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-510.73.05-r1.ebuild
@@ -7,21 +7,22 @@ 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.17"
+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? ( https://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run )
- arm64? ( https://us.download.nvidia.com/XFree86/aarch64/${PV}/NVIDIA-Linux-aarch64-${PV}.run )
- $(printf "https://github.com/NVIDIA/%s/archive/refs/tags/${PV}.tar.gz -> %s-${PV}.tar.gz " \
+ 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}{,})"
# 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"
+KEYWORDS="-* amd64 ~arm64"
IUSE="+X abi_x86_32 abi_x86_64 +driver persistenced +static-libs +tools wayland"
COMMON_DEPEND="
@@ -54,7 +55,7 @@ RDEPEND="
)
wayland? (
gui-libs/egl-gbm
- >=gui-libs/egl-wayland-1.1.7-r1
+ =gui-libs/egl-wayland-1.1.9*
media-libs/libglvnd
)"
DEPEND="
@@ -93,12 +94,15 @@ pkg_setup() {
~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
@@ -168,7 +172,7 @@ src_prepare() {
}
src_compile() {
- tc-export AR CC LD OBJCOPY
+ tc-export AR CC CXX LD OBJCOPY OBJDUMP
NV_ARGS=(
PREFIX="${EPREFIX}"/usr
@@ -179,7 +183,22 @@ src_compile() {
XNVCTRL_CFLAGS=-fPIC #840389
)
- use driver && linux-mod_src_compile
+ 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
@@ -320,8 +339,8 @@ https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
local m into
while IFS=' ' read -ra m; do
! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] ||
- eval '[[ " ${m[0]##*/}" =~ ^(\ '${skip_files[*]/%/.*|\\}' )$ ]]' ||
- eval '[[ " ${m[2]}" =~ ^(\ '${skip_types[*]/%/|\\}' )$ ]]' ||
+ [[ " ${m[0]##*/}" =~ ^(\ ${skip_files[*]/%/.*|\\} )$ ]] ||
+ [[ " ${m[2]}" =~ ^(\ ${skip_types[*]/%/|\\} )$ ]] ||
has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue
case ${m[2]} in
@@ -373,14 +392,15 @@ https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
# MODULE:powerd extras
if use amd64; then
systemd_dounit systemd/system/nvidia-powerd.service
-
- insinto /usr/share/dbus-1/system.d
- doins nvidia-dbus.conf
+ dodoc nvidia-dbus.conf
fi
+
+ # 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
}
pkg_preinst() {
- has_version "${CATEGORY}/${PN}[abi_x86_32]" && NV_HAD_ABI32=
has_version "${CATEGORY}/${PN}[wayland]" && NV_HAD_WAYLAND=
use driver || return
@@ -407,7 +427,7 @@ pkg_preinst() {
}
pkg_postinst() {
- use driver && linux-mod_pkg_postinst
+ linux-mod_pkg_postinst
readme.gentoo_print_elog
@@ -439,13 +459,6 @@ pkg_postinst() {
ewarn "https://www.nvidia.com/object/IO_32667.html"
fi
- if use !abi_x86_32 && [[ -v NV_HAD_ABI32 ]]; then
- elog
- elog "USE=abi_x86_32 is disabled, 32bit applications will not be able to"
- elog "use nvidia-drivers for acceleration without it (e.g. commonly used"
- elog "with app-emulation/wine-* or steam). Re-enable if needed."
- 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"
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-515.43.04.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-515.48.07-r1.ebuild
index 9dc25eafb693..2a68ea99fdb1 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-515.43.04.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-515.48.07-r1.ebuild
@@ -7,7 +7,7 @@ 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.17"
+NV_KERNEL_MAX="5.18"
NV_URI="https://download.nvidia.com/XFree86/"
DESCRIPTION="NVIDIA Accelerated Graphics Driver"
@@ -23,7 +23,7 @@ S="${WORKDIR}"
LICENSE="NVIDIA-r2 BSD BSD-2 GPL-2 MIT ZLIB curl openssl"
SLOT="0/${PV%%.*}"
-#KEYWORDS="-* ~amd64 ~arm64" # beta version, keeping unkeyworded
+KEYWORDS="-* ~amd64 ~arm64"
IUSE="+X abi_x86_32 abi_x86_64 +driver kernel-open persistenced +static-libs +tools wayland"
REQUIRED_USE="kernel-open? ( driver )"
@@ -57,7 +57,7 @@ RDEPEND="
)
wayland? (
gui-libs/egl-gbm
- >=gui-libs/egl-wayland-1.1.7-r1
+ =gui-libs/egl-wayland-1.1.9*
media-libs/libglvnd
)"
DEPEND="
@@ -91,18 +91,20 @@ pkg_setup() {
use driver || return
local CONFIG_CHECK="
- BACKLIGHT_CLASS_DEVICE
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
@@ -191,7 +193,7 @@ options nvidia NVreg_OpenRmEnableUnsupportedGpus=1' "${T}"/nvidia.conf || die
}
src_compile() {
- tc-export AR CC LD OBJCOPY
+ tc-export AR CC CXX LD OBJCOPY OBJDUMP
NV_ARGS=(
PREFIX="${EPREFIX}"/usr
@@ -203,7 +205,22 @@ src_compile() {
XNVCTRL_CFLAGS=-fPIC #840389
)
- use driver && linux-mod_src_compile
+ 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
@@ -344,8 +361,8 @@ https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
local m into
while IFS=' ' read -ra m; do
! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] ||
- eval '[[ " ${m[0]##*/}" =~ ^(\ '${skip_files[*]/%/.*|\\}' )$ ]]' ||
- eval '[[ " ${m[2]}" =~ ^(\ '${skip_types[*]/%/|\\}' )$ ]]' ||
+ [[ " ${m[0]##*/}" =~ ^(\ ${skip_files[*]/%/.*|\\} )$ ]] ||
+ [[ " ${m[2]}" =~ ^(\ ${skip_types[*]/%/|\\} )$ ]] ||
has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue
case ${m[2]} in
@@ -397,9 +414,7 @@ https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
# MODULE:powerd extras
if use amd64; then
systemd_dounit systemd/system/nvidia-powerd.service
-
- insinto /usr/share/dbus-1/system.d
- doins nvidia-dbus.conf
+ dodoc nvidia-dbus.conf
fi
# symlink non-versioned profile for nvidia-settings in case
@@ -409,7 +424,6 @@ https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
}
pkg_preinst() {
- has_version "${CATEGORY}/${PN}[abi_x86_32]" && NV_HAD_ABI32=
has_version "${CATEGORY}/${PN}[wayland]" && NV_HAD_WAYLAND=
use driver || return
@@ -436,7 +450,7 @@ pkg_preinst() {
}
pkg_postinst() {
- use driver && linux-mod_pkg_postinst
+ linux-mod_pkg_postinst
readme.gentoo_print_elog
@@ -473,13 +487,10 @@ pkg_postinst() {
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"
- fi
-
- if use !abi_x86_32 && [[ -v NV_HAD_ABI32 ]]; then
- elog
- elog "USE=abi_x86_32 is disabled, 32bit applications will not be able to"
- elog "use nvidia-drivers for acceleration without it (e.g. commonly used"
- elog "with app-emulation/wine-* or steam). Re-enable if needed."
+ 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
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.62.29.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-515.49.05-r1.ebuild
index cab98353f284..ee0dd200d9d4 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.62.29.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-515.49.05-r1.ebuild
@@ -7,26 +7,30 @@ 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.15"
-NV_PIN="470.103.01"
+NV_KERNEL_MAX="5.18"
+NV_PIN="515.48.07"
DESCRIPTION="NVIDIA Accelerated Graphics Driver"
HOMEPAGE="https://developer.nvidia.com/vulkan-driver"
SRC_URI="
https://developer.nvidia.com/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}{,})"
+ 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 BSD BSD-2 GPL-2 MIT ZLIB curl openssl"
SLOT="0/vulkan"
KEYWORDS="-* ~amd64"
-IUSE="+X abi_x86_32 abi_x86_64 +driver persistenced +static-libs +tools wayland"
+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:=
@@ -52,7 +56,8 @@ RDEPEND="
x11-libs/libXext[abi_x86_32(-)?]
)
wayland? (
- ~gui-libs/egl-wayland-1.1.7
+ gui-libs/egl-gbm
+ =gui-libs/egl-wayland-1.1.9*
media-libs/libglvnd
)"
DEPEND="
@@ -91,21 +96,31 @@ pkg_setup() {
~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
@@ -147,24 +162,38 @@ src_prepare() {
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/conftest.sh || die
+ -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 LD OBJCOPY
+ tc-export AR CC CXX LD OBJCOPY OBJDUMP
NV_ARGS=(
PREFIX="${EPREFIX}"/usr
@@ -172,10 +201,26 @@ src_compile() {
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
)
- use driver && linux-mod_src_compile
+ 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
@@ -202,6 +247,7 @@ src_install() {
[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
@@ -216,11 +262,11 @@ src_install() {
# nvidia_icd/layers(vulkan): skip with -X too as it uses libGLX_nvidia
$(usev !X "
libGLX_nvidia libglxserver_nvidia
- libnvidia-ifr
nvidia_icd.json nvidia_layers.json")
$(usev !wayland libnvidia-vulkan-producer)
libGLX_indirect # non-glvnd unused fallback
- libnvidia-gtk nvidia-{settings,xconfig} # built from source
+ 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=(
@@ -231,7 +277,7 @@ src_install() {
local skip_types=(
GLVND_LIB GLVND_SYMLINK EGL_CLIENT.\* GLX_CLIENT.\* # media-libs/libglvnd
OPENCL_WRAPPER.\* # virtual/opencl
- DOCUMENTATION DOT_DESKTOP .\*_SRC DKMS_CONF # handled separately / unused
+ DOCUMENTATION DOT_DESKTOP .\*_SRC DKMS_CONF SYSTEMD_UNIT # handled separately / unused
)
local DOCS=(
@@ -315,8 +361,8 @@ https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
local m into
while IFS=' ' read -ra m; do
! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] ||
- eval '[[ " ${m[0]##*/}" =~ ^(\ '${skip_files[*]/%/.*|\\}' )$ ]]' ||
- eval '[[ " ${m[2]}" =~ ^(\ '${skip_types[*]/%/|\\}' )$ ]]' ||
+ [[ " ${m[0]##*/}" =~ ^(\ ${skip_files[*]/%/.*|\\} )$ ]] ||
+ [[ " ${m[2]}" =~ ^(\ ${skip_types[*]/%/|\\} )$ ]] ||
has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue
case ${m[2]} in
@@ -324,6 +370,7 @@ https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
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
@@ -347,7 +394,7 @@ https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
dosym ${m[4]} ${into}/${m[0]}
continue
fi
- [[ ${m[0]} =~ ^libnvidia-ngx.so ]] &&
+ [[ ${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
@@ -363,10 +410,20 @@ https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers"
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}[abi_x86_32]" && NV_HAD_ABI32=
has_version "${CATEGORY}/${PN}[wayland]" && NV_HAD_WAYLAND=
use driver || return
@@ -393,7 +450,7 @@ pkg_preinst() {
}
pkg_postinst() {
- use driver && linux-mod_pkg_postinst
+ linux-mod_pkg_postinst
readme.gentoo_print_elog
@@ -425,11 +482,15 @@ pkg_postinst() {
ewarn "https://www.nvidia.com/object/IO_32667.html"
fi
- if use !abi_x86_32 && [[ -v NV_HAD_ABI32 ]]; then
- elog
- elog "USE=abi_x86_32 is disabled, 32bit applications will not be able to"
- elog "use nvidia-drivers for acceleration without it (e.g. commonly used"
- elog "with app-emulation/wine-* or steam). Re-enable if needed."
+ 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
@@ -440,8 +501,5 @@ pkg_postinst() {
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."
- elog
- elog "This version of ${PN} only supports EGLStream which is only"
- elog "supported by a few wayland compositors (e.g. kwin / mutter, not sway)."
fi
}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-515.57.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-515.57.ebuild
new file mode 100644
index 000000000000..a61e696555bb
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-515.57.ebuild
@@ -0,0 +1,506 @@
+# 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"
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="https://www.nvidia.com/download/index.aspx"
+SRC_URI="
+ amd64? ( https://us.download.nvidia.com/XFree86/Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run )
+ arm64? ( https://us.download.nvidia.com/XFree86/aarch64/${PV}/NVIDIA-Linux-aarch64-${PV}.run )
+ $(printf "https://github.com/NVIDIA/%s/archive/refs/tags/${PV}.tar.gz -> %s-${PV}.tar.gz " \
+ 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 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.10
+ 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 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
+
+ # 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
+
+ insinto /usr/share/dbus-1/system.d
+ doins nvidia-dbus.conf
+ fi
+
+ # 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
+}
+
+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
+}