diff options
Diffstat (limited to 'x11-drivers/nvidia-drivers')
14 files changed, 1244 insertions, 40 deletions
diff --git a/x11-drivers/nvidia-drivers/Manifest b/x11-drivers/nvidia-drivers/Manifest index 331031a67e74..bfd51a59ab92 100644 --- a/x11-drivers/nvidia-drivers/Manifest +++ b/x11-drivers/nvidia-drivers/Manifest @@ -1,32 +1,56 @@ -AUX 95-nvidia-settings 54 BLAKE2B 0428ef5071f8bf5dc8b7220f9963c4882d6915417d76abd0bf45989b29e04468c33c6facbb9fb0d3c6aadb324a76e3181baaa02c829445d299a2c17f457bb553 SHA512 0fdaff8701598081eeb78defcd140b78f75309ace998df67569a15d0ff653aca7ad0576912bf9a619f42990e6fb35cdb79e21f8181d3cd04dea719d912da8be9 AUX 95-nvidia-settings-r1 54 BLAKE2B 598067babb48bd0f5680300cf3cbb37ac804edb3131c47510d3350511b918cd47fcf44f1ccd4746e4a41f2f8aa36511f20c2c6f313010e89a79b7869771b9ee6 SHA512 de9edf678c64ca3d10c912397800b2cb651ef9108b33ece97a4cc1e86dad0a9e81986cca6b96cfe80740d9cb433de7ef93f29be45178db714ee408c7f6570ac7 AUX nvidia-169.07 639 BLAKE2B 00b279e3c338dc84258d8018fe80efc4b87f0fb1fcd61eda0ac2f698897605f4675a3ebb53d8baa3bdfa9f137aff214046464a642113a1b01a8c3e35bf5f99b8 SHA512 3af295c026280dc3a2b73c2cc7772254686b09cad15f1333ab0b4de8cb0ccf78e725ced2a399b10edcf8af6ba42ab1485dc0661af67461b0c3789f786357772f AUX nvidia-390.conf 199 BLAKE2B e7eabfb3a61cc0e95da78270964a6bb55ae71fdad81376d41c0ae0d38142f693511911ca8a9202e30f70efaa852b6b5c0ef776872e68597ed4ee14c4e9a86eed SHA512 0f691f5ba0aaedf1c670d3f2bfb632bdf253e94199fc2cf02277dbfae3055ef5887388af7922e65c39116bd0ed6ba13fc966145582933a5f35c3a1e9483a3c92 -AUX nvidia-430.conf 725 BLAKE2B 968f11d7954acf9f693ebfb811fa1fd8bd920720a9a00fe18d5170693c9e439bcb40921dbf7adf2a77a149170ce0973e26201ccef10efad4f2f47828c5c987d5 SHA512 04e1faa05208d565473ddb191ec13bc0c860ff3085e97b8032e1e8eb764c49aba608f4ca0ca1c6cfcb8be88657de5f683f77a12d9f85de075a7ce022b3d1ed20 -AUX nvidia-460.conf 723 BLAKE2B b5ce6a5766cfe821cbed24d12c514f2ca86a450d2e4a98022cbe6f31f67c1b7b503970c518cf62114f9428ffb20cbd7ecb0dd4aa308b6fdcd801c72824a915df SHA512 0d6da49e8bac452e7fa532a41c74f103edfe34df0fa4c70c503eea01af640bc5888b0b92f2fe4f39d43e47727552f0ac5d0a5657ac43467c555fcb49d7be7207 +AUX nvidia-430.conf 734 BLAKE2B 8332fcce02f603e84598cf817a4ba6c948f198c962b699d5d765f868eb0f4e88586390b3d0ebb14f9b3defa8ab84db9196358c9cd5754b5f4e336ace441abf95 SHA512 51691436b9ccd2e21b2a1a8b5f431865aa811ec9ca07899b1f4d8f9ff8e38a71a8c7f910a06df5b686e274447e2e570e96c07bd13bbb69bc6a570c8dd393daec +AUX nvidia-460.conf 734 BLAKE2B c266b4ffcc3f8f3666c8838273da1eb21527dfc29ab1c276fbd77c4bad993e4f206112e0e0bf6e4a899f417ccbe4522053df8e019bbbeac29ec9364ae2fa3bef SHA512 4f716c9c67f269f361ad48cd18039df3cc4495e29a8a74d1b162fc0db96942afbdc440ef21a8477271b9e561483715ce7e0c2863f382d8721f235406fcaa3095 +AUX nvidia-blacklist-nouveau.conf 150 BLAKE2B ab88433271de205cd928589eda1c5b7ca88d5febb9ca5f6a743e038d461e0d1bf4a1abddf272c8f15633c04a8ed1c09daed4eb81391768dfe96586b966186f33 SHA512 f345998328e28a34ba578e96f0ff08a94b909b151f9fe883fb59dfcffe754d0eb324caa8bbb1f42ca1c9604960b6ab1dc4e72b5edb773c3c7ade59d7adbb3057 AUX nvidia-drivers-440.26-locale.patch 299 BLAKE2B ad9065b968f1ad62c90e3aeddaa5af9fe007f89e5e80fc74f4c200c642b968196d8880511cc05d1f2fd04e5ab4f189cd2935eda993f9f174f0f0f4d58b7de711 SHA512 1723963b3e7562332909322ee28373dff83f253db4805d4c77c837abec04a73946afdd2837a699d0babd989090ddfcc33574993c2f8d3857eb24cf0e9ad4e6ce +AUX nvidia-modprobe-390.141-uvm-perms.patch 563 BLAKE2B 9befd708ad2193e507583e066f306e11d55e82912f456e738d850b804d35331df2ca5de3a35e8ab551188c1103af762941098639fa9581b4437bc5e68595ddd6 SHA512 0546d51a86554985cd7cc036e7b8f65b457cd1a1c0549ef496422fa422d2757354a47b83247b100597f908c2653314878c721b3918ebc529cae4282824d4eada AUX nvidia-persistenced.conf 250 BLAKE2B 8b3514f981d992d34c949011a25fda5737d85ade831f15481843db14f67494e6f271eb7947a459a28c7991cdeb86092a2a7920e6f40213bcded90b7f9f15dae0 SHA512 9c9562bb15bf4552754dd50a1b01dec5df76f7f5666fba2fff642a169f87e9ed421a260f2258ab469f7e4cd9ef8161653355795624387fe7ad5ae6a0d71e5f46 +AUX nvidia-persistenced.confd 213 BLAKE2B dd57e63944a97a77e83a8373dd34ef2f56824dcfadcfbbb54cdf6eeac17066d78753bd1b21a9bad8f0437c279c95492319205c15b84b7f96e0515415dfddbc26 SHA512 a311b73bb47448538e5261ba658d42e923890c909c335eeac3cc90ad0ffd3fd5fb983df8e91077f3098eaa13b07f27b23dc24a4579b1df411ae272976ef089b3 AUX nvidia-persistenced.init 650 BLAKE2B 3be9ea563ecb9741bad4de1516ab9cf373c5b412eea52cf4d8e6446ee09f6adee47bcd1f65217c7379b55d99de1966b2335ecdfa940f9c7544cd103992ba280f SHA512 864c90573a033e30d151c9adb9f0f12c5bcba2b5a7eaaa62f86fc11747f13956825fc5acb4fb1fb453a32acefe850e73264a650fafa6014cc96bbc7e3b56fdaa +AUX nvidia-persistenced.initd 404 BLAKE2B 2115075a9b0c9d0eeee55e2b3c531da82ae6aea5bf25bcedc618b108aeddab95c0ac852d6d9b96bd9bf6dba62a13db487d7c3627b244ef29c047bb7a137f2413 SHA512 34143639ca5456cacfbfcb2bc30e51dce02d9af4784791a84ba93a26f2f7f31f2dc75685bbed52138c35df310cca1c19072a5fab2b067f854550f5ee4d96aa9c AUX nvidia-rmmod.conf 108 BLAKE2B 8a14963d7498c08f22c60f0e7286b66375c22e9db081454d973738bf847bfd4343c82f4e1c529ec6b904ae3e8cf29e2570dd4cf2fbb8c8aa9bd33491d2e4f543 SHA512 cb6b70ba0fc9c6d81d43f31d724538beff79e7e9b02c610485f1e46757d7bf16410d5cb2853d8d67ea6e4da59e7e1687ad14dc4b494415c6db6fab517a03b28b +AUX nvidia-settings-390.141-fno-common.patch 478 BLAKE2B 2b222b26049aeb6692350618bd1e4dff3c4f25452c1e18c5789fd3e85ffb3edba4c54c4cdf02aec95f65c7eafb2c01e39a76b888a4f0691de6279d2981ab4f5f SHA512 a6574bc7be6299ab6f7aa3b7872506cc135ffda5591f6d385f6828ca5691e964852b4461fde771130a17b315798f986c2af6e1108e9d2298dcdf3f786e665a93 AUX nvidia-settings-fno-common.patch 762 BLAKE2B 7a4895d004ca9f5468e88f41fdb86cd14c9ffc8267c308e372722008487f0b10037dfb683fa5dc007eb99107c4f798504470a4aebc42b1f787770be0fd522226 SHA512 830bf286ff708655c358b47e6260b318b5d06eb40cb73a5e03e511a04d048440a925e47c5ca0c2da53d445cee8f5f7bcb5273a1141f5edd83e7e8d43d6c08c95 AUX nvidia-settings-linker.patch 1048 BLAKE2B a4a0a26d93514c3c43a0bc0db87b5b8dd8c20d0a9f15942db2a2f34662886436371e72c6e033d4bb2eb4d8996962f048144b93c1493149ea603ef71044cbed41 SHA512 11cd04a3efe95046d01c749df9fc055473284cb99a6138768916db841c8fadf2af5c93646b52f7bce6454e43b8621aa518964ef734c18283162fb2671f6dd9f9 AUX nvidia-settings.desktop 185 BLAKE2B 5fab31cdfad3e882095bf0fb5c3821b5d934992f1d330b80dd825da727b7cf587177f21ad6d2f83eabc6a451c15e2dc4bbe88684deb5892199da53fdef77f428 SHA512 30cab269daf282b9716e53ecf2f8993289e8d4ad05c40d6ddaad3ea6e95477c36a4d65a28d0ec3c1c9c7e845fde140df9012944306f70131a02c9ffef0a9f523 AUX nvidia-smi.init 545 BLAKE2B f4a0743f1fa5136c9c0f327645d8b66932492f2539b5c2b0bd45d29b2010fff6bbdc9e97b619e67d38bce38104d29fc4d00a9e0efc31b8ff408cb02370785bec SHA512 f7f04a73d646b90cdc14a408f53650324d7c1d7754a1d92acc9a8acaef163bda1eef33acb831df77657786e7ceebe0d7f9d25d2edd57d1590be340ce12fea6e5 -AUX nvidia-udev.sh 185 BLAKE2B cf7a46f2d123d5df46138d9ad12c4c700984fb773acdda93fc4dfe5fe5bfad36db70342ce4a851fc450a90b6ee6e481d8a4f6e38884063be14c4f0d6e15a2329 SHA512 166df3a4e7c1862ca2e0f634bf5eed7aad1bdd7e55764ca42371b91a7077c59f0bc243de5616fd38dac9694159d1695d54fbd08ac89d4d3f3649c70c7db5977e AUX nvidia-udev.sh-r1 285 BLAKE2B 6ea76f2f913b2bc2c9955e7564c770368ea6a0327887684d086040047fb95a0088387c5f87f22bc1f5a093cc79299ad72dd1495719bb344c504a342d03f34db3 SHA512 493b0d5f2698d299e3b8d5782ac7fb8174e7ee93f1dae66bc1161eb4dd16d4db91048444dc6e7bea344960936c0a5c825041f6909af004438d8009a3d3fe71c9 AUX nvidia-uvm.udev-rule 167 BLAKE2B c4606309aaa522f4c86568928b072f09578d4e78540517eda38e50f9f372e62c312a8962f190f9715ebda18cadd8fb0513c07d9083e34591512350144a267a1b SHA512 9420f9b80abed3660a33c973554603c2db477e1779c03b79093076719feee7d84e2f1c47c1b337e88318f20bd1a10b2715b098f7bd065a5c825f26c13bca038d AUX nvidia.udev-rule 462 BLAKE2B d417e0e4f5a64c5cee235f4640554ff1ba4d34590a6c3459fd8b4e10dc7581010c006f96cfd01f2c9a847c79979631f6e5afbef01724d110201377e8f8c75966 SHA512 96f9edaa0b46bea5fce17596f868bea5265b303d7185af6ba81527bbd7b8fdf92de9311317cbde51a29d222083d451c25ab77c3d6837cbc4072a50d9af89aa86 +DIST NVIDIA-Linux-aarch64-450.102.04.run 80469462 BLAKE2B dcabed08bdd2c4c328794238e175e96831ceb0ff683c7727a1873b5aaf07612f997d47c915ef7d3c5dcfcd1d40e75f9a51a83fb28eb84d4200e7e5bc41245d9f SHA512 6b0fcdbe8a0ef3a86357bcd7a48d38c2bb65d9608bfbde0fa270b7cec198acaf9b60d458406fc7c841c75c98089644e8dcfb87bd9d0d3c45bc77ec3c936d9371 +DIST NVIDIA-Linux-aarch64-460.67.run 112551235 BLAKE2B cc1166454f6e8771c7fe97010906919e9f2afd74ac86321006628f90f4d8dee033c3e09b2d9cac9063fe3fd313c0b529b347bcf38c051588ca7a972617c45026 SHA512 6ba17844dd215967f2f55a6620535464f244075a13f4b2b6d0ffaeeb6d97397fae0ba0de032d971847556d7b78ac8a1010ecec5127f45eb7ec73db87b1507ca1 DIST NVIDIA-Linux-x86-390.141.run 49589744 BLAKE2B 304672806b89885adbf8459ea99ca872769e44a42ff041a5b79ef05d113d7717f505f543441e7a2fc6c569f6d66391f0380a4f23f3e68108c8de817bf251f850 SHA512 6dfde3b54520070954b45f6bc071251084e1741f55e582b1abd806eb367e4b9ce0015615bf6a887fa784d075b3db08b6940da4163b960969773d1bdc52b4961e DIST NVIDIA-Linux-x86_64-390.141.run 85330901 BLAKE2B 7759d8cf6c9a75607b9a3ecd53cdd6f6a93f2f372d740a5a87d4d3f41a22f3bd953cc7dd6a0dc0e23a829ec86df8d65b9de499a76cfd4266a13b0aa3288aceb5 SHA512 5448d70e6e64a6403e61a004d83c69a442dd8ed0d61da3a31d3e3b7943c06c559a66b0f8d135982868ecbf209a965f60dae1a633367630b4d9287f725bbaa53c DIST NVIDIA-Linux-x86_64-450.102.04.run 141391114 BLAKE2B 019f928464b23d2a86bfdd255b7651e3cfe2b0b6ebf58d1b4a6ba1f27990e1d050d1e2429ba4aa60b966b04e775939084a04d82d1dd3482a10b39375b17b1c31 SHA512 1d13de540da36274a360ea6bcd1ce01eaae103fe417b42aa8f9ac757c382b06da455a78cf6798310179f90e2afeadf3a8c9f3398186490c3c0f9079021e850ed DIST NVIDIA-Linux-x86_64-460.39.run 178310565 BLAKE2B 65931f34ff47de02933797f60128c66c8774f3b217b79e82f781cd50560835ec79c37b7e63fb50231a22646f0cd7cf968d1fbe1ec6c2b3732a1c565b68de7bcb SHA512 9275a58ff0e72c3ee033bd18fa9e9dbb0203d2961a63e7cc04444889118eb4029c60bb10c2af8f230c1aa4aa30769131ea8c01f3bc4e7453336ad9c03ba23b42 DIST NVIDIA-Linux-x86_64-460.56.run 178496173 BLAKE2B 8f84a403ccaa9a92186cac9fb2dee9600cd29915cdacf475b6a1105772ffd52c671ef217a1201fbcd9192e858ec17796fd77b817887c79c43c266d32671fe7d0 SHA512 a61855576a27cdd2e48906ecb49cd1e9f88d14a8358aa4bdc57d59e2dfa64b394b2dcee45184d75e889fac6ebedcaaff902a07428c7f9eb011cf265228c6eb4e +DIST NVIDIA-Linux-x86_64-460.67.run 177691692 BLAKE2B 25a7d87cc128933a98100d7c5ef37f93c3a870c096eea3228a28ef79d712ce104608f9422221cc1eadc21dccbbc8bc41ab1832795cfee75e217600ed0d76489e SHA512 80fdc023a8ce80e3a103896f28a5564bb43903af6bfc719f755c48eb225e79ec6abf219ab20eb80ada5808ef932ef5fa0fe710c6e0a07dd8a248daff2ba3b898 +DIST nvidia-installer-390.141.tar.gz 205299 BLAKE2B b95ddcf9a8d61247572d73faa04558564962782b0eb222601315d741d1ee71fa0636fa87d31105ecc5ec61328d3174a3ed646046e02b6b5f29f071215a0e8bdd SHA512 3848a4ec17510bf4d3060e5ef8aafa1ad921215ec39d26c54b3bbdd8a5867c46e01d247b24b05ad6906fed7fb4ae6dc37346a7da6e5aae88b5b47584c0b07a02 +DIST nvidia-installer-450.102.04.tar.gz 197642 BLAKE2B 5d94dee76057eaea236090e2eb8cba4fdf90f4959a0ae26805bc771262a0eb05640846c191f2a5a5485e0584ae07ba64d2989201118594df747c3ac13503f90d SHA512 2c1608c0dd971122978a395edc5a51de6cb76d72aac45b4f9303e1a99e292ec0ddd9c03f2e95b10c357c0da1dc2824197c2553828eedbd0c4434b431aa593f6f +DIST nvidia-installer-460.67.tar.gz 198484 BLAKE2B 0eaf3e3eccd6749e4fe89394905dded58e739f42cbc33c8a91575f4505030a216670fc8c0fd4d1d42659acf301c9ba59d4052a80c6eba6c5db84ed022acb2620 SHA512 8fff0fa13a82cb7eaf2fd1d05be509e9124e67bb05810f8937fb1f16c4a2362a5c1a50bc9a5155cfc90a9bbcee38a54fb5ae0ae164e205900a49f6d21779d54f +DIST nvidia-modprobe-390.141.tar.gz 39965 BLAKE2B 46c01ec3e53569454a032e42561a81154712485ffb11d0393d9e9007a3825a33c8d045ea7296dd8465ad9b2cee36a639274c55ff31c70e93d334ac9fe724f7b1 SHA512 c0abec334fee4293a55a43edbcc6a7a8cd8ff6b6fbb954b428182542a24eba90f47100977c84ea9cbe557a39fc5fb90677b4f2227f49a6f30a56f6941508f40e +DIST nvidia-modprobe-450.102.04.tar.gz 42139 BLAKE2B 79218a4e76dacdafadd31e45a27d3578924db6a74894064ce856498121fbf9d80e7b07046dfc36426340e0cefd78b416b017202bc93858fdf8cc77ba335bbaf8 SHA512 ac9d8d8849606d7ef3772570c976e5efab36f66e83a62f959b28c88cd798bba860052033dc5eb18c0f9e4a6f2d8e6082456d9b1586977a23f240cfa3a750d7ef +DIST nvidia-modprobe-460.67.tar.gz 43140 BLAKE2B 8243d355f9d51495c9d09f25ccbcb39c0a6ef472cbfaded98f10818fae655e1cf62ff2edcf40baea72b8cca9eebc947742b2516bb057410239193201bb843538 SHA512 16c8239b54988622196e0eea113173e44ff8b60cdcdf585bf859e6440aff2c6699bb107962776e69056dd7d5e3bbd6289ea628a2255ac27e22ef79521e9baad3 +DIST nvidia-persistenced-390.141.tar.gz 55984 BLAKE2B c4e889d15643f6e8a4e37b32d89e14acaa792c681863c74281b17e414021dc56e4692e91e7552762ef8b8ef977284ee2f307b14216a2562a9d30b2ab7a1ba522 SHA512 d9ea32c842d8d13a59128b28ce985fe3a421d2848eac30fc8a671a391c63516b58c46d3c5b21403b4e5b016577d23aebaec1f5b4e59b25a20668120f52e231a5 +DIST nvidia-persistenced-450.102.04.tar.gz 52485 BLAKE2B 1fec24c86875789303aee8bf4362c9c35f76957a2906e2682aa5c07e914cc2acde769439d88007420904a71526e9f0d03ab9d0a3c5dcd1355047e03958d006f9 SHA512 6c51daaed3e7ecdb8d98bdcf0618e50962895895f88cc45a5f861c08d3c10f590d4a6a3f0a683ce0dce0e327d5977da1a76fdde974a97031dc698120ef990b07 +DIST nvidia-persistenced-460.67.tar.gz 53334 BLAKE2B 1354ec98fd2b95d264fd7df6219f639cf5d73173e6f0843a0880e6b18953904412cb756bd2c60432f6ae4c253d047515a9e32a128210fd94386ae6bc9a341b5c SHA512 0b4f7d8aa781c3536f6cd020225d2a3bab4b83498090419198488a2bec811534e61ba90461ae846bd09f4530f19984d77ca41edf0a851b1b700d1c0e053d537f DIST nvidia-settings-390.141.tar.bz2 1108755 BLAKE2B 210c33d4bb483dd9abe13275feb641a00d7c39a7222cbe828c925b9cfca6d4422f8fa3333dd77b73f2ba4071a7badf77625be88e02a1835177bda490c3c3c368 SHA512 44bf5f6b5bfbe3146f97d9ac82a75cc5653b6002002623ac6fa6cd233bbd3ef0d15f0b8091b59de5dbfdbde4fbe1b5212c9f9a1653ec98597c9049c9b137902e +DIST nvidia-settings-390.141.tar.gz 1297261 BLAKE2B 452870df1ba598692f5da47444eb2daf4db40c79cac98c10b1c994c0ff39fc7936909b9d7788cbfe784999e68a2bdbbc12e85d63c3bc02ac872e6b3c46834697 SHA512 dbf7c389bbdc94291a1b974adfa33414148b1ab752aa7d948a27e91ee1bceb3b8435aceb6b7ef3cb806333572db11b5524667045ef7686b119d7955d2699cb04 DIST nvidia-settings-450.102.04.tar.bz2 1057126 BLAKE2B 4e27ac75441d455122860b3834f2584e4736fff1f641e9a1d3ced4a354cb0e0e35c4e7a71e7bc05940d585e0ceca576f726fdfffbb84aae8057d06355b91293f SHA512 33f27b9a2832f7f24603d3a741b6c34cdd3f27a7075b523f8b98ae89325f810e13c134fcc7503e72d44a6f6c7a0d8587bfdad898a4ab5fa252bd9c7360a32341 +DIST nvidia-settings-450.102.04.tar.gz 1229675 BLAKE2B 166b73a0e9fe1cc1c16f83128aa94f3b9ef44fc71004e80c2681299dd564df6b458b52bedfd60eaaecf6142d0ea7d5147cb9c509d4db4e6b85bc72dd4dc75751 SHA512 c514bb3cc72954a52f4821674f9b783ebc0bd8c7294a296716619ddad15f2b63f50ada47797dee1386709deb7d407cb1d6c04532b7ca6e03d84234555751c9a9 DIST nvidia-settings-460.39.tar.bz2 1060391 BLAKE2B badfe9e5fa3ca7f5389369b01f839aa37b687e99bac47663b320602ada4d4e8dfb7c6fa4f64cee358a25ced7d9393ddfa4242147d9b645ae4fbd1b68310f3363 SHA512 a5f01d2a627695932399804776923a90050ec66b19c9d95ed34d11fc79e41604fe25474ed7b7bfec68b2115dd6fccb444b66427ce78c1d67b1b01f072bc8892a DIST nvidia-settings-460.56.tar.bz2 1060604 BLAKE2B cd1480e42ab2b25b399f19b458a1d5252d1b77d263ddecbad2d61f0445ba9f0ddf81fc944ac1136c273dfd1d21d06385bcfac9bdd7a7dc02f75302a6b8276df4 SHA512 018eb3cb7f25b926aa620201979b0efaaa82e7f036c4870a1e1234f5aac3ab9cfd48846d7eedd7ed38c3035eface3f2afe1a0d5de7a67e53e6bea760aa99fa72 +DIST nvidia-settings-460.67.tar.gz 1233189 BLAKE2B 33ffceefea4e184cb1873cdce97db26637e87cd20c82bcabcbfe88bcb084ac3d833ac5688cafa33a5a89383040d5c1c5d46de9c3f9a8ba6174574aa57aea2e46 SHA512 d1828379aa477394747ae3e5d3505e864d38a349dd159a04cb263613380afea9aea2081300b0d2b8ae205b800bfe6e8ba504e612989da394d757f00e4399b617 +DIST nvidia-xconfig-390.141.tar.gz 140293 BLAKE2B 08ee93be953f75dbe078c557af7c062092ce8a3b53af0735d43b7feabe6d1c99390b9533027fbc5017d207a70dfa5aecf88d211905bf8f0e846f769a6ea16c2b SHA512 9fedee2f720d86bd24e393328249bf970a1f242b9e750543e757eb13ca30f6ecfda6c63441093ab96ae28d5f38d4e55cc6de6316eb82d2a2f33074144a1eef2f +DIST nvidia-xconfig-450.102.04.tar.gz 141072 BLAKE2B 0d299429ccb10f351de0e7b81fa7ce8199da83db346483a7d791fd77276ff6d70b46ba153cdf6503b945d80f4a0108a6ec02a3955c9d7310de901f0e3b1e6e36 SHA512 f5752d7c49d1cb3c0061caace8cf5899c8d61e76f0b7080e05d70cd77758496dd8646a1551d93a12c8ad5f9fcfd53a49c51206af96f36ec1eec7ccfe59505f2d +DIST nvidia-xconfig-460.67.tar.gz 142323 BLAKE2B 09c7281de09a2c2968b5f4a48eca63110e6db988429c844b55f8efc28fbcd9d44c79ad47149c25f657c2a98ae7576c01b2c9b7f643b8321fe1393adc571ebcaa SHA512 0e65c81ec40d3eaeec036fbd8f46a3052a75ff0ad200c58438ff6c782a5764e62e51d03b4a2080770c32522894641288ac495f62bc39c3d5658b1ff87c9f6cdd +EBUILD nvidia-drivers-390.141-r1.ebuild 10347 BLAKE2B 4208a7f622d515327845c067b007bb8bf262e48153741af240445927d3b828951af664e603e50993128869276f8f9c05e26d66f33f55c390046dfdf699032cf8 SHA512 654dc5e93d4e9b17f0e4508bcd39e4155068d2e5555f97cb2bf69383e432829d984f62d590709fbf5e584ce6fde1b06431a9780d7544f14bc8a4bc80fb67feea EBUILD nvidia-drivers-390.141.ebuild 11741 BLAKE2B a8b6d64c68c56980d9084ae0efc1714595c0b25bb837136c7bec532e1a039bb6879d436fb7bca12590034b63e582435b921f017febece4308a387ba00caf49ee SHA512 1ec93229573d15474a14065e1b33a09a932428bb09a86e628488396270f7b0623674cfe6437dfd62ed35ca76ecefd0891ec3d5f5b231b013fa70b7967ac870aa +EBUILD nvidia-drivers-450.102.04-r1.ebuild 10837 BLAKE2B b661a414a336b025934b40bf9e22cf784fda726145ae46b9146b656d8513243169eb60c65e0ad92100422fd00766517788dd1773816747acab89edc08d73907b SHA512 8004363510c302da8b373980adcd0595271bfe072f16ea36939ae27bd2a0cef392c5ea39654f0dba858c6911906929bfdd22a1033877a3f9be6e904ee46c417a EBUILD nvidia-drivers-450.102.04.ebuild 12181 BLAKE2B c4b10edd2bdf5042c4b45b604782e515330dda0143863559351f089ad33ed397fa918dd12b2b516847bf066a73e74e2ab068b3a1b247d798ecb91734bc0d33a4 SHA512 da3857f183185af4303cf26891f029b8906f80c5ec97b241ec397d97cde188dac3af1dcb1f11d443806b4abfca85bbb44012c36060f2d680b360e2d972df4967 EBUILD nvidia-drivers-460.39-r1.ebuild 12179 BLAKE2B 58e1872093075700d88b6679eb4a1bb6c8368836c9214eded9e084a70c411a0fc245b176b1a97a983f1a85d29efc22cd8e89d04467665f31b1bf5d3dfbff1041 SHA512 71a904989afd4b82e36356e0842c2ca67dbb8efae186b7074a3a6d20c9572f6911681f3ca89ab2a179d4f0699256c2228e40a5d3094ef98cd9704c47aefcd138 EBUILD nvidia-drivers-460.56.ebuild 12180 BLAKE2B 44da00ff67edfee139d1ea40eb6c5db417daf299d7280bdfc5d7a318f9d29d1553b3490814e98042f92338bf008656a1dff7667def2eef127caf379acac28268 SHA512 cab248b945b07096a35d6f6f77df191d7bc4b3660d754fd5e43882dc11d0fe7f4048395994a10189ab70895af64a27fd8a116fa5d6feff7012f6353279bc1672 -MISC metadata.xml 1167 BLAKE2B ad7345cdf317a41ad31112cbaa6c5cb4c9eecc383b42d56616bac7c0a784a29c39978b42345dc7323699d4d3b8b610a716b32097ae780fa6b238a3b8f5f2d646 SHA512 f67f0b1568f61567f05e9c2bffee173000e9a8c8a0c4c03b8f83f0a75cc1eb5608073b2850b8aca53fd0b3e970895391bfc901f938a6d6f2c2c8ea4e667587c4 +EBUILD nvidia-drivers-460.67.ebuild 10867 BLAKE2B 7a7a30f071407628e016534c879c8b63115d188ba0104513f51ae8c5b48788c499809390fa878382d71ebcd296ddb2aab2671397cb40dfda3290ed3f6fafbe92 SHA512 9052dbc6db2e3a71d2f0bcafea12435bdbc9fcfe6b797f4f0da661cb2dc57d8b23489f7dac09a66901d4dde550c2bc93ff393d63d11fd81fc5b960fcd8887ed1 +MISC metadata.xml 1176 BLAKE2B 1042aa6da7f868c83e5d5beff5edc2ffef8345053bc2e9d9c45c0ac27651c880fa3f967d9849a7398792c0ed86ed57b84af478f5f21a35428824d440d273831d SHA512 ba249c97d7c2d07019dafdad6b8886e8a159670a116324777f9ca8d45cbde631c5c2ba3e5125a81a58686eb8d004c253496a7cc7e8674161cf34a24a18a0392a diff --git a/x11-drivers/nvidia-drivers/files/95-nvidia-settings b/x11-drivers/nvidia-drivers/files/95-nvidia-settings deleted file mode 100644 index e9d62742e1e9..000000000000 --- a/x11-drivers/nvidia-drivers/files/95-nvidia-settings +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -/opt/bin/nvidia-settings --load-config-only diff --git a/x11-drivers/nvidia-drivers/files/nvidia-430.conf b/x11-drivers/nvidia-drivers/files/nvidia-430.conf index 173513777aa9..edd957b58c4e 100644 --- a/x11-drivers/nvidia-drivers/files/nvidia-430.conf +++ b/x11-drivers/nvidia-drivers/files/nvidia-430.conf @@ -3,8 +3,8 @@ alias char-major-195 nvidia alias /dev/nvidiactl char-major-195 # To tweak the driver the following options can be used, note that -# you should be careful, as it could cause instability!! For more -# options see /usr/share/doc/PACKAGE/README +# you should be careful, as it could cause instability!! For more +# options see README.txt in /usr/share/doc/PACKAGE # # !!! SECURITY WARNING !!! # DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW @@ -17,4 +17,4 @@ options nvidia \ NVreg_DeviceFileUID=0 \ NVreg_ModifyDeviceFiles=1 \ NVreg_PreserveVideoMemoryAllocations=1 \ - NVreg_TemporaryFilePath=/tmp + NVreg_TemporaryFilePath=/var/tmp diff --git a/x11-drivers/nvidia-drivers/files/nvidia-460.conf b/x11-drivers/nvidia-drivers/files/nvidia-460.conf index faf0243a8230..03967faa577a 100644 --- a/x11-drivers/nvidia-drivers/files/nvidia-460.conf +++ b/x11-drivers/nvidia-drivers/files/nvidia-460.conf @@ -4,7 +4,7 @@ alias /dev/nvidiactl char-major-195 # To tweak the driver the following options can be used, note that # you should be careful, as it could cause instability!! For more -# options see /usr/share/doc/PACKAGE/README +# options see README.txt in /usr/share/doc/PACKAGE # # !!! SECURITY WARNING !!! # DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW @@ -17,4 +17,4 @@ options nvidia \ NVreg_DeviceFileUID=0 \ NVreg_ModifyDeviceFiles=1 \ NVreg_PreserveVideoMemoryAllocations=0 \ - NVreg_TemporaryFilePath=/tmp + NVreg_TemporaryFilePath=/var/tmp diff --git a/x11-drivers/nvidia-drivers/files/nvidia-blacklist-nouveau.conf b/x11-drivers/nvidia-drivers/files/nvidia-blacklist-nouveau.conf new file mode 100644 index 000000000000..b15fe0a3d92b --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-blacklist-nouveau.conf @@ -0,0 +1,3 @@ +# NVIDIA's official drivers and nouveau cannot be used at same time. +# Comment out the following line if you wish to allow nouveau. +blacklist nouveau diff --git a/x11-drivers/nvidia-drivers/files/nvidia-modprobe-390.141-uvm-perms.patch b/x11-drivers/nvidia-drivers/files/nvidia-modprobe-390.141-uvm-perms.patch new file mode 100644 index 000000000000..6ffd42ff77ea --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-modprobe-390.141-uvm-perms.patch @@ -0,0 +1,12 @@ +Create /dev/nvidia-uvm* by respecting nvidia.conf's permissions. +--- a/nvidia-modprobe/modprobe-utils/nvidia-modprobe-utils.c ++++ b/nvidia-modprobe/modprobe-utils/nvidia-modprobe-utils.c +@@ -742,6 +742,6 @@ + } + +- return mknod_helper(major, base_minor, NV_UVM_DEVICE_NAME, NULL) && +- mknod_helper(major, base_minor + 1, NV_UVM_TOOLS_DEVICE_NAME, NULL); ++ return mknod_helper(major, base_minor, NV_UVM_DEVICE_NAME, NV_PROC_REGISTRY_PATH) && ++ mknod_helper(major, base_minor + 1, NV_UVM_TOOLS_DEVICE_NAME, NV_PROC_REGISTRY_PATH); + } + diff --git a/x11-drivers/nvidia-drivers/files/nvidia-persistenced.confd b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.confd new file mode 100644 index 000000000000..e06d53c0c98d --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.confd @@ -0,0 +1,7 @@ +# configuration file for /etc/init.d/nvidia-persistenced + +# NVPD_USER: user to run as, needs access to /dev/nvidia* (video group) +NVPD_USER="nvpd" + +# ARGS: additional arguments, see nvidia-persistenced(1) +ARGS="" diff --git a/x11-drivers/nvidia-drivers/files/nvidia-persistenced.initd b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.initd new file mode 100644 index 000000000000..e199efc1e54e --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-persistenced.initd @@ -0,0 +1,12 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="Maintain persistent software state in the NVIDIA driver" +command="nvidia-persistenced" +command_args="${NVPD_USER:+--user ${NVPD_USER}} ${ARGS}" +pidfile="/var/run/nvidia-persistenced/nvidia-persistenced.pid" + +stop_post() { + rmdir "${pidfile%/*}" 2>/dev/null || true +} diff --git a/x11-drivers/nvidia-drivers/files/nvidia-settings-390.141-fno-common.patch b/x11-drivers/nvidia-drivers/files/nvidia-settings-390.141-fno-common.patch new file mode 100644 index 000000000000..499e969bf23a --- /dev/null +++ b/x11-drivers/nvidia-drivers/files/nvidia-settings-390.141-fno-common.patch @@ -0,0 +1,16 @@ +Fix compilation with -fno-common or gcc10 +https://bugs.gentoo.org/706742 +--- a/nvidia-settings/src/gtk+-2.x/ctkvdpau.c ++++ b/nvidia-settings/src/gtk+-2.x/ctkvdpau.c +@@ -105,2 +105,4 @@ + ++struct VDPAUDeviceImpl VDPAUDeviceFunctions; ++ + static int queryOutputSurface(CtkVDPAU *ctk_vdpau, VdpDevice device, +--- a/nvidia-settings/src/gtk+-2.x/ctkvdpau.h ++++ b/nvidia-settings/src/gtk+-2.x/ctkvdpau.h +@@ -48,3 +48,3 @@ + +-struct VDPAUDeviceImpl { ++extern struct VDPAUDeviceImpl { + diff --git a/x11-drivers/nvidia-drivers/files/nvidia-udev.sh b/x11-drivers/nvidia-drivers/files/nvidia-udev.sh deleted file mode 100644 index 9487b08e7a5e..000000000000 --- a/x11-drivers/nvidia-drivers/files/nvidia-udev.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -if [ $# -ne 1 ]; then - echo "Invalid args" >&2 - exit 1 -fi - -case $1 in - add|ADD) - /opt/bin/nvidia-smi > /dev/null - ;; - remove|REMOVE) - rm -f /dev/nvidia* - ;; -esac - -exit 0 diff --git a/x11-drivers/nvidia-drivers/metadata.xml b/x11-drivers/nvidia-drivers/metadata.xml index 05bc8c3ad62c..294430ee9cfd 100644 --- a/x11-drivers/nvidia-drivers/metadata.xml +++ b/x11-drivers/nvidia-drivers/metadata.xml @@ -1,24 +1,26 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>sudinave@gmail.com</email> + <name>Ionen Wolkens</name> + </maintainer> <maintainer type="person"> <email>soap@gentoo.org</email> </maintainer> - <longdescription> - Nvidia provides different branches of its drivers for different batches of its - hardware. When maintaining these ebuilds or other ebuilds depending on them, - you will need to keep in mind that the major versions represent these different - branches. - - You can use http://www.nvidia.com/Download/Find.aspx to figure out which branch - best matches your hardware. - </longdescription> <use> - <flag name="X">Install the X.org driver, OpenGL libraries, XvMC libraries, and VDPAU libraries</flag> <flag name="compat">Install non-GLVND libGL for backwards compatibility</flag> - <flag name="driver">Install the kernel driver module</flag> + <flag name="driver">Install kernel driver modules</flag> <flag name="kms">Enable support for kernel mode setting (KMS)</flag> <flag name="tools">Install additional tools such as nvidia-settings</flag> <flag name="uvm">Install the Unified Memory kernel module (nvidia-uvm) for sharing memory between CPU and GPU in CUDA programs</flag> </use> + <upstream> + <remote-id type="cpe">cpe:/a:nvidia:gpu_driver</remote-id> + <remote-id type="github">NVIDIA/nvidia-installer</remote-id> + <remote-id type="github">NVIDIA/nvidia-modprobe</remote-id> + <remote-id type="github">NVIDIA/nvidia-persistenced</remote-id> + <remote-id type="github">NVIDIA/nvidia-settings</remote-id> + <remote-id type="github">NVIDIA/nvidia-xconfig</remote-id> + </upstream> </pkgmetadata> diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-390.141-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-390.141-r1.ebuild new file mode 100644 index 000000000000..c639458a22d9 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-390.141-r1.ebuild @@ -0,0 +1,365 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MODULES_OPTIONAL_USE="driver" +inherit desktop linux-info linux-mod multilib-build \ + optfeature systemd toolchain-funcs unpacker + +NV_KERNEL_MAX="5.10" +NV_BIN_URI="https://download.nvidia.com/XFree86/Linux-" +NV_GIT_URI="https://github.com/NVIDIA/nvidia-" + +DESCRIPTION="NVIDIA Accelerated Graphics Driver" +HOMEPAGE="https://www.nvidia.com/download/index.aspx" +SRC_URI=" + amd64? ( ${NV_BIN_URI}x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run ) + x86? ( ${NV_BIN_URI}x86/${PV}/NVIDIA-Linux-x86-${PV}.run ) + ${NV_GIT_URI}installer/archive/${PV}.tar.gz -> nvidia-installer-${PV}.tar.gz + ${NV_GIT_URI}modprobe/archive/${PV}.tar.gz -> nvidia-modprobe-${PV}.tar.gz + ${NV_GIT_URI}persistenced/archive/${PV}.tar.gz -> nvidia-persistenced-${PV}.tar.gz + ${NV_GIT_URI}settings/archive/${PV}.tar.gz -> nvidia-settings-${PV}.tar.gz + ${NV_GIT_URI}xconfig/archive/${PV}.tar.gz -> nvidia-xconfig-${PV}.tar.gz" +# nvidia-installer is unused but here for GPL-2's "distribute sources" +S="${WORKDIR}" + +LICENSE="GPL-2 MIT NVIDIA-r2" +SLOT="0/${PV%%.*}" +KEYWORDS="-* ~amd64 ~x86" +IUSE="+X +driver static-libs +tools" + +COMMON_DEPEND=" + acct-group/video + acct-user/nvpd + net-libs/libtirpc + tools? ( + dev-libs/atk + dev-libs/glib:2 + dev-libs/jansson + 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,${MULTILIB_USEDEP}] + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + )" +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=" + app-misc/pax-utils + virtual/pkgconfig" + +QA_PREBUILT="opt/* usr/lib*" + +CONFIG_CHECK=" + ~DRM_KMS_HELPER + ~SYSVIPC + ~!AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT + ~!LOCKDEP + !DEBUG_MUTEXES" +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. + Cannot be directly selected in the kernel's menuconfig, so enable + options such as CONFIG_DRM_FBDEV_EMULATION instead. + 390.xx branch: also used by a GLX workaround needed for OpenGL." + +PATCHES=( + "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch + "${FILESDIR}"/nvidia-settings-390.141-fno-common.patch +) +DOCS=( + README.txt NVIDIA_Changelog + nvidia-settings/doc/{FRAMELOCK,NV-CONTROL-API}.txt +) +HTML_DOCS=( html/. ) + +pkg_setup() { + use driver || return + BUILD_PARAMS='NV_VERBOSE=1 IGNORE_CC_MISMATCH=yes SYSSRC="${KV_DIR}" SYSOUT="${KV_OUT_DIR}"' + use x86 && BUILD_PARAMS+=' ARCH=i386' # needed for recognition + BUILD_TARGETS="modules" # defaults' clean sometimes deletes modules + MODULE_NAMES=" + nvidia(video:kernel) + nvidia-drm(video:kernel) + nvidia-modeset(video:kernel)" + use amd64 && MODULE_NAMES+=" nvidia-uvm(video:kernel)" # no x86 support + linux-mod_pkg_setup + + if [[ ${MERGE_TYPE} != binary ]] && kernel_is gt ${NV_KERNEL_MAX/./ }; then + ewarn "Kernel ${KV_MAJOR}.${KV_MINOR} is either known to break this version of nvidia-drivers" + ewarn "or was not tested with it. It is recommended to use one of:" + ewarn " <=sys-kernel/gentoo-kernel-${NV_KERNEL_MAX}" + ewarn " <=sys-kernel/gentoo-sources-${NV_KERNEL_MAX}" + 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 + ewarn "Do _not_ file a bug report if run into issues." + ewarn + fi +} + +src_prepare() { + # make user 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)/' \ + -i kernel/conftest.sh || die + + sed -e '/Exec=\|Icon=/s/_.*/nvidia-settings/' \ + -e '/Categories=/s/_.*/System;Settings;/' \ + -i nvidia-settings/doc/nvidia-settings.desktop || die + + # remove gtk2 support (bug #592730) + sed '/^GTK2LIB = /d;/INSTALL.*GTK2LIB/,+1d' \ + -i nvidia-settings/src/Makefile || die + + sed 's/__USER__/nvpd/' \ + nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ + > nvidia-persistenced.service || die + + sed 's/__NV_VK_ICD__/libGLX_nvidia.so.0/' \ + nvidia_icd.json.template > nvidia_icd.json || die + + sed "s/%LIBDIR%/$(get_libdir)/g" "${FILESDIR}/nvidia-390.conf" \ + > nvidia-drm-outputclass.conf || die + + gzip -d nvidia-{cuda-mps-control,smi}.1.gz || die +} + +nvidia-drivers_make() { + emake -C nvidia-${1} ${2} \ + DESTDIR="${ED}" PREFIX=/usr LIBDIR="${ED}/usr/$(get_libdir)" \ + HOST_CC="$(tc-getBUILD_CC)" HOST_LD="$(tc-getBUILD_LD)" \ + DO_STRIP= MANPAGE_GZIP= \ + NV_USE_BUNDLED_LIBJANSSON=0 NV_VERBOSE=1 OUTPUTDIR=out +} + +src_compile() { + tc-export AR CC LD OBJCOPY + # may no longer be relevant but kept as a safety + export DISTCC_DISABLE=1 CCACHE_DISABLE=1 + + use driver && linux-mod_src_compile + + # 390.xx persistenced doesn't auto-detect libtirpc + LIBS=$($(tc-getPKG_CONFIG) --libs libtirpc) \ + common_cflags=$($(tc-getPKG_CONFIG) --cflags libtirpc) \ + nvidia-drivers_make persistenced + + nvidia-drivers_make modprobe + use X && nvidia-drivers_make xconfig + + if use tools; then + nvidia-drivers_make settings + elif use static-libs; then + nvidia-drivers_make settings/src build-xnvctrl + fi +} + +nvidia-drivers_libs_install() { + local libs=( + EGL_nvidia + GLESv1_CM_nvidia + GLESv2_nvidia + cuda + nvcuvid + nvidia-compiler + nvidia-eglcore + nvidia-encode + nvidia-fatbinaryloader + nvidia-glcore + nvidia-glsi + nvidia-ml + nvidia-opencl + nvidia-ptxjitcompiler + nvidia-tls + ) + + if use X; then + libs+=( + GLX_nvidia + nvidia-fbc + nvidia-ifr + vdpau_nvidia + ) + fi + + local libdir=. + if multilib_is_native_abi; then + libs+=( + nvidia-cfg + nvidia-wfb + ) + else + libdir+=/32 + fi + + local lib soname + for lib in "${libs[@]}"; do + [[ ${lib:0:3} != lib ]] && lib=lib${lib}.so.${PV} + + # auto-detect soname and create appropriate symlinks + soname=$(scanelf -qF'%S#F' "${lib}") || die "Scanning ${lib} failed" + if [[ ${soname} && ${soname} != ${lib} ]]; then + ln -s ${lib} ${libdir}/${soname} || die + fi + ln -s ${lib} ${libdir}/${lib%.so*}.so || die + + dolib.so ${libdir}/${lib%.so*}* + done +} + +src_install() { + if use driver; then + linux-mod_src_install + + insinto /etc/modprobe.d + newins "${FILESDIR}"/nvidia-169.07 nvidia.conf + doins "${FILESDIR}"/nvidia-blacklist-nouveau.conf + doins "${FILESDIR}"/nvidia-rmmod.conf + fi + + if use X; then + exeinto /usr/$(get_libdir)/xorg/modules/drivers + doexe nvidia_drv.so + + # 390 has legacy glx needing a modified .conf (bug #713546) + exeinto /usr/$(get_libdir)/extensions/nvidia + newexe libglx.so{.${PV},} + insinto /usr/share/X11/xorg.conf.d + newins {,50-}nvidia-drm-outputclass.conf + + # vulkan icd uses libGLX_nvidia.so and so requires X + insinto /usr/share/vulkan/icd.d + doins nvidia_icd.json + fi + + insinto /usr/share/glvnd/egl_vendor.d + doins 10_nvidia.json + + insinto /etc/OpenCL/vendors + doins nvidia.icd + + insinto /etc/nvidia + newins nvidia-application-profiles{-${PV},}-rc + + # install built helpers + nvidia-drivers_make modprobe install + # allow video group to load mods and create devs (bug #505092) + fowners root:video /usr/bin/nvidia-modprobe + fperms 4710 /usr/bin/nvidia-modprobe + + nvidia-drivers_make persistenced install + newconfd "${FILESDIR}/nvidia-persistenced.confd" nvidia-persistenced + newinitd "${FILESDIR}/nvidia-persistenced.initd" nvidia-persistenced + systemd_dounit nvidia-persistenced.service + + use X && nvidia-drivers_make xconfig install + + if use tools; then + nvidia-drivers_make settings install + doicon nvidia-settings/doc/nvidia-settings.png + domenu nvidia-settings/doc/nvidia-settings.desktop + + insinto /usr/share/nvidia + newins nvidia-application-profiles{-${PV},}-key-documentation + + 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/libXNVCtrl/libXNVCtrl.a + + insinto /usr/include/NVCtrl + doins nvidia-settings/src/libXNVCtrl/NVCtrl{Lib,}.h + fi + + # install prebuilt-only helpers + exeinto /opt/bin + + doexe nvidia-cuda-mps-control + doman nvidia-cuda-mps-control.1 + doexe nvidia-cuda-mps-server + + doexe nvidia-debugdump + dobin nvidia-bug-report.sh + + doexe nvidia-smi + doman nvidia-smi.1 + + # install prebuilt-only libraries + mv tls/* . || die # alternate tls lib needed for libglx.so + multilib_foreach_abi nvidia-drivers_libs_install + + einstalldocs +} + +pkg_preinst() { + use driver || return + linux-mod_pkg_preinst + + # set video group id based on live system (bug #491414) + local g=$(getent group video | cut -d: -f3) + [[ ${g} ]] || die "Failed to determine video group id" + sed "s/PACKAGE/${PF}/;s/VIDEOGID/${g}/" \ + -i "${ED}"/etc/modprobe.d/nvidia.conf || die +} + +pkg_postinst() { + use driver && linux-mod_pkg_postinst + + optfeature "wayland EGLStream with nvidia-drm.modeset=1" gui-libs/egl-wayland + + if [[ -r /proc/driver/nvidia/version && + $(grep -o ' [0-9.]* ' /proc/driver/nvidia/version) != " ${PV} " ]]; then + ewarn "Currently loaded NVIDIA modules do not match the newly installed" + ewarn "libraries and will lead to GPU-using application issues." + use driver && ewarn "The easiest way to fix this is to reboot." + fi + + if ! [[ ${REPLACING_VERSIONS} && $(getent group video | cut -d: -f4) ]]; then + elog "***** WARNING *****" + elog "Users should be in the 'video' group to use NVIDIA devices." + elog "You can add yourself by using: gpasswd -a myuser video" + fi + + if [[ ! ${REPLACING_VERSIONS} ]]; then + if use x86; then + elog "Note that NVIDIA is no longer offering support for the unified memory" + elog "module (nvidia-uvm) on x86 (32bit), as such the module was not built." + elog "This means OpenCL/CUDA (and related, like nvenc) cannot be used." + elog "Other functions, like OpenGL, will continue to work." + elog + fi + elog "For general information with using NVIDIA on Gentoo, please see:" + elog "https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers" + fi +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-450.102.04-r1.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-450.102.04-r1.ebuild new file mode 100644 index 000000000000..d28ef6effc7b --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-450.102.04-r1.ebuild @@ -0,0 +1,391 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MODULES_OPTIONAL_USE="driver" +inherit desktop linux-info linux-mod multilib-build \ + optfeature systemd toolchain-funcs unpacker + +NV_KERNEL_MAX="5.10" +NV_BIN_URI="https://download.nvidia.com/XFree86/Linux-" +NV_GIT_URI="https://github.com/NVIDIA/nvidia-" + +DESCRIPTION="NVIDIA Accelerated Graphics Driver" +HOMEPAGE="https://www.nvidia.com/download/index.aspx" +SRC_URI=" + amd64? ( ${NV_BIN_URI}x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run ) + arm64? ( ${NV_BIN_URI}aarch64/${PV}/NVIDIA-Linux-aarch64-${PV}.run ) + ${NV_GIT_URI}installer/archive/${PV}.tar.gz -> nvidia-installer-${PV}.tar.gz + ${NV_GIT_URI}modprobe/archive/${PV}.tar.gz -> nvidia-modprobe-${PV}.tar.gz + ${NV_GIT_URI}persistenced/archive/${PV}.tar.gz -> nvidia-persistenced-${PV}.tar.gz + ${NV_GIT_URI}settings/archive/${PV}.tar.gz -> nvidia-settings-${PV}.tar.gz + ${NV_GIT_URI}xconfig/archive/${PV}.tar.gz -> nvidia-xconfig-${PV}.tar.gz" +# nvidia-installer is unused but here for GPL-2's "distribute sources" +S="${WORKDIR}" + +LICENSE="GPL-2 MIT NVIDIA-r2 ZLIB" +SLOT="0/${PV%%.*}" +KEYWORDS="-* ~amd64" +IUSE="+X +driver static-libs +tools" + +COMMON_DEPEND=" + acct-group/video + acct-user/nvpd + net-libs/libtirpc + tools? ( + dev-libs/atk + dev-libs/glib:2 + dev-libs/jansson + 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,${MULTILIB_USEDEP}] + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + )" +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=" + app-misc/pax-utils + virtual/pkgconfig" + +QA_PREBUILT="opt/* usr/lib*" + +CONFIG_CHECK=" + ~DRM_KMS_HELPER + ~SYSVIPC + ~!AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT + ~!LOCKDEP + !DEBUG_MUTEXES" +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. + Cannot be directly selected in the kernel's menuconfig, so enable + options such as CONFIG_DRM_FBDEV_EMULATION instead." + +PATCHES=( + "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch +) +DOCS=( + README.txt NVIDIA_Changelog supported-gpus.json + nvidia-settings/doc/{FRAMELOCK,NV-CONTROL-API}.txt +) +HTML_DOCS=( html/. ) + +pkg_setup() { + use driver || return + BUILD_PARAMS='NV_VERBOSE=1 IGNORE_CC_MISMATCH=yes SYSSRC="${KV_DIR}" SYSOUT="${KV_OUT_DIR}"' + BUILD_TARGETS="modules" # defaults' clean sometimes deletes modules + MODULE_NAMES=" + nvidia(video:kernel) + nvidia-drm(video:kernel) + nvidia-modeset(video:kernel) + nvidia-uvm(video:kernel)" + linux-mod_pkg_setup + + if [[ ${MERGE_TYPE} != binary ]] && kernel_is gt ${NV_KERNEL_MAX/./ }; then + ewarn "Kernel ${KV_MAJOR}.${KV_MINOR} is either known to break this version of nvidia-drivers" + ewarn "or was not tested with it. It is recommended to use one of:" + ewarn " <=sys-kernel/gentoo-kernel-${NV_KERNEL_MAX}" + ewarn " <=sys-kernel/gentoo-sources-${NV_KERNEL_MAX}" + 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 + ewarn "Do _not_ file a bug report if run into issues." + ewarn + fi +} + +src_prepare() { + # make user 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)/' \ + -i kernel/conftest.sh || die + + sed -e '/Exec=\|Icon=/s/_.*/nvidia-settings/' \ + -e '/Categories=/s/_.*/System;Settings;/' \ + -i nvidia-settings/doc/nvidia-settings.desktop || die + + # remove gtk2 support (bug #592730) + sed '/^GTK2LIB = /d;/INSTALL.*GTK2LIB/,+1d' \ + -i nvidia-settings/src/Makefile || die + + sed 's/__USER__/nvpd/' \ + nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ + > nvidia-persistenced.service || die + + gzip -d nvidia-{cuda-mps-control,smi}.1.gz || die +} + +nvidia-drivers_make() { + emake -C nvidia-${1} ${2} \ + DESTDIR="${ED}" PREFIX=/usr LIBDIR="${ED}/usr/$(get_libdir)" \ + HOST_CC="$(tc-getBUILD_CC)" HOST_LD="$(tc-getBUILD_LD)" \ + DO_STRIP= MANPAGE_GZIP= \ + NV_USE_BUNDLED_LIBJANSSON=0 NV_VERBOSE=1 OUTPUTDIR=out +} + +src_compile() { + tc-export AR CC LD OBJCOPY + # may no longer be relevant but kept as a safety + export DISTCC_DISABLE=1 CCACHE_DISABLE=1 + + use driver && linux-mod_src_compile + + nvidia-drivers_make modprobe + nvidia-drivers_make persistenced + use X && nvidia-drivers_make xconfig + + if use tools; then + nvidia-drivers_make settings + elif use static-libs; then + nvidia-drivers_make settings/src out/libXNVCtrl.a + fi +} + +nvidia-drivers_libs_install() { + local libs=( + EGL_nvidia + GLESv1_CM_nvidia + GLESv2_nvidia + cuda + nvcuvid + nvidia-allocator + nvidia-eglcore + nvidia-encode + nvidia-glcore + nvidia-glsi + nvidia-glvkspirv + nvidia-ml + nvidia-opencl + nvidia-opticalflow + nvidia-ptxjitcompiler + nvidia-tls + ) + use amd64 && libs+=( nvidia-compiler ) + + if use X; then + libs+=( + GLX_nvidia + vdpau_nvidia + ) + if use amd64; then + libs+=( + nvidia-fbc + nvidia-ifr + ) + fi + fi + + local libdir=. + if multilib_is_native_abi; then + libs+=( + nvidia-cbl + nvidia-cfg + nvidia-rtcore + nvoptix + ) + use amd64 && libs+=( nvidia-ngx ) + else + libdir+=/32 + fi + + local lib soname + for lib in "${libs[@]}"; do + [[ ${lib:0:3} != lib ]] && lib=lib${lib}.so.${PV} + + # auto-detect soname and create appropriate symlinks + soname=$(scanelf -qF'%S#F' "${lib}") || die "Scanning ${lib} failed" + if [[ ${soname} && ${soname} != ${lib} ]]; then + ln -s ${lib} ${libdir}/${soname} || die + fi + ln -s ${lib} ${libdir}/${lib%.so*}.so || die + + dolib.so ${libdir}/${lib%.so*}* + done +} + +src_install() { + if use driver; then + linux-mod_src_install + + insinto /etc/modprobe.d + newins "${FILESDIR}"/nvidia-430.conf nvidia.conf + doins "${FILESDIR}"/nvidia-blacklist-nouveau.conf + doins "${FILESDIR}"/nvidia-rmmod.conf + + # used for gpu verification with binpkgs (not kept) + insinto /usr/share/nvidia + doins supported-gpus.json + fi + + if use X; then + exeinto /usr/$(get_libdir)/xorg/modules/drivers + doexe nvidia_drv.so + + exeinto /usr/$(get_libdir)/xorg/modules/extensions + newexe libglxserver_nvidia.so{.${PV},} + + insinto /usr/share/X11/xorg.conf.d + newins {,50-}nvidia-drm-outputclass.conf + + # vulkan icd uses libGLX_nvidia.so and so requires X + insinto /usr/share/vulkan/icd.d + doins nvidia_icd.json + insinto /usr/share/vulkan/implicit_layer.d + doins nvidia_layers.json + fi + + insinto /usr/share/glvnd/egl_vendor.d + doins 10_nvidia.json + + insinto /etc/OpenCL/vendors + doins nvidia.icd + + insinto /etc/nvidia + newins nvidia-application-profiles{-${PV},}-rc + + # install built helpers + nvidia-drivers_make modprobe install + # allow video group to load mods and create devs (bug #505092) + fowners root:video /usr/bin/nvidia-modprobe + fperms 4710 /usr/bin/nvidia-modprobe + + nvidia-drivers_make persistenced install + newconfd "${FILESDIR}/nvidia-persistenced.confd" nvidia-persistenced + newinitd "${FILESDIR}/nvidia-persistenced.initd" nvidia-persistenced + systemd_dounit nvidia-persistenced.service + + use X && nvidia-drivers_make xconfig install + + if use tools; then + nvidia-drivers_make settings install + doicon nvidia-settings/doc/nvidia-settings.png + domenu nvidia-settings/doc/nvidia-settings.desktop + + insinto /usr/share/nvidia + newins nvidia-application-profiles{-${PV},}-key-documentation + + 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 + + # install prebuilt-only helpers + exeinto /opt/bin + + doexe nvidia-cuda-mps-control + doman nvidia-cuda-mps-control.1 + doexe nvidia-cuda-mps-server + + doexe nvidia-debugdump + dobin nvidia-bug-report.sh + + doexe nvidia-smi + doman nvidia-smi.1 + + # install prebuilt-only libraries + multilib_foreach_abi nvidia-drivers_libs_install + + exeinto /lib/systemd/system-sleep + doexe nvidia + dobin nvidia-sleep.sh + systemd_dounit *.service + + einstalldocs +} + +pkg_preinst() { + use driver || return + linux-mod_pkg_preinst + + # set video group id based on live system (bug #491414) + local g=$(getent group video | cut -d: -f3) + [[ ${g} ]] || die "Failed to determine video group id" + sed "s/PACKAGE/${PF}/;s/VIDEOGID/${g}/" \ + -i "${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 "\"$(<${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() { + use driver && linux-mod_pkg_postinst + + optfeature "wayland EGLStream with nvidia-drm.modeset=1" gui-libs/egl-wayland + + if [[ -r /proc/driver/nvidia/version && + $(grep -o ' [0-9.]* ' /proc/driver/nvidia/version) != " ${PV} " ]]; then + ewarn "Currently loaded NVIDIA modules do not match the newly installed" + ewarn "libraries and will lead to GPU-using application issues." + use driver && ewarn "The easiest way to fix this is to reboot." + fi + + if [[ ${NV_LEGACY_MASK} ]]; then + ewarn "***** WARNING *****" + ewarn "You are installing a version of nvidia-drivers 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 ! [[ ${REPLACING_VERSIONS} && $(getent group video | cut -d: -f4) ]]; then + elog "***** WARNING *****" + elog "Users should be in the 'video' group to use NVIDIA devices." + elog "You can add yourself by using: gpasswd -a myuser video" + fi + + if [[ ! ${REPLACING_VERSIONS} ]]; then + elog "For general information with using NVIDIA on Gentoo, please see:" + elog "https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers" + fi +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-460.67.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-460.67.ebuild new file mode 100644 index 000000000000..e6d9570a2714 --- /dev/null +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-460.67.ebuild @@ -0,0 +1,391 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MODULES_OPTIONAL_USE="driver" +inherit desktop linux-info linux-mod multilib-build \ + optfeature systemd toolchain-funcs unpacker + +NV_KERNEL_MAX="5.11" +NV_BIN_URI="https://download.nvidia.com/XFree86/Linux-" +NV_GIT_URI="https://github.com/NVIDIA/nvidia-" + +DESCRIPTION="NVIDIA Accelerated Graphics Driver" +HOMEPAGE="https://www.nvidia.com/download/index.aspx" +SRC_URI=" + amd64? ( ${NV_BIN_URI}x86_64/${PV}/NVIDIA-Linux-x86_64-${PV}.run ) + arm64? ( ${NV_BIN_URI}aarch64/${PV}/NVIDIA-Linux-aarch64-${PV}.run ) + ${NV_GIT_URI}installer/archive/${PV}.tar.gz -> nvidia-installer-${PV}.tar.gz + ${NV_GIT_URI}modprobe/archive/${PV}.tar.gz -> nvidia-modprobe-${PV}.tar.gz + ${NV_GIT_URI}persistenced/archive/${PV}.tar.gz -> nvidia-persistenced-${PV}.tar.gz + ${NV_GIT_URI}settings/archive/${PV}.tar.gz -> nvidia-settings-${PV}.tar.gz + ${NV_GIT_URI}xconfig/archive/${PV}.tar.gz -> nvidia-xconfig-${PV}.tar.gz" +# nvidia-installer is unused but here for GPL-2's "distribute sources" +S="${WORKDIR}" + +LICENSE="GPL-2 MIT NVIDIA-r2 ZLIB" +SLOT="0/${PV%%.*}" +KEYWORDS="-* ~amd64" +IUSE="+X +driver static-libs +tools" + +COMMON_DEPEND=" + acct-group/video + acct-user/nvpd + net-libs/libtirpc + tools? ( + dev-libs/atk + dev-libs/glib:2 + dev-libs/jansson + 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,${MULTILIB_USEDEP}] + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + )" +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=" + app-misc/pax-utils + virtual/pkgconfig" + +QA_PREBUILT="opt/* usr/lib*" + +CONFIG_CHECK=" + ~DRM_KMS_HELPER + ~SYSVIPC + ~!AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT + ~!LOCKDEP + !DEBUG_MUTEXES" +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. + Cannot be directly selected in the kernel's menuconfig, so enable + options such as CONFIG_DRM_FBDEV_EMULATION instead." + +PATCHES=( + "${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch +) +DOCS=( + README.txt NVIDIA_Changelog supported-gpus/supported-gpus.json + nvidia-settings/doc/{FRAMELOCK,NV-CONTROL-API}.txt +) +HTML_DOCS=( html/. ) + +pkg_setup() { + use driver || return + BUILD_PARAMS='NV_VERBOSE=1 IGNORE_CC_MISMATCH=yes SYSSRC="${KV_DIR}" SYSOUT="${KV_OUT_DIR}"' + BUILD_TARGETS="modules" # defaults' clean sometimes deletes modules + MODULE_NAMES=" + nvidia(video:kernel) + nvidia-drm(video:kernel) + nvidia-modeset(video:kernel) + nvidia-uvm(video:kernel)" + linux-mod_pkg_setup + + if [[ ${MERGE_TYPE} != binary ]] && kernel_is gt ${NV_KERNEL_MAX/./ }; then + ewarn "Kernel ${KV_MAJOR}.${KV_MINOR} is either known to break this version of nvidia-drivers" + ewarn "or was not tested with it. It is recommended to use one of:" + ewarn " <=sys-kernel/gentoo-kernel-${NV_KERNEL_MAX}" + ewarn " <=sys-kernel/gentoo-sources-${NV_KERNEL_MAX}" + 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 + ewarn "Do _not_ file a bug report if run into issues." + ewarn + fi +} + +src_prepare() { + # make user 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)/' \ + -i kernel/conftest.sh || die + + sed -e '/Exec=\|Icon=/s/_.*/nvidia-settings/' \ + -e '/Categories=/s/_.*/System;Settings;/' \ + -i nvidia-settings/doc/nvidia-settings.desktop || die + + # remove gtk2 support (bug #592730) + sed '/^GTK2LIB = /d;/INSTALL.*GTK2LIB/,+1d' \ + -i nvidia-settings/src/Makefile || die + + sed 's/__USER__/nvpd/' \ + nvidia-persistenced/init/systemd/nvidia-persistenced.service.template \ + > nvidia-persistenced.service || die + + gzip -d nvidia-{cuda-mps-control,smi}.1.gz || die +} + +nvidia-drivers_make() { + emake -C nvidia-${1} ${2} \ + DESTDIR="${ED}" PREFIX=/usr LIBDIR="${ED}/usr/$(get_libdir)" \ + HOST_CC="$(tc-getBUILD_CC)" HOST_LD="$(tc-getBUILD_LD)" \ + DO_STRIP= MANPAGE_GZIP= \ + NV_USE_BUNDLED_LIBJANSSON=0 NV_VERBOSE=1 OUTPUTDIR=out +} + +src_compile() { + tc-export AR CC LD OBJCOPY + # may no longer be relevant but kept as a safety + export DISTCC_DISABLE=1 CCACHE_DISABLE=1 + + use driver && linux-mod_src_compile + + nvidia-drivers_make modprobe + nvidia-drivers_make persistenced + use X && nvidia-drivers_make xconfig + + if use tools; then + nvidia-drivers_make settings + elif use static-libs; then + nvidia-drivers_make settings/src out/libXNVCtrl.a + fi +} + +nvidia-drivers_libs_install() { + local libs=( + EGL_nvidia + GLESv1_CM_nvidia + GLESv2_nvidia + cuda + nvcuvid + nvidia-allocator + nvidia-eglcore + nvidia-encode + nvidia-glcore + nvidia-glsi + nvidia-glvkspirv + nvidia-ml + nvidia-opencl + nvidia-opticalflow + nvidia-ptxjitcompiler + nvidia-tls + ) + use amd64 && libs+=( nvidia-compiler ) + + if use X; then + libs+=( + GLX_nvidia + vdpau_nvidia + ) + if use amd64; then + libs+=( + nvidia-fbc + nvidia-ifr + ) + fi + fi + + local libdir=. + if multilib_is_native_abi; then + libs+=( + nvidia-cbl + nvidia-cfg + nvidia-rtcore + nvoptix + ) + use amd64 && libs+=( nvidia-ngx ) + else + libdir+=/32 + fi + + local lib soname + for lib in "${libs[@]}"; do + [[ ${lib:0:3} != lib ]] && lib=lib${lib}.so.${PV} + + # auto-detect soname and create appropriate symlinks + soname=$(scanelf -qF'%S#F' "${lib}") || die "Scanning ${lib} failed" + if [[ ${soname} && ${soname} != ${lib} ]]; then + ln -s ${lib} ${libdir}/${soname} || die + fi + ln -s ${lib} ${libdir}/${lib%.so*}.so || die + + dolib.so ${libdir}/${lib%.so*}* + done +} + +src_install() { + if use driver; then + linux-mod_src_install + + insinto /etc/modprobe.d + newins "${FILESDIR}"/nvidia-460.conf nvidia.conf + doins "${FILESDIR}"/nvidia-blacklist-nouveau.conf + doins "${FILESDIR}"/nvidia-rmmod.conf + + # used for gpu verification with binpkgs (not kept) + insinto /usr/share/nvidia + doins supported-gpus/supported-gpus.json + fi + + if use X; then + exeinto /usr/$(get_libdir)/xorg/modules/drivers + doexe nvidia_drv.so + + exeinto /usr/$(get_libdir)/xorg/modules/extensions + newexe libglxserver_nvidia.so{.${PV},} + + insinto /usr/share/X11/xorg.conf.d + newins {,50-}nvidia-drm-outputclass.conf + + # vulkan icd uses libGLX_nvidia.so and so requires X + insinto /usr/share/vulkan/icd.d + doins nvidia_icd.json + insinto /usr/share/vulkan/implicit_layer.d + doins nvidia_layers.json + fi + + insinto /usr/share/glvnd/egl_vendor.d + doins 10_nvidia.json + + insinto /etc/OpenCL/vendors + doins nvidia.icd + + insinto /etc/nvidia + newins nvidia-application-profiles{-${PV},}-rc + + # install built helpers + nvidia-drivers_make modprobe install + # allow video group to load mods and create devs (bug #505092) + fowners root:video /usr/bin/nvidia-modprobe + fperms 4710 /usr/bin/nvidia-modprobe + + nvidia-drivers_make persistenced install + newconfd "${FILESDIR}/nvidia-persistenced.confd" nvidia-persistenced + newinitd "${FILESDIR}/nvidia-persistenced.initd" nvidia-persistenced + systemd_dounit nvidia-persistenced.service + + use X && nvidia-drivers_make xconfig install + + if use tools; then + nvidia-drivers_make settings install + doicon nvidia-settings/doc/nvidia-settings.png + domenu nvidia-settings/doc/nvidia-settings.desktop + + insinto /usr/share/nvidia + newins nvidia-application-profiles{-${PV},}-key-documentation + + 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 + + # install prebuilt-only helpers + exeinto /opt/bin + + doexe nvidia-cuda-mps-control + doman nvidia-cuda-mps-control.1 + doexe nvidia-cuda-mps-server + + doexe nvidia-debugdump + dobin nvidia-bug-report.sh + + doexe nvidia-smi + doman nvidia-smi.1 + + # install prebuilt-only libraries + multilib_foreach_abi nvidia-drivers_libs_install + + exeinto /lib/systemd/system-sleep + doexe nvidia + dobin nvidia-sleep.sh + systemd_dounit *.service + + einstalldocs +} + +pkg_preinst() { + use driver || return + linux-mod_pkg_preinst + + # set video group id based on live system (bug #491414) + local g=$(getent group video | cut -d: -f3) + [[ ${g} ]] || die "Failed to determine video group id" + sed "s/PACKAGE/${PF}/;s/VIDEOGID/${g}/" \ + -i "${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 "\"$(<${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() { + use driver && linux-mod_pkg_postinst + + optfeature "wayland EGLStream with nvidia-drm.modeset=1" gui-libs/egl-wayland + + if [[ -r /proc/driver/nvidia/version && + $(grep -o ' [0-9.]* ' /proc/driver/nvidia/version) != " ${PV} " ]]; then + ewarn "Currently loaded NVIDIA modules do not match the newly installed" + ewarn "libraries and will lead to GPU-using application issues." + use driver && ewarn "The easiest way to fix this is to reboot." + fi + + if [[ ${NV_LEGACY_MASK} ]]; then + ewarn "***** WARNING *****" + ewarn "You are installing a version of nvidia-drivers 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 ! [[ ${REPLACING_VERSIONS} && $(getent group video | cut -d: -f4) ]]; then + elog "***** WARNING *****" + elog "Users should be in the 'video' group to use NVIDIA devices." + elog "You can add yourself by using: gpasswd -a myuser video" + fi + + if [[ ! ${REPLACING_VERSIONS} ]]; then + elog "For general information with using NVIDIA on Gentoo, please see:" + elog "https://wiki.gentoo.org/wiki/NVIDIA/nvidia-drivers" + fi +} |