summaryrefslogtreecommitdiff
path: root/x11-drivers
diff options
context:
space:
mode:
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/Manifest.gzbin4715 -> 4718 bytes
-rw-r--r--x11-drivers/nvidia-drivers/Manifest27
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-470.conf2
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-470.239.06.ebuild438
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-535.161.07.ebuild522
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-550.54.14.ebuild501
6 files changed, 1488 insertions, 2 deletions
diff --git a/x11-drivers/Manifest.gz b/x11-drivers/Manifest.gz
index 916a7cb719b9..f041437729e7 100644
--- a/x11-drivers/Manifest.gz
+++ b/x11-drivers/Manifest.gz
Binary files differ
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest
index 615ce0bcb63c..68576d1a03c4 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 1272 BLAKE2B 842aff5a34a6f6e62a914ac42a5e11c9f620e580303c470057cec261f0804f2a9254a3d4928c2dbd1ae992e71d30c0880a5bcf3e89e725ae918738ebe001911f SHA512 615b42ffdaf070ac191b9dcd4b17ca261aef1eb1ed45514a5bdfae1d900202ae6b7218f0dc037800bb51eb6a3b96aecaa4aaecc1c349b3439fdec3640a3586fa
+AUX nvidia-470.conf 1291 BLAKE2B dd0a427857d029643bc8a900bd4f3841ec1d8af198e0b930d76ada4f16efe54462218e3f203c8bd05bc751e10ab650e033fb6e990c9da485e407b457a0d84416 SHA512 b52a28f08f673ade3f5bdfe3e3b8d826cf07baf17ea4ab139c401e46647410f9f41755bfd8efb16fa5e9cbfea7e2d0034d150dd021b381527e7db0a833e17ae6
AUX nvidia-545.conf 1597 BLAKE2B 5d25a34c141bd78f565f39eed0de06296d3758ee276aed61e8464f3b2aa435235760a514d896f1b131d392e72f6b942a7977d21edefe1efcb2de91c5cc2e8482 SHA512 19c6cc73dc488660fbc54ae9ca981606629f30f68379f8e8a062340289253257a5daec459d18b967e8b455feddf67629e37309a124287278d082e52d560646a8
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
@@ -22,56 +22,81 @@ AUX nvidia-settings-390.144-raw-ldflags.patch 468 BLAKE2B bf4c00a76351e6c3d1587b
AUX nvidia-settings-530.30.02-desktop.patch 406 BLAKE2B 63f645d5c9f76349b405c61327bc4f6d44e0716b4ec4c2f1aa012505638be0a329bc9589812d1f164641e4725dd15ac652eed0992161e767325b1310d9cd0718 SHA512 ff0fed69d7d36b2f67f9382055490a031ef8e834119bb18b0f71d1265afe92fad44cb11d6fabc5e3750a434c51e4660cfaa3347d062036d975fd341967187494
DIST NVIDIA-Linux-aarch64-525.147.05.run 262738232 BLAKE2B 742feded05f659fa9965b2eebcc6a269b0355d08b6f2a686dad47c1acf2c20a359f9a9c33184ab2d51044b8823535bd7606180e31d348f362a016fad74cf476b SHA512 d1d9e49e16ee6cc69340a3458566f89fee7b63effdd8cae3e55e40cdfbd35d1e87b958769fd3b2ce5ab29596d88c3ac68189232d7a1dad8c16773faedcf5b568
DIST NVIDIA-Linux-aarch64-535.154.05.run 269669314 BLAKE2B e5d8c74304d9e555dc9c867455b7e7d6157eab38316f79d233b5528a23f91ddbaf41e693168faf67af94a1c0d8aa8b0e5686bad31f2ea9f999fe5e72de176da9 SHA512 78ba2e9a0112d80f019d272c464d2b9e4cf735edbe80de33c97bab5d6dba6f29aed271113edbde95def984ebbddea4f1f80da533337cd94561f620ecdfc3a4ef
+DIST NVIDIA-Linux-aarch64-535.161.07.run 269759554 BLAKE2B 1f2fa0b9b4d535198778cc443dc262add2f9071a60e39714fb9e35b73db34f50043b55eb9cf645a50f55191abc81825c0e733e2bd7bfa8753a1668f9d5f7c607 SHA512 bb96a28b45197003480ae223c71a5426ef5258a31eaa485cab0cf4b86bed166482734784f20c6370a1155f3ff991652cac15f1b1083d2fb056677e6881b219e2
DIST NVIDIA-Linux-aarch64-545.29.06.run 255826178 BLAKE2B 9299c91a99e02d01d9e91e9baecbc0cc5a085886d64b94e0047ef2591f9e6d309a072d7003a70c5c976906642730f013fbf968b17acd6e8fe8e73f25ab0566b3 SHA512 10c92fd02b1f452f79bb9431197e701e103ca65cc7386cc8e8a05ae5af94f0173310997690fe1809dfb19193f108bd482485942ca11342ec35650bd74947e8c5
DIST NVIDIA-Linux-aarch64-550.40.07.run 235818826 BLAKE2B 0065b78fc98db27e9478c57aa66f1f0c7f172d2373028be9cfe40f652b195acb2863ffb9421b33ab4272ed4d03ff8d54b2aab4d35ee1abaa85dbb684ec911f8f SHA512 d0c7e735bdd5d2a193c10176691dbc23ddf46ca4bc31897f767c26c28f115ffd8cde65f5437038140c66d4009418b448929054990d9a77dbbbdc49160976e6d1
+DIST NVIDIA-Linux-aarch64-550.54.14.run 236034202 BLAKE2B cdeb8dd56a09bda3c72ed20c2ee266ea12c1c6e84d458c458dbf18addf7fbf9900431961db51424bfd9bad27fbd65dad5f8b2a9db26415c59faa17b4b1b2c225 SHA512 b1d6716b56d05fc0a9a20e567ae4160ebac66330f3f279779ca75be6d6b5d6153daeb5d3f1902f89432a86a8bbbda0a1b775a30be6715af1f8b8fc142e42a45f
DIST NVIDIA-Linux-x86-390.157.run 49417041 BLAKE2B 435b5e0e60468cc74b41cc5d9b5bb0105d29c11a2d408457835212a96519c9334ecf19278b36749d3ff7f498f5b0ae45a2efae2d428703dac21245c62f1efebe SHA512 dae9ac2c12f9ad90f7441e00e01a984147c577892421911d7f67f6a31e616ac1cb7d434bc9c7f58fbd9b8ae909521b5bece607a63c79588c0bb9d99c6bad5fb0
DIST NVIDIA-Linux-x86_64-390.157.run 85835541 BLAKE2B 44b855cd11f3b2f231f9fb90492ae2e67a67ea3ea83c413e7c90956d38c9730a8bd0321281ae03c6afce633d102f5b499aed25622b9bfd31bdd2c98f0717e95b SHA512 4780503a4cff0180b1b1f37d20a6ba3438dd78b51fa7f69b98d35521835e5d61099129746929d51d63afa2d47b672b3e145e1e1897584dc3799e7f822c5b3a0a
DIST NVIDIA-Linux-x86_64-470.223.02.run 270557540 BLAKE2B fc766d193baf5ef89994188e1589b98429d4e6ddfb925ac2126b5db3d18096a2504303aa79b23401ca8b21878fe76057c3b4e1baa06b76d069fae322634aea9a SHA512 66e470343b6f0c04703c81169cd03674be06b5315db738cab64308ec073b5bf5b87508b58ac8b6288d10e95307072d99e874e7884207a323a3dd08887bbc8750
+DIST NVIDIA-Linux-x86_64-470.239.06.run 272849102 BLAKE2B 556c8f7058b83d8c4c7ccb2f62619ac001f7c3868b80ee091e2949fb7b35e136fec83c15efcf4dd4c99d312f8c36f83c76e250d18d091e053355396b8347af11 SHA512 92bdfb11db405071cd58deed2a0853448932657e256258e0a0bda5069f00485e2b6e49b4a0eeff499a4991be4f884273f3564c164110b1ed1f5d924506f13e2d
DIST NVIDIA-Linux-x86_64-525.147.05.run 414135234 BLAKE2B 77a12905771772804a5e5cf36df3e5032fe0160ac7c8a1b4ea002f65dac3732d9c900c1787a3e26d08b951a8de4893467cc7a80d424e017990d12669354d4191 SHA512 0c7b31715fce6a7bd77a2d9f9a3dca54a929a7790d748051576f62cdaeaeb6a9d0f3fbb13f0b20a51966bdb9470acdbc9ee529a9e84f38a9c834a1bd28d81773
DIST NVIDIA-Linux-x86_64-535.154.05.run 341691657 BLAKE2B 63a56771eea30d467e5a8eb4ab4746e80bda7f055c02bb130cf188b6fc30bc91427c903ac43db0837cc3855cb29f44dc1832afd76d3e39ba111e83f6f60e9d2d SHA512 29c54814ed1d93abb7888c821feb14cc419ca76db70f0a57ee56777b7b48f252303562efb8ebe026b9ce6ae624064e9e185414fbe8e5818c241de9fb576ad480
+DIST NVIDIA-Linux-x86_64-535.161.07.run 341770032 BLAKE2B e6d741a59d6cc9273f889f4eddc5a69d23b2a9f5c8b167c7f95e6fcdd084b7fefb8c35689fe84e61a1e46cccf5ff990cb47608435d3867a2165673abdf7e2a81 SHA512 4e8dd709157c15519f01a8d419daa098da64666d20a80edf3894239707ff1e83b48553f3edc5d567109d36e52b31ac7c0c7218ea77862a04e89aa3cc1f16a5ba
DIST NVIDIA-Linux-x86_64-535.43.28.run 341943540 BLAKE2B 845ead98e8609cdde80ceb25aab0a982e001e5fea3d05002a4d37faafd755895444f06d125620969e45ebd5e439d6834fd0f615a2755ed88de367ad9c2598664 SHA512 27e3a2e2ab117929f1bd18002d87067d2b386d131a7a10ec6099925f341c5a56ba8e8617f861cc60c02cae6065e518c0ec27f2d0845657250c258e0313e919f5
DIST NVIDIA-Linux-x86_64-545.29.06.run 324708574 BLAKE2B 4b6ef76942f34422a366eb226a75f0e2fa17c8eda58b239fcff7a217bce0e237677a762603553120b49bbf458be763461266f5454bf1b37d99905701cc1d1aa5 SHA512 b80e1643471c48477479a48d2e8a9c4a241874d6207ddeaccdeedd3f9f1121d79be90be07d37df094fa6f7cc5806857bf2368337ba40cb5cfe6d04c117c5c45d
DIST NVIDIA-Linux-x86_64-550.40.07.run 306517958 BLAKE2B 770d3d1b6778ce69a7ad28da963bc992fbec3eeee41bb29f507af569fda51b1e201fd5def9a8755827a749fe890ba4542f375bc43abb2a79c75fff482ed24813 SHA512 7e16f09b1924d3c375dc05710b5bb7c4d94c4b5c459e9b9c88a8f864d7719b84495ca89a27b2bb4ff08bbac1a10d810dc249050b07f2c804319792ac9bbbdad4
+DIST NVIDIA-Linux-x86_64-550.54.14.run 306861083 BLAKE2B 13ebc9f2900c4300687a2806dc12c2fc14b516097e279511b64c6f7a321223fabe408887378ba08ec2a28b9af37f8adb2d3b689b0f8a7ca44e47c731e50f497a SHA512 65fe0a3498e1b46368cfc7995fea720e4ba6373b0a74f4fc6280fbf75b2697948adf5b52b7d068b8df5ddbd347df7c0361db7e1a1fdc0d9fcfc6f478888936be
DIST NVIDIA-kernel-module-source-525.147.05.tar.xz 10140684 BLAKE2B a8ce7c1d1047be9154fd67366c5bfa13a19f03c883f24ee35043d17d517e83303420449750f9e7adc7142f61564dd5d8e5a19884dbe540514979df6381ff7f1f SHA512 58920b26081a68e05178176edb0ce8ac4a5d365492adf51d6ffe57102385ff08abc5e14741e0500419e62a752441c97051d60939245eea64b039cc7efca15b7d
DIST NVIDIA-kernel-module-source-535.154.05.tar.xz 12482832 BLAKE2B 07bf08068f7f0d597a3527970032ab3c204e1540d48494e992eb1c3fce030c68289e0512ea481e791bddd3a0e5cfc505adfe7e724c9f768d0d12cf657273103e SHA512 129829abbecd7cfa2b6fafedde606d38e12036695a8176b0d7c138a63c467917e2ca60552d813d584a18f2e68d0465a52d88fb32c405c2c841c690f9e2d265f8
+DIST NVIDIA-kernel-module-source-535.161.07.tar.xz 12494976 BLAKE2B a1e57af4ae2cb8100d3d52e5117fa3dee50f1b97e4fce59b1e1a87885765b32c4d661cfb2735f60f479d9513bb5de0a3bee0ca424a798473da9cfb22abea4c39 SHA512 8c53decfd2152480a4ef0b4a3ba5a58d6c2ea18642cca01f1e41b97ba34ba23e7a8bc8d563f1e1e7f2278f7835028d317f3ae2dabba063a9e826c1c6aaea5624
DIST NVIDIA-kernel-module-source-545.29.06.tar.xz 12679556 BLAKE2B b842951e05646eff172607000d4a1da9f31b94a90430e7aab247900ef73d9180ad448828b802d4fb6d54b2361fcfcbec56f3c0621bdb504d2e522b9132e055f2 SHA512 35af4ec2c2975c8d7550b410d155c9469857c47b33f0bd364b346f67d5b39d521df261132bd03658a1b66262b880d86cd139aa3cb25758c2abdf6a10928e7894
DIST NVIDIA-kernel-module-source-550.40.07.tar.xz 13403688 BLAKE2B bfe488c0e6852ca00ecfa07214a14165b3ca27f56cedebf25d2c50f87292ed4893d2a74ded1b0a60f1aabcd8553cbbc11320cf79d3d603ed0d1fdacff0f8346d SHA512 35b34a11d9417aa22334608172415fcd45766f6c1d80d4352f37ae7dd3077899ef6e2e656310ab4eea5a6141b3dd5b30b15b2abc23dbea7bc2d2e2ce3dadfa28
+DIST NVIDIA-kernel-module-source-550.54.14.tar.xz 13417836 BLAKE2B 991970dd664f2af971991f943944493bbbe21ee34d4efdcb92d5844db34645cfb6fc8c01e1266a185b39d6ef2151968e62aab8dae634002fc895e2e47f1f20dc SHA512 e4d5778f2d7e975bd95fe930743aa5f21b8409d448f5a74e13dcdc1da288c93fbb3cd5c0a5f6eb43b35bf3c675f58f45cb02437001ba1b39b99ce03581955a9e
DIST nvidia-installer-390.157.tar.bz2 150323 BLAKE2B 8058ca87a6dea956d564af9f7eab9b1fc82b1f2382bd5cb2f6d97cbe2e19292533522d5f8f2eacbeb16520372715fcb72f8f9b0998962af5d4e75522c8d74524 SHA512 93a7ece648602157496c8e27a88864ede341a100f5328a4c1a25faf8f0b94d252060e5e2f71d0c302fd0566c10773c30b76b3b5f431d8039b71c90a7969f7d7e
DIST nvidia-installer-470.223.02.tar.bz2 146233 BLAKE2B 8a9b1396289a0a9ca381084e9e4e0256d8b05e12f75b60ad324bd3e9f1797126a7149631ab081d1abaa74727524d372b6cc4fc99fa4646a366bd34e889116534 SHA512 ba7121ece68b5596238ae9b15b51fad8f753144859e314ea3b25eece7b583b86cf1d4e0c777152a4ba74eefadb6c3005152096b0049f7ba273ca06e6581ffccb
+DIST nvidia-installer-470.239.06.tar.bz2 146286 BLAKE2B c288c0455e6426d0e18ab7b9f5c0437af50420bdf86cebd798dd3aca463341e831808ecb297d9c3233d50a4e9dac435f8114d6eb2ed2fcb6c39be7824c3dc95c SHA512 e60f6d295649557c3c316174fb37ca0ae6e57604bc3880a3b5929b33ff6d7cc8ef74a118f9075795b81d36b6a4107a02fbad0acbca18b78d05e5d9e7998c82a8
DIST nvidia-installer-525.147.05.tar.bz2 147986 BLAKE2B 982e1a95bc255b960913cba1e78675845db472534af6cae054c74ebf82b1e4407211166249b164299f0f81ec643b7c1190e5960ac3c7844322ca42c23dc0a90a SHA512 171f9c235b2bf41dc40a875576e8cad0f4c78ba574e72db3f1ff3644701f327916121ae493cea1aed93f4826d96ef1833e98502d2d4272f4f536bab03f20e5cb
DIST nvidia-installer-535.154.05.tar.bz2 148509 BLAKE2B e86663adb2b11355997675bf636e48818441c1bce294287c01ce87fde70441918eb4888939d8bd5f0ce743c00d8a5bf3cf6448395a8dfcbe3abfc86898c32636 SHA512 af7e57b2d3f2763c1fa0e8cc264b090b0a350b4d69e80eecf03c636a5df73cebf826dbe3b01200f113fb86811b1ba8bd468130262e28e5cb0fe43829017148dc
+DIST nvidia-installer-535.161.07.tar.bz2 148590 BLAKE2B 046f8153c7164799d4a608c913b615c94cb5acbb16728b33b84e8f09bf4358410c929af1f460afc78bc9c026f178b7c57967a58665f5892fdcf96811931381ef SHA512 3196f9527cb3e6d13e37cb3043298ddabd845f825560ae98fde5a54763c6e017d1d933f789cf39f82f9238708bb08244fb5b8210529e09aa19694e231c1773f8
DIST nvidia-installer-545.29.06.tar.bz2 155580 BLAKE2B a738741659225b5c5395fd7c588c1db8ae0fcc405bdfe8691297aa3414707daf5d9a7457fdec4556bea1f9df8f40765948da2c4a39f1d1a799b77170f75df00a SHA512 a5ee3f927a1ed21dc74fba7b37330db6ec132ece623bd2a0c8b0dcf7926ba981f5f119cc37b4fd1938e5ff5da85261bea2f59b2e54937d7e954a80fa01718715
DIST nvidia-installer-550.40.07.tar.bz2 155535 BLAKE2B 680fa517e97b007f553976128a3c8a2e77db68f66fafab9434681d75e73daa5fa177fd83b25c3f1388b0d99a0702971ce52fc44e546c7362bd4fe378b1b956d1 SHA512 bbd5c58eff01f7cada865b5b32e53d6480499994ddc886b3d97eb59a1b78c1a683922999523ad11fcc50e5c7ac872dc01be2e11c99ef61f70f4cee36eb5f5f7b
+DIST nvidia-installer-550.54.14.tar.bz2 155430 BLAKE2B 8d72718b5ddf0440a707322d923cfd3a044aa05f7c0eb45337d60d32975ea89c07e69b241aa09133606f73051c3e18b7aabfe3c3ca139deb6cfec9e4e75b9004 SHA512 a721682518ee575c6a7b4ad6c27a7be064c593eeaf0f1af96f87b8b4192a9d0b4e5e36cb71982a2c3e27cd02bb3780048f57471daef04ea285a98d47e492751d
DIST nvidia-modprobe-390.157.tar.bz2 35306 BLAKE2B 80d202b39c2f95ec0f909712c2e101483af50124092c32efb33bd98ff58ddfb97b737ff07f1ddc941f688c1b4c26a15f392566d522e18506771f10422fcd571c SHA512 109bbe24a3758b568ea65fe1e9d78f69fae6108ec0497b796c885a3912825fe04ffd7389a3e22987f1a10a2926bf6eaa384faabc59478aa3ee244dd3ac91c6d3
DIST nvidia-modprobe-470.223.02.tar.bz2 38796 BLAKE2B f3d7dfaa21a2d65e0ef18144c00342b85dfc7d1a0bc8ae6d242139da5ec6a99ab65cb28ee559db3e6df6c9d5c1cb31185608a8b8f95c716ae28279972f0892df SHA512 e111c75c91f0369da77eb1793be93e785b9f658c537f5af9e1631370d66a6328d464aab13c788d02bf5f9ff7977e76c97aea9432b70f55e7024f8d0461031743
+DIST nvidia-modprobe-470.239.06.tar.bz2 38783 BLAKE2B d572bfb18b0ff99606a5ca909c0f4e45709d69dbcbba43ce37e570d4dfa2dae11fab352129879418af2af26d8ad20eb976e9c2e4d181895bdbec00beb61a9fc6 SHA512 9293b33b4c14e5f873846fba3526059b6605d70a4d7e35c7032c3ed89cc7a6a71e04b344695093d97ed3280ec2094988105144e8c66dc037ed5eb8292022eec0
DIST nvidia-modprobe-525.147.05.tar.bz2 40439 BLAKE2B 3029d39cce928b3f6a6baeb57391ddd412a35e36d880b3036dedf083b6df979ec531360421bdd347aa223821006ae3610b115277804c22614a221258944ea37f SHA512 25939b278bd2354ff787f1d10771d19baa6c691c5243bc647a556e40c4f38c16f6a248b2ce0b4a328d80b768147a188cb2d8b54e39fbfa4cf436d1f3b1b6440f
DIST nvidia-modprobe-535.154.05.tar.bz2 40711 BLAKE2B c31de0caffac865f2d1c9535af7a60660eb742c3b8eedf9b0e9a0c8623c90378da635066dbfcc66df5fdd85da124bd13ce90cef727e898fe059a6d615d9c0ae4 SHA512 0d18e6de5cac243bf4ac26e25a5502bbadadd8ea8db8d639071eb7ad9a68ff76ff3b2ab233bff26a3e2d4f61ad8824baef0d6d9e4baa8b989442779e64f44f48
+DIST nvidia-modprobe-535.161.07.tar.bz2 40692 BLAKE2B 3bf7ee5f743b097e0172dd619ee59d1de3a0195287e20ac3538bd1d63e354a0f8dbda2d5a60efb0dc1fd66ca7149c7da02273bf59b32a992045f4c90b18812b8 SHA512 44191af90d97f0264dc399d54ddea852e9149d6de4b6a772cb50a1d93dfe79ab7fd8915215a6f016a84691245685dd50745b3524b51db7646bad68416f924fad
DIST nvidia-modprobe-545.29.06.tar.bz2 41148 BLAKE2B fc9099e61d38f7bb18eb66ef5097bd27ee134ccd8752d8d19c3be274b5671be54fc446bf6df01d63683ced9c8183f5fd24f09e5d04501a5f4775ad2d24747679 SHA512 ad0eae9fed0e8ec75bdae29dff01c4d90b595650991cc7cffbf1069c4ed257665d50f38374ba3f365d18f69c902fbcf69ee526053d3ac37a1156f5531a64ff66
DIST nvidia-modprobe-550.40.07.tar.bz2 41282 BLAKE2B 74d81380f07ab9540a8e208d7b8505e7f7757649a51434ceeb30c5e832a9ab3975c5d46d3a4fd678e7d125465918eb7a280871d9908cc7f04cf3127eda43b5b7 SHA512 d984220a2e65da4f5e27c743960a91e56ee9135aad0924b3265a107c4e67cfb3a2c723fb24676db86aace129c30aef21747ffe2499db168428131d46652f06ac
+DIST nvidia-modprobe-550.54.14.tar.bz2 41560 BLAKE2B eb7d39349a2056ed146228e07ef41f9db8632172e8c63f067c35897a9b271178f5458e71e47e2819ff18f0d96e93f317cd7d98553dffa56977363c0fc2ec30fa SHA512 a98a391f134d67f03e0366e23e65b6a8ddcabbd727ebca63f06998ef2f2a758d1b8bb0f16a120fe02823e122ec8592ee8e8878ef43cb355999497397fc4e6b41
DIST nvidia-persistenced-390.157.tar.bz2 48654 BLAKE2B 2cf6c92da90acff55e8c180a06b0c6a29d48be9fd8ca3c541202fd14f0697220fba6b66452942aa7ae7cc8821f5c5eb9fa8f7a31d2248624e5f9141d83a176b8 SHA512 70f0707ed6f2b877e69ef90cf782f66cbc9d2071db53ca09ceb7b89427b0fe176708517340621fa251539b7d481b238adeeb60261674eed74de1f62db6dbb72e
DIST nvidia-persistenced-470.223.02.tar.bz2 46659 BLAKE2B d024e3d4d0062789eb3fb49325434737741b347e262571725d24d0e7e9d6a92316cd6e94d1d34b2b3ced8ace3ce7b5c88d3387dae162af29fb745ff94ed69b7c SHA512 c8b8d04390579d885076c401cbe27e1e103bc82fa4fd0f4182590721df9999078b6358f762f6c00a98c1aeda64aea4790a11556f26d4a68a55bdc889eb580a03
+DIST nvidia-persistenced-470.239.06.tar.bz2 46554 BLAKE2B 41d8ba35f68dd4609cd215249913790b150c22410c3c6b3675d7003136b660f427e14d48abb9495851d18028042ecbd1cf0557bad877fe5b0e5e6cf15d90b77c SHA512 69ff1cf92e90e5ef87d44764abf165cf3540d321264962dc09e093bb9c1e767f468e9d1e989f43a14d1ba47fc24f1e34252bf478743a80f51373d4bd20baf6fa
DIST nvidia-persistenced-525.147.05.tar.bz2 48089 BLAKE2B a9cbf291fae9d7af50a9633fa5e197939674825e72150883b4e89e72165a512c164b4d79522f5b6c329e980e1145d958ba592202e5b73edfd32b149457714982 SHA512 e9685d330d32a5e9864b45a7e099e78ef873188972700747c158c3ab1fc95ea036726c793207fba33d4a50f17b92802366ce1ad38dd110b86ee923f48e622cfe
DIST nvidia-persistenced-535.154.05.tar.bz2 48573 BLAKE2B 873a322fca3483b120892b26b50f9a758d8d3d67d2d4a76509bf7d6f5e346ab21cebf50f989fe30fac23c4f99a70a942c9b0cf256bd43b752115ad8d4f6d9834 SHA512 9c91f5ff1a94422761b8d14d33fe8b764597542af9a7b9ce9b39b4f94b8909d745bd1abae74eecb1a7a66fd4eed0312e71a64325b9f9037a0b5631251260abbd
+DIST nvidia-persistenced-535.161.07.tar.bz2 48575 BLAKE2B 77f0c28f2ee87c6e46c3555f272fca3cc01e6561f24277247c53cd5999820bd1327f3b0cfd3dae3e341239c35c8dc820bcce2c184b6e8911fc5762def2f34fda SHA512 00736047b9ad61e11e11c9b133d8d80d005bcdcd64ecb1a0bcb15ebf8e02110069a11581eabba989952a481819f8ddb4c9d88a85365dd1c3a550fb4535299a2d
DIST nvidia-persistenced-545.29.06.tar.bz2 49046 BLAKE2B a31eb1de6c019f33cb3084627a7f79e216abbcfffbf89f8b043ee86aa9210fee441d9145b941f543bd8b9e369f5ab5a833817f7159a6013b06a7aedec78d2270 SHA512 816ee602aaae2f02ae7d8d0412fed951560e4fc29a7f4cdac3aeddf6bc0e3b10d14dc473f9ffeb7fff9ebacc889008bf502b71a12fd1df1e29cdcae2ca930c78
DIST nvidia-persistenced-550.40.07.tar.bz2 49661 BLAKE2B 2fee744cb3b2cf16dbca12df8904acc93e86f32c738925b74c61dc2d51f1b6016452a2a2238bf22294d7cb6a2677ebd17a9d5a25220ae08ec78f97941dda408e SHA512 8bf07b5680403f555beb9c1e1eb9163e30fdbabfe3b73d71832624daa9891523acd2db759220250344e19a1fe1385814942802d4004eaa216fcf644f85488fa2
+DIST nvidia-persistenced-550.54.14.tar.bz2 49686 BLAKE2B d8078e38af4ae44ee448807bd5d9de5b68edf57aae9cf01e04f2c9443a6855ccdbbd4eefaba96c425a3a3f9f52686ec750d4b4484d0e8afab915b52edd92f50a SHA512 f72f5453be272ffa0218fff590fda8a8b607872e4c67e7d9f90618c0451a57b6cc376cdf938300d56a044a9608b748a29aa627bcd11ca610e0dcb4ed8e4f1003
DIST nvidia-settings-390.157.tar.bz2 1108938 BLAKE2B d9ec1ab5d7f157d74627272adf752a671dd17e2ede02069437b6180b927fe315b15cc6416d584ab2f038b76fe01e5b64514a834f24d88ac16676e55205fdecdd SHA512 b16699009bf56a1ff3b623a528c58061c4f5a2c5c4a373756a07bcd667743a1df7c733a572d2d0baa835a904ac2fda8a5c85890dcc00c3a0f223e0467aea902d
DIST nvidia-settings-470.223.02.tar.bz2 1062462 BLAKE2B 1d1403d3c2a0a242bdb61403a533b7e7ae2876ff5440fcc837706e428371dc07008e1ea4616cff00dafa426782efadd7013acddd2e3bad92a3e5aa44f8e416c4 SHA512 3fb21133cb4bc48d564d04f0bfedeb4527d7c031f3ff8a185eb87ed9ed008fa77863f65fc3f8aa6bfd6674a8ccc707b90761b271809ffd1ba543bb71dcc01954
+DIST nvidia-settings-470.239.06.tar.bz2 1062310 BLAKE2B 1154421feafe40a0ce0e980374a60f325801f52a03af9f96ea9411c61de6c7bf8049dd2750204ae53a570ebe600c7972cdefcee84886fb2a6c170affd00d51bc SHA512 a1f70491bb8bb06a802c3db36858c8956fb93db463b46c13bd8dc4fa81ff4aea01bb53ebbc9b4d18da241c4442e8d17cb4204fdcbb5a8ad3e23275b7205bf3c1
DIST nvidia-settings-525.147.05.tar.bz2 1088088 BLAKE2B cea74a20ed8208f99cb586bd40fe2cafeec55ca2db19b2c0691d3bcabadc09941ff8288e940582e63f10d8f6cd7e8813e1c5776bf65cdc7b6ee291a8b3a7e28f SHA512 9c29a477b32db3f4324d7c6d28b8da9f3de5286e39f8c67bae88a93c3d3ee0c3f0a0f3e0c29c1fa8ba01b7311623569df27e349d6148ed70b3fd42ebd36f0dcd
DIST nvidia-settings-535.154.05.tar.bz2 1094300 BLAKE2B 1fbba9f1ffb44dacf9659c773d8cb4f6cda9d50529e3c50a2a08f62b5e89a5a678dbcfd2ab6dec55b51ef471ba6071b21b5798949bae8a71e1746f8023082b46 SHA512 8d9c27225b688d89bbf7fab6ed10ad59f035e9a5a102d12c00e34312f4991041d34475ff11a931565381112ac02361bb70aff9ad6b7642d08550ffaafb7996b4
+DIST nvidia-settings-535.161.07.tar.bz2 1094800 BLAKE2B 77931240f932a9b4e2566f81b9c16141e2cfd0d074583e1a91cb0f674f49ec5a63401250b10d48e274e27850da6d704c823375f4b3121e33ffa3db032ac2b756 SHA512 2cb7061dfa636f23309f67614d3fff37c9b16d7f0b5554d559cb837ed0bcc46463819f15885c4f92cf1b125cf3e143b07d6592354cdf4b8ebd777f5b6cdb0d6e
DIST nvidia-settings-545.29.06.tar.bz2 1095301 BLAKE2B f0022219d3e8b4ab3d5b2f75d5ab792883d82526d3a7cc5773bfc8468c14345b056a8b1db6ab47f3c3be1ba75c198b548cf9e382e7a8e3150d6045ff72af9618 SHA512 6af294920315bb1d86c607e4339410cde7170b0374cf89e94e9f929b9639ce952f8db6da002f252b6717a74110c4385f2f35f16ec52a21ea164f85127048842c
DIST nvidia-settings-550.40.07.tar.bz2 1099521 BLAKE2B 3acbb3654eba654e32535251d42c14c9f87627761efbcc7914e0cf19072fdbf00146e83db4c07a585c3023dec2f5d36a55a8e83cf9c7933e798a5977577380dc SHA512 5ef5f5593d91c1bfdd79ab5bfc50f6a2c3c246d991a56b81158845f37845acc9122d9659b048629c82c5e5e70c3c243c03f85c90816fc261a6dfd07a870f55d7
+DIST nvidia-settings-550.54.14.tar.bz2 1099188 BLAKE2B e87659448d579113a86d715b373a8d2eb0f47369c6d1d83aac433773ca76bffec82d968cfe12a8a3f0f1e51fee313101e6fc91c089b6669cd1448975ea97887b SHA512 c61a0653852818b69158e03a4a21370f0692e92dc7f8c9058d8ad209de5977db95c4b0d376c9e0a2a53a3b203560190a15cee7c296650f291faf24388476d827
DIST nvidia-xconfig-390.157.tar.bz2 107399 BLAKE2B 0cbb3b1ba508ddc3ba4a161c290b31bf7a67f67880bdbd01171a962c5fa97ca945b1ef17932403f8589309380743f1da632c728d8accb6d4e56dbd895e7486bb SHA512 50b390811c9bf091b14add41f886925b17496b41006b7d3981d2398caa65cf5db8a579c8cebed78278384bf3acc629befb07b54339c61abcc75852c0dcb8b8ca
DIST nvidia-xconfig-470.223.02.tar.bz2 109065 BLAKE2B 824a4cfbfc2bc56005a4c7fae79268c4fa52aec935c30c2b39e3ee595826731e5472a3a25e6781ada5576e132fe91728d8c3902dd3c24755bed548f7e007a0a1 SHA512 c32974ca248854977a5a3107750c24321ddc269a5e95f3ef81e0de6854504fe08df2033240c6225a6b49d38cb2b8edebd71a07064c99f09add371cba67fbce1d
+DIST nvidia-xconfig-470.239.06.tar.bz2 108687 BLAKE2B e400a59b4626b37abd12893438774737f18500771c8fd8d63e7060e80463a8599f7248fda542096a5e9bcac700595cec151494695e68dc7667c89509eeb14646 SHA512 aec235f65c9f568c6717a37fe0f16b8100ffbba7731975bac5c17802b70f1ec1ff235e08c09a0bc9de0c63a705018ce76acc8252a39f56c300b9e2a556f3612a
DIST nvidia-xconfig-525.147.05.tar.bz2 110987 BLAKE2B 49116c8922b5c14eaa88b6230a824447609a885f7d97df28ed4f3b9a2e146a213f31f9f184aadd38c4c9f692f0a1476d0db0704b55947ce95cbbeebcb9a683da SHA512 4b7c02de6080924eee5ee9fe770e632404b380529e5ee40a8d0f259a5c96d6915e83c26113b3c65434ce461c959347b3651abc15de7c40def16c46bb3f6faeae
DIST nvidia-xconfig-535.154.05.tar.bz2 110612 BLAKE2B 2197351ea9b33a79db6e4e8e877d28914c8b5be90a90512721f10fdde8e51e3155123e1bbba9804cf812c9876413221b96cb06d619aae5a7becf06c3d5935c01 SHA512 c9abd2bf0ba275f2054636331f76dbedf85a72a24cb7f706d09a6d6c61fc2e4e689e8aca9a4b182197dc93f2fc0360dbbc071befb6cd7c781dbc5363e95669bf
+DIST nvidia-xconfig-535.161.07.tar.bz2 111040 BLAKE2B 3ecfc95beb88671f463cb48285ba8c2d70901028e8a6571c7c0041ceeebc6f40ee648f09289f1a3e342a565504841265a7f3cc080f4ac192951a494c5289aced SHA512 3edc2b643f62c091493797e5584479af19e8d0f64b6b88dcb183eaa12217de87f67f1facd56881bbfcd5fa6dde51f3880133273c86039d63a93eae222dd04166
DIST nvidia-xconfig-545.29.06.tar.bz2 110995 BLAKE2B 6c32bc45215f3d0ae65f5430eea46d93ec85b8b10d1d85f3ea40dfd358587cbc2b5493341e4da190586d2da5278abbd9dfb9b907f159448143715a8835d736fb SHA512 cfb3b1e1c96062d2e32c6fcf22410f8f3977b56097ef97de1e01ce325a381ad77e77a0e33a5deeb2889cc7dc74aa13c1a0796800696d60e5e1dcee7a7779d52b
DIST nvidia-xconfig-550.40.07.tar.bz2 111172 BLAKE2B bfa5deedbb521ac60424aed72f18d1e78680ba15e09b2567206fb32ac39e71ffc421c02a9d02835180ce39a05ee64fed5b3af47178caf6465cf56218a4c3133e SHA512 ac5c6ffd1216f9008253ac4bfcb7f78566f895de20bbfeac5b5bca8404c9194e8c78c48e745603f2c93360a1b005144d7d59e8a879e2de3202102082da81b35e
+DIST nvidia-xconfig-550.54.14.tar.bz2 111161 BLAKE2B 332647c44ab3debc046c1c57a3f896bb58e925e97ffef8b8c535acaae9c353b9ad9fc945b9973f5050d046e7460ce1fa3d505fd5c923943d938b2d4f0f1acc0d SHA512 0be3db50a32e76def20d01d3be76b12b3799f3a385a8006b2eceb7cfa37917abd077b18b8cd45a8087c708e2d80faf2653199f629a1894808ca91b22e28c1e37
DIST open-gpu-kernel-modules-535.43.28.tar.gz 12787974 BLAKE2B acadf01f499f4b456877dea7cccefe6b858f513a30bd4e4a94dd948bd0686535d59208d7d8033aabc9e1e1351e68d763fe0777e908665b0ca9b59e369f3de0b7 SHA512 534213a82f2db7a40d1134b34b240e50fd3b1b69c0a392f99b6cfd7fe52900c78a9648c107b1fc4809cb985105f427e1dc27afc6c693fb302e39a6936866336a
EBUILD nvidia-drivers-390.157.ebuild 14621 BLAKE2B 1220d88746beb2785b85ad587ceb26d11e9955ef95512d4f29a1f7d065396841848b9f1e6531e2c30da01fc63612e5d3167a244f5175205a932454e47499a4a1 SHA512 632aca465943c7b4fbdf8627854a6fe952195fbb997b050d8c0a5d141af18e9eac7b9ad2664d5c59aa2c9238416cd36525518a030451ed778a88b37cb3fc707f
EBUILD nvidia-drivers-470.223.02.ebuild 15481 BLAKE2B ac510b8084054dc907baa82c4a7b895164bd00721b171ceee6edfefaffc2d7132454977c142cb9cac81bcd5a58db4f0f9bd1a29c0ee7f659ed3073d3d9e2b497 SHA512 86a24c43c1923999973ca53e6f52eeb0eaa7344ba6db8b999e66b623fd5b26557070d53a3e3979967164171ba01d0de30d471fbb6f0b423f32ea6c57817a9325
+EBUILD nvidia-drivers-470.239.06.ebuild 14336 BLAKE2B ee410447f64c6e15d439526fa7297172b423b03b4048bdacfc875c73917ba6110dd150494972ede351668419eb7128f1e83f394150ddf9903c28535f11afc069 SHA512 e0e6541d63dbbae71fa2df6486f1934950579d60ae109e1e9634b24810a34f8bf58c833d4a335bb2fbd431b5793f37a2e48ad2544a18cd25fa2d639d169ac9d7
EBUILD nvidia-drivers-525.147.05.ebuild 17649 BLAKE2B c587c8ec8f356844b95c4f5dc77cc4c4c684f79c8b67ad745e472c4760925c1e4b736dfaa111fa462ccfe6ebb7e20792937a374aaa347e697180f0087a341bb8 SHA512 4dfd604a3692d4330999617bb96f02dfec0ced6a07dd393113a3ee9dee8c3aa1b9792c3bf17af1d5da6181cbf3c79873ac2cd78ce7b13fb00041696d3f0a6ef1
EBUILD nvidia-drivers-535.154.05.ebuild 17858 BLAKE2B 65c011c652f78b4550bb1271b55fd7bd3ad4a4c36a94e1a5697aec4509c49b5dd9964a23a7e3bdb778813e1d85264bcab2a9a77bc6d6777af5ca6f20e0cc183f SHA512 13e258403750bd3c3063beb03f40c6b4801b9b94e8a6e1ddd9cb2890178bf2e6f2efd75d7e73abf745d00db961df4af2436d8354c853f6dd6805b8fe985c3309
+EBUILD nvidia-drivers-535.161.07.ebuild 17553 BLAKE2B e282e9b406dd0d9e04db18d8b7437857d15c9f52f407253940dcce2a26a5d64196d7f171cb1b804b0a2be43573810f99a1b2ea948e7eb0a1c1e1407cae87acbd SHA512 4910018cbfe9bf4953165114585a213460c7398a0d2595d1ccac1daea93df3fb68f9ec86a8e27e732162bd01dd6f438d66c9b0ab8d37e2fc2cb60b46a4363e6f
EBUILD nvidia-drivers-535.43.28.ebuild 17662 BLAKE2B 4c88a564627af01ab4932860f145df6710371b0081aca80b7137b8115754598f17030b9614020f78a53bf70e16633a28086b2d82a71df49e3ecaa82f58f68fe4 SHA512 6b578e9088dedda3d13ffbb9fcfc235ca800c717ae0e0b9a08893e44c9af955190997bb5c62f76f36ada7fe8976eb9e256a3663f1ae8c725408fde9ff01da4cb
EBUILD nvidia-drivers-545.29.06-r1.ebuild 17090 BLAKE2B de7d7c6294676a69f7b92687d74b2cd3d8a70b3b421d9cd67cc6f1a1e8fc7253b4e2cfce14da38ac0abc08363bd4e77a85f1f0bf1bc24debae9de7b6e1116c5f SHA512 8b1ebc8ffea44df335ce05e6c8fea7fac8d82b32eb95606d096ed5c292fe67c5726ccc051524051783dd67c15fc4227a04726326ee1d7472be2e3250a11be2d0
EBUILD nvidia-drivers-550.40.07.ebuild 16727 BLAKE2B cbdd6a9a7624b7638dd32cf2798b8405e7e43510c9ba0004b174181bf481982f836e2512b2e236d5be5268e0fd8014b73cd71885aad39bb13f16ab0de10b7dfb SHA512 472952948120eb3270d7588cd81e9b57899440b00e74b408b4121bc792dc610efef56290d0b68529c3602aab0295f20bc5e604f9f400bd8f2254d03fcf5f3760
+EBUILD nvidia-drivers-550.54.14.ebuild 16642 BLAKE2B efa29732c6c432422947aa555eba3960150cb09691c30d3d0f187046738920e723cbb1677a00a4c3d6efd8a881748a3cd5ecab3ab5620ee07d70a1c016743080 SHA512 7392737327c5810c1d72e7a7966e23410557fff07a20bb0d40088e626fa7b5b637aa00de9c2bff51669e50a3136f1016fd3dd30be77f72495f27bfa6c1616400
MISC metadata.xml 1407 BLAKE2B c0d284fde68808892e17edbb2b1e43b059388306eae874276d4a3f336a5dc2a41cc025a834466b2ad96112b550e0bc0f759f683bd6c58ba64a41cbc8ddebd92f SHA512 39be6982c1177961706ba6426861752339373241c959fd06504e314c9f0313677ff7c7341e7d9fb41cad2b768b99f6474e087b9813016d33cd6a9c77567c50cb
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-470.conf b/x11-drivers/nvidia-drivers/files/nvidia-470.conf
index 912eb1392855..74126224c6ce 100644
--- a/x11-drivers/nvidia-drivers/files/nvidia-470.conf
+++ b/x11-drivers/nvidia-drivers/files/nvidia-470.conf
@@ -5,7 +5,7 @@
# Comment out the following line if you wish to allow nouveau.
blacklist nouveau
-# Kernel Mode Setting (notably needed for EGLStream/Wayland)
+# Kernel Mode Setting (needed for wayland but is hardly usable with legacy 470)
# Enabling may possibly cause issues with SLI and Reverse PRIME.
#options nvidia-drm modeset=1
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.239.06.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-470.239.06.ebuild
new file mode 100644
index 000000000000..9a558b2485f1
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.239.06.ebuild
@@ -0,0 +1,438 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MODULES_OPTIONAL_IUSE=+modules
+inherit desktop flag-o-matic linux-mod-r1 multilib readme.gentoo-r1
+inherit systemd toolchain-funcs unpacker user-info
+
+MODULES_KERNEL_MAX=6.7
+NV_URI="https://download.nvidia.com/XFree86/"
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="https://www.nvidia.com/download/index.aspx"
+SRC_URI="
+ ${NV_URI}Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${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"
+IUSE="+X abi_x86_32 abi_x86_64 persistenced +static-libs +tools"
+
+COMMON_DEPEND="
+ acct-group/video
+ 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}
+ sys-libs/glibc
+ X? (
+ media-libs/libglvnd[X,abi_x86_32(-)?]
+ x11-libs/libX11[abi_x86_32(-)?]
+ x11-libs/libXext[abi_x86_32(-)?]
+ )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ static-libs? (
+ x11-base/xorg-proto
+ x11-libs/libX11
+ x11-libs/libXext
+ )
+ tools? (
+ media-libs/libglvnd
+ sys-apps/dbus
+ x11-base/xorg-proto
+ x11-libs/libXrandr
+ x11-libs/libXv
+ x11-libs/libvdpau
+ )
+"
+BDEPEND="
+ sys-devel/m4
+ virtual/pkgconfig
+"
+
+QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*"
+
+PATCHES=(
+ "${FILESDIR}"/nvidia-drivers-470.141.03-clang15.patch
+ "${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 modules && [[ ${MERGE_TYPE} != binary ]] || return
+
+ local CONFIG_CHECK="
+ PROC_FS
+ ~DRM_KMS_HELPER
+ ~SYSVIPC
+ ~!AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT
+ ~!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 nvidia-drm.modeset=1 if used.
+ 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="CONFIG_X86_KERNEL_IBT: is set and, if the CPU supports the feature,
+ this *could* lead to modules load failure with ENDBR errors, or to
+ broken CUDA/NVENC. Please ignore if not having issues, but otherwise
+ try to unset or pass ibt=off to the kernel's command line." #911142
+
+ use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
+
+ linux-mod-r1_pkg_setup
+}
+
+src_prepare() {
+ # make patches usable across versions
+ rm nvidia-modprobe && mv nvidia-modprobe{-${PV},} || die
+ rm nvidia-persistenced && mv nvidia-persistenced{-${PV},} || die
+ rm nvidia-settings && mv nvidia-settings{-${PV},} || die
+ rm nvidia-xconfig && mv nvidia-xconfig{-${PV},} || die
+
+ 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
+
+ sed 's/__USER__/nvpd/' \
+ nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \
+ > "${T}"/nvidia-persistenced.service || die
+}
+
+src_compile() {
+ tc-export AR CC CXX LD OBJCOPY OBJDUMP PKG_CONFIG
+ local -x RAW_LDFLAGS="$(get_abi_LDFLAGS) $(raw-ldflags)" # raw-ldflags.patch
+
+ # latest branches has proper fixes, but legacy have more issues and are
+ # not worth the trouble, so doing the lame "fix" for gcc14 (bug #921370)
+ # TODO: check if still needed on bumps given this branch is supported,
+ # and reminder to cleanup the CC="${KERNEL_CC}" in modargs if removing
+ local noerr=(
+ -Wno-error=implicit-function-declaration
+ -Wno-error=incompatible-pointer-types
+ )
+ # not *FLAGS to ensure it's used everywhere including conftest.sh
+ CC+=" $(test-flags-CC "${noerr[@]}")"
+ use modules && KERNEL_CC+=" $(CC=${KERNEL_CC} test-flags-CC "${noerr[@]}")"
+
+ 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)"
+ NV_USE_BUNDLED_LIBJANSSON=0
+ NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out
+ XNVCTRL_CFLAGS="${xnvflags}"
+ )
+
+ local modlist=( nvidia{,-drm,-modeset,-peermem,-uvm}=video:kernel )
+ local modargs=(
+ CC="${KERNEL_CC}" # for the above gcc14 workarounds
+ IGNORE_CC_MISMATCH=yes NV_VERBOSE=1
+ SYSOUT="${KV_OUT_DIR}" SYSSRC="${KV_DIR}"
+ )
+
+ # temporary workaround for bug #914468
+ use modules &&
+ CPP="${KERNEL_CC} -E" tc-is-clang && addpredict "${KV_OUT_DIR}"
+
+ linux-mod-r1_src_compile
+ 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
+ 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}
+ [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=(
+ $(usev !X "libGLX_nvidia libglxserver_nvidia libnvidia-ifr")
+ libGLX_indirect # non-glvnd unused fallback
+ libnvidia-gtk nvidia-{settings,xconfig} # built from source
+ # skip wayland-related files, largely broken with 470 at this point
+ libnvidia-egl-wayland 10_nvidia_wayland libnvidia-vulkan-producer
+ )
+ local skip_modules=(
+ $(usev !X "nvfbc vdpau xdriver")
+ $(usev !modules 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 # 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
+ newins "${FILESDIR}"/nvidia-470.conf 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
+ ;;
+ 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 ]] &&
+ 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
+
+ # 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 /dev/char wrt bug #904292)
+ # 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/char"'
+}
+
+pkg_preinst() {
+ use modules || return
+
+ # set video group id based on live system (bug #491414)
+ local g=$(egetent group video | cut -d: -f3)
+ [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')"
+ sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die
+
+ # try to find driver mismatches using temporary supported-gpus.json
+ for g in $(grep -l 0x10de /sys/bus/pci/devices/*/vendor 2>/dev/null); do
+ g=$(grep -io "\"devid\":\"$(<${g%vendor}device)\"[^}]*branch\":\"[0-9]*" \
+ "${ED}"/usr/share/nvidia/supported-gpus.json 2>/dev/null)
+ if [[ ${g} ]]; then
+ g=$((${g##*\"}+1))
+ if ver_test -ge ${g}; then
+ NV_LEGACY_MASK=">=${CATEGORY}/${PN}-${g}"
+ break
+ fi
+ fi
+ done
+ rm "${ED}"/usr/share/nvidia/supported-gpus.json || die
+}
+
+pkg_postinst() {
+ linux-mod-r1_pkg_postinst
+
+ readme.gentoo_print_elog
+
+ if [[ -r /proc/driver/nvidia/version &&
+ $(</proc/driver/nvidia/version) != *" ${PV} "* ]]; then
+ ewarn "Currently loaded NVIDIA modules do not match the newly installed"
+ ewarn "libraries and may prevent launching GPU-accelerated applications."
+ if use modules; then
+ ewarn "Easiest way to fix this is normally to reboot. If still run into issues"
+ ewarn "(e.g. API mismatch messages in the \`dmesg\` output), please verify"
+ ewarn "that the running kernel is ${KV_FULL} and that (if used) the"
+ ewarn "initramfs does not include NVIDIA modules (or at least, not old ones)."
+ fi
+ fi
+
+ if [[ $(</proc/cmdline) == *slub_debug=[!-]* ]]; then
+ ewarn "Detected that the current kernel command line is using 'slub_debug=',"
+ ewarn "this may lead to system instability/freezes with this version of"
+ ewarn "${PN}. Bug: https://bugs.gentoo.org/796329"
+ fi
+
+ if [[ -v NV_LEGACY_MASK ]]; then
+ ewarn
+ ewarn "***WARNING***"
+ ewarn
+ ewarn "You are installing a version of ${PN} known not to work"
+ ewarn "with a GPU of the current system. If unwanted, add the mask:"
+ if [[ -d ${EROOT}/etc/portage/package.mask ]]; then
+ ewarn " echo '${NV_LEGACY_MASK}' > ${EROOT}/etc/portage/package.mask/${PN}"
+ else
+ ewarn " echo '${NV_LEGACY_MASK}' >> ${EROOT}/etc/portage/package.mask"
+ fi
+ ewarn "...then downgrade to a legacy[1] branch if possible (not all old versions"
+ ewarn "are available or fully functional, may need to consider nouveau[2])."
+ ewarn "[1] https://www.nvidia.com/object/IO_32667.html"
+ ewarn "[2] https://wiki.gentoo.org/wiki/Nouveau"
+ fi
+}
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-535.161.07.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-535.161.07.ebuild
new file mode 100644
index 000000000000..9af6f87626fb
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-535.161.07.ebuild
@@ -0,0 +1,522 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MODULES_OPTIONAL_IUSE=+modules
+inherit desktop flag-o-matic linux-mod-r1 multilib readme.gentoo-r1
+inherit systemd toolchain-funcs unpacker user-info
+
+MODULES_KERNEL_MAX=6.7
+NV_URI="https://download.nvidia.com/XFree86/"
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="https://www.nvidia.com/download/index.aspx"
+SRC_URI="
+ amd64? ( ${NV_URI}Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run )
+ arm64? ( ${NV_URI}Linux-aarch64/${PV}/NVIDIA-Linux-aarch64-${PV}.run )
+ $(printf "${NV_URI}%s/%s-${PV}.tar.bz2 " \
+ nvidia-{installer,modprobe,persistenced,settings,xconfig}{,})
+ ${NV_URI}NVIDIA-kernel-module-source/NVIDIA-kernel-module-source-${PV}.tar.xz
+"
+# nvidia-installer is unused but here for GPL-2's "distribute sources"
+S=${WORKDIR}
+
+LICENSE="NVIDIA-r2 Apache-2.0 BSD BSD-2 GPL-2 MIT ZLIB curl openssl"
+SLOT="0/${PV%%.*}"
+KEYWORDS="-* ~amd64 ~arm64"
+IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced powerd +static-libs +tools wayland"
+REQUIRED_USE="kernel-open? ( modules )"
+
+COMMON_DEPEND="
+ acct-group/video
+ X? ( x11-libs/libpciaccess )
+ persistenced? (
+ acct-user/nvpd
+ net-libs/libtirpc:=
+ )
+ tools? (
+ >=app-accessibility/at-spi2-core-2.46:2
+ dev-libs/glib:2
+ dev-libs/jansson:=
+ media-libs/harfbuzz:=
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:3[X]
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+ x11-libs/pango
+ )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ dev-libs/openssl:0/3
+ sys-libs/glibc
+ X? (
+ media-libs/libglvnd[X,abi_x86_32(-)?]
+ x11-libs/libX11[abi_x86_32(-)?]
+ x11-libs/libXext[abi_x86_32(-)?]
+ )
+ powerd? ( sys-apps/dbus[abi_x86_32(-)?] )
+ wayland? (
+ gui-libs/egl-gbm
+ >=gui-libs/egl-wayland-1.1.10
+ media-libs/libglvnd
+ )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ static-libs? (
+ x11-base/xorg-proto
+ x11-libs/libX11
+ x11-libs/libXext
+ )
+ tools? (
+ media-libs/libglvnd
+ sys-apps/dbus
+ x11-base/xorg-proto
+ x11-libs/libXrandr
+ x11-libs/libXv
+ x11-libs/libvdpau
+ )
+"
+BDEPEND="
+ sys-devel/m4
+ virtual/pkgconfig
+"
+
+QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*"
+
+PATCHES=(
+ "${FILESDIR}"/nvidia-drivers-525.147.05-gcc14.patch
+ "${FILESDIR}"/nvidia-kernel-module-source-515.86.01-raw-ldflags.patch
+ "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch
+ "${FILESDIR}"/nvidia-settings-390.144-raw-ldflags.patch
+ "${FILESDIR}"/nvidia-settings-530.30.02-desktop.patch
+)
+
+pkg_setup() {
+ use modules && [[ ${MERGE_TYPE} != binary ]] || return
+
+ local CONFIG_CHECK="
+ PROC_FS
+ ~DRM_KMS_HELPER
+ ~SYSVIPC
+ ~!LOCKDEP
+ ~!SLUB_DEBUG_ON
+ !DEBUG_MUTEXES
+ $(usev powerd '~CPU_FREQ')
+ "
+
+ 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="CONFIG_X86_KERNEL_IBT: is set and, if the CPU supports the feature,
+ this *could* lead to modules load failure with ENDBR errors, or to
+ broken CUDA/NVENC. Please ignore if not having issues, but otherwise
+ try to unset or pass ibt=off to the kernel's command line." #911142
+ use kernel-open || CONFIG_CHECK+=" ~!X86_KERNEL_IBT"
+
+ 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."
+
+ linux-mod-r1_pkg_setup
+}
+
+src_prepare() {
+ # make patches usable across versions
+ rm nvidia-modprobe && mv nvidia-modprobe{-${PV},} || die
+ rm nvidia-persistenced && mv nvidia-persistenced{-${PV},} || die
+ rm nvidia-settings && mv nvidia-settings{-${PV},} || die
+ rm nvidia-xconfig && mv nvidia-xconfig{-${PV},} || die
+ mv NVIDIA-kernel-module-source-${PV} kernel-module-source || die
+
+ default
+
+ kernel_is -ge 6 7 &&
+ eapply "${FILESDIR}"/nvidia-drivers-535.43.22-kernel-6.7.patch
+
+ # 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 !powerd || # file is missing on arm64 (masked)
+ sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die
+
+ # use alternative vulkan icd option if USE=-X (bug #909181)
+ use X || sed -i 's/"libGLX/"libEGL/' nvidia_{layers,icd}.json || die
+
+ # enable nvidia-drm.modeset=1 by default with USE=wayland
+ cp "${FILESDIR}"/nvidia-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 PKG_CONFIG
+ local -x RAW_LDFLAGS="$(get_abi_LDFLAGS) $(raw-ldflags)" # raw-ldflags.patch
+
+ 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}
+
+ 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=(
+ IGNORE_CC_MISMATCH=yes NV_VERBOSE=1
+ SYSOUT="${KV_OUT_DIR}" SYSSRC="${KV_DIR}"
+ )
+
+ # temporary workaround for bug #914468
+ CPP="${KERNEL_CC} -E" tc-is-clang && addpredict "${KV_OUT_DIR}"
+
+ linux-mod-r1_src_compile
+ CFLAGS=${o_cflags} CXXFLAGS=${o_cxxflags} LDFLAGS=${o_ldflags}
+ fi
+
+ emake "${NV_ARGS[@]}" -C nvidia-modprobe
+ use persistenced && emake "${NV_ARGS[@]}" -C nvidia-persistenced
+ use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig
+
+ if use tools; then
+ # avoid noisy *very* noisy logs with deprecation warnings
+ CFLAGS="-Wno-deprecated-declarations ${CFLAGS}" \
+ emake "${NV_ARGS[@]}" -C nvidia-settings
+ elif use static-libs; then
+ # pretend GTK+3 is available, not actually used (bug #880879)
+ emake "${NV_ARGS[@]}" BUILD_GTK3LIB=1 \
+ -C nvidia-settings/src out/libXNVCtrl.a
+ fi
+}
+
+src_install() {
+ local libdir=$(get_libdir) libdir32=$(ABI=x86 get_libdir)
+
+ NV_ARGS+=( DESTDIR="${D}" LIBDIR="${ED}"/usr/${libdir} )
+
+ local -A paths=(
+ [APPLICATION_PROFILE]=/usr/share/nvidia
+ [CUDA_ICD]=/etc/OpenCL/vendors
+ [EGL_EXTERNAL_PLATFORM_JSON]=/usr/share/egl/egl_external_platform.d
+ [FIRMWARE]=/lib/firmware/nvidia/${PV}
+ [GBM_BACKEND_LIB_SYMLINK]=/usr/${libdir}/gbm
+ [GLVND_EGL_ICD_JSON]=/usr/share/glvnd/egl_vendor.d
+ [OPENGL_DATA]=/usr/share/nvidia
+ [VULKAN_ICD_JSON]=/usr/share/vulkan
+ [WINE_LIB]=/usr/${libdir}/nvidia/wine
+ [XORG_OUTPUTCLASS_CONFIG]=/usr/share/X11/xorg.conf.d
+
+ [GLX_MODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules/extensions
+ [GLX_MODULE_SYMLINK]=/usr/${libdir}/xorg/modules
+ [XMODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules
+ )
+
+ local skip_files=(
+ $(usev !X "libGLX_nvidia libglxserver_nvidia")
+ $(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
+ 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}; 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]} == EXPLICIT_PATH ]]; then
+ into=${m[3]}
+ elif [[ ${m[2]} == *_BINARY ]]; then
+ into=/opt/bin
+ elif [[ ${m[3]} == COMPAT32 ]]; then
+ use abi_x86_32 || continue
+ into=/usr/${libdir32}
+ elif [[ ${m[2]} == *_@(LIB|SYMLINK) ]]; then
+ into=/usr/${libdir}
+ else
+ die "No known installation path for ${m[0]}"
+ fi
+ [[ ${m[3]: -2} == ?/ ]] && into+=/${m[3]%/}
+ [[ ${m[4]: -2} == ?/ ]] && into+=/${m[4]%/}
+
+ if [[ ${m[2]} =~ _SYMLINK$ ]]; then
+ [[ ${m[4]: -1} == / ]] && m[4]=${m[5]}
+ dosym ${m[4]} ${into}/${m[0]}
+ continue
+ fi
+ [[ ${m[0]} =~ ^libnvidia-ngx.so|^libnvidia-egl-gbm.so ]] &&
+ dosym ${m[0]} ${into}/${m[0]%.so*}.so.1 # soname not in .manifest
+
+ printf -v m[1] %o $((m[1] | 0200)) # 444->644
+ insopts -m${m[1]}
+ insinto ${into}
+ doins ${m[0]}
+ done < .manifest || die
+ insopts -m0644 # reset
+
+ # MODULE:installer non-skipped extras
+ : "$(systemd_get_sleepdir)"
+ exeinto "${_#"${EPREFIX}"}"
+ doexe systemd/system-sleep/nvidia
+ dobin systemd/nvidia-sleep.sh
+ systemd_dounit systemd/system/nvidia-{hibernate,resume,suspend}.service
+
+ dobin nvidia-bug-report.sh
+
+ # MODULE:powerd extras
+ if use powerd; then
+ newinitd "${FILESDIR}"/nvidia-powerd.initd nvidia-powerd #923117
+ systemd_dounit systemd/system/nvidia-powerd.service
+
+ insinto /usr/share/dbus-1/system.d
+ doins nvidia-dbus.conf
+ fi
+
+ # 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 /dev/char wrt bug #904292)
+ # 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/char"'
+}
+
+pkg_preinst() {
+ has_version "${CATEGORY}/${PN}[wayland]" && NV_HAD_WAYLAND=
+
+ use modules || return
+
+ # set video group id based on live system (bug #491414)
+ local g=$(egetent group video | cut -d: -f3)
+ [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')"
+ sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die
+
+ # try to find driver mismatches using temporary supported-gpus.json
+ for g in $(grep -l 0x10de /sys/bus/pci/devices/*/vendor 2>/dev/null); do
+ g=$(grep -io "\"devid\":\"$(<${g%vendor}device)\"[^}]*branch\":\"[0-9]*" \
+ "${ED}"/usr/share/nvidia/supported-gpus.json 2>/dev/null)
+ if [[ ${g} ]]; then
+ g=$((${g##*\"}+1))
+ if ver_test -ge ${g}; then
+ NV_LEGACY_MASK=">=${CATEGORY}/${PN}-${g}"
+ break
+ fi
+ fi
+ done
+ rm "${ED}"/usr/share/nvidia/supported-gpus.json || die
+}
+
+pkg_postinst() {
+ linux-mod-r1_pkg_postinst
+
+ readme.gentoo_print_elog
+
+ if [[ -r /proc/driver/nvidia/version &&
+ $(</proc/driver/nvidia/version) != *" ${PV} "* ]]; then
+ ewarn "Currently loaded NVIDIA modules do not match the newly installed"
+ ewarn "libraries and may prevent launching GPU-accelerated applications."
+ if use modules; then
+ ewarn "Easiest way to fix this is normally to reboot. If still run into issues"
+ ewarn "(e.g. API mismatch messages in the \`dmesg\` output), please verify"
+ ewarn "that the running kernel is ${KV_FULL} and that (if used) the"
+ ewarn "initramfs does not include NVIDIA modules (or at least, not old ones)."
+ fi
+ fi
+
+ if [[ $(</proc/cmdline) == *slub_debug=[!-]* ]]; then
+ ewarn "Detected that the current kernel command line is using 'slub_debug=',"
+ ewarn "this may lead to system instability/freezes with this version of"
+ ewarn "${PN}. Bug: https://bugs.gentoo.org/796329"
+ fi
+
+ if [[ -v NV_LEGACY_MASK ]]; then
+ ewarn
+ ewarn "***WARNING***"
+ ewarn
+ ewarn "You are installing a version of ${PN} known not to work"
+ ewarn "with a GPU of the current system. If unwanted, add the mask:"
+ if [[ -d ${EROOT}/etc/portage/package.mask ]]; then
+ ewarn " echo '${NV_LEGACY_MASK}' > ${EROOT}/etc/portage/package.mask/${PN}"
+ else
+ ewarn " echo '${NV_LEGACY_MASK}' >> ${EROOT}/etc/portage/package.mask"
+ fi
+ ewarn "...then downgrade to a legacy[1] branch if possible (not all old versions"
+ ewarn "are available or fully functional, may need to consider nouveau[2])."
+ ewarn "[1] https://www.nvidia.com/object/IO_32667.html"
+ ewarn "[2] https://wiki.gentoo.org/wiki/Nouveau"
+ fi
+
+ if use kernel-open; 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-550.54.14.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-550.54.14.ebuild
new file mode 100644
index 000000000000..1f8b7c35885b
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-550.54.14.ebuild
@@ -0,0 +1,501 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MODULES_OPTIONAL_IUSE=+modules
+inherit desktop flag-o-matic linux-mod-r1 readme.gentoo-r1
+inherit systemd toolchain-funcs unpacker user-info
+
+MODULES_KERNEL_MAX=6.7
+NV_URI="https://download.nvidia.com/XFree86/"
+
+DESCRIPTION="NVIDIA Accelerated Graphics Driver"
+HOMEPAGE="https://www.nvidia.com/download/index.aspx"
+SRC_URI="
+ amd64? ( ${NV_URI}Linux-x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run )
+ arm64? ( ${NV_URI}Linux-aarch64/${PV}/NVIDIA-Linux-aarch64-${PV}.run )
+ $(printf "${NV_URI}%s/%s-${PV}.tar.bz2 " \
+ nvidia-{installer,modprobe,persistenced,settings,xconfig}{,})
+ ${NV_URI}NVIDIA-kernel-module-source/NVIDIA-kernel-module-source-${PV}.tar.xz
+"
+# nvidia-installer is unused but here for GPL-2's "distribute sources"
+S=${WORKDIR}
+
+LICENSE="NVIDIA-r2 Apache-2.0 BSD BSD-2 GPL-2 MIT ZLIB curl openssl"
+SLOT="0/${PV%%.*}"
+KEYWORDS="-* ~amd64 ~arm64"
+IUSE="+X abi_x86_32 abi_x86_64 kernel-open persistenced powerd +static-libs +tools wayland"
+REQUIRED_USE="kernel-open? ( modules )"
+
+COMMON_DEPEND="
+ acct-group/video
+ X? ( x11-libs/libpciaccess )
+ persistenced? (
+ acct-user/nvpd
+ net-libs/libtirpc:=
+ )
+ tools? (
+ >=app-accessibility/at-spi2-core-2.46:2
+ dev-libs/glib:2
+ dev-libs/jansson:=
+ media-libs/harfbuzz:=
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:3[X]
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXxf86vm
+ x11-libs/pango
+ )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ dev-libs/openssl:0/3
+ sys-libs/glibc
+ X? (
+ media-libs/libglvnd[X,abi_x86_32(-)?]
+ x11-libs/libX11[abi_x86_32(-)?]
+ x11-libs/libXext[abi_x86_32(-)?]
+ )
+ powerd? ( sys-apps/dbus[abi_x86_32(-)?] )
+ wayland? (
+ gui-libs/egl-gbm
+ >=gui-libs/egl-wayland-1.1.10
+ )
+"
+DEPEND="
+ ${COMMON_DEPEND}
+ static-libs? (
+ x11-base/xorg-proto
+ x11-libs/libX11
+ x11-libs/libXext
+ )
+ tools? (
+ media-libs/libglvnd
+ sys-apps/dbus
+ x11-base/xorg-proto
+ x11-libs/libXrandr
+ x11-libs/libXv
+ x11-libs/libvdpau
+ )
+"
+BDEPEND="
+ sys-devel/m4
+ virtual/pkgconfig
+"
+
+QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*"
+
+PATCHES=(
+ "${FILESDIR}"/nvidia-drivers-525.147.05-gcc14.patch
+ "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch
+ "${FILESDIR}"/nvidia-settings-530.30.02-desktop.patch
+)
+
+pkg_setup() {
+ use modules && [[ ${MERGE_TYPE} != binary ]] || return
+
+ local CONFIG_CHECK="
+ PROC_FS
+ ~DRM_KMS_HELPER
+ ~SYSVIPC
+ ~!LOCKDEP
+ ~!SLUB_DEBUG_ON
+ !DEBUG_MUTEXES
+ $(usev powerd '~CPU_FREQ')
+ "
+
+ 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."
+
+ 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."
+
+ linux-mod-r1_pkg_setup
+}
+
+src_prepare() {
+ # make patches usable across versions
+ rm nvidia-modprobe && mv nvidia-modprobe{-${PV},} || die
+ rm nvidia-persistenced && mv nvidia-persistenced{-${PV},} || die
+ rm nvidia-settings && mv nvidia-settings{-${PV},} || die
+ rm nvidia-xconfig && mv nvidia-xconfig{-${PV},} || die
+ mv NVIDIA-kernel-module-source-${PV} kernel-module-source || die
+
+ default
+
+ # prevent detection of incomplete kernel DRM support (bug #603818)
+ sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \
+ -i kernel{,-module-source/kernel-open}/conftest.sh || die
+
+ # adjust service files
+ sed 's/__USER__/nvpd/' \
+ nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \
+ > "${T}"/nvidia-persistenced.service || die
+ sed -i "s|/usr|${EPREFIX}/opt|" systemd/system/nvidia-powerd.service || die
+
+ # use alternative vulkan icd option if USE=-X (bug #909181)
+ use X || sed -i 's/"libGLX/"libEGL/' nvidia_{layers,icd}.json || die
+
+ # enable nvidia-drm.modeset=1 by default with USE=wayland
+ cp "${FILESDIR}"/nvidia-545.conf "${T}"/nvidia.conf || die
+ use !wayland || sed -i '/^#.*modeset=1$/s/^#//' "${T}"/nvidia.conf || die
+
+ # makefile attempts to install wayland library even if not built
+ use wayland || sed -i 's/ WAYLAND_LIB_install$//' \
+ nvidia-settings/src/Makefile || die
+}
+
+src_compile() {
+ tc-export AR CC CXX LD OBJCOPY OBJDUMP PKG_CONFIG
+
+ local xnvflags=-fPIC #840389
+ # lto static libraries tend to cause problems without fat objects
+ tc-is-lto && xnvflags+=" $(test-flags-CC -ffat-lto-objects)"
+
+ NV_ARGS=(
+ PREFIX="${EPREFIX}"/usr
+ HOST_CC="$(tc-getBUILD_CC)"
+ HOST_LD="$(tc-getBUILD_LD)"
+ BUILD_GTK2LIB=
+ NV_USE_BUNDLED_LIBJANSSON=0
+ NV_VERBOSE=1 DO_STRIP= MANPAGE_GZIP= OUTPUTDIR=out
+ WAYLAND_AVAILABLE=$(usex wayland 1 0)
+ XNVCTRL_CFLAGS="${xnvflags}"
+ )
+
+ if use modules; then
+ local o_cflags=${CFLAGS} o_cxxflags=${CXXFLAGS} o_ldflags=${LDFLAGS}
+
+ 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=(
+ IGNORE_CC_MISMATCH=yes NV_VERBOSE=1
+ SYSOUT="${KV_OUT_DIR}" SYSSRC="${KV_DIR}"
+ )
+
+ # temporary workaround for bug #914468
+ CPP="${KERNEL_CC} -E" tc-is-clang && addpredict "${KV_OUT_DIR}"
+
+ linux-mod-r1_src_compile
+ CFLAGS=${o_cflags} CXXFLAGS=${o_cxxflags} LDFLAGS=${o_ldflags}
+ fi
+
+ emake "${NV_ARGS[@]}" -C nvidia-modprobe
+ use persistenced && emake "${NV_ARGS[@]}" -C nvidia-persistenced
+ use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig
+
+ if use tools; then
+ # avoid noisy *very* noisy logs with deprecation warnings
+ CFLAGS="-Wno-deprecated-declarations ${CFLAGS}" \
+ emake "${NV_ARGS[@]}" -C nvidia-settings
+ elif use static-libs; then
+ # pretend GTK+3 is available, not actually used (bug #880879)
+ emake "${NV_ARGS[@]}" BUILD_GTK3LIB=1 \
+ -C nvidia-settings/src out/libXNVCtrl.a
+ fi
+}
+
+src_install() {
+ local libdir=$(get_libdir) libdir32=$(ABI=x86 get_libdir)
+
+ NV_ARGS+=( DESTDIR="${D}" LIBDIR="${ED}"/usr/${libdir} )
+
+ local -A paths=(
+ [APPLICATION_PROFILE]=/usr/share/nvidia
+ [CUDA_ICD]=/etc/OpenCL/vendors
+ [EGL_EXTERNAL_PLATFORM_JSON]=/usr/share/egl/egl_external_platform.d
+ [FIRMWARE]=/lib/firmware/nvidia/${PV}
+ [GBM_BACKEND_LIB_SYMLINK]=/usr/${libdir}/gbm
+ [GLVND_EGL_ICD_JSON]=/usr/share/glvnd/egl_vendor.d
+ [OPENGL_DATA]=/usr/share/nvidia
+ [VULKAN_ICD_JSON]=/usr/share/vulkan
+ [WINE_LIB]=/usr/${libdir}/nvidia/wine
+ [XORG_OUTPUTCLASS_CONFIG]=/usr/share/X11/xorg.conf.d
+
+ [GLX_MODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules/extensions
+ [GLX_MODULE_SYMLINK]=/usr/${libdir}/xorg/modules
+ [XMODULE_SHARED_LIB]=/usr/${libdir}/xorg/modules
+ )
+
+ local skip_files=(
+ $(usev !X "libGLX_nvidia libglxserver_nvidia")
+ libGLX_indirect # non-glvnd unused fallback
+ libnvidia-{gtk,wayland-client} nvidia-{settings,xconfig} # from source
+ libnvidia-egl-gbm 15_nvidia_gbm # gui-libs/egl-gbm
+ libnvidia-egl-wayland 10_nvidia_wayland # gui-libs/egl-wayland
+ libnvidia-pkcs11.so # using the openssl3 version instead
+ )
+ local skip_modules=(
+ $(usev !X "nvfbc vdpau xdriver")
+ $(usev !modules gsp)
+ $(usev !powerd powerd)
+ installer nvpd # handled separately / built from source
+ )
+ local skip_types=(
+ GLVND_LIB GLVND_SYMLINK EGL_CLIENT.\* GLX_CLIENT.\* # media-libs/libglvnd
+ OPENCL_WRAPPER.\* # virtual/opencl
+ DOCUMENTATION DOT_DESKTOP .\*_SRC DKMS_CONF SYSTEMD_UNIT # handled separately / unused
+ )
+
+ local DOCS=(
+ README.txt NVIDIA_Changelog supported-gpus/supported-gpus.json
+ nvidia-settings/doc/{FRAMELOCK,NV-CONTROL-API}.txt
+ )
+ local HTML_DOCS=( html/. )
+ einstalldocs
+
+ local DISABLE_AUTOFORMATTING=yes
+ local DOC_CONTENTS="\
+Trusted users should be in the 'video' group to use NVIDIA devices.
+You can add yourself by using: gpasswd -a my-user video\
+$(usev modules "
+
+Like all out-of-tree kernel modules, it is necessary to rebuild
+${PN} after upgrading or rebuilding the Linux kernel
+by for example running \`emerge @module-rebuild\`. Alternatively,
+if using a distribution kernel (sys-kernel/gentoo-kernel{,-bin}),
+this can be automated by setting USE=dist-kernel globally.
+
+Loaded kernel modules also must not mismatch with the installed
+${PN} version (excluding -r revision), meaning should
+ensure \`eselect kernel list\` points to the kernel that will be
+booted before building and preferably reboot after upgrading
+${PN} (the ebuild will emit a warning if mismatching).
+
+See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.")\
+$(use amd64 && usev !abi_x86_32 "
+
+Note that without USE=abi_x86_32 on ${PN}, 32bit applications
+(typically using wine / steam) will not be able to use GPU acceleration.")
+
+For additional information or for troubleshooting issues, please see
+https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers and NVIDIA's own
+documentation that is installed alongside this README."
+ readme.gentoo_create_doc
+
+ if use modules; then
+ linux-mod-r1_src_install
+
+ insinto /etc/modprobe.d
+ doins "${T}"/nvidia.conf
+
+ # used for gpu verification with binpkgs (not kept, see pkg_preinst)
+ insinto /usr/share/nvidia
+ doins supported-gpus/supported-gpus.json
+ fi
+
+ emake "${NV_ARGS[@]}" -C nvidia-modprobe install
+ fowners :video /usr/bin/nvidia-modprobe #505092
+ fperms 4710 /usr/bin/nvidia-modprobe
+
+ if use persistenced; then
+ emake "${NV_ARGS[@]}" -C nvidia-persistenced install
+ newconfd "${FILESDIR}"/nvidia-persistenced.confd nvidia-persistenced
+ newinitd "${FILESDIR}"/nvidia-persistenced.initd nvidia-persistenced
+ systemd_dounit "${T}"/nvidia-persistenced.service
+ fi
+
+ if use tools; then
+ emake "${NV_ARGS[@]}" -C nvidia-settings install
+
+ doicon nvidia-settings/doc/nvidia-settings.png
+ domenu nvidia-settings/doc/nvidia-settings.desktop
+
+ exeinto /etc/X11/xinit/xinitrc.d
+ newexe "${FILESDIR}"/95-nvidia-settings-r1 95-nvidia-settings
+ fi
+
+ if use static-libs; then
+ dolib.a nvidia-settings/src/out/libXNVCtrl.a
+
+ insinto /usr/include/NVCtrl
+ doins nvidia-settings/src/libXNVCtrl/NVCtrl{Lib,}.h
+ fi
+
+ use X && emake "${NV_ARGS[@]}" -C nvidia-xconfig install
+
+ # mimic nvidia-installer by reading .manifest to install files
+ # 0:file 1:perms 2:type 3+:subtype/arguments -:module
+ local m into
+ while IFS=' ' read -ra m; do
+ ! [[ ${#m[@]} -ge 2 && ${m[-1]} =~ MODULE: ]] ||
+ [[ " ${m[0]##*/}" =~ ^(\ ${skip_files[*]/%/.*|\\} )$ ]] ||
+ [[ " ${m[2]}" =~ ^(\ ${skip_types[*]/%/|\\} )$ ]] ||
+ has ${m[-1]#MODULE:} "${skip_modules[@]}" && continue
+
+ case ${m[2]} in
+ MANPAGE)
+ gzip -dc ${m[0]} | newman - ${m[0]%.gz}; 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]} == EXPLICIT_PATH ]]; then
+ into=${m[3]}
+ elif [[ ${m[2]} == *_BINARY ]]; then
+ into=/opt/bin
+ elif [[ ${m[3]} == COMPAT32 ]]; then
+ use abi_x86_32 || continue
+ into=/usr/${libdir32}
+ elif [[ ${m[2]} == *_@(LIB|SYMLINK) ]]; then
+ into=/usr/${libdir}
+ else
+ die "No known installation path for ${m[0]}"
+ fi
+ [[ ${m[3]: -2} == ?/ ]] && into+=/${m[3]%/}
+ [[ ${m[4]: -2} == ?/ ]] && into+=/${m[4]%/}
+
+ if [[ ${m[2]} =~ _SYMLINK$ ]]; then
+ [[ ${m[4]: -1} == / ]] && m[4]=${m[5]}
+ dosym ${m[4]} ${into}/${m[0]}
+ continue
+ fi
+ [[ ${m[0]} =~ ^libnvidia-ngx.so|^libnvidia-egl-gbm.so ]] &&
+ dosym ${m[0]} ${into}/${m[0]%.so*}.so.1 # soname not in .manifest
+
+ printf -v m[1] %o $((m[1] | 0200)) # 444->644
+ insopts -m${m[1]}
+ insinto ${into}
+ doins ${m[0]}
+ done < .manifest || die
+ insopts -m0644 # reset
+
+ # MODULE:installer non-skipped extras
+ : "$(systemd_get_sleepdir)"
+ exeinto "${_#"${EPREFIX}"}"
+ doexe systemd/system-sleep/nvidia
+ dobin systemd/nvidia-sleep.sh
+ systemd_dounit systemd/system/nvidia-{hibernate,resume,suspend}.service
+
+ dobin nvidia-bug-report.sh
+
+ # MODULE:powerd extras
+ if use powerd; then
+ newinitd "${FILESDIR}"/nvidia-powerd.initd nvidia-powerd #923117
+ systemd_dounit systemd/system/nvidia-powerd.service
+
+ insinto /usr/share/dbus-1/system.d
+ doins nvidia-dbus.conf
+ fi
+
+ # 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 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"'
+}
+
+pkg_preinst() {
+ has_version "${CATEGORY}/${PN}[kernel-open]" && NV_HAD_KERNEL_OPEN=
+ has_version "${CATEGORY}/${PN}[wayland]" && NV_HAD_WAYLAND=
+
+ use modules || return
+
+ # set video group id based on live system (bug #491414)
+ local g=$(egetent group video | cut -d: -f3)
+ [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')"
+ sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die
+
+ # try to find driver mismatches using temporary supported-gpus.json
+ for g in $(grep -l 0x10de /sys/bus/pci/devices/*/vendor 2>/dev/null); do
+ g=$(grep -io "\"devid\":\"$(<${g%vendor}device)\"[^}]*branch\":\"[0-9]*" \
+ "${ED}"/usr/share/nvidia/supported-gpus.json 2>/dev/null)
+ if [[ ${g} ]]; then
+ g=$((${g##*\"}+1))
+ if ver_test -ge ${g}; then
+ NV_LEGACY_MASK=">=${CATEGORY}/${PN}-${g}"
+ break
+ fi
+ fi
+ done
+ rm "${ED}"/usr/share/nvidia/supported-gpus.json || die
+}
+
+pkg_postinst() {
+ linux-mod-r1_pkg_postinst
+
+ readme.gentoo_print_elog
+
+ if [[ -r /proc/driver/nvidia/version &&
+ $(</proc/driver/nvidia/version) != *" ${PV} "* ]]; then
+ ewarn "Currently loaded NVIDIA modules do not match the newly installed"
+ ewarn "libraries and may prevent launching GPU-accelerated applications."
+ if use modules; then
+ ewarn "Easiest way to fix this is normally to reboot. If still run into issues"
+ ewarn "(e.g. API mismatch messages in the \`dmesg\` output), please verify"
+ ewarn "that the running kernel is ${KV_FULL} and that (if used) the"
+ ewarn "initramfs does not include NVIDIA modules (or at least, not old ones)."
+ fi
+ fi
+
+ if [[ $(</proc/cmdline) == *slub_debug=[!-]* ]]; then
+ ewarn "Detected that the current kernel command line is using 'slub_debug=',"
+ ewarn "this may lead to system instability/freezes with this version of"
+ ewarn "${PN}. Bug: https://bugs.gentoo.org/796329"
+ fi
+
+ if [[ -v NV_LEGACY_MASK ]]; then
+ ewarn
+ ewarn "***WARNING***"
+ ewarn
+ ewarn "You are installing a version of ${PN} known not to work"
+ ewarn "with a GPU of the current system. If unwanted, add the mask:"
+ if [[ -d ${EROOT}/etc/portage/package.mask ]]; then
+ ewarn " echo '${NV_LEGACY_MASK}' > ${EROOT}/etc/portage/package.mask/${PN}"
+ else
+ ewarn " echo '${NV_LEGACY_MASK}' >> ${EROOT}/etc/portage/package.mask"
+ fi
+ ewarn "...then downgrade to a legacy[1] branch if possible (not all old versions"
+ ewarn "are available or fully functional, may need to consider nouveau[2])."
+ ewarn "[1] https://www.nvidia.com/object/IO_32667.html"
+ ewarn "[2] https://wiki.gentoo.org/wiki/Nouveau"
+ fi
+
+ if use kernel-open && [[ ! -v NV_HAD_KERNEL_OPEN ]]; then
+ ewarn
+ ewarn "Open source variant of ${PN} was selected, be warned it is experimental"
+ ewarn "and only for modern GPUs (e.g. GTX 1650+). Try to disable if run into issues."
+ ewarn "Please also see: ${EROOT}/usr/share/doc/${PF}/html/kernel_open.html"
+ fi
+
+ if use wayland && use modules && [[ ! -v NV_HAD_WAYLAND ]]; then
+ elog
+ elog "With USE=wayland, this version of ${PN} sets nvidia-drm.modeset=1"
+ elog "in '${EROOT}/etc/modprobe.d/nvidia.conf'. This feature is considered"
+ elog "experimental but is required for wayland."
+ elog
+ elog "If you experience issues, either disable wayland or edit nvidia.conf."
+ elog "Of note, may possibly cause issues with SLI and Reverse PRIME."
+ fi
+}